reinstate build.bat
This commit is contained in:
2
build.bat
Normal file
2
build.bat
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
py -3 build.py
|
||||||
|
@echo %cmdcmdline%|find /i """%~f0""">nul && cmd /k
|
||||||
11
build.py
11
build.py
@@ -1,12 +1,8 @@
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
|
||||||
import sys
|
import sys
|
||||||
import typing
|
|
||||||
import functools
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
from asar import init as asar_init, close as asar_close, patch as asar_patch, geterrors as asar_errors
|
from asar import init as asar_init, close as asar_close, patch as asar_patch, geterrors as asar_errors
|
||||||
from yaml import load, dump
|
|
||||||
|
|
||||||
JAP10HASH = '03a63945398191337e896e5771f77173'
|
JAP10HASH = '03a63945398191337e896e5771f77173'
|
||||||
|
|
||||||
@@ -15,7 +11,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
from yaml import Loader
|
from yaml import Loader
|
||||||
|
|
||||||
import xml.etree.ElementTree as ET
|
|
||||||
|
|
||||||
def int16_as_bytes(value):
|
def int16_as_bytes(value):
|
||||||
value = value & 0xFFFF
|
value = value & 0xFFFF
|
||||||
@@ -27,10 +22,10 @@ def int32_as_bytes(value):
|
|||||||
return [value & 0xFF, (value >> 8) & 0xFF, (value >> 16) & 0xFF, (value >> 24) & 0xFF]
|
return [value & 0xFF, (value >> 8) & 0xFF, (value >> 16) & 0xFF, (value >> 24) & 0xFF]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def is_bundled():
|
def is_bundled():
|
||||||
return getattr(sys, 'frozen', False)
|
return getattr(sys, 'frozen', False)
|
||||||
|
|
||||||
|
|
||||||
def local_path(path):
|
def local_path(path):
|
||||||
if local_path.cached_path:
|
if local_path.cached_path:
|
||||||
return os.path.join(local_path.cached_path, path)
|
return os.path.join(local_path.cached_path, path)
|
||||||
@@ -49,8 +44,8 @@ def local_path(path):
|
|||||||
|
|
||||||
return os.path.join(local_path.cached_path, path)
|
return os.path.join(local_path.cached_path, path)
|
||||||
|
|
||||||
local_path.cached_path = None
|
|
||||||
|
|
||||||
|
local_path.cached_path = None
|
||||||
|
|
||||||
|
|
||||||
def make_new_base2current(old_rom_data, new_rom_data):
|
def make_new_base2current(old_rom_data, new_rom_data):
|
||||||
@@ -110,6 +105,4 @@ if __name__ == '__main__':
|
|||||||
except:
|
except:
|
||||||
import traceback
|
import traceback
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|
||||||
input("Press enter to close")
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user