Skip to content

Commit

Permalink
Better documentation and app icon for the .exe and the task bar.
Browse files Browse the repository at this point in the history
  • Loading branch information
abuteler committed Sep 3, 2024
1 parent 1c2f1d8 commit a3c6982
Show file tree
Hide file tree
Showing 15 changed files with 192 additions and 387 deletions.
17 changes: 9 additions & 8 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# clipboard api is still unstable, so web-sys requires the below flag to be passed for copy (ctrl + c) to work
# https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html
# check status at https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
# we don't use `[build]` because of rust analyzer's build cache invalidation https://github.com/emilk/eframe_template/issues/93
# [target.wasm32-unknown-unknown]
# rustflags = ["--cfg=web_sys_unstable_apis"]

#[build]
#target = "x86_64-pc-windows-gnu"
#target = "x86_64-pc-windows-gnu"

[target.x86_64-pc-windows-msvc]
linker = "lld"
rustflags = [
"-Lnative=/home/abuteler/.xwin/crt/lib/x86_64",
"-Lnative=/home/abuteler/.xwin/sdk/lib/um/x86_64",
"-Lnative=/home/abuteler/.xwin/sdk/lib/ucrt/x86_64"
]
117 changes: 107 additions & 10 deletions Cargo.lock

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

17 changes: 14 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
[package]
name = "micronos" #Time-hold?
version = "0.2.0"
name = "timehold"
version = "0.2.1"
authors = ["Alejandro R. Buteler <[email protected]>"]
edition = "2021"
rust-version = "1.79.0"


[dependencies]
bevy = { version = "0.14.0", features = ["dynamic_linking"] }
bevy = { version = "0.14.0" }
# keep the following in sync with Bevy's dependencies
winit = { version = "0.30", default-features = false }
image = { version = "0.25", default-features = false }
## This greatly improves WGPU's performance due to its heavy use of trace! calls
log = { version = "*", features = ["max_level_debug", "release_max_level_warn"] }
time = { version = "0.3.34", features = ["local-offset"] }
# for app persistence:
serde = { version = "1", features = ["derive"] }

[features]
dev = [
"bevy/dynamic_linking",
]

# Enable a small amount of optimization in debug mode.
[profile.dev]
Expand All @@ -30,3 +38,6 @@ codegen-units = 1
# Do a second optimization pass over the entire program, including dependencies.
# Slightly slows compile times, marginal improvements.
lto = "thin"

[build-dependencies]
embed-resource = "2.4.3"
Binary file added assets/icons/app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions build-release.sh

This file was deleted.

8 changes: 8 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extern crate embed_resource;

fn main() {
let target = std::env::var("TARGET").unwrap();
if target.contains("windows") {
embed_resource::compile("build/windows/icon.rc", embed_resource::NONE);
}
}
Binary file added build/windows/icon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions build/windows/icon.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
app_icon ICON "icon.ico"
4 changes: 0 additions & 4 deletions cross-build.sh

This file was deleted.

12 changes: 12 additions & 0 deletions memo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# memo on account of working under wsl2
1. Using [Cross.rs](https://github.com/cross-rs/cross)
- Building:
`cross build --target x86_64-pc-windows-gnu`
- Releasing:
`cross build --release --target x86_64-pc-windows-gnu`

2. Using WSL2's GUI
- Running:
`crun` (which is an alias in my .profile for `export WGPU_BACKEND=vulkan; cargo run`, b/c it fails w/o that ENV export)
- Releasing:
- run `./win-release.sh` in the project root
Loading

0 comments on commit a3c6982

Please sign in to comment.