freemyipod r410 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r409‎ | r410 | r411 >
Date:12:34, 4 January 2011
Author:theseven
Status:new
Tags:
Comment:
Installer: Fix "Installing files..." progress bar
Modified paths:
  • /apps/installer-classic/flashfiles (modified) (history)
  • /apps/installer-classic/tools/geninstaller.py (modified) (history)
  • /apps/installer-nano2g/tools/geninstaller.py (modified) (history)

Diff [purge]

Index: apps/installer-nano2g/tools/geninstaller.py
@@ -39,16 +39,15 @@
4040 ("embiosldr", 4, 8, 0, "embiosldr-ipodnano2g.dfu"), \
4141 ("embios", 4, 10, 0, "embios-ipodnano2g.ucl")]
4242
43 -firstinstfiles = [(2, "/iLoader/iLoader.cfg", "../iloader/themes/ipodnano2g-default/iLoader/iloader.cfg", 1), \
 43+firstinstfiles = [(2, "/iLoader/iLoader.cfg", "../iloader/themes/ipodnano2g-default-fastboot/iLoader/iloader.cfg", 1), \
4444 (1, "/iLoader/theme", 1), \
45 - (2, "/iLoader/theme/backdrop.ucl", "../iloader/themes/ipodnano2g-default/iLoader/theme/backdrop.ucl", 2), \
46 - (2, "/iLoader/theme/menu.ucl", "../iloader/themes/ipodnano2g-default/iLoader/theme/menu.ucl", 2), \
47 - (2, "/iLoader/theme/booting.ucl", "../iloader/themes/ipodnano2g-default/iLoader/theme/booting.ucl", 2), \
48 - (2, "/iLoader/theme/rockbox.ucl", "../iloader/themes/ipodnano2g-default/iLoader/theme/rockbox.ucl", 2), \
49 - (2, "/iLoader/theme/apple.ucl", "../iloader/themes/ipodnano2g-default/iLoader/theme/apple.ucl", 2)]
 45+ (2, "/iLoader/theme/backdrop.ucl", "../iloader/themes/ipodnano2g-default-fastboot/iLoader/theme/backdrop.ucl", 2), \
 46+ (2, "/iLoader/theme/menu.ucl", "../iloader/themes/ipodnano2g-default-fastboot/iLoader/theme/menu.ucl", 2), \
 47+ (2, "/iLoader/theme/booting.ucl", "../iloader/themes/ipodnano2g-default-fastboot/iLoader/theme/booting.ucl", 2), \
 48+ (2, "/iLoader/theme/rockbox.ucl", "../iloader/themes/ipodnano2g-default-fastboot/iLoader/theme/rockbox.ucl", 2), \
 49+ (2, "/iLoader/theme/apple.ucl", "../iloader/themes/ipodnano2g-default-fastboot/iLoader/theme/apple.ucl", 2)]
5050
51 -commonfiles = [(2, "/iLoader/NORFlash.bak", -2, 10), \
52 - (2, "/iLoader/AppleOS.bin", -1, 30)]
 51+commonfiles = [(2, "/iLoader/AppleOS.bin", -1, 30)]
5352
5453 if len(sys.argv) > 4 and sys.argv[4] != "-":
5554 pathlen = len(sys.argv[4])
@@ -156,7 +155,7 @@
157156 statuscommon = statuscommon + f[3]
158157
159158 script = flash + struct.pack("<IIII", 0, len(flash) + 16 + len(firstinstall), \
160 - statusfirst, statusfirst + statuscommon) \
 159+ statusfirst, statuscommon) \
161160 + firstinstall + common + struct.pack("<I", 0)
162161 file = open(sys.argv[2], "wb")
163162 file.write(installer + script.ljust(scriptsize) + filedata)
Index: apps/installer-classic/flashfiles
Property changes on: apps/installer-classic/flashfiles
___________________________________________________________________
Modified: svn:ignore
## -5,3 +5,4 ##
164163 iloader.cfg.ucl
165164 iloader.embiosapp.ucl
166165 umsboot-ipodclassic.ucl
 166+uninstaller-classic.embiosapp.ucl
Index: apps/installer-classic/tools/geninstaller.py
@@ -40,7 +40,7 @@
4141 (2, "/iLoader/iLoader.cfg", "../iloader/themes/ipodclassic-default/iLoader/iloader.cfg", 1), \
4242 (2, "/iLoader/theme.ucl", "../iloader/themes/ipodclassic-default/iLoader/theme.ucl", 2)]
4343
44 -commonfiles = [(2, "/iLoader/NORFlash.bak", -2, 10)]
 44+commonfiles = [(2, "/iLoader/NORFlash.bak", -2, 3)]
4545
4646 if len(sys.argv) > 4 and sys.argv[4] != "-":
4747 pathlen = len(sys.argv[4])
@@ -51,7 +51,7 @@
5252 firstinstfiles.append((1, prefix + dir, 1))
5353 for f in d[2]:
5454 if not prefix.find("/.svn/") > -1:
55 - firstinstfiles.append((2, prefix + f, d[0] + "/" + f, os.path.getsize(d[0] + "/" + f) / 100000 + 1))
 55+ firstinstfiles.append((2, prefix + f, d[0] + "/" + f, os.path.getsize(d[0] + "/" + f) / 500000 + 1))
5656
5757 file = open(sys.argv[1], "rb")
5858 installer = file.read()
@@ -139,7 +139,7 @@
140140 statuscommon = statuscommon + f[3]
141141
142142 script = flash + struct.pack("<IIII", 0, len(flash) + 16 + len(firstinstall), \
143 - statusfirst, statusfirst + statuscommon) \
 143+ statusfirst, statuscommon) \
144144 + firstinstall + common + struct.pack("<I", 0)
145145 file = open(sys.argv[2], "wb")
146146 file.write(installer + script.ljust(scriptsize, '\0') + filedata)