Author Topic: unarchive rather than install?  (Read 3624 times)

Offline boykobb

  • Single posting newcomer
  • *
  • Posts: 5
unarchive rather than install?
« on: November 26, 2008, 05:32:06 pm »
Hello all!

This is a question to the developers of CB.
Is it possible to distribute CB for Windows in the form of an archive rather than an installation file?
I would like to use CB as one of the environments offered in programming competitions in my country (the other one being DJGPP; currently we use it and Dev-C++, but CB is much better than Dev-C++ and actively developed).
Having CB as an archive would allow me to place it in a directory of my choice, and to automate the installation through a .bat file.  Automatic de-installation would also be possible, as all that would be needed is a removal.   Neither of these is currently possible.
Using simply an archive would also avoid messing with the Windows registry when installing and de-installing, and would allow moving CB if necessary.

Note, by the way, that at present the following bug is observed in that respect.  If I install CB on a computer where there is, or there was, Dev-C++, CB would try to use the gcc from Dev-C++, even if I use the CB installer that includes its own gcc, and even if Dev-C++ and its gcc no more exist on the computer.  I know how to set CB to find its own compiler afterwords, but that requires a separate action each time I install on a different computer.  Apparently, this is a bug in both Dev-C++ and CB, related to both using the registry: one does not clean up properly after itself, the other lacks self-dependence.

Thank you,
   Boyko

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: unarchive rather than install?
« Reply #1 on: November 26, 2008, 05:49:31 pm »
Just pack up the contents of the installation directory. C::B itself doesn't need any registry keys. You could also copy over the contents of <User>\Application Data\codeblocks (C::B's settings) first if you wanted.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: unarchive rather than install?
« Reply #2 on: November 26, 2008, 06:10:07 pm »
Or use a nightly build.
They don't have an installer and have some bugfixes and improvements compared to the 8.02-release. There might be new bugs, of course, but they are normally very stable.

Offline boykobb

  • Single posting newcomer
  • *
  • Posts: 5
Re: unarchive rather than install?
« Reply #3 on: November 27, 2008, 10:30:36 pm »
Thanks for suggestions.
I copied default.conf to C::B's main directory and edited it to set GCC's MASTER_PATH to $(CODEBLOCKS)\MinGW, so C::B can now be placed anywhere and still find its gcc.
I believe that is a good default for C::B in general.  Also, perhaps it would be better if Toolchain executables -> Auto-detect wrote this relative path rather than setting an absolute one.

Regards,
   Boyko