Minor changes to the windows inno setup
This commit is contained in:
@@ -164,20 +164,13 @@ def freezePackage(buildWindowed, oneFile, makeSetup, hostOS):
|
|||||||
# Inno Setup Builder
|
# Inno Setup Builder
|
||||||
# =============================================================================================== #
|
# =============================================================================================== #
|
||||||
|
|
||||||
def innoSetup(innoExec):
|
def innoSetup():
|
||||||
"""Run the Inno Setup tool to build a setup.exe file for Windows.
|
"""Run the Inno Setup tool to build a setup.exe file for Windows.
|
||||||
"""
|
"""
|
||||||
print("")
|
print("")
|
||||||
print("Running Inno Setup")
|
print("Running Inno Setup")
|
||||||
print("##################")
|
print("##################")
|
||||||
print("")
|
print("")
|
||||||
if innoExec is None:
|
|
||||||
innoExec = "C:\\Program Files (x86)\\Inno Setup 6\\ISCC.exe"
|
|
||||||
if not os.path.isfile(innoExec):
|
|
||||||
print("ERROR: Cannot fine Inno Setup's ISCC.exe file.")
|
|
||||||
print(" Looked in: %s" % innoExec)
|
|
||||||
print(" Please provide a path with the --inno= option.")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# Read the iss template
|
# Read the iss template
|
||||||
issData = ""
|
issData = ""
|
||||||
@@ -192,9 +185,9 @@ def innoSetup(innoExec):
|
|||||||
outFile.write(issData)
|
outFile.write(issData)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
subprocess.call([innoExec, "setup.iss"])
|
subprocess.call(["iscc", "setup.iss"])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Failed with error:")
|
print("Inno Setup failed with error:")
|
||||||
print(str(e))
|
print(str(e))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
@@ -261,7 +254,6 @@ if __name__ == "__main__":
|
|||||||
buildWindowed = True
|
buildWindowed = True
|
||||||
oneFile = False
|
oneFile = False
|
||||||
makeSetup = False
|
makeSetup = False
|
||||||
innoExec = None
|
|
||||||
|
|
||||||
if "help" in sys.argv:
|
if "help" in sys.argv:
|
||||||
print(
|
print(
|
||||||
@@ -271,10 +263,10 @@ if __name__ == "__main__":
|
|||||||
"This tool provides build commands for distibuting novelWriter as\n"
|
"This tool provides build commands for distibuting novelWriter as\n"
|
||||||
"a package. The available options are as follows:\n"
|
"a package. The available options are as follows:\n"
|
||||||
"\n"
|
"\n"
|
||||||
"pip Run pip to install all package dependencies for\n"
|
|
||||||
" novelWriter and this build tool.\n"
|
|
||||||
"onefile Build a standalone executable with all dependencies\n"
|
"onefile Build a standalone executable with all dependencies\n"
|
||||||
" bundled. This does not produce a setup.exe on Windows.\n"
|
" bundled. This does not produce a setup.exe on Windows.\n"
|
||||||
|
"pip Run pip to install all package dependencies for\n"
|
||||||
|
" novelWriter and this build tool.\n"
|
||||||
"setup Build a setup.exe installer for Windows. This option\n"
|
"setup Build a setup.exe installer for Windows. This option\n"
|
||||||
" automaticall disables the 'onefile' option.\n"
|
" automaticall disables the 'onefile' option.\n"
|
||||||
"clean This will attempt to delete the 'build' and 'dist'\n"
|
"clean This will attempt to delete the 'build' and 'dist'\n"
|
||||||
@@ -315,6 +307,6 @@ if __name__ == "__main__":
|
|||||||
freezePackage(buildWindowed, oneFile, makeSetup, hostOS)
|
freezePackage(buildWindowed, oneFile, makeSetup, hostOS)
|
||||||
|
|
||||||
if makeSetup:
|
if makeSetup:
|
||||||
innoSetup(innoExec)
|
innoSetup()
|
||||||
|
|
||||||
# END Main
|
# END Main
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ UsedUserAreasWarning=no
|
|||||||
;PrivilegesRequired=lowest
|
;PrivilegesRequired=lowest
|
||||||
PrivilegesRequiredOverridesAllowed=dialog
|
PrivilegesRequiredOverridesAllowed=dialog
|
||||||
OutputDir={#nwAppDir}
|
OutputDir={#nwAppDir}
|
||||||
OutputBaseFilename=setup-novelwriter-{#nwAppVersion}
|
OutputBaseFilename=novelwriter_{#nwAppVersion}_win10_full_setup
|
||||||
Compression=lzma
|
Compression=lzma
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
WizardStyle=modern
|
WizardStyle=modern
|
||||||
|
|||||||
Reference in New Issue
Block a user