From db7b9553eec54ff2a17ff9ca18eabf9f87ae6c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szymaniak?= Date: Sun, 9 Feb 2020 12:31:53 +0100 Subject: [PATCH] #48 added subsync-cmd target as workaround for missing command line --- subsync/__main__.py | 4 +++- windows.spec | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/subsync/__main__.py b/subsync/__main__.py index ad5d0a5..a499be9 100644 --- a/subsync/__main__.py +++ b/subsync/__main__.py @@ -5,7 +5,7 @@ from subsync import translations translations.init() -import sys +import sys, os from subsync import cmdargs from subsync import loggercfg from subsync.settings import settings @@ -58,6 +58,8 @@ def initConfig(args): def shouldUseCli(): if settings().cli: return True + if os.path.basename(os.path.splitext(sys.argv[0])[0]) == 'subsync-cmd': + return True try: import wx return False diff --git a/windows.spec b/windows.spec index 0660189..7e93115 100644 --- a/windows.spec +++ b/windows.spec @@ -45,8 +45,21 @@ main_dbg = EXE(main_pyz, console=True, icon='resources/icon.ico') +main_cmd = EXE(main_pyz, + main_a.scripts, + [], + exclude_binaries=True, + name='subsync-cmd', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=True, + icon='resources/icon.ico') + main_coll = COLLECT(main_exe, main_dbg, + main_cmd, main_a.binaries, main_a.zipfiles, main_a.datas,