From 5fca9ba7d082336aa84751e5b027466df0d983c1 Mon Sep 17 00:00:00 2001 From: Martijn Kaijser Date: Mon, 20 Jul 2015 23:05:09 +0200 Subject: [win32] Use actuall add-on names instead of chopped addon-id in Windows installer; --- project/Win32BuildSetup/genNsisIncludes.bat | 83 ++++++++++++++--------------- 1 file changed, 41 insertions(+), 42 deletions(-) (limited to 'project/Win32BuildSetup') diff --git a/project/Win32BuildSetup/genNsisIncludes.bat b/project/Win32BuildSetup/genNsisIncludes.bat index e6e086998f..985fd32041 100644 --- a/project/Win32BuildSetup/genNsisIncludes.bat +++ b/project/Win32BuildSetup/genNsisIncludes.bat @@ -5,9 +5,8 @@ rem http://kodi.tv rem Script by chadoe rem This script generates NullSoft NSIS installer include files for application's add-ons -rem and addons +rem "SectionIn" defines on what level the section is selected by default rem 1. Full / 2. Normal / 3. Minimal -rem languages IF EXIST *-addons.nsi del *-addons.nsi > NUL SETLOCAL ENABLEDELAYEDEXPANSION @@ -16,14 +15,14 @@ SET Counter=1 IF EXIST BUILD_WIN32\addons\pvr.* ( ECHO SectionGroup "PVR Add-ons" SecPvrAddons >> pvr-addons.nsi FOR /F "tokens=*" %%P IN ('dir /B /AD BUILD_WIN32\addons\pvr.*') DO ( - SET "output=%%P" - SET output=!output:pvr.=! - ECHO Section "!output!" SecPvrAddons!Counter! >> pvr-addons.nsi - ECHO SectionIn 1 #section is in installtype Full >> pvr-addons.nsi - ECHO SetOutPath "$INSTDIR\addons\%%P" >> pvr-addons.nsi - ECHO File /r "${app_root}\addons\%%P\*.*" >> pvr-addons.nsi - ECHO SectionEnd >> pvr-addons.nsi - SET /A Counter = !Counter! + 1 + FOR /f "delims=<" %%N in ('powershell.exe -ExecutionPolicy Unrestricted -command "& {[xml]$a = get-content BUILD_WIN32\addons\%%P\addon.xml;$a.addon.name}"') do ( + ECHO Section "%%N" SecPvrAddons!Counter! >> pvr-addons.nsi + ECHO SectionIn 1 2 >> pvr-addons.nsi + ECHO SetOutPath "$INSTDIR\addons\%%P" >> pvr-addons.nsi + ECHO File /r "${app_root}\addons\%%P\*.*" >> pvr-addons.nsi + ECHO SectionEnd >> pvr-addons.nsi + SET /A Counter = !Counter! + 1 + ) ) ECHO SectionGroupEnd >> pvr-addons.nsi ) @@ -32,14 +31,14 @@ SET Counter=1 IF EXIST BUILD_WIN32\addons\audiodecoder.* ( ECHO SectionGroup "Audio Decoder Add-ons" SecAudioDecoderAddons >> audiodecoder-addons.nsi FOR /F "tokens=*" %%P IN ('dir /B /AD BUILD_WIN32\addons\audiodecoder.*') DO ( - SET "output=%%P" - SET output=!output:audiodecoder.=! - ECHO Section "!output!" SecAudioDecoderAddons!Counter! >> audiodecoder-addons.nsi - ECHO SectionIn 1 #section is in installtype Full >> audiodecoder-addons.nsi - ECHO SetOutPath "$INSTDIR\addons\%%P" >> audiodecoder-addons.nsi - ECHO File /r "${app_root}\addons\%%P\*.*" >> audiodecoder-addons.nsi - ECHO SectionEnd >> audiodecoder-addons.nsi - SET /A Counter = !Counter! + 1 + FOR /f "delims=<" %%N in ('powershell.exe -ExecutionPolicy Unrestricted -command "& {[xml]$a = get-content BUILD_WIN32\addons\%%P\addon.xml;$a.addon.name}"') do ( + ECHO Section "%%N" SecAudioDecoderAddons!Counter! >> audiodecoder-addons.nsi + ECHO SectionIn 1 >> audiodecoder-addons.nsi + ECHO SetOutPath "$INSTDIR\addons\%%P" >> audiodecoder-addons.nsi + ECHO File /r "${app_root}\addons\%%P\*.*" >> audiodecoder-addons.nsi + ECHO SectionEnd >> audiodecoder-addons.nsi + SET /A Counter = !Counter! + 1 + ) ) ECHO SectionGroupEnd >> audiodecoder-addons.nsi ) @@ -48,14 +47,14 @@ SET Counter=1 IF EXIST BUILD_WIN32\addons\audioencoder.* ( ECHO SectionGroup "Audio Encoder Add-ons" SecAudioEncoderAddons >> audioencoder-addons.nsi FOR /F "tokens=*" %%P IN ('dir /B /AD BUILD_WIN32\addons\audioencoder.*') DO ( - SET "output=%%P" - SET output=!output:audioencoder.=! - ECHO Section "!output!" SecAudioEncoderAddons!Counter! >> audioencoder-addons.nsi - ECHO SectionIn 1 2 3 #section is in installtype Full >> audioencoder-addons.nsi - ECHO SetOutPath "$INSTDIR\addons\%%P" >> audioencoder-addons.nsi - ECHO File /r "${app_root}\addons\%%P\*.*" >> audioencoder-addons.nsi - ECHO SectionEnd >> audioencoder-addons.nsi - SET /A Counter = !Counter! + 1 + FOR /f "delims=<" %%N in ('powershell.exe -ExecutionPolicy Unrestricted -command "& {[xml]$a = get-content BUILD_WIN32\addons\%%P\addon.xml;$a.addon.name}"') do ( + ECHO Section "%%N" SecAudioEncoderAddons!Counter! >> audioencoder-addons.nsi + ECHO SectionIn 1 2 3 >> audioencoder-addons.nsi + ECHO SetOutPath "$INSTDIR\addons\%%P" >> audioencoder-addons.nsi + ECHO File /r "${app_root}\addons\%%P\*.*" >> audioencoder-addons.nsi + ECHO SectionEnd >> audioencoder-addons.nsi + SET /A Counter = !Counter! + 1 + ) ) ECHO SectionGroupEnd >> audioencoder-addons.nsi ) @@ -64,14 +63,14 @@ SET Counter=1 IF EXIST BUILD_WIN32\addons\adsp.* ( ECHO SectionGroup "Audio DSP Add-ons" SecAudioDSPAddons >> audiodsp-addons.nsi FOR /F "tokens=*" %%P IN ('dir /B /AD BUILD_WIN32\addons\adsp.*') DO ( - SET "output=%%P" - SET output=!output:adsp.=! - ECHO Section "!output!" SecAudioDSPAddons!Counter! >> audiodsp-addons.nsi - ECHO SectionIn 1 #section is in installtype Full >> audiodsp-addons.nsi - ECHO SetOutPath "$INSTDIR\addons\%%P" >> audiodsp-addons.nsi - ECHO File /r "${app_root}\addons\%%P\*.*" >> audiodsp-addons.nsi - ECHO SectionEnd >> audiodsp-addons.nsi - SET /A Counter = !Counter! + 1 + FOR /f "delims=<" %%N in ('powershell.exe -ExecutionPolicy Unrestricted -command "& {[xml]$a = get-content BUILD_WIN32\addons\%%P\addon.xml;$a.addon.name}"') do ( + ECHO Section "%%N" SecAudioDSPAddons!Counter! >> audiodsp-addons.nsi + ECHO SectionIn 1 2 >> audiodsp-addons.nsi + ECHO SetOutPath "$INSTDIR\addons\%%P" >> audiodsp-addons.nsi + ECHO File /r "${app_root}\addons\%%P\*.*" >> audiodsp-addons.nsi + ECHO SectionEnd >> audiodsp-addons.nsi + SET /A Counter = !Counter! + 1 + ) ) ECHO SectionGroupEnd >> audiodsp-addons.nsi ) @@ -80,14 +79,14 @@ SET Counter=1 IF EXIST BUILD_WIN32\addons\skin.* ( ECHO SectionGroup "Skin Add-ons" SecSkinAddons >> skin-addons.nsi FOR /F "tokens=*" %%P IN ('dir /B /AD BUILD_WIN32\addons\skin.*') DO ( - SET "output=%%P" - SET output=!output:skin.=! - ECHO Section "!output!" SecSkinAddons!Counter! >> skin-addons.nsi - ECHO SectionIn 1 #section is in installtype Full >> skin-addons.nsi - ECHO SetOutPath "$INSTDIR\addons\%%P" >> skin-addons.nsi - ECHO File /r "${app_root}\addons\%%P\*.*" >> skin-addons.nsi - ECHO SectionEnd >> skin-addons.nsi - SET /A Counter = !Counter! + 1 + FOR /f "delims=<" %%N in ('powershell.exe -ExecutionPolicy Unrestricted -command "& {[xml]$a = get-content BUILD_WIN32\addons\%%P\addon.xml;$a.addon.name}"') do ( + ECHO Section "%%N" SecSkinAddons!Counter! >> skin-addons.nsi + ECHO SectionIn 1 >> skin-addons.nsi + ECHO SetOutPath "$INSTDIR\addons\%%P" >> skin-addons.nsi + ECHO File /r "${app_root}\addons\%%P\*.*" >> skin-addons.nsi + ECHO SectionEnd >> skin-addons.nsi + SET /A Counter = !Counter! + 1 + ) ) ECHO SectionGroupEnd >> skin-addons.nsi ) -- cgit v1.2.3