Make sample.zip before pyinstaller runs, and make sure the make_windows script is windows only
This commit is contained in:
Regular → Executable
+13
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user