mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 01:58:51 +02:00
feat(cli): autostart without a console window
This moves `komorebic` logic into a `lib.rs` file and calls it from `main.rs` (normal behavior) and then there is a second binary `komorebic-no-console` binary that uses `#![windows_subsystem = "windows"]` which tells the linker to not attach a console window to this binary.
This commit is contained in:
@@ -26,6 +26,15 @@ builds:
|
|||||||
post:
|
post:
|
||||||
- mkdir -p dist/windows_amd64
|
- mkdir -p dist/windows_amd64
|
||||||
- cp ".\target\x86_64-pc-windows-msvc\release\komorebic.exe" ".\dist\komorebic_windows_amd64_v1\komorebic.exe"
|
- cp ".\target\x86_64-pc-windows-msvc\release\komorebic.exe" ".\dist\komorebic_windows_amd64_v1\komorebic.exe"
|
||||||
|
- id: komorebic-no-console
|
||||||
|
main: dummy.go
|
||||||
|
goos: ["windows"]
|
||||||
|
goarch: ["amd64"]
|
||||||
|
binary: komorebic-no-console
|
||||||
|
hooks:
|
||||||
|
post:
|
||||||
|
- mkdir -p dist/windows_amd64
|
||||||
|
- cp ".\target\x86_64-pc-windows-msvc\release\komorebic-no-console.exe" ".\dist\komorebic_no_console_windows_amd64_v1\komorebic-no-console.exe"
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
- name_template: "{{ .ProjectName }}-{{ .Version }}-x86_64-pc-windows-msvc"
|
- name_template: "{{ .ProjectName }}-{{ .Version }}-x86_64-pc-windows-msvc"
|
||||||
|
|||||||
5
komorebic/src/bin/komorebic-no-console.rs
Normal file
5
komorebic/src/bin/komorebic-no-console.rs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#![windows_subsystem = "windows"]
|
||||||
|
|
||||||
|
fn main() -> color_eyre::Result<()> {
|
||||||
|
komorebic::main()
|
||||||
|
}
|
||||||
2343
komorebic/src/lib.rs
Normal file
2343
komorebic/src/lib.rs
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -92,6 +92,9 @@
|
|||||||
<Component Id='binary1' Guid='*'>
|
<Component Id='binary1' Guid='*'>
|
||||||
<File Id='exe1' Name='komorebic.exe' DiskId='1' Source='$(var.CargoTargetBinDir)\komorebic.exe' KeyPath='yes' />
|
<File Id='exe1' Name='komorebic.exe' DiskId='1' Source='$(var.CargoTargetBinDir)\komorebic.exe' KeyPath='yes' />
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component Id='binary3' Guid='*'>
|
||||||
|
<File Id='exe1' Name='komorebic-no-console.exe' DiskId='1' Source='$(var.CargoTargetBinDir)\komorebic-no-console.exe' KeyPath='yes' />
|
||||||
|
</Component>
|
||||||
</Directory>
|
</Directory>
|
||||||
</Directory>
|
</Directory>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|||||||
Reference in New Issue
Block a user