Skip to content

Commit

Permalink
fix(nsis): should not stop verge service while updating
Browse files Browse the repository at this point in the history
fix: build issues
  • Loading branch information
greenhat616 committed Feb 25, 2024
1 parent 791baa5 commit 36abd6f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
releaseDraft: false
prerelease: true
tauriScript: pnpm tauri
args: -f default-meta nightly -c ./backend/tauri/tauri.nightly.conf.json
args: -f deadlock-detection nightly -c ./backend/tauri/tauri.nightly.conf.json
- name: Portable Bundle (Windows Only)
if: startsWith(matrix.targets.os, 'windows-') && matrix.targets.category == 'nsis'
run: |
Expand Down
33 changes: 11 additions & 22 deletions backend/tauri/src/utils/init/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,29 +117,18 @@ pub fn init() -> Result<()> {
});

// if debug build, log to stdout and stderr with all levels
let terminal_layer = {
#[cfg(debug_assertions)]
{
Some(
fmt::Layer::new()
.with_ansi(std::io::stdout().is_terminal())
.compact()
.with_target(false)
.with_file(true)
.with_line_number(true)
.with_writer(std::io::stdout),
)
}
#[cfg(not(debug_assertions))]
{
None
}
};
#[cfg(debug_assertions)]
let terminal_layer = fmt::Layer::new()
.with_ansi(std::io::stdout().is_terminal())
.compact()
.with_target(false)
.with_file(true)
.with_line_number(true)
.with_writer(std::io::stdout);

let subscriber = tracing_subscriber::registry()
.with(filter)
.with(file_layer)
.with(terminal_layer);
let subscriber = tracing_subscriber::registry().with(filter).with(file_layer);
#[cfg(debug_assertions)]
let subscriber = subscriber.with(terminal_layer);

tracing::subscriber::set_global_default(subscriber)
.map_err(|x| anyhow!("setup logging error: {}", x))?;
Expand Down
2 changes: 1 addition & 1 deletion backend/tauri/templates/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ FunctionEnd

!macro CheckAllNyanpasuProcesses
!insertmacro CheckNyanpasuProcess "Clash Nyanpasu.exe" "1"
!insertmacro CheckNyanpasuProcess "clash-verge-service.exe" "2"
; !insertmacro CheckNyanpasuProcess "clash-verge-service.exe" "2"
!insertmacro CheckNyanpasuProcess "clash.exe" "3"
!insertmacro CheckNyanpasuProcess "clash-rs.exe" "4"
!insertmacro CheckNyanpasuProcess "mihomo.exe" "5"
Expand Down

0 comments on commit 36abd6f

Please sign in to comment.