hacktools 0.35.0__tar.gz → 0.35.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hacktools-0.35.0/hacktools.egg-info → hacktools-0.35.2}/PKG-INFO +1 -1
- hacktools-0.35.2/hacktools/__init__.py +1 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/common.py +2 -2
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/nds.py +1 -1
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/psp.py +22 -2
- {hacktools-0.35.0 → hacktools-0.35.2/hacktools.egg-info}/PKG-INFO +1 -1
- hacktools-0.35.0/hacktools/__init__.py +0 -1
- {hacktools-0.35.0 → hacktools-0.35.2}/LICENSE +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/MANIFEST.in +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/README.md +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/arch.py +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/assets/icon.png +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/c_ext/cmp_cri.c +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/c_ext/cmp_lzss.c +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/c_ext/cmp_misc.c +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/c_ext/cmp_racjin.c +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/c_ext/inc.h +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/compression.py +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/cpk.py +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/gb.py +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/gui.py +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/nasm.py +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/nitro.py +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/psx.py +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/wii.py +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools/ws.py +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools.egg-info/SOURCES.txt +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools.egg-info/dependency_links.txt +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools.egg-info/requires.txt +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/hacktools.egg-info/top_level.txt +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/setup.cfg +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/setup.py +0 -0
- {hacktools-0.35.0 → hacktools-0.35.2}/tests/test_cmp.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.35.2"
|
|
@@ -430,7 +430,7 @@ if hasClick:
|
|
|
430
430
|
runGUI()
|
|
431
431
|
|
|
432
432
|
|
|
433
|
-
def runStartup(
|
|
433
|
+
def runStartup():
|
|
434
434
|
if datafolder != "" and not os.path.isdir(datafolder):
|
|
435
435
|
makeFolder(datafolder)
|
|
436
436
|
if appname != "":
|
|
@@ -441,7 +441,7 @@ if hasClick:
|
|
|
441
441
|
if filecheck != "" and not os.path.isfile(filecheck):
|
|
442
442
|
logError(filecheck, "file not found.")
|
|
443
443
|
return False
|
|
444
|
-
if crc >= 0 and not
|
|
444
|
+
if crc >= 0 and not os.path.isfile(".skipcrc"):
|
|
445
445
|
checkcrc = crcFile(filecheck)
|
|
446
446
|
if crc != checkcrc:
|
|
447
447
|
logMessage("Checksum mismatch for", filecheck, "(" + toHex(checkcrc) + ", expected", toHex(crc) + ")")
|
|
@@ -230,7 +230,7 @@ def expandBIN(binin, binout, headerin, headerout, newlengths, injectpos):
|
|
|
230
230
|
datastart += size
|
|
231
231
|
# Write the new extended arm9.bin
|
|
232
232
|
for i in range(len(newlengths)):
|
|
233
|
-
sections.append(BINSection(None, injectpos[i], newlengths[i], 0, 0
|
|
233
|
+
sections.append(BINSection(None, injectpos[i], newlengths[i], 0, 0))
|
|
234
234
|
with common.Stream(binout, "wb") as f:
|
|
235
235
|
# Write the section data first
|
|
236
236
|
f.write(sections[0].data)
|
|
@@ -31,7 +31,7 @@ def extractIso(isofile, extractfolder, workfolder="", fixfilename=False):
|
|
|
31
31
|
common.logMessage("Done!")
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
def repackIso(isofile, isopatch, workfolder, patchfile="", fixfilename=False):
|
|
34
|
+
def repackIso(isofile, isopatch, workfolder, patchfile="", fixfilename=False, udf=False, ignorefiles=[]):
|
|
35
35
|
try:
|
|
36
36
|
import pycdlib
|
|
37
37
|
except ImportError:
|
|
@@ -41,11 +41,31 @@ def repackIso(isofile, isopatch, workfolder, patchfile="", fixfilename=False):
|
|
|
41
41
|
common.copyFile(isofile, isopatch)
|
|
42
42
|
iso = pycdlib.PyCdlib()
|
|
43
43
|
iso.open(isopatch, "r+b")
|
|
44
|
+
udflookup = {}
|
|
45
|
+
if udf:
|
|
46
|
+
for dirname, dirlist, filelist in iso.walk(udf_path="/"):
|
|
47
|
+
if dirname != "/":
|
|
48
|
+
dirname += "/"
|
|
49
|
+
common.logDebug("Dirname:", dirname, ", Dirlist:", dirlist, ", Filelist:", filelist)
|
|
50
|
+
for file in filelist:
|
|
51
|
+
udflookup[dirname[1:].lower() + file.lower()] = dirname[1:] + file
|
|
52
|
+
common.logDebug(udflookup)
|
|
44
53
|
files = common.getFiles(workfolder)
|
|
45
54
|
for file in common.showProgress(files):
|
|
46
55
|
filelen = os.path.getsize(workfolder + file)
|
|
47
56
|
with open(workfolder + file, "rb") as f:
|
|
48
|
-
|
|
57
|
+
udfpath = None
|
|
58
|
+
if udf:
|
|
59
|
+
if file.lower() not in udflookup:
|
|
60
|
+
common.logError("UDF lookup not found:", file)
|
|
61
|
+
udfpath = "/" + file
|
|
62
|
+
else:
|
|
63
|
+
udfpath = "/" + udflookup[file.lower()]
|
|
64
|
+
common.logDebug("UDF path:", udfpath)
|
|
65
|
+
# Add a . to files without extension
|
|
66
|
+
if "." not in file:
|
|
67
|
+
file += "."
|
|
68
|
+
iso.modify_file_in_place(f, filelen, "/" + file + (";1" if fixfilename else ""), udf_path=udfpath)
|
|
49
69
|
iso.close()
|
|
50
70
|
common.logMessage("Done!")
|
|
51
71
|
# Create xdelta patch
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.35.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|