-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_linux.sh
executable file
·35 lines (24 loc) · 959 Bytes
/
build_linux.sh
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
#!/bin/bash
# Navigate to the project directory which is ./ModManagerCore
cd ./ModManagerCore
# Restore dependencies
dotnet restore
# Build the project
dotnet build --configuration Release
# Publish the project
dotnet publish --configuration Release --output ../publish/Core
echo "Build and publish completed."
# Build ModManagerGUI with pyinstaller
cd ../ModManagerGUI
# ask the user if they want to have a console window
echo "Do you want to have a console window? (y/n)"
read console
if [ "$console" = "y" ]; then
pyinstaller --add-data "../publish/Core:Core" --name ModManagerGUI main.py --icon=ico.ico
echo "Build can be found in ModManagerGUI/dist/ModManagerGUI"
exit 0
fi
# assume we are in venv so we can use pyinstaller
# we need to add the publish/Core directory
pyinstaller --add-data "../publish/Core:Core" --name ModManagerGUI --windowed --icon=ico.ico main.py
echo "Build can be found in ModManagerGUI/dist/ModManagerGUI"