Skip to content

Commit

Permalink
use fbs==1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mpr1c3 committed Jul 25, 2023
1 parent 5eb8494 commit 4f6d685
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 56 deletions.
34 changes: 14 additions & 20 deletions .github/workflows/build-multi-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ name: Build
on:
push:
tags:
- 'v*'
- 'test*'
- '[0-9]+.[0-9]+.[0-9]+-?[a-zA-Z0-9]*'

jobs:
setup:
Expand All @@ -36,6 +35,7 @@ jobs:
run: |
echo "sha-short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "tag=$(git describe --tags)" >> $GITHUB_OUTPUT
echo "truncated-tag=$(git describe --tags | sed -e 's/-.*$//')" >> $GITHUB_OUTPUT
echo "draft=$(git describe --tags | sed -e 's/^test.*/true/;s/^v.*/false/')" >> $GITHUB_OUTPUT
echo "manifest=$(cat src/main/resources/base/ayab/firmware/manifest.txt)" >> $GITHUB_OUTPUT
- name: Get firmware version matching manifest
Expand All @@ -61,8 +61,8 @@ jobs:
- name: Set PACKAGE_VERSION
run: |
echo ${{ steps.vars.outputs.tag }} > src/main/resources/base/ayab/package_version
sed -i 's/PACKAGE_VERSION/${{steps.vars.outputs.tag}}/' src/build/settings/base.json
cat src/main/resources/base/ayab/package_version
sed -i -e 's/PACKAGE_VERSION/${{steps.vars.outputs.truncated-tag}}/' src/build/settings/base.json
cat src/build/settings/base.json
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -185,14 +185,15 @@ jobs:
run: |
echo "sha-short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "tag=$(git describe --tags)" >> $GITHUB_OUTPUT
echo "truncated-tag=$(git describe --tags | sed -e 's/-.*$//')" >> $GITHUB_OUTPUT
echo "draft=$(git describe --tags | sed -e 's/^test.*/true/;s/^v.*/false/')" >> $GITHUB_OUTPUT
echo "manifest=$(cat src/main/resources/base/ayab/firmware/manifest.txt)" >> $GITHUB_OUTPUT
- name: Set PACKAGE_VERSION
shell: bash
run: |
echo ${{steps.vars.outputs.tag}} > src/main/resources/base/ayab/package_version
sed -i 's/PACKAGE_VERSION/${{steps.vars.outputs.tag}}/' src/build/settings/base.json
cat src/main/resources/base/ayab/package_version
sed -i -e 's/PACKAGE_VERSION/${{steps.vars.outputs.truncated-tag}}/' src/build/settings/base.json
cat src/build/settings/base.json
- name: Set up Python ${{ matrix.python-version }}
id: py
uses: actions/setup-python@v4
Expand Down Expand Up @@ -269,16 +270,6 @@ jobs:
pwd
ls -l src/main/python/ayab/
ls -l src/main/resources/base/ayab/translations/
- name: Patch fbs package
shell: pwsh
run: |
$cwd = $(Get-Location).Path
$path = '${{ steps.py.outputs.python-path }}' -Replace '[^\\]*$', ''
echo $path
$fbs = $(Get-ChildItem -Path $path -Depth 3 -Filter 'fbs')[0].FullName + '\..\'
echo $fbs
Set-Location $fbs
patch -u -i $($cwd + '\windows-build\patch-fbs.diff') 'fbs/_defaults/src/installer/windows/Installer.nsi'
- name: Build app
shell: pwsh
run: python -m fbs freeze --debug
Expand Down Expand Up @@ -320,15 +311,17 @@ jobs:
submodules: recursive
- name: Set variables
id: vars
shell: bash
run: |
echo "sha-short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "tag=$(git describe --tags)" >> $GITHUB_OUTPUT
echo "truncated-tag=$(git describe --tags | sed -e 's/-.*$//')" >> $GITHUB_OUTPUT
echo "manifest=$(cat src/main/resources/base/ayab/firmware/manifest.txt)" >> $GITHUB_OUTPUT
- name: Set PACKAGE_VERSION
run: |
echo ${{steps.vars.outputs.tag}} > src/main/resources/base/ayab/package_version
sed -i'' -e 's/PACKAGE_VERSION/${{steps.vars.outputs.tag}}/' src/build/settings/base.json
cat src/main/resources/base/ayab/package_version
sed -i -e 's/PACKAGE_VERSION/${{steps.vars.outputs.truncated-tag}}/' src/build/settings/base.json
cat src/build/settings/base.json
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -429,15 +422,16 @@ jobs:
cd git
echo "sha-short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "tag=$(git describe --tags)" >> $GITHUB_OUTPUT
echo "truncated-tag=$(git describe --tags | sed -e 's/-.*$//')" >> $GITHUB_OUTPUT
echo "python=python${{matrix.python-version}}" >> $GITHUB_OUTPUT
echo "manifest=$(cat src/main/resources/base/ayab/firmware/manifest.txt)" >> $GITHUB_OUTPUT
echo "python-appimage=python${{matrix.python-version}}.15-cp36-cp36m-manylinux2014_x86_64.AppImage" >> $GITHUB_OUTPUT
- name: Set PACKAGE_VERSION
run: |
cd git
echo ${{steps.vars.outputs.tag}} > src/main/resources/base/ayab/package_version
sed -i 's/PACKAGE_VERSION/${{steps.vars.outputs.tag}}/' src/build/settings/base.json
cat src/main/resources/base/ayab/package_version
sed -i -e 's/PACKAGE_VERSION/${{steps.vars.outputs.truncated-tag}}/' src/build/settings/base.json
cat src/build/settings/base.json
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,6 @@ Then convert the PyQt5 `.ui` files and generate the translation files:

.\setup-environment.ps1

Finally, the `fbs` module needs a small patch.

conda install -c free patch
$dir = $(pwd).Path
cd $Env:CONDA_PREFIX\Lib\site-packages\fbs\
patch -u -i $dir\windows-build\patch-fbs.diff _defaults\src\installer\windows\Installer.nsi

Now start AYAB with:

fbs run
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fbs==0.8.6
fbs==1.0
PyInstaller==3.4
pyqt5==5.9.2
Pillow==7.1.2
Expand Down
28 changes: 0 additions & 28 deletions windows-build/patch-fbs.diff

This file was deleted.

0 comments on commit 4f6d685

Please sign in to comment.