Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add appimage build #18

Merged
merged 8 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ DIST_DIR=dist
VENV_DIR=.venv_docker

linux() {
python3 -m venv $VENV_DIR
. $VENV_DIR/bin/activate
pip install pyinstaller
pip install -r requirements.txt
pyinstaller --distpath $DIST_DIR/linux ./wb-modbus-device-editor.spec
pyinstaller --distpath $DIST_DIR/linux ./linux.spec
}

windows() {
wine pip install -r requirements.txt
wine pyinstaller --distpath $DIST_DIR/windows ./wb-modbus-device-editor.spec
wine pyinstaller --distpath $DIST_DIR/windows ./windows.spec
}

clean() {
Expand Down
7 changes: 0 additions & 7 deletions Dockerfile

This file was deleted.

7 changes: 6 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ buildDebSbuild(
repos: ['devTools'],
defaultRunLintian: true,
defaultRunPythonChecks: true,
releaseFilesFilter: "**/*.deb, **/*.zip",
releaseFilesFilter: "**/*.deb, **/*.zip, **/*.AppImage",
customBuildSteps: {
stage("Build exe") {
sh 'docker run -t -v $DEV_VOLUME -w $PWD/$PROJECT_SUBDIR tobix/pywine:3.10 bash -c "./Build.sh clean && ./Build.sh windows"'
sh 'wbdev root bash -c "cd $PROJECT_SUBDIR/dist/windows && zip -r wb-modbus-device-editor-windows.zip ./wb-modbus-device-editor/"'
sh "cp -r $PROJECT_SUBDIR/dist/ $RESULT_SUBDIR/"
archiveArtifacts artifacts: "$RESULT_SUBDIR/dist/windows/*.zip"
}
stage("Build appimage") {
sh 'wbdev root bash -c "apt-get update && apt-get install python3-tk -y && cd $PROJECT_SUBDIR && ./Build.sh clean && ./Build.sh linux"'
sh "cp -r $PROJECT_SUBDIR/dist/ $RESULT_SUBDIR/"
archiveArtifacts artifacts: "$RESULT_SUBDIR/dist/linux/*.AppImage"
}
}
)
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

# Linux

Установите пакет, используя пакетный менеджер.
Для запуска утилиты наберите в командной строке
У вас есть возможность использовать утилиту как AppImage. Для этого скачайте файл `wb-modbus-device-editor_x86_64.AppImage`, затем перейдите в свойства файла и установите флажок `Исполняемый как приложение`. Запустите утилиту двойным щелчком.

Также вы можете установить утилиту как deb пакет, используя пакетный менеджер (сам пакет вы сможете найти в релизах). Для запуска утилиты наберите в командной строке

```sh
wb-modbus-device-editor
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
wb-modbus-device-editor (1.3.0) stable; urgency=medium

* Add appimage build

-- Ekaterina Volkova <ekaterina.volkova@wirenboard.com> Mon, 20 May 2024 17:39:52 +0300

wb-modbus-device-editor (1.2.5) stable; urgency=medium

* Remove filer on tar unpacking
Expand Down
52 changes: 52 additions & 0 deletions linux.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# -*- mode: python ; coding: utf-8 -*-
from PyInstaller.utils.hooks import collect_all, collect_submodules

a = Analysis(
["bin/wb-modbus-device-editor"],
pathex=[],
binaries=[],
datas=[("wb_modbus_device_editor", "wb_modbus_device_editor")],
hiddenimports=[
"appdirs",
"tkinter",
"pymodbus.client",
"json",
"tkinter.scrolledtext",
"tkinter.filedialog",
"tkinter.ttk",
"serial.tools.list_ports",
"platform",
"jinja2",
"commentjson",
"requests",
"pymodbus",
"semantic_version"
],
hookspath=[],
runtime_hooks=[],
excludes=[],
noarchive=False,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name="wb-modbus-device-editor_x86_64.AppImage",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)

File renamed without changes.