CH-J ToolsSerververwaltung über SSH
Menü
Veröffentlichte Quellen

CH-J Tools

Durchsuchen Sie Verzeichnisse und Dateien einer bestimmten Anwendungsausgabe.

Quellen als ZIP herunterladen
CH-J / Server Manager 1704 Dateien
0.1.2-beta Hinzugefügt: · Erstellt:
build.rs Hinzugefügt: Datum nicht erfasst 2,3 KB · 57 Zeilen
Code Datei herunterladen
1//! Windows only: the helper's own version resource, so Task Manager, the startup list and file properties
2//! show "CH-J-Standby-Helper" (the app's VERSIONINFO from tauri-build never reaches this package).
3fn main() {
4 println!("cargo:rerun-if-changed=build.rs");
5 println!("cargo:rerun-if-changed=../icons/icon.ico");
6 if std::env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("windows") {
7 return;
8 }
9 #[cfg(windows)]
10 windows_resource();
11 #[cfg(not(windows))]
12 panic!("Windows builds of the standby helper must be built on Windows (embed-resource needs rc.exe).");
15#[cfg(windows)]
16fn windows_resource() {
17 let env = |key: &str| std::env::var(key).expect(key);
18 let (major, minor, patch) = (env("CARGO_PKG_VERSION_MAJOR"), env("CARGO_PKG_VERSION_MINOR"), env("CARGO_PKG_VERSION_PATCH"));
19 let version = env("CARGO_PKG_VERSION");
20 let icon = std::path::Path::new(&env("CARGO_MANIFEST_DIR")).join("../icons/icon.ico").canonicalize().expect("icons/icon.ico");
21 let icon = icon.to_string_lossy().trim_start_matches(r"\\?\").replace('\\', "\\\\");
22 let rc = format!(
23 r#"#pragma code_page(65001)
24#include <winver.h>
251 ICON "{icon}"
261 VERSIONINFO
27FILEVERSION {major},{minor},{patch},0
28PRODUCTVERSION {major},{minor},{patch},0
29FILEOS VOS_NT_WINDOWS32
30FILETYPE VFT_APP
31BEGIN
32 BLOCK "StringFileInfo"
33 BEGIN
34 BLOCK "040904B0"
35 BEGIN
36 VALUE "CompanyName", "Josef Chudy <josef@ch-j.de>"
37 VALUE "Comments", "Background helper of CH-J Tools: file-manager menu entries, KeySync and server availability. https://sm.ch-j.eu/en/"
38 VALUE "LegalCopyright", "Copyright © 2026 Josef Chudý (CH-J). All rights reserved."
39 VALUE "FileDescription", "CH-J-Standby-Helper"
40 VALUE "FileVersion", "{version}"
41 VALUE "InternalName", "ch-j-standby-helper"
42 VALUE "OriginalFilename", "ch-j-standby-helper.exe"
43 VALUE "ProductName", "CH-J Tools"
44 VALUE "ProductVersion", "{version}"
45 END
46 END
47 BLOCK "VarFileInfo"
48 BEGIN
49 VALUE "Translation", 0x409, 1200
50 END
51END
52"#
53 );
54 let path = std::path::Path::new(&env("OUT_DIR")).join("ch-j-standby-helper.rc");
55 std::fs::write(&path, rc).expect("write rc");
56 embed_resource::compile(&path, embed_resource::NONE).manifest_optional().expect("compile Windows resource");
SHA-256f9ec488851bf8fd2ffe713e11bd81518e6d6e17644637b90fcf83ecd8575b40e

CH-J Proprietary Software License 1.14 · Die Quellen werden unter der CH-J Proprietary Software License 1.14 bereitgestellt. Ihre Verfügbarkeit ändert die Lizenzbedingungen nicht und gewährt keine zusätzlichen Rechte.

SHA-256 des Archivsac8fe790f4ba60fc098f8c985fc2656cfcc6cdc21fb34b30e308a2b54e62258f
Dateien