Moved ApplicationVersion.h from es-app to es-core

This commit is contained in:
Leon Styhre 2024-04-16 20:57:04 +02:00
parent 75132df1d7
commit a021fc22a9
4 changed files with 37 additions and 37 deletions

View file

@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT
#
# ES-DE
# ES-DE Frontend
# CMakeLists.txt (es-app)
#
# CMake configuration for es-app
@ -11,7 +11,6 @@ project(es-de)
set(ES_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/ApplicationUpdater.h
${CMAKE_CURRENT_SOURCE_DIR}/src/ApplicationVersion.h
${CMAKE_CURRENT_SOURCE_DIR}/src/CollectionSystemsManager.h
${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.h
${CMAKE_CURRENT_SOURCE_DIR}/src/FileFilterIndex.h

View file

@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT
#
# ES-DE
# ES-DE Frontend
# CMakeLists.txt (es-core)
#
# CMake configuration for es-core
@ -9,6 +9,7 @@
project(core)
set(CORE_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/ApplicationVersion.h
${CMAKE_CURRENT_SOURCE_DIR}/src/AsyncHandle.h
${CMAKE_CURRENT_SOURCE_DIR}/src/AudioManager.h
${CMAKE_CURRENT_SOURCE_DIR}/src/CECInput.h

View file

@ -1,11 +1,11 @@
// SPDX-License-Identifier: MIT
//
// ES-DE
// ES-DE Frontend
// ApplicationVersion.h
//
#ifndef ES_APP_APPLICATION_VERSION_H
#define ES_APP_APPLICATION_VERSION_H
#ifndef ES_CORE_APPLICATION_VERSION_H
#define ES_CORE_APPLICATION_VERSION_H
// These numbers and strings need to be manually updated for a new version.
// Do this version number update as the very last commit for the new release version.
@ -22,4 +22,4 @@
#define RESOURCE_VERSION_STRING "3,0,1\0"
#define RESOURCE_VERSION PROGRAM_VERSION_MAJOR, PROGRAM_VERSION_MINOR, PROGRAM_VERSION_MAINTENANCE
#endif // ES_APP_APPLICATION_VERSION_H
#endif // ES_CORE_APPLICATION_VERSION_H

View file

@ -1,7 +1,7 @@
#!/usr/bin/bash
# SPDX-License-Identifier: MIT
#
# ES-DE
# ES-DE Frontend
# update_version_string.sh
#
# Updates the version string for ES-DE.
@ -14,9 +14,9 @@
#
# The following files are updated by this script:
# es-app/CMakeLists.txt
# es-app/src/ApplicationVersion.h
# es-app/assets/ES-DE.plist
# es-app/assets/Windows_Portable_README.txt
# es-core/src/ApplicationVersion.h
#
# This script is only intended to be used on Linux systems.
#
@ -50,9 +50,36 @@ NEWSTRING="set(ES_VERSION ${1}.${2}.${3}${SUFFIX})"
cat $MODIFYFILE | sed s/"${MODIFYSTRING}"/"${NEWSTRING}"/ > $TEMPFILE
mv $TEMPFILE $MODIFYFILE
##### ES-DE_Info.plist
MODIFYFILE=../es-app/assets/ES-DE_Info.plist
MODIFYSTRING=$(grep "<string>ES-DE " $MODIFYFILE)
OLDVERSION=$(echo $MODIFYSTRING | cut -f4 -d" " | sed s/".........$"//)
MODIFYSTRING=$(echo $MODIFYSTRING | sed s/".........$"//)
NEWSTRING="<string>ES-DE ${1}.${2}.${3}"
cat $MODIFYFILE | sed s/"${MODIFYSTRING}"/"${NEWSTRING}"/ > $TEMPFILE
mv $TEMPFILE $MODIFYFILE
MODIFYSTRING=$(grep -m1 "<string>${OLDVERSION}" $MODIFYFILE)
MODIFYSTRING=$(echo $MODIFYSTRING | sed s/".........$"//)
# Adding the suffix is not fully compliant with the Apple documentation but seems to be working.
# It's not used for the release builds anyway so it should hopefully not be an issue.
NEWSTRING="<string>${1}.${2}.${3}${SUFFIX}"
cat $MODIFYFILE | sed s/"${MODIFYSTRING}"/"${NEWSTRING}"/ > $TEMPFILE
mv $TEMPFILE $MODIFYFILE
##### Windows_Portable_README.txt
ROW_NUM=$(grep -n "ES-DE release:" ../es-app/assets/Windows_Portable_README.txt | cut -f1 -d:)
ROW_NUM=$((ROW_NUM+1))
NEWSTRING=${1}.${2}.${3}${SUFFIX}
sed -i ${ROW_NUM}s/.*/$(echo $NEWSTRING | unix2dos)/ ../es-app/assets/Windows_Portable_README.txt
##### ApplicationVersion.h
MODIFYFILE=../es-app/src/ApplicationVersion.h
MODIFYFILE=../es-core/src/ApplicationVersion.h
MODIFYSTRING=$(grep "PROGRAM_VERSION_MAJOR " $MODIFYFILE)
NEWSTRING="#define PROGRAM_VERSION_MAJOR ${1}"
@ -94,31 +121,4 @@ NEWSTRING=$(grep "PROGRAM_RELEASE_NUMBER" $MODIFYFILE | sed "s/$OLDRELEASE/$NEWR
cat $MODIFYFILE | sed s/"${MODIFYSTRING}"/"${NEWSTRING}"/ > $TEMPFILE
mv $TEMPFILE $MODIFYFILE
##### ES-DE_Info.plist
MODIFYFILE=../es-app/assets/ES-DE_Info.plist
MODIFYSTRING=$(grep "<string>ES-DE " $MODIFYFILE)
OLDVERSION=$(echo $MODIFYSTRING | cut -f4 -d" " | sed s/".........$"//)
MODIFYSTRING=$(echo $MODIFYSTRING | sed s/".........$"//)
NEWSTRING="<string>ES-DE ${1}.${2}.${3}"
cat $MODIFYFILE | sed s/"${MODIFYSTRING}"/"${NEWSTRING}"/ > $TEMPFILE
mv $TEMPFILE $MODIFYFILE
MODIFYSTRING=$(grep -m1 "<string>${OLDVERSION}" $MODIFYFILE)
MODIFYSTRING=$(echo $MODIFYSTRING | sed s/".........$"//)
# Adding the suffix is not fully compliant with the Apple documentation but seems to be working.
# It's not used for the release builds anyway so it should hopefully not be an issue.
NEWSTRING="<string>${1}.${2}.${3}${SUFFIX}"
cat $MODIFYFILE | sed s/"${MODIFYSTRING}"/"${NEWSTRING}"/ > $TEMPFILE
mv $TEMPFILE $MODIFYFILE
##### Windows_Portable_README.txt
ROW_NUM=$(grep -n "ES-DE release:" ../es-app/assets/Windows_Portable_README.txt | cut -f1 -d:)
ROW_NUM=$((ROW_NUM+1))
NEWSTRING=${1}.${2}.${3}${SUFFIX}
sed -i ${ROW_NUM}s/.*/$(echo $NEWSTRING | unix2dos)/ ../es-app/assets/Windows_Portable_README.txt
echo "Done updating, don't forget to run generate_man_page.sh once the binary has been compiled with the new version string."