rofl0r / agsutils

contains utils for AGS: game extractor, repacker, disassembler and assembler
44 stars 14 forks source link

Feat.req. Adapt agsoptimize to run on Windows #20

Open necros2k7 opened 2 years ago

necros2k7 commented 2 years ago

subj

rofl0r commented 2 years ago

agsoptimize is a python script. what prevents you from using it on windows ?

necros2k7 commented 2 years ago

ok will look into it, self contained exe would be better, people should not have to install another dependency

necros2k7 commented 2 years ago

What I do wrong? c:\python34\python agsex sample.exe, c:\python34\python agsex

File "agsex", line 3 usage() { ^ SyntaxError: invalid syntax

python311: File "c:\tst\agsex", line 4 echo "$0 game.exe FILES OBJ" ^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma?

rofl0r commented 2 years ago

agsex is a shell script, it requires unix shell, not python. you can get one for example via cygwin or msys2 (i recommend the former).

necros2k7 commented 2 years ago

OK i ran agsex and files are in FILES and OBJ dirs, what should I do next? Run agsoptimize? What`s command line to process all files massively? Am I right that all flags should be passed for full optimization?

rofl0r commented 2 years ago

agsex extracts everything and creates a handy makefile to rebuild project after changes to "game.ags". so you can run make optimize and then make all from inside cygwin (you need python2 and gnu make installed inside cygwin env, using cygwin installer). you also need to expand PATH environment variable to include folder with agsutils binaries, iirc.

make optimize runs agsoptimize with recommended setting on all assembly files.