Skip to content

Commit

Permalink
Merge branch 'master' into v2
Browse files Browse the repository at this point in the history
  • Loading branch information
jurplel committed Apr 15, 2020
2 parents 93cd092 + a176bda commit b0d3b64
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
uses: ./
with:
modules: 'qtcharts qtwebengine'
mirror: 'http://mirrors.ocf.berkeley.edu/qt/'
extra: '--external 7z'

- name: Configure test project on windows
if: startsWith(matrix.os, 'windows')
Expand Down
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All done.
### `version`
The desired version of Qt to install.

Default: `5.12.7` (Latest LTS at the time of writing)
Default: `5.12.8` (Latest LTS at the time of writing)

### `host`
This is the host platform of the Qt version you will be installing. It's unlikely that you will need to set this manually if you are just building.
Expand Down Expand Up @@ -89,7 +89,7 @@ It can be used with [actions/cache](https://github.com/actions/cache), for examp
uses: actions/cache@v1
with:
path: ../Qt
key: QtCache
key: ${{ runner.os }}-QtCache
- name: Install Qt
uses: jurplel/install-qt-action@v2
Expand All @@ -103,20 +103,25 @@ Default: `false`

Version of [aqtinstall](https://github.com/miurahr/aqtinstall) to use, given in the format used by pip, for example: `==0.7.1`, `>=0.7.1`, `==0.7.*`. This is intended to be used to troubleshoot any bugs that might be caused or fixed by certain versions of aqtinstall.

Default: `==0.8a4`
Default: `==0.8`

### `py7zrversion`
Version of py7zr in the same style as the aqtversion and intended to be used for the same purpose.

Default: `==0.6b8`
Default: `==0.6`

### `extra`
This input can be used to append arguments to the end of the aqtinstall command in case of special needs.

Example value: `--external 7z`

## Example with all arguments

```yml
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.12.7'
version: '5.12.8'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2017_64'
Expand All @@ -125,8 +130,9 @@ Default: `==0.6b8`
modules: 'qtcharts qtwebengine'
mirror: 'http://mirrors.ocf.berkeley.edu/qt/'
cached: 'false'
aqtversion: '==0.8a4'
py7zrversion: '==0.6b8'
aqtversion: '==0.8'
py7zrversion: '==0.6'
extra: '--external 7z'
```

## More info
Expand Down
9 changes: 5 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
description: 'Directory to install Qt'
version:
description: 'Version of Qt to install'
default: '5.12.7'
default: '5.12.8'
host:
description: 'Host platform'
target:
Expand All @@ -29,11 +29,12 @@ inputs:
default: 'false'
aqtversion:
description: "Version of aqtinstall to use in case of issues"
default: '==0.8a4'
default: '==0.8'
py7zrversion:
description: "Version of py7zr to use in case of issues"
default: '==0.6b8'

default: '==0.6'
extra:
description: "Any extra arguments to append to the back"
runs:
using: 'node12'
main: 'lib/main.js'
14 changes: 10 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ async function run() {
let arch = core.getInput("arch");
let modules = core.getInput("modules").split(" ");
let mirror = core.getInput("mirror");
let extra = core.getInput("extra").split(" ");;

//set host automatically if omitted
if (!host) {
Expand Down Expand Up @@ -62,16 +63,21 @@ async function run() {
if (arch && (host == "windows" || target == "android")) {
args.push(`${arch}`);
}
if (mirror) {
args.push("-b");
args.push(mirror);
}
if (extra) {
extra.forEach(function(string) {
args.push(string);
});
}
if (modules) {
args.push("-m");
modules.forEach(function(currentModule) {
args.push(currentModule);
});
}
if (mirror) {
args.push("-b");
args.push(mirror);
}

//accomodate for differences in python 3 executable name
let pythonName = "python3";
Expand Down

0 comments on commit b0d3b64

Please sign in to comment.