Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 9th June 2008, 14:10   #1
ewiener
Junior Member
 
Join Date: Jun 2008
Posts: 5
Cannot get CheckBox to appear

I am trying to create a simple installer and on the finishpage I want to have 3 checkboxes:

1 for running the app after the install
1 for creating a Desktop shortcut
1 for creating a QuickLaunch shortcut

I am using MUI_FINISHPAGE_RUN for running the app, and MUI_FINISHPAGE_SHOWREADME for creating the Desktop shortcut. Those both work fine. However, I am having a tough time getting the QuickLaunch checkbox to show. Here are the functions I am using, which were obtained from another thread on here:

code:

!define MUI_PAGE_CUSTOMFUNCTION_PRE QL_PRE
!define MUI_PAGE_CUSTOMFUNCTION_SHOW QL_SHOW
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE QL_LEAVE

Function QL_PRE
ReadINIStr $0 "$PLUGINSDIR\iospecial.ini" "Field 6" "HWND"
SetCtlColors $0 0x000000 0xFFFFFF
FunctionEnd

Function QL_SHOW
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Settings" "NumFields" "8"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Type" "CheckBox"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Text" "&Create Quicklaunch Shortcut"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Left" "120"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Right" "315"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Top" "130"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Bottom" "140"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "State" "1"
FunctionEnd

Function QL_LEAVE
ReadINIStr $0 "$PLUGINSDIR\iospecial.ini" "Field 6" "State"
StrCmp $0 "0" end
SetOutPath "$INSTDIR"
CreateShortCut "$QUICKLAUNCH\$(^Name).lnk" "$INSTDIR\Launch jEdit.exe"
end:
FunctionEnd



I checked the IOSpecial.INI while it is running and the entry for the CheckBox (Field 6) does appear, but it never shows up in the installer.

EDIT: Also, the QuickLaunch shortcut IS made during the install. It appears after clicking the "Next" button on the welcome screen.

Any help with this would be much appreciated. Thanks.
ewiener is offline   Reply With Quote
Old 9th June 2008, 17:24   #2
ewiener
Junior Member
 
Join Date: Jun 2008
Posts: 5
Quick update:

I re-made my installer script and curiously the CheckBox entry in the iospecial.ini for the QuickLaunch appears once on the finishpage, but the checkbox still doesn't show.

Here is a screenshot of iospecial.ini opened in the HM NIS InstallOptions Editor (while installer is running on finishpage)


And here is a screenshot of how it looks while running
ewiener is offline   Reply With Quote
Old 9th June 2008, 18:10   #3
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
You should add the creation of the checkbox into the pre function and the control colors thing into the show function.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 9th June 2008, 20:56   #4
ewiener
Junior Member
 
Join Date: Jun 2008
Posts: 5
Damn it. It works perfectly now. Thank you!
ewiener is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump