-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathinstall_msgfmt.bat
44 lines (38 loc) · 953 Bytes
/
install_msgfmt.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@echo off
setlocal enabledelayedexpansion
:: Check for admin privileges
net session >nul 2>&1
if %errorLevel% neq 0 (
echo Please run as administrator
pause
exit /b 1
)
:: Set download URL and temp file
set "URL=https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.23-v1.17/gettext0.23-iconv1.17-shared-64.exe"
set "OUTFILE=%TEMP%\gettext-tools-windows-x64.exe"
:: Download installer
echo Downloading GNU gettext tools...
bitsadmin /transfer "GetTextDownload" "%URL%" "%OUTFILE%" >nul
if not exist "%OUTFILE%" (
echo Download failed
pause
exit /b 1
)
:: Run installer silently
echo Installing...
start /wait "" "%OUTFILE%" /SILENT
if %errorLevel% neq 0 (
echo Installation failed
pause
exit /b 1
)
:: Verify installation
echo Verifying installation...
msgfmt --version
if %errorLevel% neq 0 (
echo Verification failed
pause
exit /b 1
)
echo Installation completed successfully
pause