Remove Cloudflare from pack-usb, fix password length test
This commit is contained in:
35
pack-usb.bat
35
pack-usb.bat
@@ -138,7 +138,7 @@ echo [4/8] Source trees copied.
|
||||
:: ----------------------------------------------------------------
|
||||
:: 5. Launcher + docs (always sync from project root)
|
||||
:: ----------------------------------------------------------------
|
||||
echo [5/8] Syncing LAUNCH.bat, README, cloudflare...
|
||||
echo [5/8] Syncing LAUNCH.bat and README...
|
||||
copy /y "%ROOT%\LAUNCH.bat" "%USB%\LAUNCH.bat" >nul
|
||||
if not exist "%USB%\README.txt" (
|
||||
if exist "%ROOT%\usb\README.txt" copy /y "%ROOT%\usb\README.txt" "%USB%\README.txt" >nul
|
||||
@@ -146,37 +146,7 @@ if not exist "%USB%\README.txt" (
|
||||
:: run.bat is a project-root marker used by some tooling
|
||||
echo @echo off > "%USB%\run.bat"
|
||||
echo rem AetherForge portable root marker >> "%USB%\run.bat"
|
||||
|
||||
if not exist "%USB%\cloudflare" mkdir "%USB%\cloudflare"
|
||||
|
||||
:: Core tunnel files — always sync from usb\cloudflare\
|
||||
for %%F in (start-tunnel.ps1 tunnel-config.json SETUP.txt) do (
|
||||
if exist "%ROOT%\usb\cloudflare\%%F" (
|
||||
copy /y "%ROOT%\usb\cloudflare\%%F" "%USB%\cloudflare\%%F" >nul
|
||||
)
|
||||
)
|
||||
|
||||
:: cloudflared binary — copy from usb\cloudflare\ or download
|
||||
if exist "%ROOT%\usb\cloudflare\cloudflared.exe" (
|
||||
copy /y "%ROOT%\usb\cloudflare\cloudflared.exe" "%USB%\cloudflare\cloudflared.exe" >nul
|
||||
echo [5/8] cloudflared.exe bundled.
|
||||
) else (
|
||||
echo [5/8] Downloading cloudflared.exe...
|
||||
powershell -NoProfile -Command "& { [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-windows-amd64.exe' -OutFile '%USB%\cloudflare\cloudflared.exe' }"
|
||||
if exist "%USB%\cloudflare\cloudflared.exe" (
|
||||
echo [5/8] cloudflared.exe downloaded OK.
|
||||
) else (
|
||||
echo [5/8] WARNING: cloudflared.exe not available - tunnel may not work offline.
|
||||
)
|
||||
)
|
||||
|
||||
:: MSI backup (optional — used as fallback if cloudflared.exe install fails)
|
||||
if exist "%ROOT%\cloudflared-windows-amd64.msi" (
|
||||
copy /y "%ROOT%\cloudflared-windows-amd64.msi" "%USB%\cloudflare\cloudflared-windows-amd64.msi" >nul
|
||||
) else if exist "%ROOT%\usb\cloudflare\cloudflared-windows-amd64.msi" (
|
||||
copy /y "%ROOT%\usb\cloudflare\cloudflared-windows-amd64.msi" "%USB%\cloudflare\cloudflared-windows-amd64.msi" >nul
|
||||
)
|
||||
echo [5/8] Launcher + cloudflare synced.
|
||||
echo [5/8] Launcher synced.
|
||||
|
||||
:: ----------------------------------------------------------------
|
||||
:: 6. Remove stale nested server mirror (not needed for portable)
|
||||
@@ -196,7 +166,6 @@ if not exist "%USB%\data\blueprints" mkdir "%USB%\data\blueprints"
|
||||
if not exist "%USB%\data\preps" mkdir "%USB%\data\preps"
|
||||
if not exist "%USB%\data\spread-kits" mkdir "%USB%\data\spread-kits"
|
||||
if not exist "%USB%\data\uploads" mkdir "%USB%\data\uploads"
|
||||
if not exist "%USB%\data\cloudflare" mkdir "%USB%\data\cloudflare"
|
||||
echo [7/8] data\ ready - existing config and db preserved.
|
||||
|
||||
:: ----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user