Skip to content

Commit

Permalink
Add console and non console variants for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fourlastor committed Nov 7, 2023
1 parent 70c2ea6 commit a25c211
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ jobs:
mkdir out
copy target/release/roast.exe target/release/roast-win-64.exe
copy target/i686-pc-windows-msvc/release/roast.exe target/i686-pc-windows-msvc/release/roast-win-32.exe
cargo build --release --features win_console
cargo build --target i686-pc-windows-msvc --release --features win_console
copy target/release/roast.exe target/release/roast-win-console-64.exe
copy target/i686-pc-windows-msvc/release/roast.exe target/i686-pc-windows-msvc/release/roast-win-console-32.exe
Compress-Archive -Path target/release/roast-win-64.exe -Destination out/roast-win-64.exe.zip
Compress-Archive -Path target/i686-pc-windows-msvc/release/roast-win-32.exe -Destination out/roast-win-32.exe.zip
Compress-Archive -Path target/release/roast-win-console-64.exe -Destination out/roast-win-console-64.exe.zip
Compress-Archive -Path target/i686-pc-windows-msvc/release/roast-win-console-32.exe -Destination out/roast-win-console-32.exe.zip
- name: Build MacOS
if: matrix.os == 'macos-latest'
run: |
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ image = "ghcr.io/cross-rs/x86_64-pc-windows-msvc-cross:local"

[profile.release]
strip = true

[features]
win_console = []
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg_attr(not(feature = "win_console"), windows_subsystem = "windows") ]
use jni::{objects::JString, InitArgsBuilder, JNIVersion, JavaVM};
use serde::Deserialize;
use std::{env, fs, path::{PathBuf, Path}};
Expand Down

0 comments on commit a25c211

Please sign in to comment.