Author Topic: Creatin a setup.exe Intaller with C::B  (Read 8938 times)

Offline mALA_cARA

  • Single posting newcomer
  • *
  • Posts: 3
Creatin a setup.exe Intaller with C::B
« on: March 20, 2012, 03:53:13 am »
Hi! I finish some of my Aps using GTK+ and SerialPort Libs and everything is fine except that the regular .exe file in the debug folder of my project doesn´t works in other computers. So I tought that may be some headers or libs of my app are not include in my .exe since I add the path of my libs during the instalation process of GTK+ and others in Windows.
So, the question is...there is any runtime library or other way for creeating a setup.exe (an intaller) of my apps using Code::Blocks?
Thanks by advance.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Creatin a setup.exe Intaller with C::B
« Reply #1 on: March 21, 2012, 03:01:17 am »
To my knowledge, Code::Blocks does not currently have an integrated method to create an installer.
If you want to create a Windows installer for your project, NSIS is a popular choice.
If you are just trying to enable your program to run on other computers, the easiest way is generally to either statically link to all your libraries, or copy the *.dll files your program uses into the same folder your program is in (Dependency Walker can aid in finding the dll's).

Offline mALA_cARA

  • Single posting newcomer
  • *
  • Posts: 3
Re: Creatin a setup.exe Intaller with C::B
« Reply #2 on: March 21, 2012, 04:45:21 am »
Hi! and thanks for you fast reply, temporarly I run my apps copying all .dll files in the same folder where is located the .exe file but is not a "clean" solution as you know. I noticed in the web that NSIS is a popular choice, moreover, I downlod it but I did´t start to work with it because first I want to be sure that there is not available any pluging or tool inside code::blocks to solve this issue. But as you mentioned maybe is time to put my hands in NSIS. Thanks again for the information, particularly I was not aware about Dependency Walker utility. Very usefull.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Creatin a setup.exe Intaller with C::B
« Reply #3 on: March 21, 2012, 06:50:01 am »
But as you mentioned maybe is time to put my hands in NSIS. Thanks again for the information, particularly I was not aware about Dependency Walker utility. Very usefull.
There is a NSIS plugin available for Code::Blocks. Search the forums...

However, writing a NSIS installer is nothing else than creating a script which may only need syntax highlighting so it "looks nice". This is available anyways in the core. COde::Blocks is a cross-platform C/C++ IDE, so supporting installers is nothing we do in the first place, because there is no cross-platform installer... well... stuff like CMAKE maybe, but they ship with their own "IDE", so why creating another one?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Creatin a setup.exe Intaller with C::B
« Reply #4 on: March 21, 2012, 10:14:24 pm »
There is a NSIS plugin available for Code::Blocks. Search the forums...
It seems as though I keep running into far more plugins than I thought existed... I have added a few additional links to the wiki to try to prevent them from sinking back into oblivion.

Offline mALA_cARA

  • Single posting newcomer
  • *
  • Posts: 3
Re: Creatin a setup.exe Intaller with C::B
« Reply #5 on: March 22, 2012, 04:03:43 am »
Thanks for all the answers, I really mean when I say that are very usefull to me. Something that I forget to mention is that my intention is to create one installer to Windows, another for Linux and the same for Mac (My Apps are going to be used my users without any special knowledge in programming and and computers.), so I thought...if C::B is CrossPlataform maybe it has any tool or pluging that solve everything with the same criteria (Sure, I´m not expecting one shoot tool). 
I was not aware about NSIS plugin...I´m going to follow your recomendation searching in forums.
Thanks again