News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

unarchive rather than install?

Started by boykobb, November 26, 2008, 05:32:06 PM

Previous topic - Next topic

boykobb

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

TDragon

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.
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Jenna

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.

boykobb

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