From aa43e91fef6707a70f86a1aa941d98af5a71b21a Mon Sep 17 00:00:00 2001 From: Et0h Date: Sun, 30 Nov 2014 17:58:03 +0000 Subject: [PATCH] Warn of missing/unused strings when compiling EXE --- buildPy2exe.py | 6 ++++++ syncplay/client.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/buildPy2exe.py b/buildPy2exe.py index 4a74f64..49f1d46 100644 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -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) diff --git a/syncplay/client.py b/syncplay/client.py index 51c77ce..0adefd1 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -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