Skip to content

Commit

Permalink
chore: env variable cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMrMilchmann committed Mar 4, 2025
1 parent ed6299f commit 652acf0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public open class BuildJvmLauncher @Inject constructor(
this.workingDir = sourceDirectory.get().asFile

environment(buildMap {
put("OSMERION_jvmLauncher_descriptor", resources.asFile.absolutePath)
put("OSMERION_jvmLauncher_versioninfo", resources.asFile.absolutePath)

val icon = icon.orNull
if (icon != null) put("OSMERION_jvmLauncher_icon", iconResource.asFile.absolutePath)
Expand Down
5 changes: 3 additions & 2 deletions launcher/build.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
extern crate embed_resource;

fn main() {
let descriptor_path = std::env::var("OSMERION_jvmLauncher_descriptor").unwrap();
embed_resource::compile(descriptor_path, embed_resource::NONE).manifest_optional().unwrap();
if let Ok(versioninfo_path) = std::env::var("OSMERION_jvmLauncher_versioninfo") {
embed_resource::compile(versioninfo_path, embed_resource::NONE).manifest_optional().unwrap();
}

if let Ok(icon_path) = std::env::var("OSMERION_jvmLauncher_icon") {
embed_resource::compile(icon_path, embed_resource::NONE).manifest_optional().unwrap();
Expand Down

0 comments on commit 652acf0

Please sign in to comment.