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

Remove requirement for separate Qt installation #677

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: 3 additions & 3 deletions .github/workflows/build-multi-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ jobs:
(steps.e-cache.outputs.cache-hit != 'true') ||
(steps.qm-cache.outputs.cache-hit != 'true') }}
run: |
sudo apt install -y qt6-base-dev qt6-tools-dev-tools qt6-l10n-tools
PATH=/usr/lib/qt6/bin:$PATH bash setup-environment.ps1
# Install qt6 packages to bring in system dependencies only
sudo apt install -y qt6-base-dev qt6-tools-dev-tools
bash setup-environment.ps1
- name: Cache gui files (1)
if: ${{ (steps.gui1-cache.outputs.cache-hit != 'true') }}
uses: actions/cache/save@v3
Expand Down Expand Up @@ -312,7 +313,6 @@ jobs:
shell: zsh {0}
run: |
brew install avrdude
brew install qt
mkdir tmp-wheel/
python -m pip install delocate

Expand Down
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@ After cloning the repo and installing the development dependencies, you should r
Linux
</summary>

For flashing the firmware, avrdude has to be available on your system.
To be able to work on GUI elements and translation files, you will also need Qt Dev & Localization Tools.
For flashing the firmware, avrdude has to be available on your system.
To build or run the application, you will also need the system libraries required by Qt 6; installing the Qt 6 development tools is a concise (if heavy-handed) way of bringing in these dependencies.

#### Debian/Ubuntu
```bash
sudo apt install python3.11 python3.11-dev python3.11-venv
sudo apt install libasound2-dev avrdude qt6-tools-dev-tools build-essential qt6-l10n-tools
export PATH=/usr/lib/qt6/bin:$PATH
sudo apt install libasound2-dev avrdude qt6-tools-dev-tools build-essential
```
#### openSUSE
```bash
sudo zypper install python311 python311-pip python311-virtualenv python311-devel
sudo zypper install libasound2 alsa-devel avrdude qt6-tools qt6-tools-linguist
export PATH=/usr/lib/qt6/bin:$PATH
sudo zypper install libasound2 alsa-devel avrdude qt6-tools-dev-tools build-essential
```
#### All Distributions

Expand Down Expand Up @@ -70,9 +69,6 @@ Activate the virtual environment. The command prompt should now display
```
(You may skip the virtual environment setup below.)

To be able to work on GUI elements and translation files, the Qt Dev tools are needed.
Navigate to [https://www.qt.io/download-open-source](https://www.qt.io/download-open-source) in a web browser and follow the installation
instructions. From the available options, select "Custom install" and then "Qt 6.6.3".
You will also need to download and install Perl from [https://www.perl.org/get.html](https://www.perl.org/get.html).
</details>

Expand All @@ -89,10 +85,6 @@ You will also need the Xcode command line tools:
```bash
xcode-select --install
```
To be able to work on GUI elements and translation files, the Qt Dev tools are needed also:
```bash
brew install qt
```
Install python from [the official universal2 installer](https://www.python.org/ftp/python/3.11.8/python-3.11.8-macos11.pkg). (Conda does not produce universal binaries)

If you encounter the pip `SSL:TLSV1_ALERT_PROTOCOL_VERSION` problem:
Expand Down Expand Up @@ -127,7 +119,6 @@ Next, convert the PySide6 `.ui` files and generate the translation files:
```bash
bash ./setup-environment.ps1
```
If you get errors about missing `lrelease`, you can skip this (if you do not need the translation files). To do so, comment out lines [23:26] of `setup-environment.ps1`.

Finally, you can start AYAB with
```bash
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/base/ayab/translations/ayab_trans.pl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ sub rm{
}

# now that the `.ts` files have been generated
# run `lrelease *.ts` to create binary `.qm` files
# run `pyside6-lrelease *.ts` to create binary `.qm` files
open(FILE, "<", $master);
system("lrelease *.ts");
system("pyside6-lrelease *.ts");
unlink glob "*.ts";