Thread: NSIS 3.0b2
View Single Post
Old 15th December 2015, 15:14   #12
Kriggi
Junior Member
 
Join Date: Dec 2015
Posts: 9
Hi! (Sorry, English translation - Google)

I compiled from the source code NSIS v3.0b2 rev.6682 and builded the following script:

PHP Code:
!define PRODUCT_NAME "My application"
SetCompressor lzma
!include "MUI.nsh"
 
!define MUI_CUSTOMFUNCTION_GUIINIT onGUIInit
 
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
 
!insertmacro MUI_LANGUAGE "English"
 
Name "SkinH"
OutFile "setup_SkinH.exe"
InstallDir "$PROGRAMFILES\My application"
 
Section
SectionEnd
 
Function onGUIInit
  InitPluginsDir
  SetOutPath $PLUGINSDIR
  File 
"${NSISDIR}\Plugins\x86-ansi\SkinH.dll"
  
File skinh.she
  System
::Call SkinH::SkinH_Attach()

 
#################### Patches for SkinSharp ####################
  
System::Call Kernel32::GetModuleHandle(t"SkinH.dll")i.r0
  IntOp 
$$0x0002CA98
  System
::Call Kernel32::GetCurrentProcess()i.s
  System
::Call Kernel32::VirtualProtectEx(is,ir0,i4,i0x40,*i)
  
System::Call "*$0(&i1 0)"
###############################################################
FunctionEnd
 
Function .onGUIEnd
Delete plug-ins folder
  System
::Call Kernel32::GetModuleHandle(t"SkinH.dll")i.s
  System
::Call Kernel32::FreeLibrary(is)
  
System::Call Kernel32::SetCurrentDirectory(t"$EXEDIR\")
FunctionEnd 
Unfortunately on OS Windows 64-bit installer does not start (crash).



On 32-bit operating system is functioning properly.

Downgrade NSIS revision and fulfilling its compilation I found that in the revision 6644 compiled script works fine on 64-bit OS. But in the revision 6645 and above - does not work. In the revision 6645 you have the following changes "bug # 1125: Does not load modules from the application nor current directory." As a result there was a problem.
Kriggi is offline   Reply With Quote