forked from pbatard/rufus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[app] Create full multi-arch app store package
* Package now includes x86_32, x86_64, ARM and ARM64
- Loading branch information
Showing
4 changed files
with
66 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,69 @@ | ||
@echo off | ||
setlocal EnableExtensions DisableDelayedExpansion | ||
set VERSION=3.4 | ||
|
||
rem Make sure you don't have anything you don't want included in the package, as anything residing in the | ||
rem current directory will be included, including any previous .appx, which makes for nice recursion... | ||
del /q *.appx >NUL 2>&1 | ||
del /q *.appxbundle >NUL 2>&1 | ||
del /q *.map >NUL 2>&1 | ||
|
||
rem As per the link below, you need "altform-unplated" icons and run MakePri to get transparent icons: | ||
rem https://social.msdn.microsoft.com/Forums/windowsapps/en-US/dc505f68-d120-43e3-a9e1-d7c77746d588/uwpdesktop-bridgeunplated-taskbar-icons-in-desktop-bridge-apps | ||
mkdir Assets >NUL 2>&1 | ||
copy "..\icons\rufus-44.png" "Assets\Square44x44Logo.png" | ||
copy "..\icons\rufus-48.png" "Assets\Square44x44Logo.targetsize-48.png" | ||
copy "..\icons\rufus-48.png" "Assets\Square44x44Logo.targetsize-48_altform-unplated.png" | ||
copy "..\icons\rufus-150.png" "Assets\Square150x150Logo.png" | ||
copy "..\..\rufus-%VERSION%.exe" "rufus.exe" | ||
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\MakePri" createconfig /o /dq en-US /cf priconfig.xml | ||
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\MakePri" new /o /pr . /cf priconfig.xml | ||
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\MakeAppx" pack /o /d . /p Rufus-%VERSION%.appx | ||
set WDK_PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64 | ||
set MANIFEST=AppxManifest.xml | ||
set ARCHS=x86 x64 arm arm64 | ||
|
||
cd /d "%~dp0" | ||
setlocal EnableDelayedExpansion | ||
set FILES_TO_SIGN= | ||
for %%a in (%ARCHS%) do ( | ||
if not exist "..\..\%%a\Release\rufus.exe" ( | ||
echo The %%a VS2017 Release build of Rufus does not exist! | ||
goto out | ||
) | ||
set FILES_TO_SIGN=!FILES_TO_SIGN! "..\..\%%a\Release\rufus.exe" | ||
) | ||
"%WDK_PATH%\SignTool" sign /v /sha1 9ce9a71ccab3b38a74781b975f1c228222cf7d3b /fd SHA256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp %FILES_TO_SIGN% | ||
if ERRORLEVEL 1 goto out | ||
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\SignTool" sign /v /sha1 9ce9a71ccab3b38a74781b975f1c228222cf7d3b /fd SHA256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp Rufus-%VERSION%.appx | ||
endlocal | ||
|
||
echo [Files]> bundle.map | ||
|
||
for %%a in (%ARCHS%) do ( | ||
echo Creating %%a appx... | ||
cd /d "%~dp0" | ||
echo "Rufus-%%a.appx" "Rufus-%%a.appx">> bundle.map | ||
mkdir %%a >NUL 2>&1 | ||
copy %MANIFEST% %%a\%MANIFEST% >NUL 2>&1 | ||
cd %%a | ||
for /f "delims=" %%i in ('type %MANIFEST% ^& break ^> %MANIFEST%') do ( | ||
set "line=%%i" | ||
setlocal EnableDelayedExpansion | ||
>>%MANIFEST% echo(!line:@ARCH@=%%a! | ||
endlocal | ||
) | ||
mkdir Assets >NUL 2>&1 | ||
copy "..\..\icons\rufus-44.png" "Assets\Square44x44Logo.png" >NUL 2>&1 | ||
copy "..\..\icons\rufus-48.png" "Assets\Square44x44Logo.targetsize-48.png" >NUL 2>&1 | ||
copy "..\..\icons\rufus-48.png" "Assets\Square44x44Logo.targetsize-48_altform-unplated.png" >NUL 2>&1 | ||
copy "..\..\icons\rufus-150.png" "Assets\Square150x150Logo.png" >NUL 2>&1 | ||
copy "..\..\..\%%a\Release\rufus.exe" "rufus.exe" >NUL 2>&1 | ||
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\MakePri" createconfig /o /dq en-US /cf priconfig.xml | ||
"%WDK_PATH%\MakePri" new /o /pr . /cf priconfig.xml | ||
"%WDK_PATH%\MakeAppx" pack /o /d . /p ../Rufus-%%a.appx | ||
if ERRORLEVEL 1 goto out | ||
) | ||
|
||
cd /d "%~dp0" | ||
"%WDK_PATH%\SignTool" sign /v /sha1 9ce9a71ccab3b38a74781b975f1c228222cf7d3b /fd SHA256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp *.appx | ||
if ERRORLEVEL 1 goto out | ||
"%WDK_PATH%\MakeAppx" bundle /f bundle.map /p Rufus-%VERSION%.appxbundle | ||
"%WDK_PATH%\SignTool" sign /v /sha1 9ce9a71ccab3b38a74781b975f1c228222cf7d3b /fd SHA256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp Rufus-%VERSION%.appxbundle | ||
|
||
:out | ||
del /q rufus.exe | ||
del /q priconfig.xml | ||
del /q resources.pri | ||
rmdir /s /q Assets | ||
cd /d "%~dp0" | ||
for %%a in (%ARCHS%) do ( | ||
rd /S /Q %%a >NUL 2>&1 | ||
) | ||
del /q *.map >NUL 2>&1 | ||
del /q *.appx >NUL 2>&1 | ||
rename *.appxbundle *.appx >NUL 2>&1 | ||
pause | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters