1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[app] Create full multi-arch app store package

* Package now includes x86_32, x86_64, ARM and ARM64
This commit is contained in:
Pete Batard 2018-10-26 14:05:43 +01:00
parent 92b66e02eb
commit 2727f437fd
4 changed files with 66 additions and 33 deletions

View file

@ -9,7 +9,7 @@
<Identity <Identity
Name="Rufus" Name="Rufus"
Version="3.4.1411.0" Version="3.4.1411.0"
ProcessorArchitecture="x86" ProcessorArchitecture="@ARCH@"
Publisher='CN=Akeo Consulting, O=Akeo Consulting, STREET=24 Grey Rock, L=Milford, S=Co. Donegal, PostalCode=F92 D667, C=IE' /> Publisher='CN=Akeo Consulting, O=Akeo Consulting, STREET=24 Grey Rock, L=Milford, S=Co. Donegal, PostalCode=F92 D667, C=IE' />
<Properties> <Properties>
<DisplayName>Rufus</DisplayName> <DisplayName>Rufus</DisplayName>

View file

@ -1,9 +0,0 @@
This directory contains the resources to create a Windows Store package.
However, since Microsoft doesn't allow elevated applications into the Windows
Store, and, even if you install it manually, Windows 10 will also refuse to
elevate it (so you have to explicitly select to run it as admin *every time*),
this is rather pointless.
Still, you can find the latest signed application package at:
https://rufus.akeo.ie/testing/

View file

@ -1,27 +1,69 @@
@echo off @echo off
setlocal EnableExtensions DisableDelayedExpansion
set VERSION=3.4 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 *.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: set WDK_PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64
rem https://social.msdn.microsoft.com/Forums/windowsapps/en-US/dc505f68-d120-43e3-a9e1-d7c77746d588/uwpdesktop-bridgeunplated-taskbar-icons-in-desktop-bridge-apps set MANIFEST=AppxManifest.xml
mkdir Assets >NUL 2>&1 set ARCHS=x86 x64 arm arm64
copy "..\icons\rufus-44.png" "Assets\Square44x44Logo.png"
copy "..\icons\rufus-48.png" "Assets\Square44x44Logo.targetsize-48.png" cd /d "%~dp0"
copy "..\icons\rufus-48.png" "Assets\Square44x44Logo.targetsize-48_altform-unplated.png" setlocal EnableDelayedExpansion
copy "..\icons\rufus-150.png" "Assets\Square150x150Logo.png" set FILES_TO_SIGN=
copy "..\..\rufus-%VERSION%.exe" "rufus.exe" for %%a in (%ARCHS%) do (
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\MakePri" createconfig /o /dq en-US /cf priconfig.xml if not exist "..\..\%%a\Release\rufus.exe" (
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\MakePri" new /o /pr . /cf priconfig.xml echo The %%a VS2017 Release build of Rufus does not exist!
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\MakeAppx" pack /o /d . /p Rufus-%VERSION%.appx 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 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 :out
del /q rufus.exe cd /d "%~dp0"
del /q priconfig.xml for %%a in (%ARCHS%) do (
del /q resources.pri rd /S /Q %%a >NUL 2>&1
rmdir /s /q Assets )
del /q *.map >NUL 2>&1
del /q *.appx >NUL 2>&1
rename *.appxbundle *.appx >NUL 2>&1
pause pause
exit exit

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326 IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.4.1416" CAPTION "Rufus 3.4.1417"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0 FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -392,8 +392,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,4,1416,0 FILEVERSION 3,4,1417,0
PRODUCTVERSION 3,4,1416,0 PRODUCTVERSION 3,4,1417,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -411,13 +411,13 @@ BEGIN
VALUE "Comments", "https://akeo.ie" VALUE "Comments", "https://akeo.ie"
VALUE "CompanyName", "Akeo Consulting" VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.4.1416" VALUE "FileVersion", "3.4.1417"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus-3.4.exe" VALUE "OriginalFilename", "rufus-3.4.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.4.1416" VALUE "ProductVersion", "3.4.1417"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"