Archive: CustomPage title


CustomPage title
Hi...

I want to change the customPage title:

The title of my custompage ist, with this code, the title of the "MUI_PAGE_INSTFILES".


!insertmacro MUI_PAGE_DIRECTORY
Page custom SetCustom LeaveCustom
!insertmacro MUI_PAGE_INSTFILES


How can i cange this??



And 2. Question:

I want to make an installer with only this custompage. Because this custompage edits some dokuments, like *.xml, *.conf, *.bat, ...

How can i make a .exe file with only this custompage and this functions?????


Section -main

;-------------------------
;Config.xml
;Pfade von Ordnern ändern im conf.Datei - Applikationsserver
Push ' <env_param name="java.naming.provider.url" value="ormi://$OCIP:23791/mediamid"/>'
Push 7
Push "$INSTDIR\conf.oc4j\conf.xml"
Call WriteToFileLine

;Pfade von Ordnern ändern im conf.Datei - Applikationsserver
Push ' <env_param name="java.naming.security.principal" value="$OCUSER"/>'
Push 8
Push "$INSTDIR\conf.oc4j\conf.xml"
Call WriteToFileLine

;Pfade von Ordnern ändern im conf.Datei - Applikationsserver
Push ' <env_param name="java.naming.security.credentials" value="$OCPWD"/>'
Push 9
Push "$INSTDIR\conf.oc4j\conf.xml"
Call WriteToFileLine

;Pfade von Ordnern ändern im conf.Datei - Backup
Push " <backupdir>$INSTDIR\backup</backupdir>"
Push 24
Push "$INSTDIR\conf.oc4j\conf.xml"
Call WriteToFileLine

;Pfade von Ordnern ändern im conf.Datei - Home
Push " <homedirectory>$INSTDIR</homedirectory>"
Push 30
Push "$INSTDIR\conf.oc4j\conf.xml"
Call WriteToFileLine

;Pfade von Ordnern ändern im conf.Datei - ImportExport
Push " <searchdir>$INSTDIR\importexport</searchdir>"
Push 49
Push "$INSTDIR\conf.oc4j\conf.xml"
Call WriteToFileLine

;Pfade von Ordnern ändern im conf.Datei - ImportExport
Push " <exportdir>$INSTDIR\importexport</exportdir>"
Push 54
Push "$INSTDIR\conf.oc4j\conf.xml"
Call WriteToFileLine

;Pfade von Ordnern ändern im conf.Datei - Applikationsserver
Push "<!-- <applicationserver>$OCIP</applicationserver> -->"
Push 60
Push "$INSTDIR\conf.oc4j\conf.xml"
Call WriteToFileLine

;Pfade von Ordnern ändern im conf.Datei - buffer
Push " <bufferdirectory>$INSTDIR\temp\buffer</bufferdirectory>"
Push 81
Push "$INSTDIR\conf.oc4j\conf.xml"
Call WriteToFileLine

;-------------------------
;Conversion.xml
;Pfade von Ordnern ändern im conf.Datei - bin
Push " <binaries>$INSTDIR\bin</binaries>"
Push 3
Push "$INSTDIR\conf.oc4j\conversion.xml"
Call WriteToFileLine

;Pfade von Ordnern ändern im conf.Datei - uploadbuffer
Push " <uploadbuffer>$INSTDIR\temp\uploadbuffer</uploadbuffer>"
Push 4
Push "$INSTDIR\conf.oc4j\conversion.xml"
Call WriteToFileLine

;Pfade von Ordnern ändern im conf.Datei - Rollback
Push " <rollbackbuffer>$INSTDIR\temp\rollback</rollbackbuffer>"
Push 5
Push "$INSTDIR\conf.oc4j\conversion.xml"
Call WriteToFileLine

;Pfade von Ordnern ändern im conf.Datei - Tempfiles
Push " <temp>$INSTDIR\temp\tempfiles</temp>"
Push 6
Push "$INSTDIR\conf.oc4j\conversion.xml"
Call WriteToFileLine

;Pfade von Ordnern ändern im conf.Datei - HOST
Push " <host>$OCIP</host>"
Push 12
Push "$INSTDIR\conf.oc4j\conversion.xml"
Call WriteToFileLine

;-------------------------
;conf.WAS.xml
;Pfade von Ordnern ändern im conf.wasDatei - Applicationsserver
Push ' <env_param name="java.naming.provider.url" value="ormi://$IPINPUT:23791/mediamid"/>'
Push 7
Push "$INSTDIR\conf.was\conf.xml"
Call WriteToFileLine
;Pfade von Ordnern ändern im conf.wasDatei - Backup
Push " <backupdir>$INSTDIR\backup</backupdir>"
Push 29
Push "$INSTDIR\conf.was\conf.xml"
Call WriteToFileLine
;Pfade von Ordnern ändern im conf.wasDatei - Home
Push " <homedirectory>$INSTDIR</homedirectory>"
Push 23
Push "$INSTDIR\conf.was\conf.xml"
Call WriteToFileLine
;Pfade von Ordnern ändern im conf.wasDatei - Search
Push " <searchdir>$INSTDIR\importexport</searchdir>"
Push 36
Push "$INSTDIR\conf.was\conf.xml"
Call WriteToFileLine
;Pfade von Ordnern ändern im conf.wasDatei - Export
Push " <exportdir>$INSTDIR\importexport</exportdir>"
Push 40
Push "$INSTDIR\conf.was\conf.xml"
Call WriteToFileLine
;Pfade von Ordnern ändern im conf.wasDatei - Home
Push " <applicationserver>$IPINPUT</applicationserver>"
Push 47
Push "$INSTDIR\conf.was\conf.xml"
Call WriteToFileLine
;Pfade von Ordnern ändern im conf.wasDatei - buffer
Push " <bufferdirectory>$INSTDIR\temp\buffer</bufferdirectory>"
Push 61
Push "$INSTDIR\conf.was\conf.xml"
Call WriteToFileLine

;-------------------------
;Conversion.xml
;Pfade von Ordnern ändern im conf.wasDatei - bin
Push " <binaries>$INSTDIR\bin</binaries>"
Push 3
Push "$INSTDIR\conf.was\conversion.xml"
Call WriteToFileLine
;Pfade von Ordnern ändern im conf.wasDatei - uploadbuffer
Push " <uploadbuffer>$INSTDIR\temp\uploadbuffer</uploadbuffer>"
Push 4
Push "$INSTDIR\conf.was\conversion.xml"
Call WriteToFileLine
;Pfade von Ordnern ändern im conf.wasDatei - Rollback
Push " <rollbackbuffer>$INSTDIR\temp\rollback</rollbackbuffer>"
Push 5
Push "$INSTDIR\conf.was\conversion.xml"
Call WriteToFileLine
;Pfade von Ordnern ändern im conf.wasDatei - Tempfiles
Push " <temp>$INSTDIR\temp\tempfiles</temp>"
Push 6
Push "$INSTDIR\conf.was\conversion.xml"
Call WriteToFileLine
;Pfade von Ordnern ändern im conf.wasDatei - HOST
Push " <host>$IPINPUT</host>"
Push 12
Push "$INSTDIR\conf.was\conversion.xml"
Call WriteToFileLine
Sectionend

Function WriteToFileLine
Exch $0 ;file
Exch
Exch $1 ;line number
Exch 2
Exch $2 ;string to write
Exch 2
Push $3
Push $4
Push $5
Push $6
Push $7

GetTempFileName $7
FileOpen $4 $0 r
FileOpen $5 $7 w
StrCpy $3 0

Loop:
ClearErrors
FileRead $4 $6
IfErrors Exit
IntOp $3 $3 + 1
StrCmp $3 $1 0 +3
FileWrite $5 "$2$\r$\n$6"
Goto Loop
FileWrite $5 $6
Goto Loop
Exit:

FileClose $5
FileClose $4

SetDetailsPrint none
Delete $0
Rename $7 $0
SetDetailsPrint both

Pop $7
Pop $6
Pop $5
Pop $4
Pop $3
Pop $2
Pop $1
Pop $0
FunctionEnd

For question #1:
Look in the MUI documentation:
Insert these before the page function:

LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Install Options Page Title"
LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "A subtitle"
and then this in the page's show function (in your case "SetFunction"):
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
See the MUI documenation/examples for more details.

For question #2:
If you want to just take the code you posted and turn it into an EXE with the custom page, then just create a install script in which you only have that section and function along with the functions generating the custom page. (This is pretty basic. If you're still unsure, take some time to review the documentation and examples included with NSIS.)

And by the way:
Don't post long bits of script. Use attachments instead.