186a661d1e
Credit goes to @myfreeer https://github.com/myfreeer/chrome-pak-customizer
18 lines
No EOL
759 B
Batchfile
18 lines
No EOL
759 B
Batchfile
@echo off
|
|
setlocal EnableExtensions EnableDelayedExpansion
|
|
if exist "%SystemRoot%\SysWOW64\cmd.exe" set x64=1
|
|
pushd "%~dp0"
|
|
set core_x64=pak_mingw64.exe
|
|
if not exist "%core_x64%" if exist pak_msvc64.exe set core_x64=pak_msvc64.exe
|
|
set core_x86=pak_mingw32.exe
|
|
if not exist "%core_x86%" if exist pak_msvc32.exe set core_x86=pak_msvc32.exe
|
|
set "WORK_DIR=%~dp0"
|
|
set "file=%~1"
|
|
set "pack_file=%~dpn1_packed.pak"
|
|
if not exist "%WORK_DIR%" md "%WORK_DIR%"
|
|
pushd "%WORK_DIR%"
|
|
if "%x64%"=="1" ( set core=%core_x64% ) else ( set core=%core_x86% )
|
|
if not exist %core% echo core program (%core%) NOT FOUND! &pause &exit
|
|
if exist "%file%" %core% -p "%file%" "%pack_file%"
|
|
if exist "%pack_file%" echo packed "%pack_file%" from "%file%"
|
|
timeout /t 5||pause |