diff options
author | Ash Wolf <ninji@wuffs.org> | 2018-04-24 00:33:01 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2018-04-24 00:33:01 +0100 |
commit | 27ede75d03699d774b217bda5d13dccc4750c428 (patch) | |
tree | 583b2c326823ecb3802517a43d1f6af0ccd263d7 | |
parent | d55debf80b417793ce924ec977ed3a16413fd5d6 (diff) | |
download | kamek-27ede75d03699d774b217bda5d13dccc4750c428.tar.gz kamek-27ede75d03699d774b217bda5d13dccc4750c428.zip |
couple of hacks to get this compiling on WSL
Diffstat (limited to '')
-rwxr-xr-x | makeNewerKP | 10 | ||||
-rw-r--r-- | tools/kamek.py | 15 |
2 files changed, 14 insertions, 11 deletions
diff --git a/makeNewerKP b/makeNewerKP index ea3a3f4..0a9d501 100755 --- a/makeNewerKP +++ b/makeNewerKP @@ -1,7 +1,7 @@ #!/bin/sh -cd /home/me/Games/Newer/Kamek +#cd /home/me/Games/Newer/Kamek python2 tools/mapfile_tool.py -python2 tools/kamek.py NewerProjectKP.yaml --no-rels --use-mw --use-wine --gcc-type=/opt/wiidev/bin/powerpc-elf --mw-path=tools --fast-hack +python2 tools/kamek.py NewerProjectKP.yaml --no-rels --use-mw --gcc-type=/mnt/c/devkitPro/devkitPPC/bin/powerpc-eabi --mw-path=tools --fast-hack if [ "$?" = "0" ]; then echo "compile successful" else @@ -9,9 +9,9 @@ else fi copy_files() { - cp NewerASM/n_$1_loader.bin ~/Games/Newer/NewerFinal2/files/NewerRes/System$2.bin - cp NewerASM/n_$1_dlcode.bin ~/Games/Newer/NewerFinal2/files/NewerRes/DLCode$2.bin - cp NewerASM/n_$1_dlrelocs.bin ~/Games/Newer/NewerFinal2/files/NewerRes/DLRelocs$2.bin + cp NewerASM/n_$1_loader.bin Build/System$2.bin + cp NewerASM/n_$1_dlcode.bin Build/DLCode$2.bin + cp NewerASM/n_$1_dlrelocs.bin Build/DLRelocs$2.bin } copy_files pal EU_1 diff --git a/tools/kamek.py b/tools/kamek.py index 72dfcb0..e23f57f 100644 --- a/tools/kamek.py +++ b/tools/kamek.py @@ -246,7 +246,8 @@ class KamekModule(object): # load the module data self.modulePath = os.path.normpath(filename) self.moduleName = os.path.basename(self.modulePath) - self.moduleDir = os.path.dirname(self.modulePath) + #self.moduleDir = os.path.dirname(self.modulePath) + self.moduleDir = 'processed' with open(self.modulePath, 'r') as f: self.rawData = f.read() @@ -279,7 +280,9 @@ class KamekBuilder(object): self._set_config(config) - self._configTempDir = tempfile.mkdtemp() + #self._configTempDir = tempfile.mkdtemp() + self._configTempDir = 'tmp' + os.mkdir('tmp') print_debug('Temp files for this configuration are in: '+self._configTempDir) if 'dynamic_link' in self._config and self._config['dynamic_link']: @@ -486,7 +489,7 @@ class KamekBuilder(object): outname = 'object.plf' if self.dynamic_link_base else 'object.bin' self._currentOutFile = '%s/%s_%s' % (self._outDir, nice_name, outname) - ld_command = ['%s%s-ld' % (gcc_path, gcc_type), '-L.'] + ld_command = ['%s%s-ld.exe' % (gcc_path, gcc_type), '-L.'] ld_command.append('-o') ld_command.append(self._currentOutFile) if self.dynamic_link_base: @@ -566,14 +569,14 @@ class KamekBuilder(object): # next up, run it through c++filt print_debug('Running c++filt') - p = subprocess.Popen(gcc_type + '-c++filt', stdin=subprocess.PIPE, stdout=subprocess.PIPE) + p = subprocess.Popen(gcc_type + '-c++filt.exe', stdin=subprocess.PIPE, stdout=subprocess.PIPE) symbolNameList = [sym[1] for sym in self._symbols] filtResult = p.communicate('\n'.join(symbolNameList)) filteredSymbols = filtResult[0].split('\n') for sym, filt in zip(self._symbols, filteredSymbols): - sym.append(filt) + sym.append(filt.strip()) print_debug('Done. All symbols complete.') print_debug('Generated code is at 0x%08X .. 0x%08X' % (self._codeStart, self._codeEnd - 4)) @@ -658,7 +661,7 @@ class KamekProject(object): # load the project data self.projectPath = os.path.abspath(filename) self.projectName = os.path.basename(self.projectPath) - self.projectDir = os.path.dirname(self.projectPath) + self.projectDir = '' #os.path.dirname(self.projectPath) with open(self.projectPath, 'r') as f: self.rawData = f.read() |