diff --git a/_chver.sh b/_chver.sh index c97a9d65..db472d80 100755 --- a/_chver.sh +++ b/_chver.sh @@ -22,16 +22,17 @@ esac echo "changing version to $MAJOR.$MINOR" sed -i -e "s/^AC_INIT(\[\([^ ]*\)\], \[[^ ]*\]\(.*\)/AC_INIT([\1], [$MAJOR.$MINOR]\2/" configure.ac cat > cmd.sed <<\_EOF -s/^[ \t]*FILEVERSION[ \t]*.*,.*,\(.*\),\(.*\)/ FILEVERSION @@MAJOR@@,@@MINOR@@,\1,\2/ -s/^[ \t]*PRODUCTVERSION[ \t]*.*,.*,\(.*\),\(.*\)/ PRODUCTVERSION @@MAJOR@@,@@MINOR@@,\1,\2/ -s/^\([ \t]*\)VALUE[ \t]*"FileVersion",[ \t]*".*\..*\.\(.*\)"/\1VALUE "FileVersion", "@@MAJOR@@.@@MINOR@@.\2"/ -s/^\([ \t]*\)VALUE[ \t]*"ProductVersion",[ \t]*".*\..*\.\(.*\)"/\1VALUE "ProductVersion", "@@MAJOR@@.@@MINOR@@.\2"/ -s/^\(.*\)"Rufus .*\..*\.\(.*\)"\(.*\)/\1"Rufus @@MAJOR@@.@@MINOR@@.\2"\3/ +s/^\([ \t]*\)\(FILE\|PRODUCT\)VERSION\([ \t]*\)[0-9]*,[0-9]*\(.*\)/\1\2VERSION\3@@MAJOR@@,@@MINOR@@\4/ +s/^\([ \t]*\)VALUE\([ \t]*\)"\(File\|Product\)Version",\([ \t]*\)"[0-9]*\.[0-9]*\.\(.*\)/\1VALUE\2"\3Version",\4"@@MAJOR@@.@@MINOR@@.\5/ +s/^\(.*\)"Rufus [0-9]*\.[0-9]*\.\(.*\)"\(.*\)/\1"Rufus @@MAJOR@@.@@MINOR@@.\2"\3/ +s/^\([ \t]*\)Version="[0-9]*\.[0-9]*\.\(.*\)"\(.*\)/\1Version="@@MAJOR@@.@@MINOR@@.\2"\3/ +s/^set VERSION=[0-9]*\.[0-9]*/set VERSION=@@MAJOR@@.@@MINOR@@/ _EOF # First run sed to substitute our variable in the sed command file sed -i -e "s/@@MAJOR@@/$MAJOR/g" -e "s/@@MINOR@@/$MINOR/g" cmd.sed -sed -i -f cmd.sed src/rufus.rc -sed -i 's/$/\r/' src/rufus.rc +sed -b -i -f cmd.sed src/rufus.rc +sed -b -i -f cmd.sed res/appstore/AppxManifest.xml +sed -b -i -f cmd.sed res/appstore/packme.cmd rm cmd.sed source ./bootstrap.sh diff --git a/_pre-commit.sh b/_pre-commit.sh index bc9c401b..cc4fb9e2 100755 --- a/_pre-commit.sh +++ b/_pre-commit.sh @@ -26,20 +26,16 @@ echo "setting micro to $TAGVER" echo $TAGVER > .tag cat > cmd.sed <<\_EOF -s/^[ \t]*FILEVERSION[ \t]*\(.*\),\(.*\),.*,\(.*\)/ FILEVERSION \1,\2,@@TAGVER@@,\3/ -s/^[ \t]*PRODUCTVERSION[ \t]*\(.*\),\(.*\),.*,\(.*\)/ PRODUCTVERSION \1,\2,@@TAGVER@@,\3/ -s/^\([ \t]*\)VALUE[ \t]*"FileVersion",[ \t]*"\(.*\)\..*"/\1VALUE "FileVersion", "\2.@@TAGVER@@"/ -s/^\([ \t]*\)VALUE[ \t]*"ProductVersion",[ \t]*"\(.*\)\..*"/\1VALUE "ProductVersion", "\2.@@TAGVER@@"/ +s/^\([ \t]*\)*\(FILE\|PRODUCT\)VERSION\([ \t]*\)\([0-9]*\),\([0-9]*\),[0-9]*,\(.*\)/\1\2VERSION\3\4,\5,@@TAGVER@@,\6/ +s/^\([ \t]*\)VALUE\([ \t]*\)"\(File\|Product\)Version",\([ \t]*\)"\(.*\)\..*"[ \t]*/\1VALUE\2"\3Version",\4"\5.@@TAGVER@@"/ s/^\(.*\)"Rufus \(.*\)\..*"\(.*\)/\1"Rufus \2.@@TAGVER@@"\3/ +s/^\([ \t]*\)Version="\([0-9]*\)\.\([0-9]*\)\.[0-9]*\.\([0-9]*\)"\(.*\)/\1Version="\2.\3.@@TAGVER@@.\4"\5/ _EOF # First run sed to substitute our variable in the sed command file sed -i -e "s/@@TAGVER@@/$TAGVER/g" cmd.sed - # Run sed to update the nano version -sed -i -f cmd.sed src/rufus.rc -# MinGW's sed has the bad habit of eating CRLFs - make sure we keep 'em -sed -i 's/$/\r/' src/rufus.rc +sed -b -i -f cmd.sed src/rufus.rc # NB: we need to run git add else the modified files may be ignored git add src/rufus.rc diff --git a/_release.sh b/_release.sh index 32b3716e..8cec6838 100755 --- a/_release.sh +++ b/_release.sh @@ -3,3 +3,12 @@ rm -f rufus*.exe ./configure --disable-debug "$@" make -j12 clean make -j12 release + +# Update AppxManifest.xml with the build number +TAGVER=`git log --oneline | wc -l` +cat > cmd.sed <<\_EOF +s/^\([ \t]*\)Version="\([0-9]*\)\.\([0-9]*\)\.[0-9]*\.\([0-9]*\)"\(.*\)/\1Version="\2.\3.@@TAGVER@@.\4"\5/ +_EOF +sed -i -e "s/@@TAGVER@@/$TAGVER/g" cmd.sed +sed -b -i -f cmd.sed res/appstore/AppxManifest.xml +rm cmd.sed diff --git a/_sign.cmd b/_sign.cmd index bd5df53d..ca087231 100644 --- a/_sign.cmd +++ b/_sign.cmd @@ -1,8 +1,4 @@ @echo off -:retry_sha1 -"C:\Program Files (x86)\Windows Kits\8.1\bin\x64\signtool" sign /v /sha1 655f6413a8f721e3286ace95025c9e0ea132a984 /fd SHA1 /tr http://timestamp.comodoca.com/rfc3161 /td SHA1 %1 -if ERRORLEVEL 1 goto retry_sha1 -:retry_sha256 -"C:\Program Files (x86)\Windows Kits\8.1\bin\x64\signtool" sign /as /v /sha1 5759b23dc8f45e9120a7317f306e5b6890b612f0 /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 %1 -if ERRORLEVEL 1 goto retry_sha256 +"C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool" sign /v /sha1 655f6413a8f721e3286ace95025c9e0ea132a984 /fd SHA1 /tr http://timestamp.comodoca.com/rfc3161 /td SHA1 %1 +"C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool" sign /as /v /sha1 5759b23dc8f45e9120a7317f306e5b6890b612f0 /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 %1 exit diff --git a/res/appstore/AppxManifest.xml b/res/appstore/AppxManifest.xml new file mode 100644 index 00000000..cceb5b0a --- /dev/null +++ b/res/appstore/AppxManifest.xml @@ -0,0 +1,51 @@ + + + + + + Rufus + Akeo Consulting + Rufus + Assets\Rufus-48.png + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/appstore/README.txt b/res/appstore/README.txt new file mode 100644 index 00000000..20209c28 --- /dev/null +++ b/res/appstore/README.txt @@ -0,0 +1,9 @@ +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/ diff --git a/res/appstore/packme.cmd b/res/appstore/packme.cmd new file mode 100644 index 00000000..65055dd2 --- /dev/null +++ b/res/appstore/packme.cmd @@ -0,0 +1,15 @@ +@echo off +set VERSION=2.15 +echo [Files]>mappings.lst +echo "..\icon-set\rufus-44.png" "Assets\Rufus-44.png">>mappings.lst +echo "..\icon-set\rufus-48.png" "Assets\Rufus-48.png">>mappings.lst +echo "..\icon-set\rufus-150.png" "Assets\Rufus-150.png">>mappings.lst +echo "..\..\rufus-%VERSION%.exe" "rufus.exe">>mappings.lst +echo "AppxManifest.xml" "AppxManifest.xml">>mappings.lst +"C:\Program Files (x86)\Windows Kits\10\bin\x64\MakeAppx" pack /o /f mappings.lst /p Rufus-%VERSION%.appx +if ERRORLEVEL 1 goto out +"C:\Program Files (x86)\Windows Kits\10\bin\x64\SignTool" sign /v /sha1 5759b23dc8f45e9120a7317f306e5b6890b612f0 /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 Rufus-%VERSION%.appx +:out +del mappings.lst +pause +exit diff --git a/res/icon-set/rufus-150.png b/res/icon-set/rufus-150.png new file mode 100644 index 00000000..733e3ce5 Binary files /dev/null and b/res/icon-set/rufus-150.png differ diff --git a/res/icon-set/rufus-44.png b/res/icon-set/rufus-44.png new file mode 100644 index 00000000..bce8fbf3 Binary files /dev/null and b/res/icon-set/rufus-44.png differ diff --git a/src/rufus.rc b/src/rufus.rc index e8b7ca4b..179b5a38 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.15.1090" +CAPTION "Rufus 2.15.1091" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -334,8 +334,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,15,1090,0 - PRODUCTVERSION 2,15,1090,0 + FILEVERSION 2,15,1091,0 + PRODUCTVERSION 2,15,1091,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -352,13 +352,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.15.1090" + VALUE "FileVersion", "2.15.1091" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.15.1090" + VALUE "ProductVersion", "2.15.1091" END END BLOCK "VarFileInfo"