mirror of https://github.com/FOME-Tech/fome-fw.git
Add BootCommander for macos to bundle (#274)
* experiment * list properly * macos build * testing with macos openblt branch * build as static lib, copy mac/linux in to bundle * use master with macos * reenable boards * probably correctly detect OS * oop * dead line
This commit is contained in:
parent
1cca441766
commit
124bbd09af
|
@ -25,7 +25,7 @@ jobs:
|
|||
|
||||
- name: cmake configure libopenblt
|
||||
working-directory: ./firmware/ext/openblt/Host/Source/LibOpenBLT/build
|
||||
run: cmake ..
|
||||
run: cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC=ON -DBUILD_SHARED=OFF ..
|
||||
|
||||
- name: make libopenblt
|
||||
working-directory: ./firmware/ext/openblt/Host/Source/LibOpenBLT/build
|
||||
|
@ -33,7 +33,7 @@ jobs:
|
|||
|
||||
- name: cmake configure BootCommander
|
||||
working-directory: ./firmware/ext/openblt/Host/Source/BootCommander/build
|
||||
run: cmake ..
|
||||
run: cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
|
||||
- name: make BootCommander
|
||||
working-directory: ./firmware/ext/openblt/Host/Source/BootCommander/build
|
||||
|
@ -42,12 +42,39 @@ jobs:
|
|||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: bootcommander-linux
|
||||
path: |
|
||||
./firmware/ext/openblt/Host/libopenblt.so
|
||||
./firmware/ext/openblt/Host/BootCommander
|
||||
path: ./firmware/ext/openblt/Host/BootCommander
|
||||
|
||||
build-openblt-tools-macos:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: cmake configure libopenblt
|
||||
working-directory: ./firmware/ext/openblt/Host/Source/LibOpenBLT/build
|
||||
run: cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC=ON -DBUILD_SHARED=OFF ..
|
||||
|
||||
- name: make libopenblt
|
||||
working-directory: ./firmware/ext/openblt/Host/Source/LibOpenBLT/build
|
||||
run: make -j8
|
||||
|
||||
- name: cmake configure BootCommander
|
||||
working-directory: ./firmware/ext/openblt/Host/Source/BootCommander/build
|
||||
run: cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
|
||||
- name: make BootCommander
|
||||
working-directory: ./firmware/ext/openblt/Host/Source/BootCommander/build
|
||||
run: make -j8
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: bootcommander-macos
|
||||
path: ./firmware/ext/openblt/Host/BootCommander
|
||||
|
||||
build-firmware:
|
||||
needs: build-openblt-tools-linux
|
||||
needs: [build-openblt-tools-linux, build-openblt-tools-macos]
|
||||
runs-on: ubuntu-latest-selfhost
|
||||
|
||||
strategy:
|
||||
|
@ -200,10 +227,6 @@ jobs:
|
|||
folder: config/boards/core48
|
||||
ini-file: fome_core48.ini
|
||||
|
||||
# - build-target: 48way
|
||||
# folder: config/boards/48way
|
||||
# ini-file: fome_48way.ini
|
||||
|
||||
# - build-target: atlas
|
||||
# folder: config/boards/atlas
|
||||
# ini-file: fome_atlas.ini
|
||||
|
@ -301,11 +324,17 @@ jobs:
|
|||
# 'OS="Windows_NT"' allows us to build Windows executable on unix
|
||||
run: OS="Windows_NT" bash misc/jenkins/build_simulator.sh
|
||||
|
||||
- name: Download OpenBLT BootCommander Tool
|
||||
- name: Download OpenBLT BootCommander Tool (Linux)
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: bootcommander-linux
|
||||
path: ./firmware/ext/openblt/Host/
|
||||
path: ./firmware/ext/openblt/Host/linux/
|
||||
|
||||
- name: Download OpenBLT BootCommander Tool (MacOS)
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: bootcommander-macos
|
||||
path: ./firmware/ext/openblt/Host/macos/
|
||||
|
||||
- name: Package Bundle
|
||||
if: ${{ env.full == 'true' }}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8321fc6b446661ed28c15632f577f75fade3dd48
|
||||
Subproject commit fd038b4a295589235567a1eb899beca32e21a446
|
|
@ -7,9 +7,20 @@ import java.io.File;
|
|||
import java.io.FileNotFoundException;
|
||||
|
||||
public final class OpenbltBootCommanderRunner {
|
||||
public static final boolean IS_WIN = System.getProperty("os.name").toLowerCase().contains("win");
|
||||
private static String getBootCommanderBinary() {
|
||||
String osName = System.getProperty("os.name").toLowerCase();
|
||||
if (osName.contains("win")) {
|
||||
return "BootCommander.exe";
|
||||
}
|
||||
|
||||
private static final String BOOT_COMMANDER = "BootCommander" + (IS_WIN ? ".exe" : "");
|
||||
if (osName.contains("mac") || osName.contains("darwin")) {
|
||||
return "BootCommander_macos";
|
||||
}
|
||||
|
||||
return "BootCommander_linux";
|
||||
}
|
||||
|
||||
private static final String BOOT_COMMANDER = getBootCommanderBinary();
|
||||
private static final String OPENBLT_BINARY_LOCATION = Launcher.TOOLS_PATH + File.separator + "openblt";
|
||||
|
||||
public static void flashSerial(String port, String file, UpdateOperationCallbacks callbacks) {
|
||||
|
|
|
@ -53,8 +53,8 @@ cp java_console/rusefi.xml $CONSOLE_FOLDER
|
|||
cp -r java_console/bin $FOLDER
|
||||
cp firmware/ext/openblt/Host/BootCommander.exe $OPENBLT_FOLDER
|
||||
cp firmware/ext/openblt/Host/libopenblt.dll $OPENBLT_FOLDER
|
||||
cp firmware/ext/openblt/Host/BootCommander $OPENBLT_FOLDER
|
||||
cp firmware/ext/openblt/Host/libopenblt.so $OPENBLT_FOLDER
|
||||
cp firmware/ext/openblt/Host/linux/BootCommander $OPENBLT_FOLDER/BootCommander_linux
|
||||
cp firmware/ext/openblt/Host/macos/BootCommander $OPENBLT_FOLDER/BootCommander_macos
|
||||
|
||||
cp misc/console_launcher/readme.html $FOLDER
|
||||
|
||||
|
|
Loading…
Reference in New Issue