Skip to content

Commit

Permalink
long-term-archiving
Browse files Browse the repository at this point in the history
  • Loading branch information
SHexplorer committed Apr 10, 2023
0 parents commit 62ffa6e
Show file tree
Hide file tree
Showing 18 changed files with 2,279 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build-appimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will install create an AppImage of BeamIT-Desktop-App

name: Build Linux AppImage

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y squashfs-tools libfuse2
- name: Checkout repo
uses: actions/checkout@master
with:
path: 'BeamIT-Desktop-App'

- name: build
run: |
wget -c https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
chmod +x appimage-builder-1.1.0-x86_64.AppImage
./appimage-builder-1.1.0-x86_64.AppImage --recipe BeamIT-Desktop-App/AppImageBuilder.yml
- name: create pre-release
uses: ncipollo/release-action@v1.12.0
with:
allowUpdates: True
tag: appimage-build
name: AppImage build
prerelease: True
artifacts: "BeamIT-Desktop-App-*.AppImage"
token: ${{ secrets.GITHUB_TOKEN }}


39 changes: 39 additions & 0 deletions .github/workflows/module-test_and_syntax.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python test_config.py
129 changes: 129 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
61 changes: 61 additions & 0 deletions AppImageBuilder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
version: 1
script:
# Remove any previous build
- rm -rf AppDir | true
# Make usr and icons dirs
- mkdir -p AppDir/opt/beamit-desktop-app
# Copy the python application code into the AppDir
- cp BeamIT-Desktop-App/* AppDir/opt/beamit-desktop-app -r
- mkdir -p AppDir/usr/share/icons
- cp BeamIT-Desktop-App/icon.png AppDir/usr/share/icons -r
# Install application dependencies
- python3 -m pip install --ignore-installed --prefix=/usr --root=AppDir requests PySide6 pyperclip


AppDir:
path: ./AppDir

app_info:
id: de.beamit.desktop-app
name: BeamIT-Desktop-App
icon: icon
version: 0.1.1
# Set the python executable as entry point
exec: usr/bin/python3
# Set the application main script path as argument. Use '$@' to forward CLI parameters
exec_args: "$APPDIR/opt/beamit-desktop-app/main.py $APPDIR/opt/beamit-desktop-app/"

apt:
arch: amd64
sources:
- sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse'
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C'
#key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'

include:
- python3
- python3-pkg-resources
- python3-pip
exclude: []

files:
exclude:
- opt/beamit-desktop-app/.git
- opt/beamit-desktop-app/.gitignore
- opt/beamit-desktop-app/BeamIT-Desktop-Install.iss
- opt/beamit-desktop-app/AppImageBuilder.yml
- opt/beamit-desktop-app/test_config.py

runtime:
env:
# Set python home
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
PYTHONHOME: '${APPDIR}/usr'
# Path to the site-packages dir or other modules dirs
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
PYTHONPATH: '${APPDIR}/usr/lib/python3.10/site-packages'

AppImage:
update-information: 'gh-releases-zsync|BeamIT|beamit-destkop-app|latest|beamit-destkop-app-*x86_64.AppImage.zsync'
sign-key: None
arch: x86_64
44 changes: 44 additions & 0 deletions BeamIT-Desktop-Install.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "BeamIT Desktop"
#define MyAppVersion "1.1"
#define MyAppPublisher "BeamIT, Inc."
#define MyIconFileName "icon.ico"

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{E90C3F0D-5581-4A7D-934B-CE41F1DD08A8}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=C:\Users\Dev\Desktop\InnoSetup BeamIT
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
WizardStyle=modern
SetupIconFile="C:\Users\Dev\Desktop\InnoSetup BeamIT\src\BeamIT-Desktop-App\{#MyIconFileName}"

[Languages]
Name: "german"; MessagesFile: "compiler:Languages\German.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\Users\Dev\Desktop\InnoSetup BeamIT\src\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\python-3.11.1.amd64\pythonw.exe"; WorkingDir: "{app}\BeamIT-Desktop-App\"; Parameters: "main.py"; IconFilename: "{app}\BeamIT-Desktop-App\{#MyIconFileName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\python-3.11.1.amd64\pythonw.exe"; WorkingDir: "{app}\BeamIT-Desktop-App\"; Parameters: "main.py"; Tasks: desktopicon; IconFilename: "{app}\BeamIT-Desktop-App\{#MyIconFileName}"

[Run]
Filename: "{app}\python-3.11.1.amd64\pythonw.exe"; WorkingDir: "{app}\BeamIT-Desktop-App\"; Parameters: "main.py"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Loading

0 comments on commit 62ffa6e

Please sign in to comment.