-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ggand0/win
Add codes to build for Windows
- Loading branch information
Showing
6 changed files
with
165 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use { | ||
std::{ | ||
env, | ||
io, | ||
}, | ||
winres::WindowsResource, | ||
}; | ||
|
||
fn main() -> io::Result<()> { | ||
if env::var_os("CARGO_CFG_WINDOWS").is_some() { | ||
WindowsResource::new() | ||
// This path can be absolute, or relative to your crate root. | ||
// When building on Windows, comment out the first 3 lines of this block (just call set_icon) | ||
.set_toolkit_path("/usr/bin") | ||
.set_windres_path("x86_64-w64-mingw32-windres") | ||
.set_ar_path("x86_64-w64-mingw32-ar") | ||
.set_icon("./assets/icon.ico") | ||
.compile()?; | ||
} | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters