mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
redundancy in code that builds windows installer
This commit is contained in:
parent
ed32f2264e
commit
e306581c12
@ -4641,6 +4641,10 @@ except:
|
|||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
def MakeInstallerNSIS(file, fullname, smdirectory, installdir):
|
def MakeInstallerNSIS(file, fullname, smdirectory, installdir):
|
||||||
|
if (os.path.isfile(file)):
|
||||||
|
os.remove(file)
|
||||||
|
elif (os.path.isdir(file)):
|
||||||
|
shutil.rmtree(file)
|
||||||
if (RUNTIME):
|
if (RUNTIME):
|
||||||
# Invoke the make_installer script.
|
# Invoke the make_installer script.
|
||||||
AddToPathEnv("PATH", GetOutputDir() + "\\bin")
|
AddToPathEnv("PATH", GetOutputDir() + "\\bin")
|
||||||
@ -4652,8 +4656,6 @@ def MakeInstallerNSIS(file, fullname, smdirectory, installdir):
|
|||||||
print "Building "+fullname+" installer. This can take up to an hour."
|
print "Building "+fullname+" installer. This can take up to an hour."
|
||||||
if (COMPRESSOR != "lzma"):
|
if (COMPRESSOR != "lzma"):
|
||||||
print("Note: you are using zlib, which is faster, but lzma gives better compression.")
|
print("Note: you are using zlib, which is faster, but lzma gives better compression.")
|
||||||
if (os.path.exists(file)):
|
|
||||||
os.remove(file)
|
|
||||||
if (os.path.exists("nsis-output.exe")):
|
if (os.path.exists("nsis-output.exe")):
|
||||||
os.remove("nsis-output.exe")
|
os.remove("nsis-output.exe")
|
||||||
WriteFile(GetOutputDir()+"/tmp/__init__.py", "")
|
WriteFile(GetOutputDir()+"/tmp/__init__.py", "")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user