Skip to content

Commit

Permalink
added a custom settings.ini for advanced users (will work without it)
Browse files Browse the repository at this point in the history
  • Loading branch information
myfreeer committed May 7, 2016
1 parent c7ad4c0 commit f84431e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
7 changes: 5 additions & 2 deletions replace.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ set NODEJS=node.exe
set "WORK_DIR=%~dp0"
set mainjs=node-chrome-pak.js
set file=chrome_100_percent.pak
set unpack-dir=unpacked
set modified-dir=modified
if not exist "%WORK_DIR%" md "%WORK_DIR%"
pushd "%WORK_DIR%"
if not exist "%WORK_DIR%\modified" md "%WORK_DIR%\modified" &exit
if exist "%WORK_DIR%\%file%" for %%i in (modified\*) do %NODEJS% %mainjs% replace "%WORK_DIR%\%file%" %%~ni "%%~fsnxi"
if exist settings.ini for /f "tokens=* eol=; delims=" %%i in (settings.ini) do set %%i
if not exist "%WORK_DIR%\%modified-dir%" md "%WORK_DIR%\%modified-dir%" &exit
if exist "%WORK_DIR%\%file%" for %%i in (%modified-dir%\*) do %NODEJS% %mainjs% replace "%WORK_DIR%\%file%" %%~ni "%%~fsnxi"
16 changes: 16 additions & 0 deletions settings.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
;DO NOT CHANGE IF NOT FULLY UNDERSTOOD
;
;NODEJS=node.exe
;the file name of nodejs
;
;mainjs=node-chrome-pak.js
;the file name of main program
;
file=chrome_100_percent.pak
;the file name of the pak file to modify
;
unpack-dir=unpacked122
;the folder to unpack the pak
;
modified-dir=modified
;the folder to merge the modified files
9 changes: 6 additions & 3 deletions unpack.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ set NODEJS=node.exe
set "WORK_DIR=%~dp0"
set mainjs=node-chrome-pak.js
set file=chrome_100_percent.pak
set unpack-dir=unpacked
set modified-dir=modified
if not exist "%WORK_DIR%" md "%WORK_DIR%"
pushd "%WORK_DIR%"
if not exist "%WORK_DIR%\unpacked" md "%WORK_DIR%\unpacked"
if not exist "%WORK_DIR%\modified" md "%WORK_DIR%\modified"
if exist "%WORK_DIR%\%file%" %NODEJS% %mainjs% unpack "%WORK_DIR%\%file%" "%WORK_DIR%\unpacked"
if exist settings.ini for /f "tokens=* eol=; delims=" %%i in (settings.ini) do set %%i
if not exist "%WORK_DIR%\%unpack-dir%" md "%WORK_DIR%\%unpack-dir%"
if not exist "%WORK_DIR%\%modified-dir%" md "%WORK_DIR%\%modified-dir%"
if exist "%WORK_DIR%\%file%" %NODEJS% %mainjs% unpack "%WORK_DIR%\%file%" "%WORK_DIR%\%unpack-dir%"

0 comments on commit f84431e

Please sign in to comment.