Skip to content

Commit

Permalink
feat(cli): Add icon command (tauricon) (#4992)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
  • Loading branch information
FabianLars and lucasfernog authored Sep 3, 2022
1 parent 0837454 commit 12e9d81
Show file tree
Hide file tree
Showing 7 changed files with 269 additions and 48 deletions.
5 changes: 5 additions & 0 deletions .changes/cli-tauricon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cli.rs": minor
---

Add `icon` command to generate icons.
2 changes: 1 addition & 1 deletion tooling/bundler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ zip = "0.6"
semver = "1"

[target."cfg(target_os = \"macos\")".dependencies]
icns = "0.3"
icns = { package = "tauri-icns", version = "0.1" }
time = { version = "0.3", features = [ "formatting" ] }
plist = "1"

Expand Down
65 changes: 18 additions & 47 deletions tooling/cli/Cargo.lock

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

2 changes: 2 additions & 0 deletions tooling/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ ignore = "0.4"
ctrlc = "3.2"
log = { version = "0.4.17", features = [ "kv_unstable", "kv_unstable_std" ] }
env_logger = "0.9.0"
icns = { package = "tauri-icns", version = "0.1" }
image = { version = "0.24", default-features = false, features = [ "ico" ] }

[target."cfg(windows)".dependencies]
winapi = { version = "0.3", features = [ "handleapi", "processenv", "winbase", "wincon", "winnt" ] }
Expand Down
52 changes: 52 additions & 0 deletions tooling/cli/src/helpers/icns.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"16x16": {
"name": "icon_16x16.png",
"size": 16,
"ostype": "icp4"
},
"16x16@2x": {
"name": "icon_16x16@2x.png",
"size": 32,
"ostype": "ic11"
},
"32x32": {
"name": "icon_32x32.png",
"size": 32,
"ostype": "icp5"
},
"32x32@2x": {
"name": "icon_32x32@2x.png",
"size": 64,
"ostype": "ic12"
},
"128x128": {
"name": "icon_128x128.png",
"size": 128,
"ostype": "ic07"
},
"128x128@2x": {
"name": "icon_128x128@2x.png",
"size": 256,
"ostype": "ic13"
},
"256x256": {
"name": "icon_256x256.png",
"size": 256,
"ostype": "ic08"
},
"256x256@2x": {
"name": "icon_256x256@2x.png",
"size": 512,
"ostype": "ic14"
},
"512x512": {
"name": "icon_512x512.png",
"size": 512,
"ostype": "ic09"
},
"512x512@2x": {
"name": "icon_512x512@2x.png",
"size": 1024,
"ostype": "ic10"
}
}
Loading

0 comments on commit 12e9d81

Please sign in to comment.