|
|
#1 |
|
Junior Member
Join Date: Feb 2012
Posts: 2
|
Header Text / MUI2 / nsDialogs
Hi,
I just created my first installer using NSIS. I just can't set header text nor header image. I tried: !define MUI_PAGE_HEADER_TEXT "Title" or !insertmacro MUI_HEADER_TEXT "Title" "Subtitle" but there's still an empty header bar. What I'm doing wrong? code: |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,783
|
No language macros?
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2012
Posts: 3
|
I have created my first installer and need to add a new page before the FINISH page. Objective is to ask for directory location where a specific file(exe file of another application) is located. Based on the location entered, I need to pass this as a parameter to run a program. I am new to NSIS and having hard time creating a new page by myself. Here is the code I am using:
; Script generated by the HM NIS Edit Script Wizard. ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "myfirstapp" !define PRODUCT_VERSION "1.0" !define PRODUCT_PUBLISHER "Company XYZ" !define PRODUCT_WEB_SITE "http://www.companyxyz.com" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define PRODUCT_UNINST_ROOT_KEY "HKLM" ; MUI 1.67 compatible ------ !include "MUI.nsh" ; MUI Settings !define MUI_ABORTWARNING !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" ; Welcome page !insertmacro MUI_PAGE_WELCOME ; License page !define MUI_LICENSEPAGE_RADIOBUTTONS !insertmacro MUI_PAGE_LICENSE "Software_License.txt" ; Directory page !insertmacro MUI_PAGE_DIRECTORY ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Finish page !insertmacro MUI_PAGE_FINISH ; Uninstaller pages !insertmacro MUI_UNPAGE_INSTFILES ; Language files !insertmacro MUI_LANGUAGE "English" ; MUI end ------ Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" OutFile "Setup.exe" InstallDir "$PROGRAMFILES\myfirstapp" ShowInstDetails show ShowUnInstDetails show Section "MainSection" SEC01 SetOutPath "$INSTDIR\config" SetOverwrite try File "config\firstfile.xsl" File "config\second.xsl" File "config\fav.jpg" File "config\favicon.ico" SetOutPath "$INSTDIR\config\fonts\fonts" File "config\fonts\fonts\CALIBRI.TTF" File "config\fonts\fonts\CALIBRI.xml" File "config\fonts\fonts\CALIBRIB.TTF" File "config\fonts\fonts\CALIBRIB.xml" File "config\fonts\fonts\CALIBRII.TTF" File "config\fonts\fonts\CALIBRII.xml" File "config\fonts\fonts\CALIBRIZ.TTF" File "config\fonts\fonts\CALIBRIZ.xml" File "config\fonts\fonts\times.ttf" File "config\fonts\fonts\times.xml" File "config\fonts\fonts\timesbd.ttf" File "config\fonts\fonts\timesbd.xml" File "config\fonts\fonts\timesbi.ttf" File "config\fonts\fonts\timesbi.xml" File "config\fonts\fonts\timesi.ttf" File "config\fonts\fonts\timesi.xml" SetOutPath "$INSTDIR\config" File "config\helper.xml" CreateDirectory "$SMPROGRAMS\myfirstapp" CreateShortCut "$SMPROGRAMS\myfirstapp\Help.lnk" SetOutPath "$INSTDIR" File "myfirstapp.jar" CreateShortCut "$DESKTOP\myfirstapp.lnk" "$INSTDIR\myfirstapp.jar" " " "$INSTDIR\config\favicon.ico" File "Software_License.txt" SectionEnd Section -AdditionalIcons CreateShortCut "$SMPROGRAMS\myfirstapp\Uninstall.lnk" "$INSTDIR\uninst.exe" SectionEnd Section -Post WriteUninstaller "$INSTDIR\uninst.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" SectionEnd Function un.onUninstSuccess HideWindow MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." FunctionEnd Function un.onInit MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 Abort FunctionEnd Section Uninstall Delete "$INSTDIR\uninst.exe" RMDir "$INSTDIR" DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" SetAutoClose true SectionEnd |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,783
|
How is this question related to the original post?
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Feb 2012
Posts: 3
|
Sorry, i am new to this forum and could not find link to start new thread. Instead I saw this thread is related to custom page.
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Feb 2012
Posts: 2
|
@Anders:
how languages macros are related to the header text? |
|
|
|
|
|
#7 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,841
|
When using MUI, you must include at least one language.
|
|
|
|
|
|
#8 |
|
Junior Member
Join Date: May 2009
Posts: 8
|
@Liero
Use this macro: !insertmacro MUI_HEADER_TEXT_PAGE "Text" "Subtext" |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|