Skip to content

Commit

Permalink
My last fix for the SectionTheme bug fixed that particular bug but in…
Browse files Browse the repository at this point in the history
…troduced a new one. Hopefully that new bug is now fixed. (You would get the wrong themeslist.rc and themeselect.rc files when installing on a computer that didn't already have losi installed)
  • Loading branch information
Tobbe committed Jun 15, 2008
1 parent cf1c5aa commit f8ecd16
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
23 changes: 23 additions & 0 deletions HiddenSectionTheme.nsh
@@ -0,0 +1,23 @@
!ifndef HIDDEN_SECTION_THEME
!define HIDDEN_SECTION_THEME
!include LogicLib.nsh

Section "-HiddenSectionTheme"
; OTS2 Theme files
IfFileExists "$whereprofiles\themes\themeslist.rc" 0 AddThemeFiles
IfFileExists "$whereprofiles\themes\themeselect.rc" SkipThemeFiles

AddThemeFiles:
SetOutPath "$whereprofiles\themes\"
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
${If} ${SectionIsSelected} ${SecTheme}
File ".\Personal\themes\themeselect.rc"
File ".\Personal\themes\themeslist.rc"
${Else}
File /oname=themeselect.rc ".\Personal\themes\themeselect-empty.rc"
File /oname=themeslist.rc ".\Personal\themes\themeslist-empty.rc"
${EndIf}
!insertmacro UNINSTALL.LOG_CLOSE_INSTALL
SkipThemeFiles:
SectionEnd
!endif
1 change: 1 addition & 0 deletions LOSI.nsi
Expand Up @@ -116,6 +116,7 @@ ShowUnInstDetails show
!include PagePreviousInstall.nsh
!include SectionCore.nsh
!include SectionTheme.nsh
!include HiddenSectionTheme.nsh
!include SectionLOSI.nsh
!include PageHowLS.nsh
!include PageWhereProfiles.nsh
Expand Down
12 changes: 0 additions & 12 deletions SectionCore.nsh
Expand Up @@ -81,18 +81,6 @@
WriteRegStr HKLM "Software\${PRODUCT_NAME}\Installer" "ProfilesDir" $whereprofiles
WriteRegStr HKLM "Software\${PRODUCT_NAME}\Installer" "PersonalDir" "$whereprofiles\personal"

; OTS2 Theme files
IfFileExists "$whereprofiles\themes\themeslist.rc" 0 AddThemeFiles
IfFileExists "$whereprofiles\themes\themeselect.rc" SkipThemeFiles

AddThemeFiles:
SetOutPath "$whereprofiles\themes\"
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
File /oname=themeselect.rc ".\Personal\themes\themeselect-empty.rc"
File /oname=themeslist.rc ".\Personal\themes\themeslist-empty.rc"
!insertmacro UNINSTALL.LOG_CLOSE_INSTALL
SkipThemeFiles:

SetOutPath "$INSTDIR"
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
File ".\LS\changes.txt"
Expand Down

0 comments on commit f8ecd16

Please sign in to comment.