diff options
-rw-r--r-- | cmake/scripts/common/Macros.cmake | 17 | ||||
-rw-r--r-- | project/Win32BuildSetup/AppxManifest.xml.in | 7 | ||||
-rw-r--r-- | tools/buildsteps/windows/BuildSetup.bat | 38 | ||||
-rw-r--r-- | tools/windows/packaging/uwp/package.appxmanifest.in | 6 | ||||
-rw-r--r-- | version.txt | 3 |
5 files changed, 50 insertions, 21 deletions
diff --git a/cmake/scripts/common/Macros.cmake b/cmake/scripts/common/Macros.cmake index 0d509ce101..d508f87f33 100644 --- a/cmake/scripts/common/Macros.cmake +++ b/cmake/scripts/common/Macros.cmake @@ -668,7 +668,22 @@ macro(core_find_versions) core_file_read_filtered(version_list ${CORE_SOURCE_DIR}/version.txt) core_file_read_filtered(json_version ${CORE_SOURCE_DIR}/xbmc/interfaces/json-rpc/schema/version.txt) string(REGEX REPLACE "([^ ;]*) ([^;]*)" "\\1;\\2" version_list "${version_list};${json_version}") - cmake_parse_arguments(APP "" "APP_NAME;COMPANY_NAME;WEBSITE;VERSION_MAJOR;VERSION_MINOR;VERSION_TAG;VERSION_CODE;ADDON_API;APP_PACKAGE;JSONRPC_VERSION" "" ${version_list}) + set(version_props + ADDON_API + APP_NAME + APP_PACKAGE + COMPANY_NAME + JSONRPC_VERSION + PACKAGE_DESCRIPTION + PACKAGE_IDENTITY + PACKAGE_PUBLISHER + VERSION_MAJOR + VERSION_MINOR + VERSION_TAG + VERSION_CODE + WEBSITE + ) + cmake_parse_arguments(APP "" "${version_props}" "" ${version_list}) if(NOT ${APP_VERSION_CODE} MATCHES "^[0-9]+\\.[0-9][0-9]?\\.[0-9][0-9]?[0-9]?$") message(FATAL_ERROR "VERSION_CODE was set to ${APP_VERSION_CODE} in version.txt, but it has to match '^\\d+\\.\\d{1,2}\\.\\d{1,3}$'") diff --git a/project/Win32BuildSetup/AppxManifest.xml.in b/project/Win32BuildSetup/AppxManifest.xml.in index 6b4d1636b2..e8d0959ab0 100644 --- a/project/Win32BuildSetup/AppxManifest.xml.in +++ b/project/Win32BuildSetup/AppxManifest.xml.in @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <Package IgnorableNamespaces="uap" xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"> - <Identity Name="XBMCFoundation.Kodi" ProcessorArchitecture="@TARGET_ARCHITECTURE@" Publisher="CN=C62BD90A-CDD8-477F-96C3-B25992247B97" Version="@VERSION_NUMBER@" /> + <Identity Name="@PACKAGE_IDENTITY@" ProcessorArchitecture="@TARGET_ARCHITECTURE@" Publisher="CN=@PACKAGE_PUBLISHER@" Version="@VERSION_CODE@.0" /> <Properties> <DisplayName>@APP_NAME@</DisplayName> <PublisherDisplayName>@COMPANY_NAME@</PublisherDisplayName> - <Description>Kodi is an open source (GPL) software media center for playing videos, music, pictures, games, and more.</Description> + <Description>@PACKAGE_DESCRIPTION@</Description> <Logo>media\icon256x256.png</Logo> </Properties> <Dependencies> @@ -16,7 +16,8 @@ </Resources> <Applications> <Application Id="Kodi" Executable="Kodi.exe" EntryPoint="Windows.FullTrustApplication"> - <uap:VisualElements DisplayName="@APP_NAME@" Square150x150Logo="media\icon256x256.png" Square44x44Logo="media\icon48x48.png" Description="Kodi is an open source (GPL) software media center for playing videos, music, pictures, games, and more." BackgroundColor="transparent"> + <uap:VisualElements DisplayName="@APP_NAME@" Description="@PACKAGE_DESCRIPTION@" + Square150x150Logo="media\icon256x256.png" Square44x44Logo="media\icon48x48.png" BackgroundColor="transparent"> <uap:DefaultTile Wide310x150Logo="media\banner.png" /> <uap:InitialRotationPreference> <uap:Rotation Preference="landscape" /> diff --git a/tools/buildsteps/windows/BuildSetup.bat b/tools/buildsteps/windows/BuildSetup.bat index 9e3bf4c689..ad36df988c 100644 --- a/tools/buildsteps/windows/BuildSetup.bat +++ b/tools/buildsteps/windows/BuildSetup.bat @@ -11,17 +11,25 @@ IF NOT EXIST %msys_dir% (SET msys_dir=%builddeps_dir%\msys32) SET sed_exe=%msys_dir%\usr\bin\sed.exe REM read the version values from version.txt -FOR /f "delims=" %%i IN ('%sed_exe% -n "/APP_NAME/ s/APP_NAME *//p" %base_dir%\version.txt') DO SET APP_NAME=%%i -FOR /f "delims=" %%i IN ('%sed_exe% -n "/COMPANY_NAME/ s/COMPANY_NAME *//p" %base_dir%\version.txt') DO SET COMPANY_NAME=%%i -FOR /f "delims=" %%i IN ('%sed_exe% -n "/WEBSITE/ s/WEBSITE *//p" %base_dir%\version.txt') DO SET WEBSITE=%%i -FOR /f "delims=" %%i IN ('%sed_exe% -n "/VERSION_MAJOR/ s/VERSION_MAJOR *//p" %base_dir%\version.txt') DO SET MAJOR=%%i -FOR /f "delims=" %%i IN ('%sed_exe% -n "/VERSION_MINOR/ s/VERSION_MINOR *//p" %base_dir%\version.txt') DO SET MINOR=%%i -FOR /f "delims=" %%i IN ('%sed_exe% -n "/VERSION_TAG/ s/VERSION_TAG *//p" %base_dir%\version.txt') DO SET TAG=%%i -FOR /f "delims=" %%i IN ('%sed_exe% -n "/ADDON_API/ s/ADDON_API *//p" %base_dir%\version.txt') DO SET VERSION_NUMBER=%%i.0 - -SET APP_VERSION=%MAJOR%.%MINOR% -IF NOT [%TAG%] == [] ( - SET APP_VERSION=%APP_VERSION%-%TAG% +SET version_props=^ +APP_NAME ^ +COMPANY_NAME ^ +PACKAGE_DESCRIPTION ^ +PACKAGE_IDENTITY ^ +PACKAGE_PUBLISHER ^ +VERSION_MAJOR ^ +VERSION_MINOR ^ +VERSION_TAG ^ +VERSION_CODE ^ +WEBSITE + +FOR %%p IN (%version_props%) DO ( + FOR /f "delims=" %%v IN ('%sed_exe% -n "/%%p/ s/%%p *//p" %base_dir%\version.txt') DO SET %%p=%%v +) + +SET APP_VERSION=%VERSION_MAJOR%.%VERSION_MINOR% +IF NOT [%VERSION_TAG%] == [] ( + SET APP_VERSION=%APP_VERSION%-%VERSION_TAG% ) rem ----Usage---- @@ -154,8 +162,10 @@ set WORKSPACE=%base_dir%\kodi-build -e 's/@APP_NAME@/%APP_NAME%/g' ^ -e 's/@COMPANY_NAME@/%COMPANY_NAME%/g' ^ -e 's/@TARGET_ARCHITECTURE@/%TARGET_ARCHITECTURE%/g' ^ - -e 's/@APP_VERSION@/%APP_VERSION%/g' ^ - -e 's/@VERSION_NUMBER@/%VERSION_NUMBER%/g' ^ + -e 's/@VERSION_CODE@/%VERSION_CODE%/g' ^ + -e 's/@PACKAGE_IDENTITY@/%PACKAGE_IDENTITY%/g' ^ + -e 's/@PACKAGE_PUBLISHER@/%PACKAGE_PUBLISHER%/g' ^ + -e 's/@PACKAGE_DESCRIPTION@/%PACKAGE_DESCRIPTION%/g' ^ "AppxManifest.xml.in" > "BUILD_WIN32\application\AppxManifest.xml" SET build_path=%CD% @@ -242,7 +252,7 @@ set WORKSPACE=%base_dir%\kodi-build ) SET NSISExe=%NSISExePath%\makensis.exe - "%NSISExe%" /V1 /X"SetCompressor /FINAL lzma" /Dapp_root="%CD%\BUILD_WIN32" /DAPP_NAME="%APP_NAME%" /DTARGET_ARCHITECTURE="%TARGET_ARCHITECTURE%" /DVERSION_NUMBER="%VERSION_NUMBER%" /DCOMPANY_NAME="%COMPANY_NAME%" /DWEBSITE="%WEBSITE%" /Dapp_revision="%GIT_REV%" /Dapp_branch="%BRANCH%" /D%TARGET_ARCHITECTURE% "genNsisInstaller.nsi" + "%NSISExe%" /V1 /X"SetCompressor /FINAL lzma" /Dapp_root="%CD%\BUILD_WIN32" /DAPP_NAME="%APP_NAME%" /DTARGET_ARCHITECTURE="%TARGET_ARCHITECTURE%" /DVERSION_NUMBER="%VERSION_CODE%.0" /DCOMPANY_NAME="%COMPANY_NAME%" /DWEBSITE="%WEBSITE%" /Dapp_revision="%GIT_REV%" /Dapp_branch="%BRANCH%" /D%TARGET_ARCHITECTURE% "genNsisInstaller.nsi" IF NOT EXIST "%APP_SETUPFILE%" ( POPD set DIETEXT=Failed to create %APP_SETUPFILE%. NSIS installed? diff --git a/tools/windows/packaging/uwp/package.appxmanifest.in b/tools/windows/packaging/uwp/package.appxmanifest.in index 6b005394a3..0e0338f345 100644 --- a/tools/windows/packaging/uwp/package.appxmanifest.in +++ b/tools/windows/packaging/uwp/package.appxmanifest.in @@ -5,13 +5,13 @@ xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp"> - <Identity Name="XBMCFoundation.Kodi" ProcessorArchitecture="@SDK_TARGET_ARCH@" Publisher="CN=C62BD90A-CDD8-477F-96C3-B25992247B97" Version="@APP_VERSION_CODE@.0" /> + <Identity Name="@APP_PACKAGE_IDENTITY@" ProcessorArchitecture="@SDK_TARGET_ARCH@" Publisher="CN=@APP_PACKAGE_PUBLISHER@" Version="@APP_VERSION_CODE@.0" /> <mp:PhoneIdentity PhoneProductId="0175E9D8-B885-4F34-BE46-F3BA2C70C00C" PhonePublisherId="00000000-0000-0000-0000-000000000000" /> <Properties> <DisplayName>@APP_NAME@</DisplayName> <PublisherDisplayName>@APP_COMPANY_NAME@</PublisherDisplayName> - <Description>Kodi is an open source (GPL) software media center for playing videos, music, pictures, games, and more.</Description> + <Description>@APP_PACKAGE_DESCRIPTION@</Description> <Logo>media\icon50x50.png</Logo> </Properties> @@ -27,7 +27,7 @@ <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="@APP_NAME_LC@.App"> <uap:VisualElements DisplayName="@APP_NAME@ @APP_VERSION@" - Description="Kodi is an open source (GPL) software media center for playing videos, music, pictures, games, and more." + Description="@APP_PACKAGE_DESCRIPTION@" Square150x150Logo="media\icon150x150.png" Square44x44Logo="media\icon44x44.png" BackgroundColor="transparent"> diff --git a/version.txt b/version.txt index ac68de60ee..545f436b89 100644 --- a/version.txt +++ b/version.txt @@ -7,3 +7,6 @@ VERSION_TAG ALPHA1 VERSION_CODE 17.99.701 ADDON_API 17.9.701 APP_PACKAGE org.xbmc.kodi +PACKAGE_IDENTITY XBMCFoundation.Kodi +PACKAGE_PUBLISHER C62BD90A-CDD8-477F-96C3-B25992247B97 +PACKAGE_DESCRIPTION Kodi is an open source (GPL) software media center for playing videos, music, pictures, games, and more. |