Skip to content

Commit

Permalink
Fix AppImage build (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
airvzxf committed Oct 22, 2022
1 parent f29afc8 commit 9aefbe4
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Packaging
on:
push:
branches-ignore:
# Also, don't build i18n, the only changes are uncompiled translation files
# Also, don't build i18n, the only changes are un-compiled translation files
- 'i18n'
tags-ignore:
# Do not build tags that we create when we upload to GitHub Releases
Expand All @@ -27,15 +27,15 @@ jobs:
- name: Install dependencies
run: |
bash -xe ci/bootstrap-container.sh
# beware: the line below is a DIRTY HACK -- it will override the system pip -- the proper way to do this would be a virtualenv
wget https://bootstrap.pypa.io/get-pip.py -O- | sudo python3.6; sudo pip install tox-travis
- name: Compile translations
run: |
source /opt/qt514/bin/qt514-env.sh || true
bash -xe prepare_activate_translations.sh 70 "https://hosted.weblate.org/exports/stats/pext/?format=json"
lrelease pext/pext.pro
- name: Run tests
run: xvfb-run tox -v -e py36
run: |
source pext-env/bin/activate
xvfb-run tox -v -e py38
- name: Build AppImage
run: |
mkdir -p build
Expand Down
72 changes: 71 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,74 @@ ENV/
# Pext specific
pext/i18n/*.qm

# nano editor
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
24 changes: 13 additions & 11 deletions ci/bootstrap-container.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
#! /bin/bash

# install Python 3.6
sudo add-apt-repository -y ppa:deadsnakes/ppa
# Install Python
sudo apt-get update
sudo apt-get install -y python3.6 python3.6-venv python3.6-dev
sudo apt-get install -y python3.8 python3.8-venv python3.8-dev

# install proper cross-distro libcurl
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/TheAssassin:/AppImageLibraries/xUbuntu_18.04/ /' > /etc/apt/sources.list.d/curl-httponly.list"
wget https://download.opensuse.org/repositories/home:/TheAssassin:/AppImageLibraries/xUbuntu_18.04/Release.key -O- | sudo apt-key add -
sudo apt-get update

sudo apt-get install -y curl libcurl4-gnutls-dev libcurl3-gnutls libcurl3 bc
# Install curl
sudo apt-get install -y curl libcurl4 libcurl4-gnutls-dev bc

# install somewhat up-to-date Qt
sudo add-apt-repository -y ppa:beineri/opt-qt-5.14.2-xenial
# Install Qt
sudo add-apt-repository -y ppa:beineri/opt-qt-5.14.2-bionic
sudo apt-get update
sudo apt-get install -y qt514tools

# Create the Python vEnv and install requirements
/usr/bin/python3.8 -m venv pext-env
source pext-env/bin/activate
pip install --upgrade pip
pip install tox-travis
pip install -r requirements.txt
4 changes: 3 additions & 1 deletion pext/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,9 @@ def install(self, url: str, identifier: str, name: str, branch: bytes, verbose=F
Logger.log(None, Translation.get("downloading_from_url").format(name, url))

try:
porcelain.clone(UpdateManager.fix_git_url_for_dulwich(url), target=module_path, checkout=branch, force=True)
porcelain.clone(
UpdateManager.fix_git_url_for_dulwich(url), target=module_path, checkout=branch, force=True
)
except Exception as e:
if verbose:
Logger.log_critical(
Expand Down

0 comments on commit 9aefbe4

Please sign in to comment.