Old 8th January 2012, 10:21   #1
doniels
Junior Member
 
Join Date: Jan 2012
Posts: 3
Unhappy Linker::link plugin not working for me

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
PHP Code:
    FindWindow $"#32770" "" $HWNDPARENT
    GetDlgItem 
$$0 1006
    Linker
::link /NOUNLOAD $"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. The "go to google" link appears as text but is not a hyperlink.

I've tried with "linker" and "linker 1.1" from the linker plug in page. 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.
doniels is offline   Reply With Quote
Old 8th January 2012, 12:45   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
What function are you calling it from? The page show function (MUI_PAGE_CUSTOMFUNCTION_SHOW)?

Stu
Afrow UK is offline   Reply With Quote
Old 9th January 2012, 07:01   #3
doniels
Junior Member
 
Join Date: Jan 2012
Posts: 3
Correct. Here's the relevant parts of the code:

PHP 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 
$"#32770" "" $HWNDPARENT
    GetDlgItem 
$0 $HWNDPARENT 1021
    linker
::link /NOUNLOAD $"http://www.ourlink.com/"
FunctionEnd
.
.
Section /"(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\
doniels is offline   Reply With Quote
Old 9th January 2012, 10:59   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Your GetDlgItem is wrong there. It should be GetDlgItem $0 $0 1021.

Stu
Afrow UK is offline   Reply With Quote
Old 9th January 2012, 12:51   #5
doniels
Junior Member
 
Join Date: Jan 2012
Posts: 3
Unhappy Still not working

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.

The code now says:

PHP Code:
    FindWindow $"#32770" "" $HWNDPARENT
    GetDlgItem 
$$0 1021
    linker
::link /NOUNLOAD $"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
doniels is offline   Reply With Quote
Old 9th January 2012, 12:58   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
links, nsis, url

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