- Selection multiple dans les vignettes (Ctrl+clic, Maj+clic) - Rotation/suppression sur selection multiple - Impression : os.startfile(print) avec fallback - MAJ deplacee dans Aide > Rechercher une mise a jour (plus au demarrage) - Support arguments CLI : ouvrir un PDF en argument, fusionner si plusieurs - register_windows.bat : association fichier PDF + menu contextuel Windows - Clic droit > CopyDev Impose > Ouvrir / Livret A4 / Livret A3 - Presets manager (base pour macros) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
96 lines
3.4 KiB
Batchfile
96 lines
3.4 KiB
Batchfile
@echo off
|
|
chcp 65001 >nul 2>&1
|
|
echo ============================================================
|
|
echo CopyDev Imposing Tool — Enregistrement Windows
|
|
echo ============================================================
|
|
echo.
|
|
|
|
:: Trouver l'exe
|
|
set "EXE_PATH=%~dp0CopydevImposingTool.exe"
|
|
if not exist "%EXE_PATH%" (
|
|
set "EXE_PATH=%~dp0dist\CopydevImposingTool.exe"
|
|
)
|
|
if not exist "%EXE_PATH%" (
|
|
echo [ERREUR] CopydevImposingTool.exe introuvable.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
echo Executable : %EXE_PATH%
|
|
echo.
|
|
|
|
echo 1. Associer les fichiers PDF
|
|
echo 2. Ajouter au menu contextuel
|
|
echo 3. Tout enregistrer (1+2)
|
|
echo 4. Tout desenregistrer
|
|
echo 5. Quitter
|
|
echo.
|
|
set /p "CHOIX=Votre choix [1-5] : "
|
|
|
|
if "%CHOIX%"=="1" goto ASSOC
|
|
if "%CHOIX%"=="2" goto CONTEXT
|
|
if "%CHOIX%"=="3" goto ALL
|
|
if "%CHOIX%"=="4" goto UNREGISTER
|
|
if "%CHOIX%"=="5" exit /b 0
|
|
|
|
:ALL
|
|
call :DO_ASSOC
|
|
call :DO_CONTEXT
|
|
goto DONE
|
|
|
|
:ASSOC
|
|
call :DO_ASSOC
|
|
goto DONE
|
|
|
|
:CONTEXT
|
|
call :DO_CONTEXT
|
|
goto DONE
|
|
|
|
:DO_ASSOC
|
|
echo.
|
|
echo [1] Association des fichiers PDF...
|
|
reg add "HKCU\Software\Classes\.pdf\OpenWithProgids" /v "CopyDevImpose" /t REG_SZ /d "" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\CopyDevImpose" /ve /d "CopyDev Imposing Tool" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\CopyDevImpose\shell\open\command" /ve /d "\"%EXE_PATH%\" \"%%1\"" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\CopyDevImpose\DefaultIcon" /ve /d "%EXE_PATH%,0" /f >nul 2>&1
|
|
echo [OK] PDF associe a CopyDev Imposing Tool
|
|
echo (clic droit > Ouvrir avec > CopyDev Imposing Tool)
|
|
goto :EOF
|
|
|
|
:DO_CONTEXT
|
|
echo.
|
|
echo [2] Menu contextuel Windows...
|
|
:: Entree principale
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose" /ve /d "CopyDev Impose" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose" /v "SubCommands" /t REG_SZ /d "" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose" /v "Icon" /t REG_SZ /d "%EXE_PATH%,0" /f >nul 2>&1
|
|
|
|
:: Sous-commandes
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\open" /ve /d "Ouvrir" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\open\command" /ve /d "\"%EXE_PATH%\" \"%%1\"" /f >nul 2>&1
|
|
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\bookletA4" /ve /d "Livret A4" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\bookletA4\command" /ve /d "\"%EXE_PATH%\" --action booklet_a4 \"%%1\"" /f >nul 2>&1
|
|
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\bookletA3" /ve /d "Livret A3" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\bookletA3\command" /ve /d "\"%EXE_PATH%\" --action booklet_a3 \"%%1\"" /f >nul 2>&1
|
|
|
|
echo [OK] Menu contextuel ajoute
|
|
echo (clic droit sur PDF > CopyDev Impose > ...)
|
|
goto :EOF
|
|
|
|
:UNREGISTER
|
|
echo.
|
|
echo Suppression des enregistrements...
|
|
reg delete "HKCU\Software\Classes\CopyDevImpose" /f >nul 2>&1
|
|
reg delete "HKCU\Software\Classes\.pdf\OpenWithProgids" /v "CopyDevImpose" /f >nul 2>&1
|
|
reg delete "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose" /f >nul 2>&1
|
|
echo [OK] Tout desenregistre
|
|
goto DONE
|
|
|
|
:DONE
|
|
echo.
|
|
echo ============================================================
|
|
echo Termine
|
|
echo ============================================================
|
|
pause
|