[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nsis-commits
Subject:    [NSIS-commits] SF.net SVN: nsis:[6106] NSIS/trunk/Source
From:       wizou () users ! sourceforge ! net
Date:       2010-06-16 15:07:06
Message-ID: E1OOuCo-0007NV-1e () sfp-svn-4 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 6106
          http://nsis.svn.sourceforge.net/nsis/?rev=6106&view=rev
Author:   wizou
Date:     2010-06-16 15:07:05 +0000 (Wed, 16 Jun 2010)

Log Message:
-----------
Default OutFile determined by NSI script filename

Modified Paths:
--------------
    NSIS/trunk/Source/build.cpp
    NSIS/trunk/Source/build.h
    NSIS/trunk/Source/makenssi.cpp

Modified: NSIS/trunk/Source/build.cpp
===================================================================
--- NSIS/trunk/Source/build.cpp	2010-06-16 14:20:27 UTC (rev 6105)
+++ NSIS/trunk/Source/build.cpp	2010-06-16 15:07:05 UTC (rev 6106)
@@ -2349,6 +2349,12 @@
   return PS_OK;
 }
 
+void CEXEBuild::set_default_output_filename(const tstring& filename)
+{
+    if (build_output_filename[0] == 0)
+        _tcsnccpy(build_output_filename,filename.c_str(),1024-1);
+}
+
 int CEXEBuild::check_write_output_errors() const
 {
   if (has_called_write_output)

Modified: NSIS/trunk/Source/build.h
===================================================================
--- NSIS/trunk/Source/build.h	2010-06-16 14:20:27 UTC (rev 6105)
+++ NSIS/trunk/Source/build.h	2010-06-16 15:07:05 UTC (rev 6106)
@@ -105,6 +105,8 @@
 #endif //NSIS_CONFIG_PLUGIN_SUPPORT
 
 
+    void set_default_output_filename(const tstring& filename);
+
     // process a script (you can process as many scripts as you want,
     // it is as if they are concatenated)
     int process_script(FILE *filepointer, const TCHAR *filename, BOOL unicode);

Modified: NSIS/trunk/Source/makenssi.cpp
===================================================================
--- NSIS/trunk/Source/makenssi.cpp	2010-06-16 14:20:27 UTC (rev 6105)
+++ NSIS/trunk/Source/makenssi.cpp	2010-06-16 15:07:05 UTC (rev 6106)
@@ -516,6 +516,7 @@
             if (change_to_script_dir(build, script_file))
               return 1;
           }
+          build.set_default_output_filename(remove_file_extension(sfile)+_T(".exe"));
  }
 
         if (build.display_script) 


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
NSIS-commits mailing list
NSIS-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nsis-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic