Moved from NSIS Unicode to NSIS 3 due to #121 (raised by Armada651)
This commit is contained in:
parent
6192080cf1
commit
6533aa81f6
@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
''' *** TROUBLESHOOTING ***
|
''' *** TROUBLESHOOTING ***
|
||||||
|
|
||||||
1) If you get the error "ImportError: No module named zope.interface" then add an empty __init__.py file to the PYTHONDIR/Lib/site-packages/zope directory
|
) If you get the error "ImportError: No module named zope.interface" then add an empty __init__.py file to the PYTHONDIR/Lib/site-packages/zope directory
|
||||||
|
|
||||||
2) It is expected that you will have Unicode NSIS from http://www.scratchpaper.com/ installed to: C:\Program Files (x86)\NSIS\Unicode\
|
2) It is expected that you will have NSIS 3 NSIS from http://nsis.sourceforge.net installed to: C:\Program Files (x86)\NSIS\
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import sys
|
import sys, codecs
|
||||||
try:
|
try:
|
||||||
if (sys.version_info.major != 2) or (sys.version_info.minor < 7):
|
if (sys.version_info.major != 2) or (sys.version_info.minor < 7):
|
||||||
raise Exception("You must build Syncplay with Python 2.7!")
|
raise Exception("You must build Syncplay with Python 2.7!")
|
||||||
@ -31,7 +31,7 @@ if missingStrings is not None and missingStrings is not "":
|
|||||||
import warnings
|
import warnings
|
||||||
warnings.warn("MISSING/UNUSED STRINGS DETECTED:\n{}".format(missingStrings))
|
warnings.warn("MISSING/UNUSED STRINGS DETECTED:\n{}".format(missingStrings))
|
||||||
|
|
||||||
p = "C:\\Program Files (x86)\\NSIS\\Unicode\\makensis.exe" #TODO: how to move that into proper place, huh
|
p = "C:\\Program Files (x86)\\NSIS\\makensis.exe" #TODO: how to move that into proper place, huh
|
||||||
NSIS_COMPILE = p if os.path.isfile(p) else "makensis.exe"
|
NSIS_COMPILE = p if os.path.isfile(p) else "makensis.exe"
|
||||||
OUT_DIR = "syncplay v{}".format(syncplay.version)
|
OUT_DIR = "syncplay v{}".format(syncplay.version)
|
||||||
SETUP_SCRIPT_PATH = "syncplay_setup.nsi"
|
SETUP_SCRIPT_PATH = "syncplay_setup.nsi"
|
||||||
@ -45,6 +45,8 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
|||||||
LoadLanguageFile "$${NSISDIR}\Contrib\Language files\Russian.nlf"
|
LoadLanguageFile "$${NSISDIR}\Contrib\Language files\Russian.nlf"
|
||||||
LoadLanguageFile "$${NSISDIR}\Contrib\Language files\German.nlf"
|
LoadLanguageFile "$${NSISDIR}\Contrib\Language files\German.nlf"
|
||||||
|
|
||||||
|
Unicode true
|
||||||
|
|
||||||
Name "Syncplay $version"
|
Name "Syncplay $version"
|
||||||
OutFile "Syncplay $version Setup.exe"
|
OutFile "Syncplay $version Setup.exe"
|
||||||
InstallDir $$PROGRAMFILES\Syncplay
|
InstallDir $$PROGRAMFILES\Syncplay
|
||||||
@ -594,8 +596,8 @@ class NSISScript(object):
|
|||||||
installFiles = installFiles,
|
installFiles = installFiles,
|
||||||
totalSize = totalSize,
|
totalSize = totalSize,
|
||||||
)
|
)
|
||||||
with open(SETUP_SCRIPT_PATH, "w") as outfile:
|
with codecs.open(SETUP_SCRIPT_PATH, "w", "utf-8-sig") as outfile:
|
||||||
outfile.write(contents)
|
outfile.write(contents.decode('utf-8'))
|
||||||
|
|
||||||
def compile(self):
|
def compile(self):
|
||||||
if not os.path.isfile(NSIS_COMPILE):
|
if not os.path.isfile(NSIS_COMPILE):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user