Skip to content
This repository was archived by the owner on Oct 28, 2022. It is now read-only.

Commit 034151d

Browse files
author
Andre Meyer
committed
build script windows
1 parent 4167668 commit 034151d

File tree

3 files changed

+6
-45
lines changed

3 files changed

+6
-45
lines changed
File renamed without changes.

main-win.spec

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ block_cipher = None
55

66
a = Analysis(['main.py'],
77
pathex=['C:\\Users\\Administrator\\Desktop\\sm64-randomizer'],
8-
binaries=[],
8+
binaries=[('Lib/site-packages/rtree/spatialindex*', '.')],
99
datas=[('README.md', '.'), ('LICENSE', '.'), ('Data', '.'), ('Lib/site-packages/trimesh/resources', 'trimesh/resources/')],
1010
hiddenimports=[],
1111
hookspath=[],

tools/build_win.ps1

+5-44
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,11 @@
33
# Install Python 3.7.x (newest minor) both 32 and 64 bit. If you only require one and not the other, feel free to remove/comment out the other.
44
# Make sure Python is installed in the default folder in your Users Directory
55

6-
# setup (read version file, create folders)
7-
#./Scripts/activate.ps1
8-
$env:Path = ";$home\AppData\Local\Programs\Python\Python37-32"
9-
$env:Path += ";$home\AppData\Local\Programs\Python\Python37-32\Scripts"
10-
116
$RandoVersion = python -c 'from __version__ import __version__; print(__version__)'
127
echo "Randomizer Version: $RandoVersion"
138

149
mkdir ./release -ErrorAction SilentlyContinue
1510

16-
$env:Path = ";$home\AppData\Local\Programs\Python\Python37-32"
17-
$env:Path += ";$home\AppData\Local\Programs\Python\Python37-32\Scripts"
1811
# 32 bit
1912
pip install -r .\requirements.txt
2013
Remove-Item ./dist/ -Recurse -ErrorAction SilentlyContinue
@@ -23,47 +16,15 @@ pyinstaller main-win.spec
2316
mv "dist/main.exe" "dist/SM64 Randomizer Generator.exe"
2417

2518
mkdir ./dist/3rdparty -ErrorAction SilentlyContinue
26-
mkdir ./dist/Data -ErrorAction SilentlyContinue
27-
mkdir ./dist/Config -ErrorAction SilentlyContinue
2819

29-
cp 3rdparty/*win* ./dist/3rdparty
30-
cp 3rdparty/LICENSE ./dist/3rdparty
31-
cp 3rdparty/README.md ./dist/3rdparty
32-
cp LICENSE ./dist/LICENSE
33-
cp README.md ./dist/README.md
34-
cp Config/* ./dist/Config/
35-
cp Data/* ./dist/Data/
20+
Copy-Item 3rdparty/*.exe -Destination dist/3rdparty
21+
Copy-Item 3rdparty/LICENSE -Destination dist/3rdparty
22+
Copy-Item 3rdparty/README.md -Destination dist/3rdparty
23+
Copy-Item ./Config -Destination ./dist -Recurse -Force
24+
Copy-Item ./Data -Destination ./dist -Recurse -Force
3625

3726
$ArchiveName = "release/sm64-randomizer-$RandoVersion-win32.zip"
3827
del $ArchiveName -ErrorAction SilentlyContinue
3928
cd dist
4029
& 'C:\Program Files\7-Zip\7z.exe' -tzip a ../$ArchiveName ./*.exe 3rdparty/* *.md LICENSE ./Data ./Config
4130
cd ..
42-
43-
# 64 bit
44-
$env:Path = ";$home\AppData\Local\Programs\Python\Python37"
45-
$env:Path += ";$home\AppData\Local\Programs\Python\Python37\Scripts"
46-
47-
pip install -r .\requirements.txt
48-
Remove-Item ./dist/ -Recurse
49-
Remove-Item ./release/*.exe
50-
pyinstaller main-win.spec
51-
mv "dist/main.exe" "dist/SM64 Randomizer Generator.exe"
52-
53-
mkdir ./dist/3rdparty -ErrorAction SilentlyContinue
54-
mkdir ./dist/Data -ErrorAction SilentlyContinue
55-
mkdir ./dist/Config -ErrorAction SilentlyContinue
56-
57-
cp 3rdparty/*win* ./dist/3rdparty
58-
cp 3rdparty/LICENSE ./dist/3rdparty
59-
cp 3rdparty/README.md ./dist/3rdparty
60-
cp LICENSE ./dist/LICENSE
61-
cp README.md ./dist/README.md
62-
cp Config/* ./dist/Config/
63-
cp Data/* ./dist/Data/
64-
65-
$ArchiveName = "release/sm64-randomizer-$RandoVersion-win64.zip"
66-
del $ArchiveName -ErrorAction SilentlyContinue
67-
cd dist
68-
& 'C:\Program Files\7-Zip\7z.exe' -tzip a ../$ArchiveName ./*.exe 3rdparty/* *.md LICENSE ./Data ./Config
69-
cd ..

0 commit comments

Comments
 (0)