mirror of
https://github.com/tauri-apps/nsis-tauri-utils.git
synced 2026-01-31 00:45:23 +01:00
chore: update change file, fix combined libs generation
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
"nsis-tauri-utils": "patch"
|
||||
"nsis_tauri_utils": "patch"
|
||||
---
|
||||
|
||||
Fix `StrReplace` not accessible in this plugin.
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#![no_std]
|
||||
use nsis_plugin_api::*;
|
||||
nsis_plugin!();
|
||||
|
||||
/* start-marker */
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::{borrow::ToOwned, vec, vec::Vec};
|
||||
use core::{ffi::c_void, mem, ops::Deref, ops::DerefMut, ptr};
|
||||
|
||||
use nsis_plugin_api::*;
|
||||
use windows_sys::Win32::Foundation::{ERROR_ACCESS_DENIED, ERROR_INVALID_PARAMETER};
|
||||
use windows_sys::{
|
||||
w,
|
||||
@@ -36,8 +38,6 @@ use windows_sys::{
|
||||
},
|
||||
};
|
||||
|
||||
nsis_plugin!();
|
||||
|
||||
/// Test if there is a running process with the given name, skipping processes with the host's pid. The input and process names are case-insensitive.
|
||||
///
|
||||
/// # Safety
|
||||
@@ -371,6 +371,8 @@ impl DerefMut for OwnedHandle {
|
||||
}
|
||||
}
|
||||
|
||||
/* end-marker */
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
#![no_std]
|
||||
|
||||
use core::cmp::Ordering;
|
||||
|
||||
use nsis_plugin_api::*;
|
||||
use semver::Version;
|
||||
|
||||
nsis_plugin!();
|
||||
|
||||
/* start-marker */
|
||||
use core::cmp::Ordering;
|
||||
use semver::Version;
|
||||
|
||||
/// Compare two semantic versions.
|
||||
///
|
||||
/// Returns `0` if equal, `1` if `$v1` is newer and `-1` if `$v2` is newer.
|
||||
@@ -47,6 +46,8 @@ fn compare(v1: &str, v2: &str) -> i32 {
|
||||
}
|
||||
}
|
||||
|
||||
/* end-marker */
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#![no_std]
|
||||
|
||||
use nsis_plugin_api::*;
|
||||
|
||||
nsis_plugin!();
|
||||
|
||||
/* start-marker */
|
||||
|
||||
/// Replaces all occurrences of a substring in a string with another substring.
|
||||
///
|
||||
/// Returns the modified string.
|
||||
@@ -22,3 +22,5 @@ fn StrReplace() -> Result<(), Error> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/* end-marker */
|
||||
|
||||
@@ -23,14 +23,8 @@ fn combine_plugins_and_write_to_out_dir() {
|
||||
] {
|
||||
let lines = plugin
|
||||
.lines()
|
||||
.filter(|l| {
|
||||
// remove lines that should only be specified once
|
||||
// either for compilation or for clippy
|
||||
!(l.contains("#![no_std]")
|
||||
|| l.contains("nsis_plugin!();")
|
||||
|| l.contains("use nsis_plugin_api::*;"))
|
||||
})
|
||||
.take_while(|l| !l.contains("mod tests {"))
|
||||
.skip_while(|&l| l != "/* start-marker */")
|
||||
.take_while(|&l| l != "/* end-marker */")
|
||||
.collect::<Vec<&str>>();
|
||||
|
||||
// skip last line which should be #[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user