You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.3 KiB

2 months ago
@echo off
chcp 65001 >nul
echo ==========================================
echo Avalonia App Linux Font Installation
echo ==========================================
echo.
echo Starting font installation in WSL Ubuntu...
echo.
REM 检查WSL是否可用
wsl --status >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: WSL is not available or not running
echo Please ensure WSL is installed and Ubuntu-22.04 is running
pause
exit /b 1
)
echo Checking Ubuntu-22.04 distribution...
wsl -d Ubuntu-22.04 -- echo "WSL test" >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: Ubuntu-22.04 distribution not accessible
echo Please ensure Ubuntu-22.04 is installed and running
pause
exit /b 1
)
echo Ubuntu-22.04 is accessible
echo.
echo Copying font installation script to WSL...
wsl -d Ubuntu-22.04 -- cp /mnt/d/Log/MyAvaloniaApp/install-fonts.sh ~/install-fonts.sh
echo Setting script permissions...
wsl -d Ubuntu-22.04 -- chmod +x ~/install-fonts.sh
echo Running font installation script...
echo.
wsl -d Ubuntu-22.04 -- ~/install-fonts.sh
echo.
echo ==========================================
echo Font installation completed!
echo ==========================================
echo.
echo You can now run the Avalonia app in Linux.
echo The font rendering issue should be resolved.
echo.
pause