aboutsummaryrefslogtreecommitdiff
path: root/desktop/package
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2020-11-09 18:36:31 -0800
committerMicah Lee <micah@micahflee.com>2020-11-09 18:36:31 -0800
commit731d6391c3c5fcb028a5d7979f7cab8848e0e1af (patch)
treebb5a05170697ead7de242740293a34e76dcb2c1d /desktop/package
parent1514ffb56a940543340d6cd7a1b95134000c8baf (diff)
downloadonionshare-731d6391c3c5fcb028a5d7979f7cab8848e0e1af.tar.gz
onionshare-731d6391c3c5fcb028a5d7979f7cab8848e0e1af.zip
Add setuptools as a dependency for pkg_resources module, and update build scripts to properly delete last build
Diffstat (limited to 'desktop/package')
-rwxr-xr-xdesktop/package/linux/build-appimage.py10
-rwxr-xr-xdesktop/package/macos/build.py10
-rw-r--r--desktop/package/windows/build.py12
3 files changed, 19 insertions, 13 deletions
diff --git a/desktop/package/linux/build-appimage.py b/desktop/package/linux/build-appimage.py
index 8fcbda90..30c5de94 100755
--- a/desktop/package/linux/build-appimage.py
+++ b/desktop/package/linux/build-appimage.py
@@ -23,6 +23,12 @@ def main():
cli_dir = os.path.join(root, "cli")
desktop_dir = os.path.join(root, "desktop")
+ print("○ Clean up from last build")
+ if os.path.exist(os.path.join(cli_dir, "dist")):
+ shutil.rmtree(os.path.join(cli_dir, "dist"))
+ if os.path.exists(os.path.join(desktop_dir, "linux")):
+ shutil.rmtree(os.path.join(desktop_dir, "linux"))
+
print("○ Building onionshare-cli")
run(["poetry", "install"], cli_dir)
run(["poetry", "build"], cli_dir)
@@ -30,10 +36,6 @@ def main():
whl_basename = os.path.basename(whl_filename)
shutil.copyfile(whl_filename, os.path.join(desktop_dir, whl_basename))
- print("○ Clean up from last build")
- if os.path.exists(os.path.join(desktop_dir, "linux")):
- shutil.rmtree(os.path.join(desktop_dir, "linux"))
-
print("○ Create the binary")
run(["briefcase", "create"], desktop_dir)
diff --git a/desktop/package/macos/build.py b/desktop/package/macos/build.py
index 0cf3c57c..f9af29c5 100755
--- a/desktop/package/macos/build.py
+++ b/desktop/package/macos/build.py
@@ -33,6 +33,12 @@ def main():
cli_dir = os.path.join(root, "cli")
desktop_dir = os.path.join(root, "desktop")
+ print("○ Clean up from last build")
+ if os.path.exist(os.path.join(cli_dir, "dist")):
+ shutil.rmtree(os.path.join(cli_dir, "dist"))
+ if os.path.exists(os.path.join(desktop_dir, "macOS")):
+ shutil.rmtree(os.path.join(desktop_dir, "macOS"))
+
print("○ Building onionshare-cli")
run(["poetry", "install"], cli_dir)
run(["poetry", "build"], cli_dir)
@@ -40,10 +46,6 @@ def main():
whl_basename = os.path.basename(whl_filename)
shutil.copyfile(whl_filename, os.path.join(desktop_dir, whl_basename))
- print("○ Clean up from last build")
- if os.path.exists(os.path.join(desktop_dir, "macOS")):
- shutil.rmtree(os.path.join(desktop_dir, "macOS"))
-
print("○ Create app bundle")
run(["briefcase", "create"], desktop_dir)
app_path = os.path.join(desktop_dir, "macOS", "OnionShare", "OnionShare.app")
diff --git a/desktop/package/windows/build.py b/desktop/package/windows/build.py
index 3ee7de4f..c4d1fd89 100644
--- a/desktop/package/windows/build.py
+++ b/desktop/package/windows/build.py
@@ -23,6 +23,12 @@ def main():
cli_dir = os.path.join(root, "cli")
desktop_dir = os.path.join(root, "desktop")
+ print("○ Clean up from last build")
+ if os.path.exist(os.path.join(cli_dir, "dist")):
+ shutil.rmtree(os.path.join(cli_dir, "dist"))
+ if os.path.exists(os.path.join(desktop_dir, "windows")):
+ shutil.rmtree(os.path.join(desktop_dir, "windows"))
+
print("○ Building onionshare-cli")
run(["poetry", "install"], cli_dir)
run(["poetry", "build"], cli_dir)
@@ -30,14 +36,10 @@ def main():
whl_basename = os.path.basename(whl_filename)
shutil.copyfile(whl_filename, os.path.join(desktop_dir, whl_basename))
- print("○ Clean up from last build")
- if os.path.exists(os.path.join(desktop_dir, "windows")):
- shutil.rmtree(os.path.join(desktop_dir, "windows"))
-
print("○ Create the binary")
run(["briefcase", "create"], desktop_dir)
run(["briefcase", "package"], desktop_dir)
- msi_filename = os.path.join(desktop_dir, "windows", "OnionShare-2.3.dev1.msi")
+ msi_filename = glob.glob(os.path.join(cli_dir, "windows", "OnionShare-*.msi"))[0]
print(f"○ Created unsigned installer: {msi_filename}")
print(f"○ Signing installer")