aboutsummaryrefslogtreecommitdiff
path: root/snap
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2020-05-06 16:05:48 -0700
committerMicah Lee <micah@micahflee.com>2020-05-06 16:05:48 -0700
commitf22958cbae5d8434a75715f7e99b7aa47416deba (patch)
tree1551c87b0624c620757fdff9bee55aedb04fe43e /snap
parent905b4b80d0e823779729657e05f47cf2cbe35d6b (diff)
downloadonionshare-f22958cbae5d8434a75715f7e99b7aa47416deba.tar.gz
onionshare-f22958cbae5d8434a75715f7e99b7aa47416deba.zip
Successfully install Qt5, attempt to get onionshare python deps installed
Diffstat (limited to 'snap')
-rw-r--r--snap/qt-installer-script.js78
-rw-r--r--snap/snapcraft.yaml64
2 files changed, 136 insertions, 6 deletions
diff --git a/snap/qt-installer-script.js b/snap/qt-installer-script.js
new file mode 100644
index 00000000..ab7bccb8
--- /dev/null
+++ b/snap/qt-installer-script.js
@@ -0,0 +1,78 @@
+// 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 84104cd8..caa8f884 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -41,34 +41,86 @@ parts:
python-version: python3
python-packages:
- poetry
+ - setuptools
+ - wheel
+ - Click
+ - Flask
+ - Flask-HTTPAuth
+ - pycryptodome
+ - PyQt5 == "5.14.0"
+ - PyQt5-sip
+ - PySocks
+ - requests
+ - stem
stage-packages:
- libatk-bridge2.0-0
- libatspi2.0-0
- libgtk-3-0
- - python3-pyqt5
after: [qt5, tor, obfs4]
# Install Qt5 pre-compiled binary, because it's much simpler than
# building from source
qt5:
plugin: nil
+ override-pull: |
+ #wget https://download.qt.io/official_releases/qt/5.14/5.14.0/qt-opensource-linux-x64-5.14.0.run
+ wget http://10.51.172.1:8000/qt-opensource-linux-x64-5.14.0.run
+ echo "4379f147c6793ec7e7349d2f9ee7d53b8ab6ea4e4edf8ee0574a75586a6a6e0e *qt-opensource-linux-x64-5.14.0.run" | shasum -a 256 --check
+ chmod +x qt-opensource-linux-x64-5.14.0.run
build-packages:
- xvfb
- libdbus-1-3
- libxkbcommon-x11-0
- libxkbcommon-x11-dev
- libfontconfig1
- override-pull: |
- wget https://download.qt.io/official_releases/qt/5.14/5.14.0/qt-opensource-linux-x64-5.14.0.run
- echo "4379f147c6793ec7e7349d2f9ee7d53b8ab6ea4e4edf8ee0574a75586a6a6e0e *qt-opensource-linux-x64-5.14.0.run" | shasum -a 256 --check
- chmod +x qt-opensource-linux-x64-5.14.0.run
override-build: |
# qt-installer-script.js
- echo "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();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()};" > qt-installer-script.js
+ echo "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()};" > qt-installer-script.js
# Disable Qt installer from phoning home via hosts file
echo "127.0.0.1 iapi.qt.io.herokudns.com" >> /etc/hosts
# Install Qt5
+ rm -rf $SNAPCRAFT_PART_INSTALL/opt/Qt5.14.0
xvfb-run ./qt-opensource-linux-x64-5.14.0.run --script qt-installer-script.js --verbose
+ stage-packages:
+ - libdrm2
+ - libfontconfig1
+ - libfreetype6
+ - libgl1
+ - libglvnd0
+ - libglx0
+ - libpng16-16
+ - libx11-6
+ - libx11-xcb1
+ - libxau6
+ - libxcb-glx0
+ - libxcb-xkb1
+ - libxcb1
+ - libxdmcp6
+ - libxext6
+ - libxkbcommon-x11-0
+ - libxkbcommon0
+ - libegl1
+ - libasound2
+ - libbluetooth3
+ - libcairo-gobject2
+ - libcairo2
+ - libcups2
+ - libgdk-pixbuf2.0-0
+ - libgtk3.0-cil
+ - libgstreamer-plugins-base1.0-0
+ - libodbc1
+ - libpango-1.0-0
+ - libpangocairo-1.0-0
+ - libpq5
+ - libpulse-mainloop-glib0
+ - libpulse0
+ - libspeechd2
+ - libwayland-client0
+ - libwayland-cursor0
+ - libwayland-egl1
+ - libxml2
+ - libqt5webengine5
+ - libqt5webenginecore5
tor:
source: https://dist.torproject.org/tor-0.4.2.7.tar.gz