Author Topic: Problem creating a portable version of the 14.02.09 nightly build  (Read 4194 times)

Offline dave.berk

  • Single posting newcomer
  • *
  • Posts: 8
Hi

1. I'm trying to create a portable version of CodeBlocks (20091402 night build). Unfortunately the directives here do not work. Even though I copied the %APPDATA%\codeblocks folder content to the program directory, a folder named codeblocks is still created in the %APPDATA% directory on every run of the program :(...

2. I'm trying to create a folder inside the program directory that will serve as a default project folder. How do I go about making it the default folder inside codeblocks without hard coding its location?

Thanks a lot
Dave

EDIT: it also keep trying to save workspace changes to the config file in %APPDATA%\codeblocks which doesn't exist and not the config file in the program directory.
« Last Edit: March 17, 2009, 07:36:35 pm by dave.berk »

Offline zac

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Problem creating a portable version of the 14.02.09 nightly build
« Reply #1 on: March 18, 2009, 01:25:32 am »
Dear Dave,

I think there is some plugins within CB not honour for the portable settings and so, still leave info in the application folder. You may try the following batch file settings. Most times it works for me, but sometimes not.

You need to create a batch file, e.g. codeblocks.bat, paste the following contents into the file and save it under the application folder of CB, the one with codeblocks.exe.

:: codeblocks.bat - begin
@ECHO OFF
setlocal
set USERPROFILE=%~dp0settings
mkdir "%USERPROFILE%"

:: :: For Vista or above
:: mkdir %USERPROFILE%\AppData
:: For Windows 2000 and XP
mkdir %USERPROFILE%\"Application Data"

START /D"%~dp0" codeblocks.exe %*
endlocal
:: codeblocks.bat - end

zac

Offline dave.berk

  • Single posting newcomer
  • *
  • Posts: 8
Re: Problem creating a portable version of the 14.02.09 nightly build
« Reply #2 on: March 18, 2009, 08:11:09 am »
Thanks, zac.

Anything about point 2?

Dave

Offline zac

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Problem creating a portable version of the 14.02.09 nightly build
« Reply #3 on: March 18, 2009, 07:06:46 pm »
Sorry Dave,

I've no idea about this.

Regards,

zac