From c14d3d2407d07c1c5edf278f3aa9e23e3621a0ce Mon Sep 17 00:00:00 2001 From: Hugh Sorby Date: Fri, 28 May 2021 12:14:20 +1200 Subject: [PATCH] Update Windows application creation scripts with variant. --- res/win/create_installer.py | 8 +++++--- res/win/nsis.nsi.template | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/res/win/create_installer.py b/res/win/create_installer.py index c9b74b5d..0b6f8c7c 100644 --- a/res/win/create_installer.py +++ b/res/win/create_installer.py @@ -24,7 +24,7 @@ def run_command(cmd): yield 'command returned with value: %s' % return_code -def run_makensis(repo_root_dir, app_version): +def run_makensis(repo_root_dir, app_version, app_variant): if not os.path.exists(os.path.join(repo_root_dir, 'package')): os.mkdir(os.path.join(repo_root_dir, 'package')) @@ -36,7 +36,8 @@ def run_makensis(repo_root_dir, app_version): contents = f.read() match_keys = ReplaceOnlyDict(map_client_version=app_version.__version__, - dist_dir=os.path.join(repo_root_dir, 'res', 'pyinstaller', 'dist', 'MAP-Client'), + app_variant=app_variant, + dist_dir=os.path.join(repo_root_dir, 'res', 'pyinstaller', 'dist', 'MAP-Client' + app_variant), win_res_dir=os.path.join(repo_root_dir, 'res', 'win'), package_dir=os.path.join(repo_root_dir, 'package')) formatted_contents = contents.format_map(match_keys) @@ -63,4 +64,5 @@ def run_makensis(repo_root_dir, app_version): from mapclient.settings import version as app_version - run_makensis(root_dir, app_version) + app_variant = '-mapping-tools' + run_makensis(root_dir, app_version, app_variant) diff --git a/res/win/nsis.nsi.template b/res/win/nsis.nsi.template index 404aba8d..99ffe78c 100644 --- a/res/win/nsis.nsi.template +++ b/res/win/nsis.nsi.template @@ -3,7 +3,7 @@ ;-------------------------------- ; You must define these values - !define APP_NAME "MAP-Client" + !define APP_NAME "MAP-Client{app_variant}" !define APP_VERSION "{map_client_version}" !define APP_ORGANISATION "MAP" !define VERSION "1.0.0"