final update
This commit is contained in:
@@ -26,7 +26,7 @@ echo Building single-file executable...
|
||||
echo This may take a few minutes...
|
||||
echo.
|
||||
|
||||
pyinstaller --onefile --windowed --name "EBoek_Scraper" ^
|
||||
python -m pyinstaller --onefile --windowed --name "EBoek_Scraper" ^
|
||||
--hidden-import "PyQt5.QtCore" ^
|
||||
--hidden-import "PyQt5.QtGui" ^
|
||||
--hidden-import "PyQt5.QtWidgets" ^
|
||||
@@ -51,7 +51,7 @@ if errorlevel 1 (
|
||||
|
||||
REM Option 2: Use spec file
|
||||
echo Building with spec file...
|
||||
pyinstaller eboek_scraper.spec
|
||||
python -m pyinstaller eboek_scraper.spec
|
||||
|
||||
if errorlevel 1 (
|
||||
echo BUILD FAILED!
|
||||
@@ -66,14 +66,23 @@ echo =====================================
|
||||
echo BUILD SUCCESSFUL!
|
||||
echo =====================================
|
||||
echo.
|
||||
echo Your executable is located at:
|
||||
echo Your Windows executable is located at:
|
||||
echo dist\EBoek_Scraper.exe
|
||||
echo.
|
||||
echo File size:
|
||||
dir /b "dist\EBoek_Scraper.exe" | find /v "EBoek_Scraper.exe" || echo Not found
|
||||
for %%f in ("dist\EBoek_Scraper.exe") do echo %%~zf bytes
|
||||
echo Verifying file exists...
|
||||
if exist "dist\EBoek_Scraper.exe" (
|
||||
echo ✓ EBoek_Scraper.exe found
|
||||
for %%f in ("dist\EBoek_Scraper.exe") do echo File size: %%~zf bytes
|
||||
) else (
|
||||
echo ❌ EBoek_Scraper.exe not found - build may have failed
|
||||
)
|
||||
echo.
|
||||
echo You can now distribute this single file!
|
||||
echo Note: Windows may show a security warning on first run.
|
||||
echo ============================================
|
||||
echo 🎉 Ready for Windows distribution!
|
||||
echo ============================================
|
||||
echo • Share the file: dist\EBoek_Scraper.exe
|
||||
echo • No Python installation required on target PC
|
||||
echo • Windows may show security warning on first run
|
||||
echo (Click "More Info" → "Run Anyway")
|
||||
echo.
|
||||
pause
|
||||
@@ -66,13 +66,14 @@ def main():
|
||||
# Determine platform-specific settings
|
||||
is_windows = sys.platform.startswith('win')
|
||||
exe_name = "EBoek_Scraper.exe" if is_windows else "EBoek_Scraper"
|
||||
app_name = "EBoek_Scraper" # Base name without extension
|
||||
|
||||
# Build command
|
||||
build_cmd = [
|
||||
f"{sys.executable}", "-m", "PyInstaller",
|
||||
"--onefile",
|
||||
"--windowed",
|
||||
"--name", "EBoek_Scraper",
|
||||
"--name", app_name,
|
||||
# Hidden imports for PyQt5
|
||||
"--hidden-import", "PyQt5.QtCore",
|
||||
"--hidden-import", "PyQt5.QtGui",
|
||||
|
||||
Reference in New Issue
Block a user