PDA

View Full Version : Linker::link plugin not working for me


doniels
8th January 2012, 09:21
I've spent most of the past week trying to add a link to MUI_PAGE_COMPONENTS - I've tried all the various examples that I found by searching the forum.

But there's not way to get the text to be "live" and open a browser.

The classic

FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1006
Linker::link /NOUNLOAD $0 "http://nsis.sourceforge.net/Linker_plug-in"

does nothing, no matter which control I use. (I'd prefer to use 1021, based on Resource Hacker)

My latest attempt tried all the tricks on this old thread (http://forums.winamp.com/showthread.php?t=320113). The "go to google" link appears as text but is not a hyperlink. :confused:

I've tried with "linker" and "linker 1.1" from the linker plug in page (http://nsis.sourceforge.net/Linker_plug-in). I'm using NSIS version 2.45

I've considered adding a button instead, but that looks even more complicated.

Any ideas? Our MUI_PAGE_COMPONENTS has a list of 10 check-boxes, so I'm in no hurry to recreate it as a custom screen, unless that's the easy way to do it.

- Danny, who inherited a rather large and complicated NSIS installation that needs to be maintained.

Afrow UK
8th January 2012, 11:45
What function are you calling it from? The page show function (MUI_PAGE_CUSTOMFUNCTION_SHOW)?

Stu

doniels
9th January 2012, 06:01
Correct. Here's the relevant parts of the code:


!include MUI2.nsh
!addplugindir .
!include "WinMessages.nsh"
.
.
!define MUI_TEXT_DIRECTORY_SUBTITLE " "
!define MUI_COMPONENTSPAGE_TEXT_TOP "Select your device manufacturer from the list below to install a driver. "
!define MUI_COMPONENTSPAGE_TEXT_COMPLIST " "
!define MUI_COMPONENTSPAGE_TEXT_INSTTYPELIST " "
!define MUI_COMPONENTSPAGE_TEXT_INSTTYPE "Show supported devices"
!define MUI_TEXT_COMPONENTS_TITLE "Driver installation"
!define MUI_TEXT_COMPONENTS_SUBTITLE " "
!define MUI_COMPONENTSPAGE_NODESC 1
.
.
!define MUI_PAGE_CUSTOMFUNCTION_SHOW SetupLink
!insertmacro MUI_PAGE_COMPONENTS
.
.
Function SetupLink
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $HWNDPARENT 1021
linker::link /NOUNLOAD $0 "http://www.ourlink.com/"
FunctionEnd
.
.
Section /o "(other)"
SectionIn 7 ; for a total of 10 sections
push "(other)"
ExecWait 'msiexec /quiet /i "$INSTDIR\Other\Driver_V10.msi"'
SectionEnd
.
.


In the setup.exe I can see linker.dll under setup.exe\$COMMONFILES\Our App\Install drivers\$PLUGINSDIR\

Afrow UK
9th January 2012, 09:59
Your GetDlgItem is wrong there. It should be GetDlgItem $0 $0 1021.

Stu

doniels
9th January 2012, 11:51
Hi Stu

I really appreciate the time you are spending on this.

Your "correction" was the original code - and it didn't work. So I changed it based on some "hint" I found in my many searches.

I just tried it again - this time with your version, and alas, it still does not work. :cry:

The code now says:


FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1021
linker::link /NOUNLOAD $0 "http://www.ourlink.com/"


All I get is a plain text "Show supported devices" - it's not a hyper-link and clicking on it does nothing.

Is there some "include" I am missing? I'm convinced I'm missing something elementary.

Thanks

- Danny

Afrow UK
9th January 2012, 11:58
It works for 1006 and 1023 but not that control. It must be the SS_LEFTNOWORDWRAP style. Try replacing the style with SS_LEFT using Resource Hacker and apply the modified resource with !define MUI_UI.

Stu