-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sh
55 lines (55 loc) · 1.49 KB
/
build.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version="v1.67"
echo "清理dist目录"
if [ -d "dist" ]
then
rm -rf dist
mkdir dist
else
mkdir dist
fi
if [ -f "GTAV Cheat.spec" ]
then
rm -rf GTAV Cheat.spec
fi
echo "编译dll文件"
cmake -S gtaLib -B gtaLib/build -G "MinGW Makefiles"
cmake --build gtaLib/build
if [ -f gtaLib/build/lib/libgtaLib.dll ]
then
cp gtaLib/build/lib/libgtaLib.dll gtaLib/gtaLib.dll
fi
echo "切换到python3.10"
source activate python3.10
pyuic5 src/app.ui -o src/ui_app.py
pyrcc5 resource/resource.qrc -o src/resource_rc.py
echo "同步到github"
git reset 10e0ae9314a3048bd05cf76c5ce5fe07dad0b77a
git push origin tag -d "$version"
git tag -d "$version"
git add .
git commit -m"$version"
git tag "$version"
git push -f
git push --tags
echo "本地编译exe"
pyinstaller -w ./src/app.py --uac-admin -i icon.ico --version-file=version_info.txt -n="GTAV Cheat" --add-data="teleports.txt;./" --add-binary="./gtaLib/build/lib/gtaLib.dll;./" --clean -y
# pyinstaller -Fw ./src/app.py --uac-admin -i icon.ico --version-file=version_info.txt -n="GTAV Cheat" --add-data="teleports.txt;./" --add-binary="./gtaLib/build/lib/gtaLib.dll;./" --clean -y
if [ -f "dist/GTAV Cheat.exe" ]
then
cp teleports.txt "dist/teleports.txt"
fi
path=$(pwd)
cd dist
if [ -f "GTAV Cheat.exe" ]
then
7z a "GTAV_Cheat.zip" "GTAV Cheat.exe" "teleports.txt" -tZIP
fi
cd $path
if [ -f "YimMenu.dll" ]
then
cp YimMenu.dll "dist/GTAV Cheat/YimMenu.dll"
if [ -f "dist/GTAV Cheat.exe" ]
then
cp YimMenu.dll "dist/YimMenu.dll"
fi
fi