-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.bat
36 lines (36 loc) · 1.24 KB
/
build.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
@echo off
echo Building Useful Tools for Windows...
echo Cleaning up...
rmdir /s /q dist
echo Installing Dependencies...
bun install
pip install uv
uv pip install git+https://github.com/bottlepy/bottle.git
uv pip install wheel
uv pip install -r requirements.txt
echo Building the UI...
bun run build
echo Copying the files...
copy main.py tmp && copy icon.ico tmp && mkdir tmp\scripts && copy scripts\* tmp\scripts\
echo Installing Inno Setup...
winget install --id=JRSoftware.InnoSetup -e -s winget
echo Installing NanaZip...
winget install --id=M2Team.NanaZip -e -s winget
echo Building the executable folder...
cd tmp
python -m eel main.py web --clean --noconfirm --onedir --windowed --icon icon.ico --name "Useful Tools for Windows"
cd "dist\Useful Tools for Windows\"
echo Copying the scripts to executable folder...
mkdir scripts
copy ..\..\scripts\* scripts\
echo Zipping the portable edition...
7z a -r ..\..\..\dist\Useful_Tools_For_Windows_Portable.zip *
cd ..\..\..
echo Adding license to the zip file...
7z a dist\Useful_Tools_For_Windows_Portable.zip LICENSE.txt
echo Building the installer...
"%ProgramFiles(x86)%\Inno Setup 6\ISCC.exe" setup.iss
"%LOCALAPPDATA%\Programs\Inno Setup 6\ISCC.exe" setup.iss
echo Cleaning up...
rmdir /s /q tmp
echo Done!