diff --git a/build/WindowsApp/README.txt b/build/WindowsApp/README.txt index 81357e3bf..1f531243d 100644 --- a/build/WindowsApp/README.txt +++ b/build/WindowsApp/README.txt @@ -1,6 +1,6 @@ Instructions: 1) on Linux: sudo apt install unzip zip gettext cmake p7zip-full -2) on Windows: install DesktopAppConverter and the Windows SDK +2) on Windows: install DesktopAppConverter and the Windows 10 SDK 3) Run build.sh to create the ZIP file 4) Transfer multicraft-windows.zip to Windows and extract it 5) Edit the settings in the .bat file diff --git a/build/WindowsApp/package.bat b/build/WindowsApp/package.bat index 81c27b882..7019b1352 100755 --- a/build/WindowsApp/package.bat +++ b/build/WindowsApp/package.bat @@ -1,11 +1,11 @@ @echo off -REM ---- change these ---- +REM --- change these --- SET folderpath=C:\Users\Doge\Desktop\MultiCraft-1.1.8-dev-win32 SET outputpath=C:\Users\Doge\Desktop SET version=1.1.8.0 SET publisher=example text -REM ---------------------- +REM -------------------- rem Find path to DesktopAppConverter pushd "%ProgramFiles%\WindowsApps" @@ -13,11 +13,20 @@ set cmd="dir /b Microsoft.DesktopAppConverter_*" for /f "tokens=*" %%i in (' %cmd% ') do set appname=%%i popd +rem Find installed Windows 10 SDK version +pushd "%ProgramFiles(x86)%\Windows Kits\10\bin" +set cmd="dir /b 10.*" +for /f "tokens=*" %%i in (' %cmd% ') do set sdkver=%%i +popd + echo Please wait... powershell -NoProfile -NoLogo -ExecutionPolicy Bypass^ -File "%ProgramFiles%\WindowsApps\%appname%\DesktopAppConverter.ps1"^ -Installer "%folderpath%" -AppExecutable MultiCraft.exe^ -Destination "%outputpath%" -PackageName MultiCraft^ -Publisher "CN=%publisher%" -Version %version% +"%ProgramFiles(x86)%\Windows Kits\10\bin\%sdkver%\x64\MakeAppx.exe"^ + pack /l^ + /d "%outputpath%\MultiCraft\PackageFiles" /p "%outputpath%\MultiCraft.appx" pause