mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[appstore] prevent packaging of ALPHA or BETA versions
* Also add package version override
This commit is contained in:
parent
b63f9ae93c
commit
f6fd520d2a
4 changed files with 46 additions and 15 deletions
8
.github/workflows/mingw.yml
vendored
8
.github/workflows/mingw.yml
vendored
|
@ -63,14 +63,18 @@ jobs:
|
|||
shell: bash
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
# This ONLY works if the shell is bash or if using $env:GITHUB_OUTPUT
|
||||
run: echo "option=--enable-alpha" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
echo "option=--enable-alpha" >> $GITHUB_OUTPUT
|
||||
sed -b -i 's/VALUE "InternalName", "Rufus"/VALUE "InternalName", "Rufus (ALPHA)"/' ./src/rufus.rc
|
||||
|
||||
- name: Set BETA
|
||||
id: set_beta
|
||||
shell: bash
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') && contains(github.ref, 'BETA') }}
|
||||
# This ONLY works if the shell is bash or if using $env:GITHUB_OUTPUT
|
||||
run: echo "option=--enable-beta" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
echo "option=--enable-beta" >> $GITHUB_OUTPUT
|
||||
sed -b -i 's/VALUE "InternalName", "Rufus"/VALUE "InternalName", "Rufus (BETA)"/' ./src/rufus.rc
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
|
|
8
.github/workflows/vs2022.yml
vendored
8
.github/workflows/vs2022.yml
vendored
|
@ -54,14 +54,18 @@ jobs:
|
|||
shell: bash
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
# This ONLY works if the shell is bash or if using $env:GITHUB_OUTPUT
|
||||
run: echo "option=/DALPHA" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
echo "option=/DALPHA" >> $GITHUB_OUTPUT
|
||||
sed -b -i 's/VALUE "InternalName", "Rufus"/VALUE "InternalName", "Rufus (ALPHA)"/' ./src/rufus.rc
|
||||
|
||||
- name: Set BETA
|
||||
id: set_beta
|
||||
shell: bash
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') && contains(github.ref, 'BETA') }}
|
||||
# This ONLY works if the shell is bash or if using $env:GITHUB_OUTPUT
|
||||
run: echo "option=/DBETA" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
echo "option=/DBETA" >> $GITHUB_OUTPUT
|
||||
sed -b -i 's/VALUE "InternalName", "Rufus"/VALUE "InternalName", "Rufus (BETA)"/' ./src/rufus.rc
|
||||
|
||||
- name: Build
|
||||
shell: cmd
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
@echo off
|
||||
setlocal EnableExtensions DisableDelayedExpansion
|
||||
|
||||
rem if set, this will override the version for the package
|
||||
rem set VERSION_OVERRIDE=4.4.2104.0
|
||||
|
||||
goto main
|
||||
|
||||
:ReplaceTokenInFile
|
||||
|
@ -66,13 +69,33 @@ for %%a in (%ARCHS%) do (
|
|||
)
|
||||
)
|
||||
|
||||
rem exiftool.exe can't be installed in the Windows system directories...
|
||||
if not exist exiftool.exe (
|
||||
echo exiftool.exe must exist in this directory
|
||||
goto out
|
||||
)
|
||||
|
||||
rem Make sure we're not trying to create a package from an ALPHA or BETA version!
|
||||
exiftool -s3 -*InternalName* rufus_x64.exe | findstr /C:"ALPHA" 1>nul && (
|
||||
echo Alpha version detected - ABORTED
|
||||
goto out
|
||||
)
|
||||
exiftool -s3 -*InternalName* rufus_x64.exe | findstr /C:"BETA" 1>nul && (
|
||||
echo Beta version detected - ABORTED
|
||||
goto out
|
||||
)
|
||||
|
||||
rem Populate the version from the executable
|
||||
set target=%~dp0rufus_x64.exe
|
||||
set target=%target:\=\\%
|
||||
wmic datafile where "name='%target%'" get version | find /v "Version" > version.txt
|
||||
set /p VERSION=<version.txt
|
||||
set VERSION=%VERSION: =%
|
||||
del version.txt
|
||||
setlocal EnableDelayedExpansion
|
||||
if "%VERSION_OVERRIDE%"=="" (
|
||||
exiftool -s3 -*FileVersionNumber* rufus_x64.exe > version.txt
|
||||
set /p VERSION=<version.txt
|
||||
del version.txt
|
||||
)else (
|
||||
echo WARNING: Forcing version to %VERSION_OVERRIDE%
|
||||
set VERSION=%VERSION_OVERRIDE%
|
||||
)
|
||||
setlocal DisableDelayedExpansion
|
||||
|
||||
echo Will create %VERSION% AppStore Bundle
|
||||
pause
|
||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_ACCEPTFILES
|
||||
CAPTION "Rufus 4.4.2103"
|
||||
CAPTION "Rufus 4.4.2104"
|
||||
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
||||
|
@ -392,8 +392,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 4,4,2103,0
|
||||
PRODUCTVERSION 4,4,2103,0
|
||||
FILEVERSION 4,4,2104,0
|
||||
PRODUCTVERSION 4,4,2104,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -411,13 +411,13 @@ BEGIN
|
|||
VALUE "Comments", "https://rufus.ie"
|
||||
VALUE "CompanyName", "Akeo Consulting"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "4.4.2103"
|
||||
VALUE "FileVersion", "4.4.2104"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2024 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
||||
VALUE "OriginalFilename", "rufus-4.4.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "4.4.2103"
|
||||
VALUE "ProductVersion", "4.4.2104"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in a new issue