You are here

[Outdated] Code::Blocks 8.02 Portable Dev Test 1

39 posts / 0 new
Last post
ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 12 months ago
Developer
Joined: 2006-12-06 18:07
[Outdated] Code::Blocks 8.02 Portable Dev Test 1

THIS IS NOW OUTDATED! See here instead https://portableapps.com/node/18671

Base App: Code::Blocks

Category: Development

About:
Code::Blocks is an open source IDE for development in the C++ language. It includes support for several compilers including Borland, MSVC, and MinGW.

Download CodeBlocks Portable 8.02 Development Test 1

Note: This initial release DOES NOT include the MinGW compiler, or any of the Code::Blocks plugins. The package will be updated to include MinGW, and a plugins pack will be created after I do a bit more personal testing of this. I also plan on including a wxWidgets library installation. That will take a bit more time to create.

Release Notes:
Development Test 1 (2008-07-10): Initial release

digitxp
digitxp's picture
Offline
Last seen: 13 years 3 months ago
Joined: 2007-11-03 18:33
Oh...

You're doing a plugin multi :P???

Insert original signature here with Greasemonkey Script.

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 12 months ago
Developer
Joined: 2006-12-06 18:07
Download link finally works

Download link finally works

The developer formerly known as ZGitRDun8705

CeremCem
Offline
Last seen: 15 years 5 months ago
Joined: 2008-07-13 18:24
MinGW is not needed to be included

Hi,

I'm using Code::Blocks for more than 3 months as portable. I just copied and pasted it into my thumbdrive, then override some environment variables.

According to my experiments, there is no need to include MinGW or SDCC at all. Because, these compilers can be copied and pasted into thumbdrive. Only thing to do is to start the menu or the IDE with a batch file and add the MinGW path to the %PATH% environment variable.

Advantage of this approach is that we could use these compilers with another IDE or another way (for example in another batch file). Also, we could update MinGW and/or SDCC (and/or any other compilers) separately. Last advantage is, the size will be reduced if any of the compilers are not included.

For example;

I use PStart as my portable menu. To use PStart, I made a batch file. It's not the whole file, but I give its stripped out version:

-- menu.bat --
@echo off

set MINGW_PATH=%~d0\Win32-Apps\Programming\MinGW\bin
set SDCC_PATH=%~d0\Win32-Apps\Programming\SDCC\bin
::
set COMPILERS=%MINGW_PATH%;%SDCC_PATH%

:: :::::::: There is nothing to alter below ::::::::
:: :::::::::::::::::::::::::::::::::::::::::::::::::

set PATH=%COMPILERS%;%PATH%
start %~p0\Win32-Apps\Menu\PStart.exe

--------------

As you can see above, whole applications that will run from the menu will "see" both the MinGW and SDCC compilers.

[EDIT]

User Template's are saving into the user's Application Data path (%appdata%\codeblocks\UserTemplates), isn't this edition modified to use relative paths?

I'm also interested in why did you choose to move default.conf file from Data/settings to App/CodeBlocks before running C::B? Couldn't default.conf file be used while it's located in Data/settings folder?

Also, DisableSplashScreen=true is not working in CodeBlocksPortable.ini file

[/EDIT]

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 12 months ago
Developer
Joined: 2006-12-06 18:07
I'll look into the issues

I'll look into the issues tomorrow.

No, the base application is not modified at all. I simply made a wrapper around it, and redirecting %APPDATA% does not work. CB uses the %USERPROFILE% environment variable to determine where %APPDATA% is, and because XP and Vista handle that path differently, issues could occur.

CodeBlocks can't read the settings file from an external directory, unless it's %APPDATA%, so it has to be moved to App/CodeBlocks

The developer formerly known as ZGitRDun8705

CeremCem
Offline
Last seen: 15 years 5 months ago
Joined: 2008-07-13 18:24
I know that Code::Blocks

I know that Code::Blocks doesn't look for %appdata%, but it looks for %userprofile%\"Application Data"; that's why Code::Blocks must be recompiled to get over this issue.

Otherwise, we need to override %userprofile% environment variable as Data, so this brings more problems such as: %userprofile%\Desktop can not be found (as expected).

If we have a chance to make some symbolic links where we love to do on Linux, Desktop directory could be redirected to another location or could be created every startup to point real %userprofile%\Desktop folder. (I prefer redirecting it to \Masaüstü folder which is my desktop folder on the thumdrive.)

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
You know, every time I decide

You know, every time I decide to try something new, I always find a portable version of what I need right here at PortableApps.com

Zach, I thank you.,
And the new PAMBot thanks you as well.

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

learn2laugh
Offline
Last seen: 11 months 6 days ago
Joined: 2007-01-30 20:26
Cool.

I will check this out, see if I run into any troubles. Thanks for the work on this one!

---
Jeffrey Wiggs
Loving God and Learning Laughter

learn2laugh
Offline
Last seen: 11 months 6 days ago
Joined: 2007-01-30 20:26
Looks good here, but...

I seem to recall seeing an uninstall program still in it. That could be deleted. I haven't been near my computer lately, so no extensive testing yet. Let's hope for some free time here in the next little bit. Thanks again for the work on this.

---
Jeffrey Wiggs
Loving God and Learning Laughter

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
Saved data to %appdata% on

Saved data to %appdata% on the host computer.
Source doesn't indicate a redirection.

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 12 months ago
Developer
Joined: 2006-12-06 18:07
redirection not used. if

redirection not used. if default.conf is present in codeblocks dir, data should be saved to codeblocks dir. redirection will not work correctly because codeblocks uses %USERPROFILE% rather than %APPDATA%, and this will create different paths on XP and Vista and cause errors.

The Code::Blocks team was very unhelpful in figuring out a solution

The developer formerly known as ZGitRDun8705

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
ah . . . It still didn't

ah . . .

It still didn't work- I've got the file on my computer.

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 12 months ago
Developer
Joined: 2006-12-06 18:07
it may be an issue with the

it may be an issue with the plugins. i tested it with no plugins, and it worked as expected on my machine. if it's a plugins issue, there's not much i can do. when i asked in the Code::Blocks forums, they basically said its up to the individual plugin developers to make it work right.

The developer formerly known as ZGitRDun8705

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
no plugins

no plugins
defualt install.

I'm going to download it again to make double sure.
******
*EDIT*
******
It appears that I'm an idiot

It doesn't show up here.

Buit it is on another pc

Maybe I deleted something I shouldn't have . . .

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

CeremCem
Offline
Last seen: 15 years 5 months ago
Joined: 2008-07-13 18:24
C::B Portable works behind

Hi,

Sometimes CodeBlocks start working behind. In these situations I open the task manager (Ctrl+Alt+Del) and right click on CodeBlocks, select "Bring front" (or something like that) (the second option starting on top of the context menu).

Why could this happen?

k52ooo
Offline
Last seen: 16 years 4 months ago
Joined: 2008-08-22 07:05
Do not save & restore Setting!

This program do not save and restore Setting.
I installed this program and MinGW compiler in my usb-hdd.
And I Changed Compiler Setting to the path of MinGW in my usb-hdd.
But after closing program, there was default.conf in '%APPDATA%\' and
the thing I changed is not reflected in Data\setting\defalut.conf.

....

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 12 months ago
Developer
Joined: 2006-12-06 18:07
i know. i can't seem to

i know. i can't seem to resolve the issue. if another developer wishes to take this portable project over, or offer some input, that would be great.

The developer formerly known as ZGitRDun8705

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
I suspect it has to do with

I suspect it has to do with the creating new project files.

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

k52ooo
Offline
Last seen: 16 years 4 months ago
Joined: 2008-08-22 07:05
for Using relative path in the Compiler path

Cannot use relative path for Compiler path.
So problem is complex. Before, I thought this problem.

That time the Location of Code::Blocks whi changed from registry to XML
config file.

I thought that portable launcher change the reg file of Code::Blocks,
but the location of configuration was changed to XML file.
So, I gave up because I can't manipulate XML file with programming and
NSIS have the function of manipulating xml.

Portable launcher need relative path but Code::Blocks doesn't support it.
Cannot make perfect method because Code::Blocks doesn't support relative path.
but there are non-perfect 2 methods.
1. Use the variable of Code::Blocks $(APP_PATH) in the toolchain path.
2. Use Windows Environment Variable like the opinion of CeremCem.
The variables that can be used in Code::Blocks :
http://wiki.codeblocks.org/index.php?title=Variable_expansion

....

roamer
roamer's picture
Offline
Last seen: 15 years 3 weeks ago
Joined: 2007-02-21 16:01
Woot! I'm testing this!

I need a good c++ ide portable...

OliverK> you don't live on a cow
IRC: It brings out the best in all of us...Especially when tired.

CeremCem
Offline
Last seen: 15 years 5 months ago
Joined: 2008-07-13 18:24
Workaround for %AppData%

Hi,

I'm currently using C::B with a batch script to override %userprofile% environment variable. In this manner, I can use C::B (and my other portable applications as well) without leaving any trace or important data on host computer. I offer this workaround to be implemented by default in C::BPortable. Here the code is:


set oldUserProfile=%userprofile%
set oldAppData=%appdata%
set UserProfile=%~dp0\UserProfile
set AppData=%UserProfile%\"Application Data"
if not exist %UserProfile%\. (
mkdir %UserProfile%
mkdir %AppData%
mkdir %UserProfile%\"Desktop"
echo laylaylay... > %UserProfile%\Desktop\"THIS IS NOT REAL DESKTOP.txt"
)

the oldEnvironmentVariable's are used for restoring the variable's values on exit.

[EDIT]
If you do so, when you want to open or save a file from/to desktop, you will use the Desktop folder under UserProfile folder. So, I'm working on NTFS junction points. In fact, this workaround is more suitable for me, because I prefer using my desktop folder on the portable device. However, the junction thing may add some useful features.
[/EDIT]

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 12 months ago
Developer
Joined: 2006-12-06 18:07
Thanks for this. I'll check

Thanks for this. I'll check into it and see if I can get a working solution

The developer formerly known as ZGitRDun8705

CeremCem
Offline
Last seen: 15 years 5 months ago
Joined: 2008-07-13 18:24
How are we?

How are we? What is current progress?

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 12 months ago
Developer
Joined: 2006-12-06 18:07
Nothing new. School has

Nothing new. School has pretty much taken over my life lately

The developer formerly known as ZGitRDun8705

crazy2be
Offline
Last seen: 14 years 6 months ago
Joined: 2008-08-22 20:56
I made this post on the old thread...

That i found using google. well, here is my solution.
you can use the ProcessStartInfo Method (http://msdn.microsoft.com/en-us/library/system.diagnostics.processstarti...)
Ofcourse, that requires you make an actual program to launch it, not just an NSIS script.
Hope to see one out soon!
-Crazy2be

cengbrecht
cengbrecht's picture
Offline
Last seen: 15 years 11 months ago
Joined: 2008-12-18 01:59
What about compiling it from source?

You should be able to change all the info you are having problems with in the source can you not?
I mean it has it right on the downloads page?
I could do some code sniffing if you want?

Edit: Sorry I don't know if you are already working on this or not...?
I am also definitely testing this out!! bringing C++ Learning book tomorrow!!

E=MC²

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
APPDATA stuff

There's a long story to the app data stuff. It's to do with a ShGetFolderLocation call. USERPROFILE and APPDATA must both be set, with APPDATA being the appropriately named subdirectory of USERPROFILE - which varies from PC to PC, by language and OS version. Otherwise it returns nothing.

I would suggest that you look at how I finally conquered the identical problem in the source code of my Inkscape Portable. It solves the problem by renaming before and renaming after.

I'm just about to start using Code::Blocks for a (hush hush) secret project (look on the IRC logs if you want to know what it is :P, so I may actually fix up your launcher for you and post the code back here if you like.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 12 months ago
Developer
Joined: 2006-12-06 18:07
If you want to fix up the

If you want to fix up the launcher, feel free. Even now with being on winter break from school, i still don't have as much free time as i'd hoped.

The developer formerly known as ZGitRDun8705

notsure
Offline
Last seen: 10 years 9 months ago
Joined: 2007-02-10 13:09
Development

Is there still someone currently working on this project? I'd love to see a C++ environment out there with a form designer.

Dagenham
Dagenham's picture
Offline
Last seen: 1 year 12 months ago
Joined: 2007-03-23 06:19
wxDev-C++

Try wxDev-C++ (http://wxdsgn.sourceforge.net/). To launch in portable mode, use the -c path_to_your_desired_config_directory command line switch.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
I'm doing that too.

Thanks for providing me with quick info about config location redirection! It'll save me some time looking through the source code Smile

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Me

I'd like to take it over, I've been working on it and am just about ready to publish it. I just need to have a look at its source code and see if there's another way to redirect settings, and also test it with my complex APPDATA redirection technique; the file selection dialogs may crash with it (known bug about which nothing much can be done). I'll need to look through the source code to check how it can be best done though. I'll report back soon.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

horusofoz
horusofoz's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2008-04-03 22:45
Hi Chris

Sorry to post OT but can you assist jammiii in his work on a launcher for Picasa. He's using something from your APPDATA redirection script for redirecting something about the environmental variables that Picasa uses (Sorry but evidently this sort of thing is way beyond my level of knowledge).

Thanks

PortableApps.com Advocate

notsure
Offline
Last seen: 10 years 9 months ago
Joined: 2007-02-10 13:09
wait

Chris, please keep up what you are doing. I was hoping to find Dev-C++ out here somewhere, so to find a form designer as well is even better. Looking forward to seeing it up sometime!

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 12 months ago
Developer
Joined: 2006-12-06 18:07
Code::Blocks does support a

Code::Blocks does support a profile redirection command, however, using this method may not work for the settings of some plugins. Only an APPDATA redirect will be sure to catch everything. (I asked in their forums when i first started this, and they basically told me i was SOL ensuring everything was saved correctly unless i could get the appdata redirect working)

Check out this forum post I just found over there
http://forums.codeblocks.org/index.php/topic,4475.msg43203.html#msg43203

It's an older post and says it's for the nightly builds, but it should work just fine in the current release

The developer formerly known as ZGitRDun8705

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Not proper

That's just what I'm doing - APPDATA redirect; except I'm doing it properly, what they do would only work on XP English.

It uses the wxWidgets wxStandardPaths::Get().GetUserDataPath() call for its setting path, which will use USERPROFILE and APPDATA (the complex method)

However, I've found another solution from the source code, namely personalities; you can pass codeblocks.exe a -p switch, e.g. codeblocks.exe -p codeblocksportable, and then it'll use APPDATA\codeblocksportable, instead of APPDATA\codeblocks, and so that way there'll be no clash with a local one; move it from the USB disk to APPDATA\codeblocksportable, run it with -p codeblocksportable, and then move it back.

I'm still testing though, and need to see how it responds to a total APPDATA redirect. If the file selection dialogs cope OK, which I don't think they will ("Desktop" may make it crash, and probably won't respond properly), then I'll do APPDATA Redirect, otherwise a custom personality and moving back and forth.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

evstevemd
Offline
Last seen: 13 years 4 months ago
Joined: 2007-07-31 06:37
Waiting to See Code blocks

I have been using it for some times. I don't like its behaviour of Questioning me every time about configurations. I hope Chris will fix this!

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
APPDATA redirection no go

Having now tested it, total APPDATA redirection causes the Windows file selection (open/save) dialogs to just not open on Windows 2000. And it's unlikely to be any better on newer OSes (I can't be bothered testing it on this XP machine).

What I'm doing now with it is the move-move technique. I'm just finishing off my testing of it, should publish it soon. Currently I'm testing and working out MinGW32 compatibility - I think I may publish my Code::Blocks DT when I publish my MinGW32 Portable DT package.

New features include MinGW32 handling, multiple personality support through the INI, including directing Code::Blocks to select which personality. If you don't know what a personality is, think of it as a profile as in Firefox.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
New version

OK, I've now finished and uploaded my new version of Code::Blocks Portable.

Code::Blocks Portable 8.02 Development Test 2

Should this topic be locked?

ZachHudock: could you please add a note in the content of the page, that it has been superseded?

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Topic locked