Old 20th April 2018, 13:35   #1
Coby
Junior Member
 
Join Date: Feb 2016
Posts: 48
NSIS custom initpluginsdir help

When I use a custom temporary $PLUGINSDIR in NSIS, the system.dll plugin is not displayed in this folder
What's wrong here?

Example:

PHP Code:
Name "Basic"
OutFile "Basic.exe"
InstallDir "$TEMP"

!include "MUI.nsh"

RequestExecutionLevel User

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_LANGUAGE "English"
  
Function .onInit
  ClearErrors
  CreateDirectory $EXEDIR
\PluginsDir
  IfErrors 0 
+3
  ClearErrors
  InitPluginsDir
  StrCpy 
$0 $EXEDIR\PluginsDir
  SetOutPath 
$0
  File 
//x thumbs.db "${NSISDIR}\Plugins\chngvrbl.dll"
  
Push $0
  Push 26
  CallInstDLL 
$0\chngvrbl.dll changeVariable
FunctionEnd

Section 
""
  
SetAutoClose True
SectionEnd

Function .OnGuiEnd
  RMDir 
/"$PLUGINSDIR"
  
SetOutPath $EXEDIR
FunctionEnd 
Coby is offline   Reply With Quote
Old 20th April 2018, 14:44   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,914
You are not initializing $pluginsdir to something special so how is the system plug-in supposed to know?

Quote:
Function .onInit
UnsafeStrCpy $pluginsdir "$localappdata\mytemp" ; NSIS 3
CreateDirectory $pluginsdir
; Use plug-ins here...
FunctionEnd
This thread is a duplicate of http://forums.winamp.com/showthread.php?p=3053503 and http://forums.winamp.com/showthread.php?t=357534 , try searching first next time!

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast 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