Make sample.zip before pyinstaller runs, and make sure the make_windows script is windows only

This commit is contained in:
Veronica K. B. Olsen
2020-10-17 01:43:47 +02:00
parent 0665b9b032
commit ede9d034c7
Regular → Executable
+13
View File
@@ -19,6 +19,10 @@ import sys
import getopt import getopt
import subprocess import subprocess
if not sys.platform.startswith("win32"):
print("ERROR: This script is intended for Windows only.")
sys.exit(1)
# Defaults # Defaults
buildWindowed = True buildWindowed = True
runPip = False runPip = False
@@ -134,6 +138,15 @@ else:
instOpt.append("novelWriter.py") instOpt.append("novelWriter.py")
# Make sample.zip first
print("Building sample.zip")
try:
subprocess.call([sys.executable, "setup.py" "sample"])
except Exception as e:
print("Failed with error:")
print(str(e))
sys.exit(1)
import PyInstaller.__main__ # noqa: E402 import PyInstaller.__main__ # noqa: E402
PyInstaller.__main__.run(instOpt) PyInstaller.__main__.run(instOpt)