Prev Previous Post   Next Post Next
Old 26th April 2016, 15:32   #1
cx08
Junior Member
 
Join Date: Apr 2016
Posts: 2
Question nsis error: resolving install function

Sample script:

code:
(--helpers.nsh--)
!define CreateSymbolicLinkFolder "!insertmacro CreateSymbolicLinkFolder"
!ifdef CreateSymbolicLinkFolder_
Function CreateSymbolicLinkFolder_
Exch $0 ; _TARGET
Exch 1
Exch $1 ; _JUNCTION
IfFileExists "$0" 0 done
${GetParent} "$1" $R0
CreateDirectory "$R0"
System::Call "kernel32::CreateSymbolicLinkW(w `$1`, w `$0`, i 1) i .s"
done:
Pop $R0
Pop $1
Pop $0
FunctionEnd
!endif
!macro CreateSymbolicLinkFolder _JUNCTION _TARGET
!define CreateSymbolicLinkFolder_
Push "${_JUNCTION}"
Push "${_TARGET}"
Call CreateSymbolicLinkFolder_
!macroend

(--sample.nsi--)
!include "helpers.nsh"
...
${CreateSymbolicLinkFolder} "$APPDATA\SOMEPATH" "$EXEDIR\Data"


Nsis error:
Error: resolving install function "DeleteLinkOrFolder_" in function "Clean"
Note: uninstall functions must begin with "un.", and install functions must not

How can i do fix the this?

In this code:

code:
!define CreateSymbolicLinkFolder "!insertmacro CreateSymbolicLinkFolder"
!define CreateSymbolicLinkFolder_
!ifdef CreateSymbolicLinkFolder_
Function CreateSymbolicLinkFolder_
Exch $0 ; _TARGET
Exch 1
Exch $1 ; _JUNCTION
IfFileExists "$0" 0 done
${GetParent} "$1" $R0
CreateDirectory "$R0"
System::Call "kernel32::CreateSymbolicLinkW(w `$1`, w `$0`, i 1) i .s"
done:
Pop $R0
Pop $1
Pop $0
FunctionEnd
!endif
!macro CreateSymbolicLinkFolder _JUNCTION _TARGET
Push "${_JUNCTION}"
Push "${_TARGET}"
Call CreateSymbolicLinkFolder_
!macroend


if i modify the script like this and if i don't need the macro "CreateSymbolicLinkFolder", nsis give me a warning:
install function "CreateSymbolicLinkFolder_" not referenced - zeroing code
cx08 is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
function, macro

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