feat: windows app icon (#3753)
* default icon * cli * fix typos, fmt + icon fix I don't think it's a good idea to do [default.extend-words] fo = "fo" as it's a very common mispelling for 'for' * fix clippy * return error on non implemented platforms instead of default dx icon * fix * fix fix the amazing merge renamed winres to windows moved windows winres build request to windows * fix typos * fix schema * Update schema.json * fix schema again * use default icon if no fallback * wire up the rest of windows * fmt --------- Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
1 parent
6d1f19067a
commit
3f82c45520
17 files changed
+1125
-25
No files matched your search
@@ -943,6 +943,15 @@ impl BuildRequest {
|
||||
AndroidTools::unpack_prebuilt_openssl()?;
|
||||
}
|
||||
|
||||
// Compile the Windows resource (.res) so it's ready to be linked in later
|
||||
if matches!(self.triple.operating_system, OperatingSystem::Windows) {
|
||||
if let Err(err) = self.write_winres() {
|
||||
if self.using_dioxus_explicitly {
|
||||
tracing::warn!("Application may not have an icon: {err}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1767,6 +1776,11 @@ 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 => {
|
||||
if let Some((search_path, link_spec)) = self.winres_linker_args() {
|
||||
cargo_args.extend(["-L".to_string(), search_path, "-l".to_string(), link_spec]);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
@@ -2505,7 +2519,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" })
|
||||
|
||||
Reference in new issue
Block a user