-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetup_Full.bat
More file actions
51 lines (44 loc) · 1.6 KB
/
Copy pathSetup_Full.bat
File metadata and controls
51 lines (44 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@echo off
setlocal enabledelayedexpansion
title PDF Optimizer Suite v4.3.0 - Portable Setup
color 07
set "LOG_DIR=%~1"
if "%LOG_DIR%"=="" set "LOG_DIR=%TEMP%"
set "LOG_FILE=%LOG_DIR%\pdf_optimizer_debug.log"
echo Starting Portable Installation v4.3.0...
echo --- SETUP LOG v4.3.0 START --- >> "%LOG_FILE%"
:: 1. Python (Embedded - Skipped check)
echo [1/3] Configuring Embedded Python...
echo [INFO] Using Embedded Python (skip system check). >> "%LOG_FILE%"
:: 2. Ghostscript
echo [2/3] Checking Ghostscript...
gswin64c -version >nul 2>&1
if %errorlevel% neq 0 (
if exist "%~dp0resources\gs-installer.exe" (
echo [INFO] Installing Ghostscript... >> "%LOG_FILE%"
start /wait "" "%~dp0resources\gs-installer.exe" /S
) else (
echo [WARN] Ghostscript installer not found. >> "%LOG_FILE%"
)
) else (
echo [INFO] Ghostscript already installed. >> "%LOG_FILE%"
)
:: 3. ImageMagick
echo [3/3] Checking ImageMagick...
magick -version >nul 2>&1
if %errorlevel% neq 0 (
if exist "%~dp0resources\ImageMagick-Installer.exe" (
echo [INFO] Installing ImageMagick... >> "%LOG_FILE%"
start /wait "" "%~dp0resources\ImageMagick-Installer.exe" /VERYSILENT /TASKS="legacy_support,add_path"
) else (
echo [WARN] ImageMagick installer not found. >> "%LOG_FILE%"
)
) else (
echo [INFO] ImageMagick already installed. >> "%LOG_FILE%"
)
:: 4. Registry Registration
echo [Finalizing] Registering Menu...
:: Pass the language argument (%2) to install.bat
call "%~dp0install\install.bat" "%LOG_FILE%" "%~2"
echo Setup Finished.
echo --- SETUP LOG v4.3.0 END --- >> "%LOG_FILE%"