Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build portable version #449

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions scripts/package_desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def make():

def make_windows():
global package_version, sign, machine, arch, xp, iscc_args, source_dir, \
innosetup_file, innosetup_update_file, advinst_file, portable_zip_file
innosetup_file, innosetup_update_file, advinst_file, portable_zip_file, \
portable_evb_file

set_cwd(get_abspath(git_dir, build_dir))

Expand All @@ -40,6 +41,7 @@ def make_windows():
delete_files("*.aic")
delete_files("*.tmp")
delete_files("*.zip")
delete_files(get_path("portable/*.exe"))
delete_files(get_path("update/*.exe"))
delete_files(get_path("update/*.xml"))
delete_files(get_path("update/*.html"))
Expand Down Expand Up @@ -77,9 +79,13 @@ def make_windows():
advinst_file = "%s_%s_%s.msi" % (package_name, package_version, suffix)
make_advinst()

if target.startswith('portable'):
if target.startswith('portable-zip'):
portable_zip_file = "%s_%s_%s.zip" % (package_name, package_version, suffix)
make_win_portable()
make_portable_zip()

if target.startswith('portable-evb'):
portable_evb_file = get_path("portable/DesktopEditorsPortable.exe")
make_portable_evb()

return

Expand Down Expand Up @@ -219,15 +225,24 @@ def make_advinst():
["/execute", "DesktopEditors.aip", "DesktopEditors.aic", "-nofail"])
return

def make_win_portable():
log("\n=== Build portable\n")
def make_portable_zip():
log("\n=== Build portable zip\n")
log("--- " + portable_zip_file)
if is_file(portable_zip_file):
log("! file exist, skip")
return
cmd("7z", ["a", "-y", portable_zip_file, get_path(source_dir, "*")])
return

def make_portable_evb():
log("\n=== Build portable evb\n")
log("--- " + portable_evb_file)
if is_file(portable_evb_file):
log("! file exist, skip")
return
cmd('start', ["%s\%s" % (get_abspath(git_dir, build_dir), "portable_" + source_prefix + ".bat")])
return

#
# macOS
#
Expand Down