mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-06-03 21:08:13 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 62745490c3 | |||
| c2c9748ab5 | |||
| 2dc1fcc778 |
@@ -43,8 +43,8 @@
|
||||
"ShadowBroker_0.9.8_x64_en-US.msi": "fe22f9d51e4360d74c18a7250c2fbb9ed4fa4c7a884b3ac0d04a21115466386b"
|
||||
},
|
||||
"v0.9.81": {
|
||||
"ShadowBroker_v0.9.81.zip": "42f8a51f9a5690d1e7349d90d8ecf2d163c9061d6cf90c69ee03647a785437ff",
|
||||
"ShadowBroker_0.9.81_x64-setup.exe": "eca884b9d37eeccd0f11c91dcc6f6ae1b3609d9dee72bd73c37c9a427babfef2",
|
||||
"ShadowBroker_0.9.81_x64_en-US.msi": "a45b177c26c95d2b28d71592d7147e88ff4e104865f214fde11249d311ec9e25"
|
||||
"ShadowBroker_v0.9.81.zip": "af8c87ccdece8fbb9aadc6be63cce10d3fcba74e6d87ef83289dda6d555fd270",
|
||||
"ShadowBroker_0.9.81_x64-setup.exe": "4e866fa0423c0c2470ed32f4809167a7815dc23ee7762b69e95681c1f3a28250",
|
||||
"ShadowBroker_0.9.81_x64_en-US.msi": "8977c9a1c54e1f0d030436be9c4e3d81d766cc0080699eb747649095f360c7ff"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,6 +130,45 @@ function stageBackendRuntime() {
|
||||
});
|
||||
stagePrivacyCoreArtifact();
|
||||
stageReleaseAttestation();
|
||||
stageStartScripts();
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy ``start.bat`` and ``start.sh`` from the repo root into the
|
||||
* staged backend-runtime/ so they sit next to ``privacy_core.dll``.
|
||||
*
|
||||
* Why: an MSI/EXE/AppImage user who wants to launch via the dev-style
|
||||
* scripts (because the desktop shell is failing, or they prefer the
|
||||
* browser frontend at localhost:3000) shouldn't have to clone the
|
||||
* source repo just to get the scripts. Having them inside the install
|
||||
* directory also means the bundled ``privacy_core.dll`` fallback in
|
||||
* those scripts resolves to the SAME directory as the script, which
|
||||
* is exactly the layout the v0.9.81 script update is looking for.
|
||||
*
|
||||
* Tracked from issue #319: users who fell back to start.bat from
|
||||
* their MSI install dir had to go fetch it from GitHub, then saw a
|
||||
* scary "install Rust" warning because the script didn't know where
|
||||
* the bundled DLL was. Bundling the script removes both problems.
|
||||
*/
|
||||
function stageStartScripts() {
|
||||
const scripts = ['start.bat', 'start.sh'];
|
||||
for (const name of scripts) {
|
||||
const src = path.join(repoRoot, name);
|
||||
if (!fs.existsSync(src)) {
|
||||
console.warn(`backend-runtime staged without ${name} (not at repo root)`);
|
||||
continue;
|
||||
}
|
||||
const dst = path.join(outputDir, name);
|
||||
fs.copyFileSync(src, dst);
|
||||
// Preserve executable bit on POSIX systems for the .sh script.
|
||||
if (name.endsWith('.sh') && process.platform !== 'win32') {
|
||||
try {
|
||||
fs.chmodSync(dst, 0o755);
|
||||
} catch {
|
||||
/* best-effort; not fatal on filesystems that don't honor chmod */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function stagePrivacyCoreArtifact() {
|
||||
|
||||
@@ -237,6 +237,14 @@ echo [*] Backend Node.js dependencies OK.
|
||||
echo.
|
||||
echo [*] Checking privacy-core shared library...
|
||||
set "PRIVACY_CORE_DLL=%ROOT%\privacy-core\target\release\privacy_core.dll"
|
||||
:: MSI/EXE installers stage privacy_core.dll directly in backend-runtime/
|
||||
:: alongside this script. If somebody runs start.bat from an installed
|
||||
:: app directory (no source checkout, no Rust toolchain), they shouldn't
|
||||
:: see a spurious "install Rust" warning because the DLL is right next
|
||||
:: to them — just at a different path than the source-tree build.
|
||||
if not exist "%PRIVACY_CORE_DLL%" if exist "%ROOT%\privacy_core.dll" (
|
||||
set "PRIVACY_CORE_DLL=%ROOT%\privacy_core.dll"
|
||||
)
|
||||
if not exist "%PRIVACY_CORE_DLL%" (
|
||||
where cargo >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
|
||||
@@ -203,6 +203,17 @@ echo ""
|
||||
echo "[*] Checking privacy-core shared library..."
|
||||
PRIVACY_CORE_SO="$SCRIPT_DIR/privacy-core/target/release/libprivacy_core.so"
|
||||
PRIVACY_CORE_DYLIB="$SCRIPT_DIR/privacy-core/target/release/libprivacy_core.dylib"
|
||||
# MSI/AppImage/DMG installers stage the platform-specific shared library
|
||||
# directly alongside this script (in backend-runtime/). If somebody runs
|
||||
# start.sh from an installed app dir without Rust, they shouldn't see a
|
||||
# spurious "install Rust" warning — the library is right next to them,
|
||||
# just at a different path than the source-tree build.
|
||||
if [ ! -f "$PRIVACY_CORE_SO" ] && [ -f "$SCRIPT_DIR/libprivacy_core.so" ]; then
|
||||
PRIVACY_CORE_SO="$SCRIPT_DIR/libprivacy_core.so"
|
||||
fi
|
||||
if [ ! -f "$PRIVACY_CORE_DYLIB" ] && [ -f "$SCRIPT_DIR/libprivacy_core.dylib" ]; then
|
||||
PRIVACY_CORE_DYLIB="$SCRIPT_DIR/libprivacy_core.dylib"
|
||||
fi
|
||||
if [ ! -f "$PRIVACY_CORE_SO" ] && [ ! -f "$PRIVACY_CORE_DYLIB" ]; then
|
||||
if command -v cargo >/dev/null 2>&1; then
|
||||
echo "[*] Building privacy-core release library..."
|
||||
|
||||
Reference in New Issue
Block a user