Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   NSIS downloader (http://forums.winamp.com/showthread.php?t=303461)

UzumakiNaruto 24th February 2009 17:33

NSIS downloader
 
hey,

i have a little trouble with with nsis.
i have start it a few minutes ago and i wanna make a "big" installer.

i can program php and i miss some methods from there :D

little text to explain my wish:
  • user start the installer
  • installer load down a txt file with infos

    code:
    name for components;description;installpath;filename

  • user choose the files to install
  • installer read a registry key for the install path
  • installer load the files down and place it in the right path
  • finish
  • option to create shortcuts on the desktop

which functions, macros, etc i must watch to make an installer with this functions?

how i can read and seperate (array) the little txt from the server to place the infos in the installer?

i have build a downloader marco
code:
!macro DOWNLOADER VAR FILENAME
NSISdl::download ${DOWNLOAD} ${FILENAME}
!macroend


Animaether 24th February 2009 23:02

# user choose the files to install
standard: Page Components
MUI2: !insertmacro MUI_PAGE_COMPONENTS

# installer read a registry key for the install path
Depending on what you're referring to, exactly...
InstallDirRegKey
ReadRegStr

# installer load the files down and place it in the right path
NSISdl plugin or inetc plugin (I prefer the latter, myself). The macro you've built has an error, unless you defined ${DOWNLOAD} elsewhere.

# finish
standard: Page custom
Use nsDialogs to create your own finish page

MUI2: !insertmacroMUI_UNPAGE_FINISH

# option to create shortcuts on the desktop
You can go down many roads with this one.
A. You could offer this on a separate page (Custom)
B. You could add it in a Section so the user chooses it when choosing components
C. You could combine it with the Finish page (would have to be a custom finish page, not the MUI2 built-in one)
I recommend A or B, as typical guidelines indicate that any system changes should only occur when actually installing (e.g. just before, during, or just after, InstFiles), and not as an 'option' on a Finish page. But I've seen many installers ignore that; up to you %)

UzumakiNaruto 25th February 2009 19:37

# installer load the files down and place it in the right path
NSISdl plugin or inetc plugin (I prefer the latter, myself). The macro you've built has an error, unless you defined ${DOWNLOAD} elsewhere.

i have define it ;)

code:
!include "MUI.nsh"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH



MUI2: !insertmacroMUI_UNPAGE_FINISH
what is the different to MUI_PAGE?

InstallDirRegKey - create a reg key????

Afrow UK 26th February 2009 11:13

InstallDirRegKey doesn't create the registry entry, it simply defines the registry entry to read $INSTDIR from. You have to write it yourself at the end of installation with WriteRegStr.

You should use MUI2.nsh. UNPAGE macros are for your uninstaller.

Stu


All times are GMT. The time now is 04:27.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.