Skip to content

Commit 3497681

Browse files
committed
Switch to the new way of building packages via pkgdesc.qml
Note a new (as of making this change unreleased) version of vesc_tool is now needed to build the package the default way. To build via the old vesc_tool method, run: make OLDVT=1
1 parent 3509623 commit 3497681

4 files changed

Lines changed: 30 additions & 1 deletion

File tree

.github/actions/build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ runs:
1212

1313
- name: Build
1414
shell: bash
15-
run: make -j
15+
run: make -j OLDVT=1

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22
VESC_TOOL ?= vesc_tool
33
# use `make MINIFY_QML=0` to skip qml minification and pack the qml verbatim
44
MINIFY_QML ?= 1
5+
# use `make OLDVT=1` to build with old vesc_tool which doesn't support pkgdesc.qml
6+
OLDVT ?= 0
57

68
all: refloat.vescpkg
79

810
refloat.vescpkg: src package.lisp package_README-gen.md ui.qml
11+
ifeq ($(OLDVT), 1)
912
$(VESC_TOOL) --buildPkg "refloat.vescpkg:package.lisp:ui.qml:0:package_README-gen.md:Refloat"
13+
else
14+
$(VESC_TOOL) --buildPkgFromDesc pkgdesc.qml
15+
endif
1016

1117
src:
1218
$(MAKE) -C $@

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ To build the package, run:
2121
make
2222
```
2323

24+
Note a new beta (as of writing this, unreleased) version of `vesc_tool` is needed for the above to work. To build the package with the current / old `vesc_tool` version, use:
25+
```sh
26+
make OLDVT=1
27+
```
28+
2429
If you don't have `vesc_tool` in your `$PATH` (but you have, for example, a downloaded `vesc_tool` binary), you can specify the `vesc_tool` to use:
2530
```sh
2631
make VESC_TOOL=/path/to/vesc_tool

pkgdesc.qml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import QtQuick 2.15
2+
3+
Item {
4+
property string pkgName: "Refloat"
5+
property string pkgDescriptionMd: "package_README-gen.md"
6+
property string pkgLisp: "package.lisp"
7+
property string pkgQml: "ui.qml"
8+
property bool pkgQmlIsFullscreen: false
9+
property string pkgOutput: "refloat.vescpkg"
10+
11+
function isCompatible (fwRxParams) {
12+
if (fwRxParams.hwTypeStr() != "vesc") {
13+
return false;
14+
}
15+
16+
return true;
17+
}
18+
}

0 commit comments

Comments
 (0)