-
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Git hash to version info, display version on startup, remove ms from log timestamp * Add startup info
- Loading branch information
1 parent
7b64ca1
commit e419045
Showing
5 changed files
with
69 additions
and
16 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1,8 +1,18 @@ | ||
fn main() { | ||
if cfg!(target_os = "windows") { | ||
let mut res = winresource::WindowsResource::new(); | ||
res.set_icon("../assets/icon.ico"); | ||
res.set_language(0x0009); // English | ||
res.compile().unwrap(); | ||
} | ||
} | ||
use git_version::git_version; | ||
use std::env; | ||
|
||
fn main() { | ||
if cfg!(target_os = "windows") { | ||
let mut res = winresource::WindowsResource::new(); | ||
res.set_icon("../assets/icon.ico"); | ||
res.set_language(0x0009); // English | ||
res.compile().unwrap(); | ||
} | ||
|
||
let version = git_version!(fallback = "unknown"); | ||
let git_version = match version { | ||
"unknown" => env::var("GIT_VERSION").unwrap_or("unknown".to_string()), | ||
_ => version.to_string(), | ||
}; | ||
println!("cargo:rustc-env=GIT_VERSION={}", git_version); | ||
} |
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
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