Improved the Windıws installer, updated readme

This commit is contained in:
Deniz Şafak
2025-04-27 06:15:06 +03:00
parent bb3cb27b25
commit 7135ea6222
2 changed files with 6 additions and 13 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
# abogen <img width="40px" title="abogen icon" src="https://raw.githubusercontent.com/denizsafak/abogen/refs/heads/main/abogen/assets/icon.ico" align="right" style="padding-left: 10px; padding-top:5px;"> # abogen <img width="40px" title="abogen icon" src="https://raw.githubusercontent.com/denizsafak/abogen/refs/heads/main/abogen/assets/icon.ico" align="right" style="padding-left: 10px; padding-top:5px;">
[![Build Status](https://github.com/denizsafak/abogen/actions/workflows/test_pip.yml/badge.svg)](https://github.com/denizsafak/abogen/actions) [![Build Status](https://github.com/denizsafak/abogen/actions/workflows/test_pip.yml/badge.svg)](https://github.com/denizsafak/abogen/actions)
![Python Versions](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue?logo=python) [![GitHub Release](https://img.shields.io/github/v/release/denizsafak/abogen)](https://github.com/denizsafak/abogen/releases/latest)
![abogen PyPi Python Versions](https://img.shields.io/pypi/pyversions/abogen)
[![Operating Systems](https://img.shields.io/badge/os-windows%20%7C%20linux%20%7C%20macos%20-blue)](https://github.com/denizsafak/abogen/releases/latest) [![Operating Systems](https://img.shields.io/badge/os-windows%20%7C%20linux%20%7C%20macos%20-blue)](https://github.com/denizsafak/abogen/releases/latest)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![License: MIT](https://img.shields.io/badge/License-MIT-maroon.svg)](https://opensource.org/licenses/MIT) [![License: MIT](https://img.shields.io/badge/License-MIT-maroon.svg)](https://opensource.org/licenses/MIT)
+4 -12
View File
@@ -46,8 +46,7 @@ if exist "%VERSION_FILE%" (
set "LOCAL_VERSION_CLEAN=!LOCAL_VERSION:.=!" set "LOCAL_VERSION_CLEAN=!LOCAL_VERSION:.=!"
:: First verify GitHub is accessible by checking HTTP status code :: First verify GitHub is accessible by checking HTTP status code
curl -s -o nul -w "%%{http_code}" "%VERSION_URL%" > "%TEMP%\abogen_http_status.txt" for /f %%i in ('curl -s -o nul -w "%%{http_code}" "%VERSION_URL%"') do set abogen_http_status=%%i
set /p abogen_http_status=<"%TEMP%\abogen_http_status.txt"
if not "!abogen_http_status!"=="200" ( if not "!abogen_http_status!"=="200" (
echo Failed to access GitHub repository ^(HTTP status: !abogen_http_status!^). Continuing with current version. echo Failed to access GitHub repository ^(HTTP status: !abogen_http_status!^). Continuing with current version.
@@ -55,14 +54,8 @@ if exist "%VERSION_FILE%" (
) )
:: Get the remote version (only if GitHub is accessible) :: Get the remote version (only if GitHub is accessible)
curl -s -o "%TEMP%\abogen_remote_version.txt" "%VERSION_URL%" for /f "delims=" %%i in ('curl -s "%VERSION_URL%"') do set abogen_remote_version=%%i
findstr "^" "%TEMP%\abogen_remote_version.txt" >nul 2>&1
if errorlevel 1 (
echo Failed to retrieve version information. Continuing with current version.
goto continue_with_current_version
)
set /p abogen_remote_version=<"%TEMP%\abogen_remote_version.txt"
if "!abogen_remote_version!"=="" ( if "!abogen_remote_version!"=="" (
echo Empty version information received. Continuing with current version. echo Empty version information received. Continuing with current version.
goto continue_with_current_version goto continue_with_current_version
@@ -97,8 +90,7 @@ if exist "%VERSION_FILE%" (
echo Downloading the latest update... echo Downloading the latest update...
:: Test the zip URL before downloading :: Test the zip URL before downloading
curl -s -o nul -w "%%{http_code}" "%UPDATE_ZIP_URL%" > "%TEMP%\abogen_zip_status.txt" for /f %%i in ('curl -s -o nul -w "%%{http_code}" "%UPDATE_ZIP_URL%"') do set abogen_zip_status=%%i
set /p abogen_zip_status=<"%TEMP%\abogen_zip_status.txt"
if not "!abogen_zip_status!"=="302" ( if not "!abogen_zip_status!"=="302" (
echo Failed to access update zip file ^(HTTP status: !abogen_zip_status!^). Continuing with current version. echo Failed to access update zip file ^(HTTP status: !abogen_zip_status!^). Continuing with current version.
@@ -137,7 +129,7 @@ if exist "%VERSION_FILE%" (
) )
) else ( ) else (
echo Current version: !LOCAL_VERSION!, Remote version: !abogen_remote_version! echo Current version: !LOCAL_VERSION!, Remote version: !abogen_remote_version!
echo You are usering the latest version. echo You are using the latest version.
) )
) else ( ) else (
echo VERSION file not found. Cannot check for updates. echo VERSION file not found. Cannot check for updates.