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

View Poll Results: what would you like to have?
!include <test.nsh> 1 11.11%
!include /switch test.nsh 5 55.56%
other solution (posted below) 0 0%
leave me alon, no one needs this! 3 33.33%
Voters: 9. You may not vote on this poll

Reply
Thread Tools Search this Thread Display Modes
Old 23rd January 2007, 21:40   #1
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
!include <file.nsh> .- What do YOU think?

Hi everyone!

this is open for discussion now.

i recently submitted a patch that adds the possibility to !include files so that makensis wont search them in the current directory but in include directories (default dir and !addincludedir's) only.

problem now is:
kichik does not like the c-style syntax with <bla.nsh>, because of some problems with spaces and general handling of tokens in nsis.

working examples:
!include <testfile.nsh>
!include <test\file.nsh>

working but crappy example:
!include "<test file.nsh>"

non-working example:
!include <test file.nsh>

now how to solve this?

plz post any ideas below!
Comm@nder21 is offline   Reply With Quote
Old 24th January 2007, 14:00   #2
Backland
Senior Member
 
Join Date: Sep 2006
Posts: 150
Its not a bad idea, but IMO NSIS needs to add several compile time functions (e.g. !IfFileExists)
Backland is offline   Reply With Quote
Old 24th January 2007, 14:30   #3
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
I think the /switch is the only way to go. C-style <blarg.nsh> just isn't the NSIS style.

The guy with the ridiculous username. Thou shall call him PaR instead.
Visit My Website
{_trueparuex^} is offline   Reply With Quote
Old 24th January 2007, 15:46   #4
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
Quote:
leave me alon, no one needs this!

I don't see problem in the current style.
PHP Code:
!include "dummy.nsh" 
I think is nice to NSIS be unique.


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 25th January 2007, 12:29   #5
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
Quote:
I don't see problem in the current style.
you did not get the point....

!include "dummy.nsh" will be kept, but topic is about an advanced !include that does ONLY include files from declared include directories.

!include "dummy.nsh" will include the dummy.nsh file, even if its just in the current working directoriy, or in the same directory as the .nsi file you're compiling.

while !include <dummy.nsh> or whatever will just include the file, if its in ${NSISDIR}\include or in any other folder declared by !addincludedir.

got it now?
Comm@nder21 is offline   Reply With Quote
Old 25th January 2007, 15:44   #6
ncsengodi
Junior Member
 
ncsengodi's Avatar
 
Join Date: Mar 2006
Location: Budapest, Hungary
Posts: 21
I think the !include /switch "dummy.nsh" could give more ability.

Some idea for switch usage :
- skip if not found
- force using local or remote if both are exist
- set the search order (local or remote first)
ncsengodi is offline   Reply With Quote
Old 25th January 2007, 15:52   #7
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Quote:
- skip if not found
That's already possible with /nonfatal

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 26th January 2007, 21:54   #8
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
guess we'll stick with the switch
Comm@nder21 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