-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_installer.bat
More file actions
executable file
·115 lines (100 loc) · 3.3 KB
/
build_installer.bat
File metadata and controls
executable file
·115 lines (100 loc) · 3.3 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
@echo off
setlocal enabledelayedexpansion
chcp 65001
title Deep Clean - Complete Installer Builder
echo ========================================
echo Deep Clean - Complete Installer
echo ========================================
echo.
:: Check requirements
where python >nul 2>&1
if errorlevel 1 (
echo ❌ Python not found in PATH
echo Please install Python 3.8+ first
pause
exit /b 1
)
where makensis >nul 2>&1
if errorlevel 1 (
echo ❌ NSIS not found
echo Download from: https://nsis.sourceforge.io/Download
pause
exit /b 1
)
:: Create directory structure
echo [1/7] Creating directory structure...
if not exist "dist" mkdir dist
if not exist "tools" mkdir tools
if not exist "tools\ImageMagick" mkdir tools\ImageMagick
:: Create virtual environment
echo [2/7] Setting up Python environment...
python -m venv build_env
call build_env\Scripts\activate.bat
pip install --upgrade pip
pip install -r requirements.txt
:: Create application icon
echo [3/7] Creating application icon...
python create_icon.py
:: Build executable
echo [4/7] Building main executable...
pyinstaller --onefile --windowed --name "DeepClean" --icon=clean_icon.ico --add-data "clean_icon.ico;." deep_clean_app.py
:: Download and prepare dependencies
echo [5/7] Preparing dependencies...
:: Download ExifTool
if not exist "tools\exiftool.exe" (
echo Downloading ExifTool...
powershell -Command "Invoke-WebRequest -Uri 'https://exiftool.org/exiftool-12.69.zip' -OutFile 'tools\exiftool.zip'"
powershell -Command "Expand-Archive -Path 'tools\exiftool.zip' -DestinationPath 'tools\temp_exiftool\' -Force"
move "tools\temp_exiftool\exiftool(-k).exe" "tools\exiftool.exe" >nul 2>&1
rmdir /s /q "tools\temp_exiftool" >nul 2>&1
del "tools\exiftool.zip" >nul 2>&1
)
:: Download ImageMagick portable (smaller version)
if not exist "tools\ImageMagick\magick.exe" (
echo Downloading ImageMagick Portable...
powershell -Command "Invoke-WebRequest -Uri 'https://imagemagick.org/archive/binaries/ImageMagick-7.1.1-15-portable-Q16-x64.zip' -OutFile 'tools\imagemagick.zip'"
powershell -Command "Expand-Archive -Path 'tools\imagemagick.zip' -DestinationPath 'tools\ImageMagick\' -Force"
del "tools\imagemagick.zip" >nul 2>&1
)
:: Create documentation
echo [6/7] Creating documentation...
(
echo Deep Clean - Image Metadata Cleaner
echo ===================================
echo.
echo Features:
echo • Remove EXIF metadata from images
echo • Batch process multiple files
echo • Multiple cleaning algorithms
echo • 100%% offline processing
echo • Modern dark theme UI
echo.
echo Shortcuts:
echo • Desktop: Deep Clean.lnk
echo • Start Menu: DeepClean folder
echo • Uninstall: Add/Remove Programs
echo.
echo Support: Contact your administrator
) > README.txt
:: Build installer
echo [7/7] Building installer...
makensis installer.nsi
if exist "DeepClean_Setup.exe" (
echo.
echo ✅ SUCCESS! Installer created: DeepClean_Setup.exe
echo.
echo 🚀 Users can run this to get:
echo • Deep Clean application
echo • ExifTool for metadata
echo • ImageMagick for processing
echo • Desktop and Start Menu shortcuts
echo • Professional installer experience
echo.
) else (
echo ❌ Installer creation failed!
)
:: Cleanup
deactivate
rd /s /q build_env
echo.
pause