From 7135ea6222578ea3e78112fc4bf8bdd28d96b97a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20=C5=9Eafak?= Date: Sun, 27 Apr 2025 06:15:06 +0300 Subject: [PATCH] =?UTF-8?q?Improved=20the=20Wind=C4=B1ws=20installer,=20up?= =?UTF-8?q?dated=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- WINDOWS_INSTALL.bat | 16 ++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e1318bb..3c7d103 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # abogen [![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) [![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) diff --git a/WINDOWS_INSTALL.bat b/WINDOWS_INSTALL.bat index cccda1a..dbe8d6b 100644 --- a/WINDOWS_INSTALL.bat +++ b/WINDOWS_INSTALL.bat @@ -46,8 +46,7 @@ if exist "%VERSION_FILE%" ( set "LOCAL_VERSION_CLEAN=!LOCAL_VERSION:.=!" :: First verify GitHub is accessible by checking HTTP status code - curl -s -o nul -w "%%{http_code}" "%VERSION_URL%" > "%TEMP%\abogen_http_status.txt" - set /p abogen_http_status=<"%TEMP%\abogen_http_status.txt" + for /f %%i in ('curl -s -o nul -w "%%{http_code}" "%VERSION_URL%"') do set abogen_http_status=%%i if not "!abogen_http_status!"=="200" ( 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) - curl -s -o "%TEMP%\abogen_remote_version.txt" "%VERSION_URL%" - 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 - ) + for /f "delims=" %%i in ('curl -s "%VERSION_URL%"') do set abogen_remote_version=%%i - set /p abogen_remote_version=<"%TEMP%\abogen_remote_version.txt" if "!abogen_remote_version!"=="" ( echo Empty version information received. Continuing with current version. goto continue_with_current_version @@ -97,8 +90,7 @@ if exist "%VERSION_FILE%" ( echo Downloading the latest update... :: Test the zip URL before downloading - curl -s -o nul -w "%%{http_code}" "%UPDATE_ZIP_URL%" > "%TEMP%\abogen_zip_status.txt" - set /p abogen_zip_status=<"%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 if not "!abogen_zip_status!"=="302" ( 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 ( 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 ( echo VERSION file not found. Cannot check for updates.