Menu

#26 Changes to NSIS 2RC for MinGW

Unstable
closed-accepted
NSIS (71)
5
2014-07-21
2004-01-12
No

The attached patch has all the changes I did to get
NSIS (makensis.exe and exehead*.exe) to compile using
MinGW.
The difference is for a cvs checkout from about a day ago,
(1/11/04) so should hopefully still apply pretty cleanly.

I tried to make the changes as minimal as possible. I
do not guarentee all features work or work as expected
when compiled with MinGW (should have no effect on MSVC
builds), but with these changes, a workable AbiWord
installer is created. The Makefiles have not been
updated yet (just starting on them), as I normally
build within AbiWord build framework.

The main changes are in how the .ndata section is used,
an __attribute__ instead of #pragma, and the need for a
linker script to get the .ndata section after the
import (.idata) section in the PE file. (The default
order causes any call to an imported function to cause
a crash in the installer; my first go was to generate a
.reloc section and apply fixups, but this approach
works out better). The remaining changes are to handle
missing includes/defines or casts for gcc.

I would appreciate if at least some of these would be
incorporated. Thank you for their consideration.

*** Using the MSVC builds is still better for released
installers, as the MinGW build of NSIS adds a
msvcrt.dll dependency to the installer, the .ndata
section adds bloat (someone more familiar with gcc may
get this not to), and has not been fully tested. But
it works. ***

Discussion

  • Kenneth Davis

    Kenneth Davis - 2004-01-12

    diff for compiling with MinGW

     
  • Joost Verburg

    Joost Verburg - 2004-01-13

    Logged In: YES
    user_id=604457

    That shlwapi.h / StrStrI stuff has been removed from the
    NSIS source, so you should not add it.

    Isn't it possible to remove the msvcrt dependency? With this
    dependency it becomes almost useless because all
    compatibility is gone.

     
  • Kenneth Davis

    Kenneth Davis - 2004-01-14

    Logged In: YES
    user_id=164681

    I believe it is possible, but I have not had time to look
    into what is dragging in the C runtime. If I figure it out,
    I'll submit the appropriate patches. Thanks.

     
  • alan johnson

    alan johnson - 2004-02-08

    Logged In: YES
    user_id=943591

    thanks

     
  • Amir Szekely

    Amir Szekely - 2004-03-06

    Logged In: YES
    user_id=584402

    Applied inline changes. More will come later.

     
  • Amir Szekely

    Amir Szekely - 2004-03-12
    • status: open --> closed-accepted
     
  • Amir Szekely

    Amir Szekely - 2004-03-12

    Logged In: YES
    user_id=584402

    Applied everything, added some more, fixed compile errors
    and warnings and rewrote the makefiles. Thanks.

     
  • Amir Szekely

    Amir Szekely - 2004-03-12

    Logged In: YES
    user_id=584402

    I forgot to mention I managed to remove the MSVCRT.dll
    dependency. It's still way larger than the binary MSVC
    produces, but it seems to work.

     

Log in to post a comment.