Old 29th March 2020, 00:39   #1
RyuichiYoshida
Junior Member
 
Join Date: Mar 2020
Posts: 1
Newbie Trying to Write an Installer

Hello!
I am very excited to attempt coding with the NSIS installer, but I guess I kinda got ahead of myself and am somewhat lost in trying to implement my code.

I am attempting to write an automatic installer for a 128gb ram patch for Windows XP, but I am not familiar with a lot of commands. I've tried referencing commands, but I am still falling short of understanding how to properly make the installer. I've spent almost 7 hours attempting this now, I think.

I established a specific outline of my plan, but I am just having a bit of trouble converting my pseudocode to actual code.

I need to take this step-by-step:
1. How can I make the NSIS installer menu say "You are installing the 128gb Ram Patch by Diyba?" I am aiming for the default menu that has a next and back button.
2. My installer will be taking two different folders of files. How can I make these files part of the installer file?
3. Once those two problems are solved, I must figure out how to set the default installation directory. How can I change the $INSTDIR's default location?
4. I also need to take a look at my code for the registry information; I am not too familiar with the whole thing and need to review the code there.

I tried skimming the chapters for NSIS, but I am still confused.
Attached Files
File Type: txt NSIS.txt (3.7 KB, 59 views)
RyuichiYoshida is offline   Reply With Quote
Old 29th March 2020, 20:28   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,287
1: I don't know whet you mean by "menu". The Modern UI has a welcome page if that is what you are talking about? Or perhaps the directory page?

2:
Quote:
Section
SetOutPath "$InstDir"
File /r "c:\myfiles\*.*"

SetOutPath "$WinDir\Something"
File /r "c:\mywindowsfiles\*.*"
SectionEnd
3: InstallDir

4: Not sure what you mean.

You have "OutFile" twice in your script, only the last one is used.

You can check for x86 XP like this:

PHP Code:
!include WinVer.nsh
!include x64.nsh
Function .onInit
${IfNot} ${IsWinXP}
${
OrIfNot} ${IsNativeIA32} ; i386 32-bit
  MessageBox MB_ICONSTOP 
"XP only blah blah"
  
Quit 
${EndIf} 
FunctionEnd 

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