From bcc91f8e03a62758ac975c000f58ad07b36630ca Mon Sep 17 00:00:00 2001 From: skymike03 Date: Wed, 30 Jul 2025 11:47:20 +0200 Subject: [PATCH] correction fichier bat windows --- RGSX_Windows.bat | 58 ++---------------------------------------------- 1 file changed, 2 insertions(+), 56 deletions(-) diff --git a/RGSX_Windows.bat b/RGSX_Windows.bat index b0f7314..02e20e3 100644 --- a/RGSX_Windows.bat +++ b/RGSX_Windows.bat @@ -9,8 +9,8 @@ echo [%DATE% %TIME%] Démarrage du script >> "%LOG_FILE%" :: Afficher un message de démarrage cls -echo Exécution de __main__.py pour Windows... -echo [%DATE% %TIME%] Exécution de __main__.py pour Windows >> "%LOG_FILE%" +echo Exécution de __main__.py pour RetroBat... +echo [%DATE% %TIME%] Exécution de __main__.py pour RetroBat >> "%LOG_FILE%" :: Définir les chemins relatifs set TOOLS_FOLDER=..\..\..\system\tools @@ -110,63 +110,9 @@ if %ERRORLEVEL% equ 0 ( :end echo Tâche terminée. echo [%DATE% %TIME%] Tâche terminée avec succès. >> "%LOG_FILE%" -:: Vérifier si Python est installé -echo Vérification de la présence de Python... -where python >nul 2>&1 -if %ERRORLEVEL% equ 0 ( - echo Python est déjà installé. - python --version - goto :end -) - -:: Python non trouvé, procéder au téléchargement -echo Python non trouvé. Téléchargement en cours... -set PYTHON_VERSION=3.13.5 -set PYTHON_INSTALLER=python-%PYTHON_VERSION%-amd64.exe -set DOWNLOAD_URL=https://www.python.org/ftp/python/%PYTHON_VERSION%/%PYTHON_INSTALLER% - -:: Créer un dossier temporaire -set TEMP_DIR=%TEMP%\PythonInstall -mkdir "%TEMP_DIR%" - -:: Télécharger l'installateur -echo Téléchargement de Python %PYTHON_VERSION%... -powershell -Command "Invoke-WebRequest -Uri %DOWNLOAD_URL% -OutFile %TEMP_DIR%\%PYTHON_INSTALLER%" - -:: Vérifier si le téléchargement a réussi -if not exist "%TEMP_DIR%\%PYTHON_INSTALLER%" ( - echo Erreur : Échec du téléchargement de l'installateur. - goto :error -) - -:: Installer Python -echo Installation de Python... -start /wait "" "%TEMP_DIR%\%PYTHON_INSTALLER%" /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 - -:: Vérifier si l'installation a réussi -where python >nul 2>&1 -if %ERRORLEVEL% equ 0 ( - echo Python a été installé avec succès. - python --version -) else ( - echo Erreur : L'installation de Python a échoué. - goto :error -) - -:: Nettoyage -echo Nettoyage des fichiers temporaires... -rd /s /q "%TEMP_DIR%" - -:end -echo Script terminé. Lancement de RGSX -python __main__.py -pause ->>>>>>> d5d5fa0991ce487dc11335a0d27345e48fa2ac4c exit /b 0 :error echo Une erreur s'est produite. echo [%DATE% %TIME%] Une erreur s'est produite. >> "%LOG_FILE%" -rd /s /q "%TEMP_DIR%" -pause exit /b 1 \ No newline at end of file