From c2998ed535aa6c827769523e213068fcc151df11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Fri, 1 Nov 2024 08:48:08 +0100 Subject: [PATCH] Added more build platforms. --- .github/workflows/build.yml | 162 +++++++++++++++++- .../src/icy_board/state/functions.rs | 4 +- crates/pplc/src/main.rs | 2 +- crates/qfile/.gitignore | 14 ++ tools/prep_diz.py | 4 +- 5 files changed, 180 insertions(+), 6 deletions(-) create mode 100644 crates/qfile/.gitignore diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5435d4..1c3b121 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: mv target/release/ppld bin mv target/release/scandb bin mv target/release/ppl-language-server bin - - name: 'Upload deb' + - name: 'Upload zip' uses: actions/upload-artifact@v4 with: name: icy_board_linux_${{ env.VERSION }} @@ -50,3 +50,163 @@ jobs: bin/scandb bin/ppl-language-server file_id.diz + build_windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Build + id: build + run: | + $VERSION=$(python tools\prep_diz.py "file_id.diz") + echo "Version: $VERSION" + + Add-Content -Path $env:GITHUB_ENV -Value "VERSION=$VERSION" + get-content .\crates\${{ matrix.app }}\build\file_id.diz | %{$_ -replace "#VERSION","$VERSION"} >file_id.diz + + cargo build --release + echo "Copy $DEB to icy_board.deb" + mkdir bin + move target/release/icy_board.exe bin + move target/release/icbsetup.exe bin + move target/release/icbmailer.exe bin + move target/release/icbsysmgr.exe bin + move target/release/mkicbmnu.exe bin + move target/release/mkicbtxt.exe bin + move target/release/pplc.exe bin + move target/release/ppld.exe bin + move target/release/scandb.exe bin + move target/release/ppl-language-server.exe bin + - name: 'Upload zip' + uses: actions/upload-artifact@v4 + with: + name: icy_board_linux_${{ env.VERSION }} + path: | + bin/icy_board + bin/icbsetup + bin/icbmailer + bin/icbsysmgr + bin/mkicbmnu + bin/mkicbtxt + bin/pplc + bin/pppld + bin/scandb + bin/ppl-language-server + file_id.diz + build_mac: + runs-on: macos-13 + steps: + - uses: actions/checkout@v4 + - name: Build + id: build + run: | + rustup target add aarch64-apple-darwin + rustup target add x86_64-apple-darwin + + cargo build --release --target aarch64-apple-darwin + cargo build --release --target x86_64-apple-darwin + + export version=$(python3 tools/prep_diz.py "file_id.diz") + echo "VERSION=$version" >> $GITHUB_ENV + echo "Version: $version" + cargo build --release + echo "Copy $DEB to icy_board.deb" + mkdir aarch64-apple-darwin/bin + mv target/aarch64-apple-darwin/release/icy_board aarch64-apple-darwin/bin + mv target/aarch64-apple-darwin/release/icbsetup aarch64-apple-darwin/bin + mv target/aarch64-apple-darwin/release/icbmailer aarch64-apple-darwin/bin + mv target/aarch64-apple-darwin/release/icbsysmgr aarch64-apple-darwin/bin + mv target/aarch64-apple-darwin/release/mkicbmnu aarch64-apple-darwin/bin + mv target/aarch64-apple-darwin/release/mkicbtxt aarch64-apple-darwin/bin + mv target/aarch64-apple-darwin/release/pplc aarch64-apple-darwin/bin + mv target/aarch64-apple-darwin/release/ppld aarch64-apple-darwin/bin + mv target/aarch64-apple-darwin/release/scandb aarch64-apple-darwin/bin + mv target/aarch64-apple-darwin/release/ppl-language-server aarch64-apple-darwin/bin + + mkdir x86_64-apple-darwin/bin + mv target/x86_64-apple-darwin/release/icy_board x86_64-apple-darwin/bin + mv target/x86_64-apple-darwin/release/icbsetup x86_64-apple-darwin/bin + mv target/x86_64-apple-darwin/release/icbmailer x86_64-apple-darwin/bin + mv target/x86_64-apple-darwin/release/icbsysmgr x86_64-apple-darwin/bin + mv target/x86_64-apple-darwin/release/mkicbmnu x86_64-apple-darwin/bin + mv target/x86_64-apple-darwin/release/mkicbtxt x86_64-apple-darwin/bin + mv target/x86_64-apple-darwin/release/pplc x86_64-apple-darwin/bin + mv target/x86_64-apple-darwin/release/ppld x86_64-apple-darwin/bin + mv target/x86_64-apple-darwin/release/scandb x86_64-apple-darwin/bin + mv target/x86_64-apple-darwin/release/ppl-language-server x86_64-apple-darwin/bin + + - name: 'Upload zip' + uses: actions/upload-artifact@v4 + with: + name: icy_board_osx_aarch64-apple-darwin_${{ env.VERSION }} + path: | + aarch64-apple-darwin/bin/icy_board + aarch64-apple-darwin/bin/icbsetup + aarch64-apple-darwin/bin/icbmailer + aarch64-apple-darwin/bin/icbsysmgr + aarch64-apple-darwin/bin/mkicbmnu + aarch64-apple-darwin/bin/mkicbtxt + aarch64-apple-darwin/bin/pplc + aarch64-apple-darwin/bin/pppld + aarch64-apple-darwin/bin/scandb + aarch64-apple-darwin/bin/ppl-language-server + file_id.diz + - name: 'Upload zip' + uses: actions/upload-artifact@v4 + with: + name: icy_board_osx_x86_64-apple-darwin_${{ env.VERSION }} + path: | + x86_64-apple-darwin/bin/icy_board + x86_64-apple-darwin/bin/icbsetup + x86_64-apple-darwin/bin/icbmailer + x86_64-apple-darwin/bin/icbsysmgr + x86_64-apple-darwin/bin/mkicbmnu + x86_64-apple-darwin/bin/mkicbtxt + x86_64-apple-darwin/bin/pplc + x86_64-apple-darwin/bin/pppld + x86_64-apple-darwin/bin/scandb + x86_64-apple-darwin/bin/ppl-language-server + file_id.diz + build_arm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install required libraries + run: | + sudo apt-get install build-essential libasound2-dev libxcb-shape0-dev libxcb-xfixes0-dev + rustup target add aarch64-unknown-linux-gnu + cargo install -f cross + - name: Build + id: build + run: | + export version=$(python3 tools/prep_diz.py "file_id.diz") + echo "VERSION=$version" >> $GITHUB_ENV + echo "Version: $version" + cross build --target aarch64-unknown-linux-gnu + echo "Copy $DEB to icy_board.deb" + mkdir bin + mv target/release/icy_board bin + mv target/release/icbsetup bin + mv target/release/icbmailer bin + mv target/release/icbsysmgr bin + mv target/release/mkicbmnu bin + mv target/release/mkicbtxt bin + mv target/release/pplc bin + mv target/release/ppld bin + mv target/release/scandb bin + mv target/release/ppl-language-server bin + - name: 'Upload zip' + uses: actions/upload-artifact@v4 + with: + name: icy_board_aarch64_${{ env.VERSION }} + path: | + bin/icy_board + bin/icbsetup + bin/icbmailer + bin/icbsysmgr + bin/mkicbmnu + bin/mkicbtxt + bin/pplc + bin/pppld + bin/scandb + bin/ppl-language-server + file_id.diz diff --git a/crates/icy_board_engine/src/icy_board/state/functions.rs b/crates/icy_board_engine/src/icy_board/state/functions.rs index b6de3ac..f1100b0 100644 --- a/crates/icy_board_engine/src/icy_board/state/functions.rs +++ b/crates/icy_board_engine/src/icy_board/state/functions.rs @@ -247,10 +247,8 @@ impl IcyBoardState { let old = self.session.disp_options.non_stop; self.session.disp_options.non_stop = true; for (i, line) in converted_content.lines().enumerate() { - if i > 0 { - self.write_raw(TerminalTarget::Both, &['\r', '\n']).await?; - } self.display_line(line).await?; + self.write_raw(TerminalTarget::Both, &['\r', '\n']).await?; self.session.disp_options.non_stop = false; let next = self.next_line().await?; self.session.disp_options.non_stop = true; diff --git a/crates/pplc/src/main.rs b/crates/pplc/src/main.rs index b1a571c..409937c 100644 --- a/crates/pplc/src/main.rs +++ b/crates/pplc/src/main.rs @@ -179,7 +179,7 @@ fn check_errors(errors: std::sync::Arc