From 8ad8413454923c34bd05faa8c3f8c5b59793a4c4 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sun, 5 Jul 2020 10:19:06 -0700 Subject: Start making snap package pull from source tree instead of git --- snap/README.md | 37 --------------------- snap/qt-installer-script.js | 78 --------------------------------------------- snap/snapcraft.yaml | 4 +-- 3 files changed, 1 insertion(+), 118 deletions(-) delete mode 100644 snap/README.md delete mode 100644 snap/qt-installer-script.js (limited to 'snap') diff --git a/snap/README.md b/snap/README.md deleted file mode 100644 index 074cdb13..00000000 --- a/snap/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Snap package - -This folder contains files to build a [snap package](https://snapcraft.io/). First make sure you install `snap` and `snapcraft` (`snap install snapcraft --classic`). - -To build the snap, cd to the `snap` folder and run: - -```sh -snapcraft -snap install ./onionshare_*.snap -``` - -See your installed snaps: - -```sh -snap list -``` - -Run the OnionShare snap: - -```sh -/snap/bin/onionshare # CLI version -/snap/bin/onionshare-gui # GUI version -``` - -Delete the OnionShare snap: - -```sh -snap remove onionshare -``` - -## Making a new release - -In `snapcraft.yaml`: - -- Update `version` -- Update the `onionshare` part to use the correct tag -- Update `Qt5`, `tor`, `libevent`, and `obfs4` dependencies, if necessary diff --git a/snap/qt-installer-script.js b/snap/qt-installer-script.js deleted file mode 100644 index ab7bccb8..00000000 --- a/snap/qt-installer-script.js +++ /dev/null @@ -1,78 +0,0 @@ -// This script is here for convenience. Minify it and copy it into the -// qt5 override-build section of snapcraft.yaml - -function Controller() { - installer.installationFinished.connect(proceed) -} - -function logCurrentPage() { - var pageName = page().objectName - var pagePrettyTitle = page().title - console.log('At page: ' + pageName + ' (' + pagePrettyTitle + ')') -} - -function page() { - return gui.currentPageWidget() -} - -function proceed(button, delay) { - gui.clickButton(button || buttons.NextButton, delay) -} - -Controller.prototype.WelcomePageCallback = function () { - logCurrentPage() - proceed(buttons.NextButton, 2000) -} - -Controller.prototype.CredentialsPageCallback = function () { - logCurrentPage() - proceed() -} - -Controller.prototype.IntroductionPageCallback = function () { - logCurrentPage() - proceed() -} - -Controller.prototype.TargetDirectoryPageCallback = function () { - logCurrentPage() - var dir = installer.environmentVariable('SNAPCRAFT_PART_INSTALL') + '/opt/Qt5.14.0' - console.log('Installing to ' + dir) - page().TargetDirectoryLineEdit.setText(dir) - proceed() -} - -Controller.prototype.ComponentSelectionPageCallback = function () { - logCurrentPage() - page().deselectAll() - page().selectComponent('qt.qt5.5140.gcc_64') - proceed() -} - -Controller.prototype.LicenseAgreementPageCallback = function () { - logCurrentPage() - page().AcceptLicenseRadioButton.checked = true - gui.clickButton(buttons.NextButton) -} - -Controller.prototype.ReadyForInstallationPageCallback = function () { - logCurrentPage() - proceed() -} - -Controller.prototype.PerformInstallationPageCallback = function () { - logCurrentPage() -} - -Controller.prototype.FinishedPageCallback = function () { - logCurrentPage() - proceed(buttons.FinishButton) -} - -Controller.prototype.DynamicTelemetryPluginFormCallback = function () { - logCurrentPage() - console.log(Object.keys(page().TelemetryPluginForm.statisticGroupBox)) - var radioButtons = page().TelemetryPluginForm.statisticGroupBox - radioButtons.disableStatisticRadioButton.checked = true - proceed() -} \ No newline at end of file diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 5ce700ed..f42a1f28 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -35,9 +35,7 @@ apps: parts: onionshare: - source: https://github.com/micahflee/onionshare.git - source-type: git - source-branch: 1111_snap + source: . plugin: python python-version: python3 python-packages: -- cgit v1.2.3-54-g00ecf