aboutsummaryrefslogtreecommitdiff
path: root/project/Win32BuildSetup/genNsisIncludes.bat
blob: 016cb2953a8012d83e473b106518cbc85626fc4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@ECHO OFF
rem XBMC for Windows install script
rem Copyright (C) 2005-2013 Team XBMC
rem http://xbmc.org

rem Script by chadoe
rem This script generates nullsoft installer include files for xbmc's languages
rem and pvr addons
rem 1. Full / 2. Normal  / 3. Minimal
rem languages
IF EXIST languages.nsi del languages.nsi > NUL
IF EXIST xbmc-pvr-addons.nsi del xbmc-pvr-addons.nsi > NUL
IF EXIST skins.nsi del skins.nsi > NUL
SETLOCAL ENABLEDELAYEDEXPANSION
SET Counter=1
FOR /F "tokens=*" %%S IN ('dir /B /AD BUILD_WIN32\Xbmc\language') DO (
  rem English is already included as default language
  IF "%%S" NEQ "English" (
    ECHO Section "%%S" SecLanguage!Counter! >> languages.nsi
    ECHO SectionIn 1 2 3 #section is in installtype Full/Normal >> languages.nsi
    ECHO SectionIn RO #section is in installtype Manditory >> languages.nsi
    ECHO SetOutPath "$INSTDIR\language\%%S" >> languages.nsi
    ECHO File /r "${xbmc_root}\Xbmc\language\%%S\*.*" >> languages.nsi
    ECHO SectionEnd >> languages.nsi
    SET /A Counter = !Counter! + 1
  )
)

SET Counter=1
FOR /F "tokens=*" %%P IN ('dir /B /AD BUILD_WIN32\Xbmc\xbmc-pvr-addons') DO (
  SET "output=%%P"
  SET output=!output:pvr.=!
  ECHO Section !output! SecPvrAddons!Counter! >> xbmc-pvr-addons.nsi
  ECHO SectionIn 1 #section is in installtype Full >> xbmc-pvr-addons.nsi
  ECHO SetOutPath "$INSTDIR\addons\%%P" >> xbmc-pvr-addons.nsi
  ECHO File /r "${xbmc_root}\Xbmc\xbmc-pvr-addons\%%P\*.*" >> xbmc-pvr-addons.nsi
  ECHO SectionEnd >> xbmc-pvr-addons.nsi
  SET /A Counter = !Counter! + 1
)

SET Counter=1
FOR /F "tokens=*" %%R IN ('dir /B /AD BUILD_WIN32\Xbmc\addons\skin*') DO (
  SET "output=%%R"
  SET output=!output:skin.=!
  rem Confluence is already included as default skin
  IF "%%R" NEQ "skin.confluence" (
    ECHO Section !output! SecSkins!Counter! >> skins.nsi
    ECHO SectionIn 1 #section is in installtype Full >> skins.nsi
    ECHO SetOutPath "$INSTDIR\addons\%%R" >> skins.nsi
    ECHO File /r "${xbmc_root}\Xbmc\addons\%%R\*.*" >> skins.nsi
    ECHO SectionEnd >> skins.nsi
    SET /A Counter = !Counter! + 1
  )
)
ENDLOCAL