Skip to content

Commit

Permalink
Update Windows application creation scripts with variant.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsorby committed May 28, 2021
1 parent 67e3cb4 commit c14d3d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions res/win/create_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))

Expand All @@ -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)
Expand All @@ -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)
2 changes: 1 addition & 1 deletion res/win/nsis.nsi.template
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c14d3d2

Please sign in to comment.