diff options
author | Micah Lee <micah@micahflee.com> | 2020-11-08 12:07:17 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-11-08 12:07:17 -0800 |
commit | 46a9434fbfa14b4545f7f5f12f3bd3a2cc3621c9 (patch) | |
tree | 064af592ca9e469488f67ff255879c4dbf3ead9f /desktop | |
parent | f319de1d7a833e38e190ef07072aee16e322c6fc (diff) | |
download | onionshare-46a9434fbfa14b4545f7f5f12f3bd3a2cc3621c9.tar.gz onionshare-46a9434fbfa14b4545f7f5f12f3bd3a2cc3621c9.zip |
Add incomplete flatpak manifest, update release docs, re-add source package script
Diffstat (limited to 'desktop')
-rwxr-xr-x | desktop/package/linux/build-appimage.py | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/desktop/package/linux/build-appimage.py b/desktop/package/linux/build-appimage.py new file mode 100755 index 00000000..8fcbda90 --- /dev/null +++ b/desktop/package/linux/build-appimage.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +import os +import inspect +import subprocess +import argparse +import shutil +import glob + +root = os.path.dirname( + os.path.dirname( + os.path.dirname( + os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) + ) + ) +) + + +def run(cmd, cwd=None): + subprocess.run(cmd, cwd=cwd, check=True) + + +def main(): + cli_dir = os.path.join(root, "cli") + desktop_dir = os.path.join(root, "desktop") + + print("○ Building onionshare-cli") + run(["poetry", "install"], cli_dir) + run(["poetry", "build"], cli_dir) + whl_filename = glob.glob(os.path.join(cli_dir, "dist", "*.whl"))[0] + 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) + + print("○ Create the AppImage") + run(["briefcase", "build"], desktop_dir) + + +if __name__ == "__main__": + main()
\ No newline at end of file |