Warn of missing/unused strings when compiling EXE

This commit is contained in:
Et0h 2014-11-30 17:58:03 +00:00
parent ac3e0f39c6
commit aa43e91fef
2 changed files with 7 additions and 1 deletions

View File

@ -16,6 +16,12 @@ 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))
p = "C:\\Program Files (x86)\\NSIS\\Unicode\\makensis.exe" #TODO: how to move that into proper place, huh
NSIS_COMPILE = p if os.path.isfile(p) else "makensis.exe"
OUT_DIR = "syncplay v{}".format(syncplay.version)

View File

@ -112,7 +112,7 @@ class SyncplayClient(object):
if constants.DEBUG_MODE and constants.WARN_ABOUT_MISSING_STRINGS:
missingStrings = getMissingStrings()
if missingStrings is not None and missingStrings is not "":
self.ui.showDebugMessage("MISSING STRINGS DETECTED:\n{}".format(missingStrings))
self.ui.showDebugMessage("MISSING/UNUSED STRINGS DETECTED:\n{}".format(missingStrings))
def initProtocol(self, protocol):
self._protocol = protocol