aliens

Author Topic: how to build to single exe with all dll embedded inside using MS VS 2010 ?  (Read 6725 times)

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
how to build to single exe with all dll embedded inside using MS VS 2010 and without need to use *.rc files ?

Tom

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
You need find proper version libraries that allow that, problem is that usually SDL1.2 is ship as separate dlls (mainly because of LGPL).
One solution I find to don't bother with all this stuff is get linux that have properly set libraries to create standalone exe. I use virtual machine to run that :)
Another way is hit to SupSuper and ask him form where he get libraries that he use to compile milestones.
Final and probably most complex is compile everything (libraries too, with dependences) form sources as one exe.

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
You should not do it without a proper reason, as it prevents the end-user from updating the DLLs that don't work on their system.
It happened to me with SDL 1.3 and 2.0 : The official latest had crashing bugs, I had to compile from latest source to get the fixes.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
pretty sure vs2010 express doesn't have that facility.

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
thanks,

which version of MS VS would allow to build it with minimal "admin" / manual work ?

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
how to build to single exe with all dll embedded inside using MS VS 2010 and without need to use *.rc files ?

Tom
.rc file just controls the Windows game icon, you can remove it if you don't want it.
You should be able to do with any VS. To embed the libraries into the game you just need to compile with static libraries instead (DLLs are called dynamic or shared libraries). However library developers only provide pre-built dynamic versions, so you will likely have to build them from source.

The only difference between a shared and a static library is one build setting:


Finally, you can also embed the VC runtime into OpenXcom with this setting:


That'll get you a completely standalone (and much bigger) EXE.

You need find proper version libraries that allow that, problem is that usually SDL1.2 is ship as separate dlls (mainly because of LGPL).
One solution I find to don't bother with all this stuff is get linux that have properly set libraries to create standalone exe. I use virtual machine to run that :)
Another way is hit to SupSuper and ask him form where he get libraries that he use to compile milestones.
Final and probably most complex is compile everything (libraries too, with dependences) form sources as one exe.
The milestones use VS and DLLs. The nightlies are all statically built, but they are built on an automated MinGW on Linux so it's much simpler to just get all the required source packages and build them appropriately.
« Last Edit: January 11, 2015, 10:24:31 pm by SupSuper »