aboutsummaryrefslogtreecommitdiffstats
path: root/mediaplugin/installer/settings/files_main_install.nsh
blob: 10afc6f63c34fa2db77b4f8e466dd5f78a1aa6d4 (plain) (blame)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~
; UltraStar Deluxe Installer: Main components
; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~

; Remove old files from previous versions
IfFileExists $INSTDIR\ScoreConverter.exe 0 +2
Delete "$INSTDIR\ScoreConverter.exe"
IfFileExists $INSTDIR\USdx.exe 0 +2
Delete "$INSTDIR\USdx.exe"
IfFileExists $INSTDIR\covers.cache 0 +2
Delete "$INSTDIR\covers.cache"
IfFileExists $INSTDIR\avcodec-51.dll 0 +2
Delete "$INSTDIR\avcodec-51.dll"
IfFileExists $INSTDIR\avformat-50.dll 0 +2
Delete "$INSTDIR\avformat-50.dll"
IfFileExists $INSTDIR\avutil-49.dll 0 +2
Delete "$INSTDIR\avutil-49.dll"
IfFileExists $INSTDIR\bass.dll 0 +2
Delete "$INSTDIR\bass.dll"
IfFileExists $INSTDIR\SDL.dll 0 +2
Delete "$INSTDIR\SDL.dll"
IfFileExists $INSTDIR\sqlite3.dll 0 +2
Delete "$INSTDIR\sqlite3.dll"

RMDir /r "$INSTDIR\Themes"
RMDir /r "$INSTDIR\Skins"
RMDir /r "$INSTDIR\Plugins"
RMDir /r "$INSTDIR\Languages"

; Create Directories:

CreateDirectory $INSTDIR\plugins
CreateDirectory $INSTDIR\covers
CreateDirectory $INSTDIR\songs

${If} $UseAppData == true

  ; Create folders in appdata for current user
  SetShellVarContext current		
  CreateDirectory $UserDataPath
  CreateDirectory $UserDataPath\screenshots
  CreateDirectory $UserDataPath\playlists

  SetOutPath "$INSTDIR"

  CreateShortCut "screenshots.lnk" "$UserDataPath\screenshots"
  CreateShortCut "playlists.lnk" "$UserDataPath\playlists"
  CreateShortCut "config.ini.lnk" "$ConfigIniPath"

  SetShellVarContext all
${EndIf}

; themes, languages, sounds, fonts, visuals dir

SetOutPath "$INSTDIR"

File /r /x .svn /x .gitignore ..\game\themes
File /r /x .svn /x .gitignore ..\game\languages
File /r /x .svn /x .gitignore ..\game\sounds
File /r /x .svn /x .gitignore ..\game\fonts
File /r /x .svn /x .gitignore ..\game\resources
File /r /x .svn /x .gitignore ..\game\visuals

; Root dir:

File .\dependencies\dll\*.dll

File ..\ChangeLog.txt
File ..\ChangeLog.GERMAN.txt
File ..\game\LuaCommands.odt
File ..\README.txt
File .\dependencies\documents\license.txt
File .\dependencies\documents\documentation.pdf

File "..\${exe}.exe"

; Covers dir:

SetOutPath "$INSTDIR\covers"

IfFileExists $INSTDIR\covers\covers.ini +2 0
File ..\game\covers\covers.ini
File ..\game\covers\NoCover.jpg

; Plugins dir:

SetOutPath "$INSTDIR\plugins\"
File "..\game\plugins\*.*"

SetOutPath "$INSTDIR"