Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Portable Code::Blocks

<< < (5/19) > >>

ollydbg:

--- Quote from: Biplab on April 16, 2009, 05:37:59 pm ---@Rokan,

I haven't tried this. But having a complete development environment should be nice to many users. Thanks for sharing this.


@OllyDbg,

So far CbLauncher does the similar thing before launching Code::Blocks. Assuming the batch file is error free, you do not need CbLauncher.exe v0.1.1 to make C::B portable. You can use this batch file.

--- End quote ---

Thanks for the quick response. :D I will try it.

By the way, comparing a batch file with a exe file, I do prefer the former one, because it can be easily add to trunk. :D

Biplab:

--- Quote from: ollydbg on April 16, 2009, 05:44:24 pm ---By the way, comparing a batch file with a exe file, I do prefer the former one, because it can be easily add to trunk. :D

--- End quote ---

You are forgetting that exe file has a corresponding source file which should not be difficult to add to trunk. Nobody will add a exe file to trunk unless absolutely necessary.

ollydbg:

--- Quote from: Biplab on April 16, 2009, 05:50:57 pm ---
--- Quote from: ollydbg on April 16, 2009, 05:44:24 pm ---By the way, comparing a batch file with a exe file, I do prefer the former one, because it can be easily add to trunk. :D

--- End quote ---

You are forgetting that exe file has a corresponding source file which should not be difficult to add to trunk. Nobody will add a exe file to trunk unless absolutely necessary.

--- End quote ---

Oh, yes. I really forget that. :D
I notices that there is an DLL file named "exchndl.dll" in the trunk\src\, I'm not sure why we need this file :shock:.

Biplab:
exchndl.dll is used generate crash report for Code::Blocks on Windows.

rokan1:

--- Quote from: ollydbg on April 16, 2009, 05:29:50 pm ---
Thanks.
My question is:
Do I need the "CBLuncher.exe" supplied by BipLab to run CB?
Or I just type codeblocks.exe  as you said?

Thanks. :D

--- End quote ---

No, you do not need CBLuncher.exe and all that jazz, just unpack standard codeblocks  (eg from nightly builds) to /codeblocks directory on USB

I have found a bug in codeblocks: It does not use APPDATA to store various .ini files, instead it uses hard-codded "Application Data" subdirectory within users directory, which causes messing the root (on USB) with various files. As a work-arround I have modified the directories on USB to look like "standard windows" ones (although I prefer short unix-like ones where you do not need to type quotes to get around that stupid spaces). The script launches codeblocks.exe and also command prompt with all variables set - where you can eg launch real bash shell from msys by typing "sh". Here is modified script expecting MinGW, msys, and codeblocks directories as before:


--- Code: ---
@echo off


echo Setting environment variables and checking for directories availability:
:: Get the current batch fille drive and set it as homedrive
for %%x in (%0) do set HOMEDRIVE=%%~dsx
set HOMEDRIVE

:: Set user as USERNAME
set USERNAME=user
set USERNAME


:: Set \Documents and Settings\%USERNAME% as HOMEPATH and assure the directory exists
set HOMEPATH=\Documents and Settings\%USERNAME%
set HOMEPATH
mkdir "%HOMEDRIVE%%HOMEPATH%"
mkdir "%HOMEDRIVE%%HOMEPATH%\Desktop"

:: Set %HOMEDRIVE%%HOMEPATH% as USERPROFILE
set USERPROFILE=%HOMEDRIVE%%HOMEPATH%
set USERPROFILE



::set "%HOMEDRIVE%%HOMEPATH%\Application Data" as APPDATA
set APPDATA=%HOMEDRIVE%%HOMEPATH%\Application Data
mkdir "%APPDATA%"
set APPDATA



:: Set %HOMEDRIVE%\home\All Users as ALLUSERSPROFILE and assure it exists
set ALLUSERSPROFILE=%HOMEDRIVE%\Documents and settings\All Users
mkdir "%ALLUSERSPROFILE%"
mkdir "%ALLUSERSPROFILE%\Application Data"


echo Preppending %HOMEDRIVE%\MinGW\bin;%HOMEDRIVE%\msys\1.0\bin;%HOMEDRIVE%\codeblocks to the PATH
set PATH=%HOMEDRIVE%\MinGW\bin;%HOMEDRIVE%\msys\1.0\bin;%HOMEDRIVE%\codeblocks;%PATH%

start codeblocks.exe

cmd.exe


--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version