-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathsetup.bat
42 lines (39 loc) · 1007 Bytes
/
setup.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
:: Copyright (c) 2024. Vili and contributors.
@echo off
cls
echo.
echo H4X-Tools Setup Script
echo.
echo ~~by Vili (https://vili.dev)
echo.
:: Install dependencies
echo Installing dependencies...
python -m pip install -r requirements.txt
if %errorlevel% neq 0 (
echo Error: Failed to install dependencies.
pause
exit /b 1
)
echo Done.
:: Build executable
echo Building H4X-Tools to a single executable...
python -m PyInstaller h4xtools.py --add-data "resources\*;resources" --onefile -F --clean
if %errorlevel% neq 0 (
echo Error: Failed to build executable.
pause
exit /b 1
)
echo Done.
:: Open dist folder
echo Your H4X-Tools executable is located in the 'dist' folder. You can now move it to your desired location.
echo OR you can start H4X-Tools with python by typing 'python h4xtools.py' in the terminal.
echo.
set /p "input=Open 'dist' folder now? (y/n) -> "
if /i "%input%"=="y" (
echo Opening up 'dist'.
start dist\.
) else (
echo Exiting...
)
pause
exit /b 0