diff --git a/bin/conductor b/bin/conductor index ac2fb7d5..3a303f66 100755 --- a/bin/conductor +++ b/bin/conductor @@ -13,6 +13,13 @@ try: except: sys.path.append(os.path.dirname(os.path.dirname(__file__))) +# On Windows, due to the quirks of the multiprocessing module +# this file is installed as 'conductor.py' and to ensure the +# environment gets passed properly, add the module to the path +# list again +if os.name == 'nt': + sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) + import conductor from conductor.lib import conductor_submit, downloader, downloader2, uploader, uploader_v2, loggeria @@ -447,7 +454,8 @@ def run_downloader(args): # Code switcher between new downloader and old downloader # HARD set windows users to old downloader if sys.platform == "win32": - return downloader2.run_downloader(args_dict) + return downloader.run_downloader(args_dict) + # return downloader2.run_downloader(args_dict) if args_dict.get("task_id") and not args_dict.get("job_id"): raise argparse.ArgumentTypeError('Must supply a job_id with task_id.') diff --git a/installers/windows/ConductorClient.nsi b/installers/windows/ConductorClient.nsi index cf60eff1..0dcb8309 100644 --- a/installers/windows/ConductorClient.nsi +++ b/installers/windows/ConductorClient.nsi @@ -74,6 +74,8 @@ ${INSTALL_TYPE} SetOverwrite ifnewer SetOutPath "$INSTDIR" File /r /x ".git" "Conductor" +File /oname=Conductor\bin\conductor.py "Conductor\bin\conductor" +Delete "Conductor\bin\conductor" ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\Conductor" ${EnvVarUpdate} $0 "PYTHONPATH" "A" "HKLM" "$INSTDIR\Conductor" diff --git a/installers/windows/conductor.bat b/installers/windows/conductor.bat index cd2ece01..78ba8c80 100644 --- a/installers/windows/conductor.bat +++ b/installers/windows/conductor.bat @@ -1,2 +1,2 @@ -@echo off -"%~dp0\python\python.exe" "%~dp0\bin\conductor" %* +@echo off +"%~dp0\python\python.exe" "%~dp0\bin\conductor.py" %*