Skip to content

Commit 2f1a1cd

Browse files
committed
Fix Windows build process
1 parent 6eaad72 commit 2f1a1cd

File tree

2 files changed

+17
-23
lines changed

2 files changed

+17
-23
lines changed

windows-support/Makefile

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,21 @@ vendor:
1818
state:
1919
mkdir -p state
2020

21-
vendor/python.msi: | vendor state/wineprefix
22-
wget https://www.python.org/ftp/python/2.7.10/python-2.7.10.msi -O vendor/python.msi
23-
touch vendor/python.msi
21+
vendor/python.exe: | vendor state/wineprefix
22+
wget https://www.python.org/ftp/python/3.6.1/python-3.6.1.exe -O vendor/python.exe
23+
touch vendor/python.exe
2424

25-
vendor/python.msi.installed: | vendor/python.msi
26-
cp vendor/python.msi vendor/python-tmp.msi
27-
$(WINEARGS) $(WINE) msiexec /i vendor/python-tmp.msi /qn
28-
touch vendor/python.msi.installed
25+
vendor/python.exe.installed: | vendor/python.exe
26+
cp vendor/python.exe vendor/python-tmp.exe
27+
$(WINEARGS) $(WINE) vendor/python-tmp.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
28+
touch vendor/python.exe.installed
2929

30-
state/wineprefix/drive_c/Python27/Scripts/pyinstaller.exe: | vendor/python.msi.installed vendor/pywin32.exe.installed
31-
$(WINEARGS) $(WINE) 'c:/python27/python.exe' -m pip install pyinstaller==3.1.1
30+
state/pyinstaller.installed: | vendor/python.exe.installed
31+
$(WINEARGS) $(WINE) 'c:/Program Files (x86)/Python36-32/python.exe' -m pip install pyinstaller==3.4
32+
touch state/pyinstaller.installed
3233

33-
vendor/pywin32.exe: | vendor
34-
wget http://iweb.dl.sourceforge.net/project/pywin32/pywin32/Build%20219/pywin32-219.win32-py2.7.exe -O vendor/pywin32.exe
35-
36-
vendor/pywin32.exe.installed: | vendor/pywin32.exe
37-
unzip vendor/pywin32.exe || true
38-
mv PLATLIB/* SCRIPTS/* state/wineprefix/drive_c/Python27/Lib/site-packages/
39-
rmdir PLATLIB SCRIPTS
40-
$(WINEARGS) $(WINE) 'c:/python27/python.exe' state/wineprefix/drive_c/Python27/Lib/site-packages/pywin32_postinstall.py -install
41-
touch vendor/pywin32.exe.installed
42-
43-
dist/vagrant-spk.exe: ../vagrant-spk | state/wineprefix/drive_c/Python27/Scripts/pyinstaller.exe
44-
$(WINEARGS) $(WINE) c:/python27/Scripts/pyinstaller -F ../vagrant-spk
34+
dist/vagrant-spk.exe: ../vagrant-spk | state/pyinstaller.installed
35+
$(WINEARGS) $(WINE) 'c:/Program Files (x86)/Python36-32/Scripts/pyinstaller' -F ../vagrant-spk
4536

4637
vendor/innosetup.exe: | vendor
4738
wget 'http://www.jrsoftware.org/download.php/is.exe?site=1' -O vendor/innosetup.exe
@@ -50,7 +41,10 @@ vendor/innosetup.exe.installed: | state/wineprefix vendor/innosetup.exe
5041
$(WINEARGS) $(WINE) vendor/innosetup.exe /VERYSILENT
5142
touch vendor/innosetup.exe.installed
5243

53-
dist/innosetup/vagrant-spk-setup.exe: dist/vagrant-spk.exe | vendor/innosetup.exe.installed vendor/msysgit.7z vendor/msysgit/bin
44+
state/version.iss: ../vagrant-spk
45+
../vagrant-spk --version | sed -e 's,vagrant-spk ,,' | xargs printf '#define MyAppVersion "%s"\n' > state/version.iss
46+
47+
dist/innosetup/vagrant-spk-setup.exe: dist/vagrant-spk.exe | vendor/innosetup.exe.installed vendor/msysgit.7z vendor/msysgit/bin state/version.iss
5448
# Some WINE installs are seemingly 64-bit but install InnoSetup to Program Files, not
5549
# Program Files (x86). We work around this with a symlink.
5650
if [ ! -d 'state/wineprefix/drive_c/Program Files (x86)' ] ; then ln -s 'Program Files' 'state/wineprefix/drive_c/Program Files (x86)' ; fi

windows-support/windows-installer.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "vagrant-spk"
5-
#define MyAppVersion "v1.0"
5+
#include "state/version.iss"
66
#define MyAppPublisher "Sandstorm Development Group, Inc."
77
#define MyAppURL "https://docs.sandstorm.io/"
88
#define MyAppExeName "vagrant-spk.exe"

0 commit comments

Comments
 (0)