feat(branding): add 3D shield logo, embed Windows PE icon, and update README banner
Sanctum Release / Build & Release (Windows x86_64) (push) Canceled after 0s
Sanctum Release / Build & Release (Windows x86_64) (push) Canceled after 0s
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
|
<p align="center">
|
||||||
|
<img src="assets/logo.png" alt="Sanctum Logo" width="220"/>
|
||||||
|
</p>
|
||||||
|
|
||||||
# Sanctum 🛡️
|
# Sanctum 🛡️
|
||||||
|
|
||||||
|
**Verschlüsselter Ein-Datei-Container unter Windows 10/11 im reinen Userland**
|
||||||
|
|
||||||
Sanctum ist eine eigenständige, speichersichere und hochperformante CLI-Anwendung in Rust, die verschlüsselte Ein-Datei-Container (`.sanctum`) unter Windows 10/11 im reinen Userland verwaltet.
|
Sanctum ist eine eigenständige, speichersichere und hochperformante CLI-Anwendung in Rust, die verschlüsselte Ein-Datei-Container (`.sanctum`) unter Windows 10/11 im reinen Userland verwaltet.
|
||||||
|
|
||||||
- **100% Userland**: Keine Administratorrechte erforderlich, keine Kernel-Treiber (weder WinFsp noch Dokan).
|
- **100% Userland**: Keine Administratorrechte erforderlich, keine Kernel-Treiber (weder WinFsp noch Dokan).
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 169 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 546 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
@@ -0,0 +1,28 @@
|
|||||||
|
fn main() {
|
||||||
|
println!("cargo:rerun-if-changed=assets/icon.ico");
|
||||||
|
println!("cargo:rerun-if-changed=build.rs");
|
||||||
|
|
||||||
|
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
|
||||||
|
if target_os == "windows" {
|
||||||
|
let out_dir = std::env::var("OUT_DIR").unwrap();
|
||||||
|
let rc_path = format!("{}/sanctum.rc", out_dir);
|
||||||
|
let res_path = format!("{}/sanctum.res", out_dir);
|
||||||
|
|
||||||
|
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||||
|
let ico_path = format!("{}/assets/icon.ico", manifest_dir).replace('\\', "/");
|
||||||
|
|
||||||
|
if std::path::Path::new(&ico_path).exists() {
|
||||||
|
let rc_content = format!("1 ICON \"{}\"\n", ico_path);
|
||||||
|
if std::fs::write(&rc_path, rc_content).is_ok() {
|
||||||
|
let status = std::process::Command::new("windres")
|
||||||
|
.args(["-i", &rc_path, "-O", "coff", "-o", &res_path])
|
||||||
|
.status();
|
||||||
|
if let Ok(s) = status {
|
||||||
|
if s.success() {
|
||||||
|
println!("cargo:rustc-link-arg={}", res_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -65,6 +65,7 @@ Copy-Item $ExeSource (Join-Path $StagingDir "sanctum.exe")
|
|||||||
Copy-Item (Join-Path $ProjectRoot "README.md") (Join-Path $StagingDir "README.md")
|
Copy-Item (Join-Path $ProjectRoot "README.md") (Join-Path $StagingDir "README.md")
|
||||||
Copy-Item (Join-Path $ProjectRoot "LICENSE") (Join-Path $StagingDir "LICENSE")
|
Copy-Item (Join-Path $ProjectRoot "LICENSE") (Join-Path $StagingDir "LICENSE")
|
||||||
Copy-Item (Join-Path $ProjectRoot "CHANGELOG.md") (Join-Path $StagingDir "CHANGELOG.md")
|
Copy-Item (Join-Path $ProjectRoot "CHANGELOG.md") (Join-Path $StagingDir "CHANGELOG.md")
|
||||||
|
Copy-Item (Join-Path $ProjectRoot "assets") (Join-Path $StagingDir "assets") -Recurse
|
||||||
|
|
||||||
# ZIP-Archiv schnueren
|
# ZIP-Archiv schnueren
|
||||||
Compress-Archive -Path "$StagingDir\*" -DestinationPath $ZipFile -Force
|
Compress-Archive -Path "$StagingDir\*" -DestinationPath $ZipFile -Force
|
||||||
|
|||||||
+9
-1
@@ -172,9 +172,17 @@ pub fn unregister_explorer_integration() -> Result<()> {
|
|||||||
pub fn get_default_system_icon() -> Option<tray_item::IconSource> {
|
pub fn get_default_system_icon() -> Option<tray_item::IconSource> {
|
||||||
extern "system" {
|
extern "system" {
|
||||||
fn LoadIconW(instance: isize, icon_name: *const u16) -> isize;
|
fn LoadIconW(instance: isize, icon_name: *const u16) -> isize;
|
||||||
|
fn GetModuleHandleW(module_name: *const u16) -> isize;
|
||||||
}
|
}
|
||||||
|
|
||||||
// IDI_SHIELD = 32518, IDI_APPLICATION = 32512
|
// 1. Eingebettetes Anwendungs-Icon (Ressource ID 1) aus eigenem Modul laden
|
||||||
|
let h_instance = unsafe { GetModuleHandleW(std::ptr::null()) };
|
||||||
|
let app_icon = unsafe { LoadIconW(h_instance, 1 as *const u16) };
|
||||||
|
if app_icon != 0 {
|
||||||
|
return Some(tray_item::IconSource::RawIcon(app_icon));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Fallback: Windows IDI_SHIELD = 32518, IDI_APPLICATION = 32512
|
||||||
let icon = unsafe { LoadIconW(0, 32518 as *const u16) };
|
let icon = unsafe { LoadIconW(0, 32518 as *const u16) };
|
||||||
if icon != 0 {
|
if icon != 0 {
|
||||||
Some(tray_item::IconSource::RawIcon(icon))
|
Some(tray_item::IconSource::RawIcon(icon))
|
||||||
|
|||||||
Reference in New Issue
Block a user