User:Anders: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Added GDFTrace)
(Added a link)
 
Line 125: Line 125:
scons ZLIB_W32=dep\zlib-win32 PREFIX=c:\NSIS SKIPUTILS="NSIS Menu" SKIPTESTS=Examples\makensis.nsi install
scons ZLIB_W32=dep\zlib-win32 PREFIX=c:\NSIS SKIPUTILS="NSIS Menu" SKIPTESTS=Examples\makensis.nsi install
</pre>
</pre>
= Blogroll =
* [https://rentry.co/N-O-D-E N-O-D-E zine]

Latest revision as of 15:19, 18 November 2025

--Anders 17:21, 26 March 2008 (PDT)




CppUnit

TinyCppUnit is a tiny reimplementation of CppUnit and contains just enough functionality to work with NSIS. Its only redeeming feature is that you don't have to link to the CppUnit .lib file (that might not work with your compiler).

TinyCppUnit.zip (5 KB)


Game Explorer

GDFTrace.zip (27 KB)


Building NSIS

MSVC

VS 2017 (15.7.3)

Neither NSIS nor SCons currently supports VS 2017 so this is a bit of a hack.

First we must patch \scons-3.0.1\SCons\Util.py with a ugly hack:

def __eq__(self, other):
        if issubclass(other.__class__, self._subject.__class__):
            return self._subject == other
+        if not self.__dict__:
+            return False
+        if not other:
+            return False
+        if not other.__dict__:
+            return False
        return self.__dict__ == other.__dict__

And then we can build:

REM Visual Studio 2017 v15.7.3 (CL 19.14.26430 for x86)
REM SVN r6998 in C:\bld\trunk
REM zlib-win32 in C:\bld\dep\zlib-win32
set path=%path%;c:\python27
REM Using vcvars32.bat because SCons 3.0.1 does not support VS2017
"C:\Program Files\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
set ZLIB_W32=C:\bld\dep\zlib-win32
REM Using MSTOOLKIT, MSVC_USE_SCRIPT and MSVS_VERSION=10.0 because 14.14 is not supported yet
scons MSTOOLKIT=yes MSVC_USE_SCRIPT=None MSVS_VERSION=10.0 VER_MAJOR=3 VER_MINOR=3 SKIPUTILS="NSIS Menu" PREFIX="c:\bld\NSIS" install

MinGW

MinGW GCC 4.5.2

The latest w32api headers don't actually work with this GCC version without some patching:

  • Add __AW and __STR macros to _mingw.h
    #define __AW__(AW, AW_) AW ## AW_
    #if ( \
     (!defined(__TEST_SQL_NOUNICODEMAP) && defined(UNICODE)) || \
     (!defined(__TEST_SQL_NOUNICODEMAP) && defined(_UNICODE)) || \
     defined(FORCE_UNICODE) || \
     (defined(__TEST_SQL_NOUNICODEMAP) && !defined(SQL_NOUNICODEMAP) && \
       (defined(UNICODE) || defined(_UNICODE))) \
     )
    # define __AW(AW) __AW__(AW, W)
    # define __STR(AW) __AW__(L, AW)
    #else
    # define __AW(AW) __AW__(AW, A)
    # define __STR(AW) __AW__(, AW)
    #endif
    
  • Fix unknwn.h by adding #include <windows.h> to the top of the file or use this patch:
    Index: Source/7zip/Common/MyUnknown.h
    ===================================================================
    --- Source/7zip/Common/MyUnknown.h	(revision 6530)
    +++ Source/7zip/Common/MyUnknown.h	(working copy)
    @@ -30,6 +30,14 @@
     #include <basetyps.h>
     #endif
     
    +#ifdef __MINGW32__
    +/* 
    + * MinGW/w32api BUGFIX
    + * w32api-4.0.3-1-mingw32-dev will error on LPUNKNOWN usage in commdlg.h if windows.h is not included before unknwn.h
    + */
    +#include <windows.h>
    +#endif
    +
     #include <unknwn.h>
     
     #else 
    
  • Add #ifndef NSISCALL & #endif around SHGetImageList() in shellapi.h

We are now ready to build:

mingw-get install "g++<4.6"
set path=%path%;c:\MinGW\bin
cd SVN-r6530\NSIS\trunk
scons ZLIB_W32=dep\zlib-win32 PREFIX=c:\NSIS SKIPUTILS="NSIS Menu" SKIPTESTS=Examples\makensis.nsi install

Blogroll