File tree Expand file tree Collapse file tree 14 files changed +68
-48
lines changed
Expand file tree Collapse file tree 14 files changed +68
-48
lines changed Original file line number Diff line number Diff line change 1+ target
2+ out
3+ node_modules
4+ test_work
Original file line number Diff line number Diff line change 1414 steps :
1515 - uses : actions/checkout@v4
1616
17- - name : Build WASM module
18- uses : Navigraph/cargo-msfs@v1
19- with :
20- token : ${{ secrets.BOT_TOKEN }}
21- run : ./scripts/build.sh
22-
23- - name : Zip Modules
24- run : |
25- zip -j interface2020.zip out20/*
26- zip -j interface2024.zip out24/*
17+ - name : Workflow Script
18+ run : ./scripts/workflow.sh
2719
2820 - name : Pre-Release
2921 uses : softprops/action-gh-release@v1
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ tsconfig.tsbuildinfo
77examples /aircraft /PackageSources /html_ui /Pages /VCockpit /Instruments /Navigraph /NavigationDataInterfaceSample
88examples /aircraft /PackageSources /SimObjects /Airplanes /Navigraph_Navigation_Data_Interface_Aircraft /panel /msfs_navigation_data_interface.wasm
99out
10+ out20
11+ out24
1012
1113# Rust
1214# will have compiled files and executables
Original file line number Diff line number Diff line change 1+ FROM ghcr.io/navigraph/cargo-msfs-bin:latest
2+
3+ WORKDIR /external
4+
5+ RUN apt install git -y
6+
7+ RUN cargo-msfs install msfs2020
8+ RUN cargo-msfs install msfs2024
9+
10+ RUN apt install npm -y
11+
12+ COPY package.json ./
13+ COPY package-lock.json ./
14+
15+ RUN npm i
16+
17+ COPY rust-toolchain.toml ./
18+
19+ RUN rustup show
20+
21+ COPY . .
22+
23+
Original file line number Diff line number Diff line change 77 "format" : " prettier --write ." ,
88 "lint:js" : " eslint \" src/js/**/*.ts\" " ,
99 "setup" : " .\\ scripts\\ setup.bat" ,
10- "build:wasm" : " .\\ scripts\\ build.bat" ,
11- "build:wasm-workflow" : " .\\ scripts\\ build_workflow.bat" ,
10+ "build:wasm" : " .\\ scripts\\ build.bat both" ,
11+ "build:wasm:2020" : " .\\ scripts\\ build.bat 2020" ,
12+ "build:wasm:2024" : " .\\ scripts\\ build.bat 2024" ,
1213 "build:js" : " cd .\\ src\\ js && npm run build" ,
1314 "build:gauge" : " cd .\\ examples\\ gauge && npm run build" ,
1415 "dev:gauge" : " cd .\\ examples\\ gauge && npm run dev" ,
Original file line number Diff line number Diff line change 22
33cd %~dp0
44
5- mkdir ..\out
5+ CALL .\run_docker_cmd.bat ./scripts/build.sh %*
66
7- cargo-msfs build msfs2020 -i .. -o ..\out\msfs_navigation_data_interface.wasm
8-
9- copy ..\out\msfs_navigation_data_interface.wasm ..\examples\aircraft\PackageSources\SimObjects\Airplanes\Navigraph_Navigation_Data_Interface_Aircraft\panel
7+ copy ..\out20\msfs_navigation_data_interface.wasm ..\examples\aircraft\PackageSources\SimObjects\Airplanes\Navigraph_Navigation_Data_Interface_Aircraft\panel
Original file line number Diff line number Diff line change 1- mkdir out20
2- mkdir out24
3-
4- echo Installing MSFS SDK
1+ #! /bin/bash
52
6- cargo-msfs install msfs2020
7- cargo-msfs install msfs2024
3+ if ! [ -a out20 ]; then
4+ mkdir out20
5+ fi
86
9- echo Building packages in dir $( pwd)
7+ if ! [ -a out24 ]; then
8+ mkdir out24
9+ fi
1010
11- cargo-msfs build msfs2020 -i . -o out20/msfs_navigation_data_interface.wasm
12- cargo-msfs build msfs2024 -i . -o out24/msfs_navigation_data_interface.wasm
11+ if [ $1 = " 2020" ] || [ $1 = " both" ]; then
12+ echo " Building MSFS 2020"
13+ cargo-msfs build msfs2020 -i . -o out20/msfs_navigation_data_interface.wasm
14+ fi
1315
16+ if [ $1 = " 2024" ] || [ $1 = " both" ]; then
17+ echo " Building MSFS 2024"
18+ cargo-msfs build msfs2024 -i . -o out24/msfs_navigation_data_interface.wasm
19+ fi
Original file line number Diff line number Diff line change 11@ echo off
22
3- set image = " ghcr.io/flybywiresim/dev-env@sha256:aa36c0e4b8c66c2ec0195a104f8ae04a8ffbf45e8ddb6a8aca4f7237436bd876 "
3+ set image = " local "
44
55cd %~dp0
66
7- docker run --rm -it -v " %cd% \..\:/external" -v " %cd% \..\out:/out " %image% %*
7+ docker run --rm -it -v " %cd% \..\:/external" %image% %*
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ IMAGE=" local"
4+
5+ cd " $( dirname " $0 " ) "
6+
7+ echo " Running $@ in docker"
8+
9+ docker run --rm -v " $( pwd) /../:/external" $IMAGE " $@ "
You can’t perform that action at this time.
0 commit comments