diff --git a/.gitignore b/.gitignore index dc84959..c7fd8ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ build/ - +tools/pack/ +.gitignore +CheatMenuVC.7z +CheatMenuIII.7z +CheatMenuSA.7z diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 0e8e364..315c4ed 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -165,5 +165,86 @@ } }, }, + { + "label": "Build DebugAll", + "type": "shell", + "command": "${workspaceFolder}/tools/DebugAll.bat", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": false, + "clear": true + }, + "group": { + "kind": "build", + "isDefault": true + }, + "windows": { + "options": { + "shell": { + "executable": "cmd.exe", + "args": [ + "/d", "/c" + ] + } + } + }, + }, + { + "label": "Build ReleaseAll", + "type": "shell", + "command": "${workspaceFolder}/tools/ReleaseAll.bat", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": false, + "clear": true + }, + "group": { + "kind": "build", + "isDefault": true + }, + "windows": { + "options": { + "shell": { + "executable": "cmd.exe", + "args": [ + "/d", "/c" + ] + } + } + }, + }, + { + "label": "Package all", + "type": "shell", + "command": "${workspaceFolder}/tools/PackAll.bat", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": false, + "clear": true + }, + "group": { + "kind": "build", + "isDefault": true + }, + "windows": { + "options": { + "shell": { + "executable": "cmd.exe", + "args": [ + "/d", "/c" + ] + } + } + }, + }, ] } \ No newline at end of file diff --git a/src/menuinfo.h b/src/menuinfo.h index e9d14ab..8f108c6 100644 --- a/src/menuinfo.h +++ b/src/menuinfo.h @@ -1,6 +1,6 @@ #pragma once #define MENU_NAME "Cheat Menu" #define MENU_VERSION_NUMBER "3.1" -#define MENU_VERSION MENU_VERSION_NUMBER -#define BUILD_NUMBER "20211222" +#define MENU_VERSION MENU_VERSION_NUMBER"-beta" +#define BUILD_NUMBER "20211227" #define MENU_TITLE MENU_NAME " v" MENU_VERSION diff --git a/tools/DebugAll.bat b/tools/DebugAll.bat new file mode 100644 index 0000000..da6f1c0 --- /dev/null +++ b/tools/DebugAll.bat @@ -0,0 +1,7 @@ +@echo off +echo -------------------------------------------------- +echo Building DebugAll +echo -------------------------------------------------- +echo[ +call "tools\Setup.bat" +MsBuild CheatMenu.sln /property:Configuration=Debug diff --git a/tools/DebugIII.bat b/tools/DebugIII.bat index f5aeb3b..31a7b5e 100644 --- a/tools/DebugIII.bat +++ b/tools/DebugIII.bat @@ -1,7 +1,7 @@ @echo off -cd tools -premake5.exe vs2022 -cd ../build -call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" +echo -------------------------------------------------- +echo Building DebugIII +echo -------------------------------------------------- +echo[ +call "tools\Setup.bat" MsBuild CheatMenu.sln /property:Configuration=Debug /t:CheatMenuIII -cd .. diff --git a/tools/DebugSA.bat b/tools/DebugSA.bat index b61bfa3..8723665 100644 --- a/tools/DebugSA.bat +++ b/tools/DebugSA.bat @@ -1,7 +1,7 @@ @echo off -cd tools -premake5.exe vs2022 -cd ../build -call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" +echo -------------------------------------------------- +echo Building DebugSA +echo -------------------------------------------------- +echo[ +call "tools\Setup.bat" MsBuild CheatMenu.sln /property:Configuration=Debug /t:CheatMenuSA -cd .. diff --git a/tools/DebugVC.bat b/tools/DebugVC.bat index cbebb0a..5b8d97d 100644 --- a/tools/DebugVC.bat +++ b/tools/DebugVC.bat @@ -1,7 +1,7 @@ @echo off -cd tools -premake5.exe vs2022 -cd ../build -call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" +echo -------------------------------------------------- +echo Building DebugVC +echo -------------------------------------------------- +echo[ +call "tools\Setup.bat" MsBuild CheatMenu.sln /property:Configuration=Debug /t:CheatMenuVC -cd .. diff --git a/tools/PackAll.bat b/tools/PackAll.bat new file mode 100644 index 0000000..53f9f5f --- /dev/null +++ b/tools/PackAll.bat @@ -0,0 +1,53 @@ +@echo off +@REM Packs all game files into their proper archives (Yes I'm that lazy) + +@REM ------------------------------------------------------ +@REM Set game paths below +set "SA_DIR="F:\GTASanAndreas"" +set "VC_DIR="E:\GTA Vice City"" +set "III_DIR="E:\GTA3"" +@REM ------------------------------------------------------ + +echo ------------------------------------------------------ +echo "CheatMenu Packaging Utility" +echo ------------------------------------------------------ +cd tools +echo Packing SA... +call :copyFiles %SA_DIR% "CheatMenuSA" +echo Packing VC... +call :copyFiles %VC_DIR% "CheatMenuVC" +echo Packing III... +call :copyFiles %III_DIR% "CheatMenuIII" +cd .. +rd /S /Q "pack" /Q +exit + + +@REM ------------------------------------------------------ +@REM Functions +@REM ------------------------------------------------------ + + + +:copyFiles +set "asiPath="%~1\%~2.asi"" +set "folderpath="%~1\CheatMenu"" +set "archivePath="..\%~2.7z"" + +@REM Remove existing files +rd /S /Q "pack" /Q +rd /S /Q %archivePath% /Q + +@REM Copy the files to a temp folder +@REM straight xcopy doesn't seem to work on my system, broken registry? +%systemroot%\System32\xcopy /s %asiPath% "pack\" /K /D /H /Y +%systemroot%\System32\xcopy /s %folderpath% "pack\CheatMenu\" /K /D /H /Y + +@REM Remove the config and versioninfo files since we don't want to distribute them +del "pack\CheatMenu\json\config.json" /Q +del "pack\CheatMenu\json\versioninfo.json" /Q + +@REM Guessing we have 7zip installed already, well I have +"C:\Program Files\7-Zip\7z.exe" a -t7z %archivePath% ".\pack\*" + +@REM ------------------------------------------------------ diff --git a/tools/ReleaseAll.bat b/tools/ReleaseAll.bat new file mode 100644 index 0000000..04ab256 --- /dev/null +++ b/tools/ReleaseAll.bat @@ -0,0 +1,7 @@ +@echo off +echo -------------------------------------------------- +echo Building ReleaseAll +echo -------------------------------------------------- +echo[ +call "tools\Setup.bat" +MsBuild CheatMenu.sln /property:Configuration=Release diff --git a/tools/ReleaseIII.bat b/tools/ReleaseIII.bat index e304cb3..0c7f912 100644 --- a/tools/ReleaseIII.bat +++ b/tools/ReleaseIII.bat @@ -1,7 +1,7 @@ @echo off -cd tools -premake5.exe vs2022 -cd ../build -call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" +echo -------------------------------------------------- +echo Building ReleaseIII +echo -------------------------------------------------- +echo[ +call "tools\Setup.bat" MsBuild CheatMenu.sln /property:Configuration=Release /t:CheatMenuIII -cd .. diff --git a/tools/ReleaseSA.bat b/tools/ReleaseSA.bat index cdd027e..0536c09 100644 --- a/tools/ReleaseSA.bat +++ b/tools/ReleaseSA.bat @@ -1,7 +1,7 @@ @echo off -cd tools -premake5.exe vs2022 -cd ../build -call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" +echo -------------------------------------------------- +echo Building ReleaseSA +echo -------------------------------------------------- +echo[ +call "tools\Setup.bat" MsBuild CheatMenu.sln /property:Configuration=Release /t:CheatMenuSA -cd .. diff --git a/tools/ReleaseVC.bat b/tools/ReleaseVC.bat index 687f260..77c219f 100644 --- a/tools/ReleaseVC.bat +++ b/tools/ReleaseVC.bat @@ -1,7 +1,7 @@ @echo off -cd tools -premake5.exe vs2022 -cd ../build -call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" +echo -------------------------------------------------- +echo Building ReleaseVC +echo -------------------------------------------------- +echo[ +call "tools\Setup.bat" MsBuild CheatMenu.sln /property:Configuration=Release /t:CheatMenuVC -cd .. diff --git a/tools/Setup.bat b/tools/Setup.bat new file mode 100644 index 0000000..e7f0613 --- /dev/null +++ b/tools/Setup.bat @@ -0,0 +1,6 @@ +rem Generate visual studio files and run the devcmd init +@echo off +cd tools +premake5.exe vs2022 +cd ../build +call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat"