Fix formatting
This commit is contained in:
parent
db1cfd12f0
commit
b4d02e3686
@ -6,7 +6,8 @@
|
||||
# 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
|
||||
# 2) It is expected that you will have NSIS 3 NSIS from http://nsis.sourceforge.net installed.
|
||||
|
||||
import sys, codecs
|
||||
import codecs
|
||||
import sys
|
||||
# try:
|
||||
# if (sys.version_info.major != 2) or (sys.version_info.minor < 7):
|
||||
# raise Exception("You must build Syncplay with Python 2.7!")
|
||||
@ -14,23 +15,26 @@ import sys, codecs
|
||||
# import warnings
|
||||
# warnings.warn("You must build Syncplay with Python 2.7!")
|
||||
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
from string import Template
|
||||
|
||||
from distutils.core import setup
|
||||
try:
|
||||
from py2exe.build_exe import py2exe
|
||||
except ImportError:
|
||||
from py2exe.distutils_buildexe import py2exe
|
||||
from string import Template
|
||||
|
||||
import syncplay
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from syncplay.messages import getMissingStrings
|
||||
|
||||
missingStrings = getMissingStrings()
|
||||
if missingStrings is not None and missingStrings is not "":
|
||||
import warnings
|
||||
warnings.warn("MISSING/UNUSED STRINGS DETECTED:\n{}".format(missingStrings))
|
||||
|
||||
|
||||
def get_nsis_path():
|
||||
bin_name = "makensis.exe"
|
||||
from winreg import HKEY_LOCAL_MACHINE as HKLM
|
||||
@ -44,6 +48,8 @@ def get_nsis_path():
|
||||
raise Exception("You must install NSIS 3 or later.")
|
||||
except WindowsError:
|
||||
return bin_name
|
||||
|
||||
|
||||
NSIS_COMPILE = get_nsis_path()
|
||||
|
||||
OUT_DIR = "syncplay_v{}".format(syncplay.version)
|
||||
@ -613,6 +619,7 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
||||
SectionEnd
|
||||
"""
|
||||
|
||||
|
||||
class NSISScript(object):
|
||||
def create(self):
|
||||
fileList, totalSize = self.getBuildDirContents(OUT_DIR)
|
||||
@ -669,6 +676,7 @@ class NSISScript(object):
|
||||
delete.append('RMdir "$INSTDIR\\{}"'.format(file_))
|
||||
return "\n".join(delete)
|
||||
|
||||
|
||||
class build_installer(py2exe):
|
||||
def run(self):
|
||||
py2exe.run(self)
|
||||
@ -678,7 +686,9 @@ class build_installer(py2exe):
|
||||
script.compile()
|
||||
print("*** DONE ***")
|
||||
|
||||
guiIcons = ['resources/accept.png', 'resources/arrow_undo.png', 'resources/clock_go.png',
|
||||
|
||||
guiIcons = [
|
||||
'resources/accept.png', 'resources/arrow_undo.png', 'resources/clock_go.png',
|
||||
'resources/control_pause_blue.png', 'resources/cross.png', 'resources/door_in.png',
|
||||
'resources/folder_explore.png', 'resources/help.png', 'resources/table_refresh.png',
|
||||
'resources/timeline_marker.png', 'resources/control_play_blue.png',
|
||||
@ -700,7 +710,13 @@ guiIcons = ['resources/accept.png', 'resources/arrow_undo.png', 'resources/clock
|
||||
'resources/email_go.png',
|
||||
'resources/world_add.png', 'resources/film_add.png', 'resources/delete.png', 'resources/spinner.mng'
|
||||
]
|
||||
resources = ["resources/icon.ico", "resources/syncplay.png", "resources/syncplayintf.lua", "resources/license.rtf", "resources/third-party-notices.rtf"]
|
||||
resources = [
|
||||
"resources/icon.ico",
|
||||
"resources/syncplay.png",
|
||||
"resources/syncplayintf.lua",
|
||||
"resources/license.rtf",
|
||||
"resources/third-party-notices.rtf"
|
||||
]
|
||||
resources.extend(guiIcons)
|
||||
intf_resources = ["resources/lua/intf/syncplay.lua"]
|
||||
|
||||
@ -714,11 +730,16 @@ common_info = dict(
|
||||
|
||||
info = dict(
|
||||
common_info,
|
||||
windows=[{"script":"syncplayClient.py", "icon_resources":[(1, "resources\\icon.ico")], 'dest_base': "Syncplay"},],
|
||||
windows=[{
|
||||
"script": "syncplayClient.py",
|
||||
"icon_resources": [(1, "resources\\icon.ico")],
|
||||
'dest_base': "Syncplay"},
|
||||
],
|
||||
console=['syncplayServer.py'],
|
||||
# *** If you wish to make the Syncplay client use console mode (for --no-gui to work) then comment out the above two lines and uncomment the following line:
|
||||
# console=['syncplayServer.py', {"script":"syncplayClient.py", "icon_resources":[(1, "resources\\icon.ico")], 'dest_base': "Syncplay"}],
|
||||
options={'py2exe': {
|
||||
options={
|
||||
'py2exe': {
|
||||
'dist_dir': OUT_DIR,
|
||||
'packages': 'PySide.QtUiTools',
|
||||
'includes': 'twisted, sys, encodings, datetime, os, time, math, PySide, liburl, ast, unicodedata, _ssl',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user