add custom icon designed by me (close #28), add script to build mac icns + windows ico, fix get_seed to read 4 bytes instead of 2 for seed_count, minor text changes, require appJar>=0.93

This commit is contained in:
Ian Burgwin 2018-11-29 17:04:58 -08:00
parent ea87d61107
commit cbbd3fbd1a
No known key found for this signature in database
GPG Key ID: 90725113CA578EAA
11 changed files with 41 additions and 10 deletions

View File

@ -7,4 +7,4 @@
__author__ = 'ihaveamac'
__copyright__ = 'Copyright (c) 2017-2018 Ian Burgwin'
__license__ = 'MIT'
__version__ = '1.3'
__version__ = '1.3.1.dev1'

View File

@ -250,6 +250,8 @@ if version_info[3] != 'final':
pybits = 64 if maxsize > 0xFFFFFFFF else 32
app = gui('fuse-3ds v' + version, showIcon=False, handleArgs=False)
if windows:
app.setIcon(pjoin(dirname(__file__), 'data', 'windows.ico'))
def run_mount(module_type: str, item: str, mountpoint: str, extra_args: list = ()):
@ -345,8 +347,8 @@ def press(button: str):
'fuse-3ds Warning',
'You chose drive letter when using the NAND mount.\n'
'\n'
'Using a directory mount over a drive letter for NAND is highly\n'
'recommended because some tools like OSFMount will not be\n'
'Using a directory mount over a drive letter for NAND is highly '
'recommended because some tools like OSFMount will not be '
'able to read from files in a mount using a drive letter.\n'
'\n'
'Are you sure you want to continue?'
@ -759,8 +761,8 @@ with app.frame('loading', row=1, colspan=3):
def show_unknowntype(path: str):
app.warningBox('fuse-3ds Error',
"The type of the given file couldn't be detected.\n"
"If you know it is a compatibile file, choose the \n"
"The type of the given file couldn't be detected."
"If you know it is a compatibile file, choose the "
"correct type and file an issue on GitHub if it works.\n\n"
+ path)
@ -1099,8 +1101,8 @@ with app.subWindow('unmounterror', 'fuse-3ds Error', modal=True, blocking=False)
app.addLabel('unmounterror-label', 'Failed to unmount. Please check the output.\n\n'
'You can kill the process if it is not responding.\n'
'This should be used as a last resort.'
'You can kill the process if it is not responding. '
'This should be used as a last resort. '
'The process should be unmounted normally.', colspan=2)
app.addNamedButton(OK, 'unmounterror-ok', unmount_ok)
app.addNamedButton('Kill process', 'unmounterror-kill', kill_process, row=PV, column=1)

BIN
fuse3ds/data/1024x1024.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 947 KiB

BIN
fuse3ds/data/128x128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
fuse3ds/data/16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
fuse3ds/data/32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
fuse3ds/data/64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
fuse3ds/data/windows.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@ -40,7 +40,7 @@ def get_seed(f: 'BinaryIO', program_id: int) -> bytes:
"""Get a seed in a seeddb.bin from an I/O stream."""
tid_bytes = program_id.to_bytes(0x8, 'little')
f.seek(0)
seed_count = readle(f.read(2))
seed_count = readle(f.read(4))
f.seek(0x10)
for _ in range(seed_count):
entry = f.read(0x20)

28
make_icons.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/sh
if [[ `uname -s` = Darwin ]]; then
mkdir build
rm -r build/fuse3ds.iconset
mkdir build/fuse3ds.iconset
cp fuse3ds/data/16x16.png build/fuse3ds.iconset/icon_16x16.png
cp fuse3ds/data/32x32.png build/fuse3ds.iconset/icon_16x16@2x.png
cp fuse3ds/data/32x32.png build/fuse3ds.iconset/icon_32x32.png
cp fuse3ds/data/64x64.png build/fuse3ds.iconset/icon_32x32@2x.png
cp fuse3ds/data/128x128.png build/fuse3ds.iconset/icon_128x128.png
cp fuse3ds/data/1024x1024.png build/fuse3ds.iconset/icon_512x512@2x.png
convert fuse3ds/data/1024x1024.png -resize 256x256 build/256x256_gen.png
convert fuse3ds/data/1024x1024.png -resize 512x512 build/512x512_gen.png
cp build/256x256_gen.png build/fuse3ds.iconset/icon_128x128@2x.png
cp build/256x256_gen.png build/fuse3ds.iconset/icon_256x256.png
cp build/512x512_gen.png build/fuse3ds.iconset/icon_256x256@2x.png
cp build/512x512_gen.png build/fuse3ds.iconset/icon_512x512.png
iconutil --convert icns --output build/AppIcon.icns build/fuse3ds.iconset
fi
cd fuse3ds/data
convert 1024x1024.png 128x128.png 64x64.png 32x32.png 16x16.png \
\( -clone 2 -resize 48x48 \) \
\( -clone 0 -resize 256x256 \) \
-delete 0 windows.ico

View File

@ -12,7 +12,7 @@ with open('README.md', 'r', encoding='utf-8') as f:
setup(
name='fuse-3ds',
version='1.3',
version='1.3.1.dev1',
packages=find_packages(),
url='https://github.com/ihaveamac/fuse-3ds',
license='MIT',
@ -21,6 +21,7 @@ setup(
description='FUSE Filesystem Python scripts for Nintendo 3DS files',
long_description=readme,
long_description_content_type='text/markdown',
package_data={'fuse3ds': ['*.ico']},
classifiers=[
'Topic :: Utilities',
'License :: OSI Approved :: MIT License',
@ -30,7 +31,7 @@ setup(
],
install_requires=['pycryptodomex'],
# fusepy should be added here once the main repo has a new release with Windows support.
extras_require={'gui': ['appJar']},
extras_require={'gui': ['appJar>=0.93']},
entry_points={'console_scripts': ['fuse3ds = fuse3ds.main:gui',
# not putting in gui_scripts since the cmd window is required and trying to
# remove it breaks some other stuff with subprocess management ?!?