Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ unparented = "unparented"
flate2="flate2"

[files]
extend-exclude = ["notes/translations/*", "CHANGELOG.md", "*.js"]
extend-exclude = ["notes/translations/*", "CHANGELOG.md", "*.js", "packages/cli/src/build/windows.rs"]
Binary file added packages/cli/assets/icon.ico
Binary file not shown.
31 changes: 31 additions & 0 deletions packages/cli/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,13 @@
"null"
]
},
"name": {
"description": "Display name of the application",
"type": [
"string",
"null"
]
},
"out_dir": {
"type": [
"string",
Expand Down Expand Up @@ -649,6 +656,12 @@
"type": "string"
}
},
"file_version": {
"type": [
"string",
"null"
]
},
"icon": {
"type": [
"array",
Expand Down Expand Up @@ -680,6 +693,12 @@
}
]
},
"original_file_name": {
"type": [
"string",
"null"
]
},
"publisher": {
"type": [
"string",
Expand All @@ -701,6 +720,18 @@
"null"
]
},
"trademark": {
"type": [
"string",
"null"
]
},
"version": {
"type": [
"string",
"null"
]
},
"windows": {
"anyOf": [
{
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
mod android;
mod apple;
mod web;
mod windows;

mod assets;
mod builder;
Expand Down
12 changes: 11 additions & 1 deletion packages/cli/src/build/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,16 @@ impl BuildRequest {
cargo_args.push("-Clink-arg=-Wl,-rpath,$ORIGIN/../lib".to_string());
cargo_args.push("-Clink-arg=-Wl,-rpath,$ORIGIN".to_string());
}
OperatingSystem::Windows => match self.write_winres() {
Ok(res) => {
cargo_args.extend(["-L".to_string(), res.path, "-l".to_string(), res.lib]);
}
Err(err) => {
if self.using_dioxus_explicitly {
tracing::warn!("Application may not have an icon: {err}");
}
}
},
_ => {}
}

Expand Down Expand Up @@ -2505,7 +2515,7 @@ impl BuildRequest {
/// target/dx/build/app/web/
/// target/dx/build/app/web/public/
/// target/dx/build/app/web/server.exe
fn platform_dir(&self) -> PathBuf {
pub(crate) fn platform_dir(&self) -> PathBuf {
self.internal_out_dir()
.join(&self.main_target)
.join(if self.release { "release" } else { "debug" })
Expand Down
Loading
Loading