hacktools 0.35.1__tar.gz → 0.36.0__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.
Files changed (33) hide show
  1. {hacktools-0.35.1/hacktools.egg-info → hacktools-0.36.0}/PKG-INFO +1 -1
  2. hacktools-0.36.0/hacktools/__init__.py +1 -0
  3. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/common.py +3 -4
  4. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/psp.py +22 -2
  5. {hacktools-0.35.1 → hacktools-0.36.0/hacktools.egg-info}/PKG-INFO +1 -1
  6. hacktools-0.35.1/hacktools/__init__.py +0 -1
  7. {hacktools-0.35.1 → hacktools-0.36.0}/LICENSE +0 -0
  8. {hacktools-0.35.1 → hacktools-0.36.0}/MANIFEST.in +0 -0
  9. {hacktools-0.35.1 → hacktools-0.36.0}/README.md +0 -0
  10. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/arch.py +0 -0
  11. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/assets/icon.png +0 -0
  12. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/c_ext/cmp_cri.c +0 -0
  13. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/c_ext/cmp_lzss.c +0 -0
  14. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/c_ext/cmp_misc.c +0 -0
  15. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/c_ext/cmp_racjin.c +0 -0
  16. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/c_ext/inc.h +0 -0
  17. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/compression.py +0 -0
  18. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/cpk.py +0 -0
  19. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/gb.py +0 -0
  20. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/gui.py +0 -0
  21. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/nasm.py +0 -0
  22. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/nds.py +0 -0
  23. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/nitro.py +0 -0
  24. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/psx.py +0 -0
  25. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/wii.py +0 -0
  26. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools/ws.py +0 -0
  27. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools.egg-info/SOURCES.txt +0 -0
  28. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools.egg-info/dependency_links.txt +0 -0
  29. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools.egg-info/requires.txt +0 -0
  30. {hacktools-0.35.1 → hacktools-0.36.0}/hacktools.egg-info/top_level.txt +0 -0
  31. {hacktools-0.35.1 → hacktools-0.36.0}/setup.cfg +0 -0
  32. {hacktools-0.35.1 → hacktools-0.36.0}/setup.py +0 -0
  33. {hacktools-0.35.1 → hacktools-0.36.0}/tests/test_cmp.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hacktools
3
- Version: 0.35.1
3
+ Version: 0.36.0
4
4
  Summary: A set of utilities and tools for rom hacking and translations.
5
5
  Home-page: https://github.com/Illidanz/hacktools
6
6
  Author: Illidan
@@ -0,0 +1 @@
1
+ __version__ = "0.36.0"
@@ -430,7 +430,7 @@ if hasClick:
430
430
  runGUI()
431
431
 
432
432
 
433
- def runStartup(nocrc=False):
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 nocrc:
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) + ")")
@@ -1163,8 +1163,7 @@ def copyFolder(f1, f2):
1163
1163
 
1164
1164
 
1165
1165
  def mergeFolder(f1, f2):
1166
- import distutils.dir_util
1167
- distutils.dir_util.copy_tree(f1, f2, verbose=0)
1166
+ shutil.copytree(f1, f2, dirs_exist_ok=True)
1168
1167
 
1169
1168
 
1170
1169
  def copyFile(f1, f2):
@@ -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
- iso.modify_file_in_place(f, filelen, "/" + file + (";1" if fixfilename and not file.endswith(".") else ""))
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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hacktools
3
- Version: 0.35.1
3
+ Version: 0.36.0
4
4
  Summary: A set of utilities and tools for rom hacking and translations.
5
5
  Home-page: https://github.com/Illidanz/hacktools
6
6
  Author: Illidan
@@ -1 +0,0 @@
1
- __version__ = "0.35.1"
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