-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Platform-specific improvements (#127)
* Use native-windows-gui crate to manage tray icon Adds log file support on Windows * Log file location now works like other paths * Removed context builder * Context --> App * Removed mount URLs from App * Switch to a nicer crate for forking daemon * Handle errors from notify_ready * Add application icon to all Windows Polaris executables, not just those created by the release script * Add build.rs to release tarball * Create PID file parent directory if necessary
- Loading branch information
Showing
20 changed files
with
377 additions
and
661 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,12 @@ name = "polaris" | |
version = "0.0.0" | ||
authors = ["Antoine Gersant <[email protected]>"] | ||
edition = "2018" | ||
build = "build.rs" | ||
|
||
[features] | ||
default = ["bundle-sqlite"] | ||
bundle-sqlite = ["libsqlite3-sys"] | ||
ui = ["uuid", "winapi"] | ||
ui = ["native-windows-gui", "native-windows-derive"] | ||
|
||
[dependencies] | ||
actix-files = { version = "0.4" } | ||
|
@@ -59,12 +60,15 @@ default_features = false | |
features = ["bmp", "gif", "jpeg", "png"] | ||
|
||
[target.'cfg(windows)'.dependencies] | ||
uuid = { version="0.8", optional = true } | ||
winapi = { version = "0.3.3", features = ["winuser", "libloaderapi", "shellapi", "errhandlingapi"], optional = true } | ||
native-windows-gui = {version = "1.0.7", default-features = false, features = ["cursor", "image-decoder", "message-window", "menu", "tray-notification"], optional = true } | ||
native-windows-derive = {version = "1.0.2", optional = true } | ||
|
||
[target.'cfg(unix)'.dependencies] | ||
daemonize = "0.4.1" | ||
sd-notify = "0.1.0" | ||
unix-daemonize = "0.1.2" | ||
|
||
[target.'cfg(windows)'.build-dependencies] | ||
winres = "0.1" | ||
|
||
[dev-dependencies] | ||
headers = "0.3" | ||
|
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,9 @@ | ||
#[cfg(windows)] | ||
fn main() { | ||
let mut res = winres::WindowsResource::new(); | ||
res.set_icon("./res/windows/application/icon_polaris_512.ico"); | ||
res.compile().unwrap(); | ||
} | ||
|
||
#[cfg(unix)] | ||
fn main() {} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Oops, something went wrong.