Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 20th January 2012, 18:13   #1
renoto
Junior Member
 
Join Date: Jan 2012
Posts: 2
Combining multiple PDF files into a single NSIS compatible file

I know its a very basic question but so far I havent been able to see anything that really touches on the subject even after trying both this forum and the FAQ's on the website and a Google search. Hopefully someone can help me with this issue here.

The goal I'm looking at is to create a CD that prompts a window with an 'install' button (this part is actually already completed, used Flash to create the window with the 'install' button), so that the end user is able to click that and download to their desktop our entire PDF catalog. This is about 57 PDF files kept in a single folder (which has all the pdf files inside it divided into their own folders). I've found quite a few codes on the NSIS site about installing files, but my problem is getting all those files/folders into a format that is compatable with the NSIS code.

At first I tried condensing them into a 'download.cab' file, but when I tried to save it in the Script Editor I got an error, so I figured .cab files arent compatible. Short of this, I'm entirely unsure how to proceed. I'm not at all technologically sound, I'm actually just a graphic designer and this is the first time I'm working with code that isnt CSS or HTML. Forgive me too if I'm slow to understand, as many of the termanology I'm running across I've never seen or heard of before. (Google has become my best friend today haha) Normally I stick with what I know, but I have to do this for work so I'm exploring unchartered territory.

Thanks in advance for your time!
renoto is offline   Reply With Quote
Old 20th January 2012, 18:19   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
To learn NSIS, start with examining NSIS\Examples\Example1.nsi and Example2.nsi. Find out what all commands do, using the command reference: http://nsis.sourceforge.net/Docs/Chapter4.html

Once you know what all the commands in those Examples do, and why, you will be well on your way to understanding NSIS. For your specific problem, you can use the CopyFiles command: http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.3.2
MSG is offline   Reply With Quote
Old 20th January 2012, 18:28   #3
renoto
Junior Member
 
Join Date: Jan 2012
Posts: 2
Yeah I'm still reading through the User Manual and trying to understand as much as possible, but I'm also on a deadline. I was actually supposed to have this entire thing done by today, but converting all the PDF files (and creating the entire index for the catalog) took me the whole week, so I havent even had time to sit down and really focus on this. Hopefully if my boss doesnt lob my head off for not having it done today, I can use the weekend to really sit and look at it, but right now I'm trying to get it done as quickly as possible.

I did see that Copy Files thing mentioned somewhere once before, and I looked at it earlier, but of course I didnt understand it.

[/SILENT] [/FILESONLY] filespec_on_destsys destination_path [size_of_files_in_kb]

CreateDirectory $INSTDIR\backup
CopyFiles $INSTDIR\*.dat $INSTDIR\backup


Thats what it is, my only question is where it says 'filespec_on...' is that where I put the name of the folder? Or does the folder name replace 'backup'? Also I'm guessing I have to put the cumulative kb of the files down in that last [], what happens if I miscalculate and give the wrong size?

Again I'm so sorry if I'm misunderstanding it entirely, I'm going to read through again (the top part of the page) but I presently have to run another errand for my boss, so I'll check back in a bit. Thanks!
renoto is offline   Reply With Quote
Old 21st January 2012, 03:57   #4
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
filespec_on_destsys means the file specification (path) on the destination system (your user's pc). It's made so explicit because the File command (which compresses the pdf into the installer.exe) is a compiletime command and therefore requires a path on the development system (your pc).

If you 'miscalculate' the filesize, nothing happens. The size parameter is simply added to the total size required by the installer, so that the 'Space needed' field isn't zero.
MSG is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
pdf nsis compatibility

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