Portable CodeLite + MinGW + wxWidgets (Windows)

General questions regarding the usage of CodeLite
User avatar
eranif
CodeLite Plugin
Posts: 5767
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Portable CodeLite + MinGW + wxWidgets (Windows)

Postby eranif » Fri Mar 26, 2010 3:44 am

Using trunk version of codelite (or any build > 3984), you can make a *fully* portable version codelite (including MinGW/wxWidgets)

How to achieve that?

First install codelite with the wxWidgets + MinGW package (or you can choose to install only MinGW or without MinGW)

Make sure that you install MinGW and / or wxWidgets under the same directory that you have selected for codelite itself so they will all have a common root directory

For the example, I have installed codelite under the following paths:
CodeLite : C:\Program Files\CodeLite
MinGW : C:\Program Files\CodeLite\MinGW-4.4.1
wxWidgets:C:\Program Files\CodeLite\wxWidgets-2.8.10

Next, we need to update some environment variables:

  • Start codelite on your local machine
  • Open the environment variable dialog - you should now see a new environment variable named $(CodeLiteDir) - this environment points to codelite installation path (in our example: C:\Program Files\CodeLite)
  • First, we need to add codelite installation path to the PATH environment variable, we also want to add the MinGW bin's directory + wxWidgets DLL path, so copy / paste the following into the env variables dialog:

    Code: Select all

    PATH=$(CodeLiteDir);$(CodeLiteDir)\MinGW-4.4.1\bin;$(CodeLiteDir)\wxWidgets-2.8.10\lib\gcc_dll;$(PATH)
  • (If you dont want wxWidgets, you can skip this step) For the wx-config tool to work properly, we need to set/update the environment variables WXCFG and WXWIN

    Code: Select all

    WXCFG=gcc_dll\mswu
    WXWIN=$(CodeLiteDir)\wxWidgets-2.8.10

So, you should end up with environment variables (for the 'Default' set, or any other set you might want to choose) similar to this:

Code: Select all

CodeLiteDir=\some\path\to\codelite
PATH=$(CodeLiteDir);$(CodeLiteDir)\MinGW-4.4.1\bin;$(CodeLiteDir)\wxWidgets-2.8.10\lib\gcc_dll;$(PATH)
WXCFG=gcc_dll\mswu
WXWIN=$(CodeLiteDir)\wxWidgets-2.8.10


Note that the environment variable order DOES MATTER:
In order to use the CodeLiteDir environment variable, it must be defined FIRST (so it will be recognized later)

You can now copy the entire codelite directory into your USB stick and you are ready to go!

Note:
The environment variable CodeLiteDir will be updated automatically whenever you start codelite - so there is no need to modify it by hand.

Eran
Make sure you have read the HOW TO POST thread
evstevemd
CodeLite Guru
Posts: 329
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Portable CodeLite + MinGW + wxWidgets (Windows)

Postby evstevemd » Fri Mar 26, 2010 10:37 am

I will make launcher for compatibility with portableapps.com
Thanks for Making CL portable
CodeLite 12.x
CodeLite is awesome, I just Love it!
User avatar
aprilmot
CodeLite Enthusiast
Posts: 24
Joined: Sun Jul 04, 2010 1:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Portable CodeLite + MinGW + wxWidgets (Windows)

Postby aprilmot » Thu Jul 29, 2010 9:27 pm

Can I have only Codelite as portable. I dont want to have MinGW and wxWidget
Thank you
Aprilmot
Long Live the Open Source and Humanity
evstevemd
CodeLite Guru
Posts: 329
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Portable CodeLite + MinGW + wxWidgets (Windows)

Postby evstevemd » Mon Aug 09, 2010 4:39 pm

aprilmot wrote:Can I have only Codelite as portable. I dont want to have MinGW and wxWidget
Thank you
Aprilmot


Just follow Instruction and leave out section for wxWidgets and Mingw.
I'm curious though how are you going to compile your sources :shock:
CodeLite 12.x
CodeLite is awesome, I just Love it!
hekfan
CodeLite Curious
Posts: 3
Joined: Fri Nov 27, 2009 5:06 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Portable CodeLite + MinGW + wxWidgets (Windows)

Postby hekfan » Wed Sep 12, 2012 5:57 am

"Double click on the file wxcrafter.wxcp and you the designer should open on a new tab labeled [wxCrafter]. "
But I get a text view:
{
"metadata": {
"m_generatedFilesDir": "",
"m_objCounter": 9,
"m_includeFiles": [],
"m_bitmapFunction": "wxC9ED9InitBitmapResources",
"m_bitmapsFile" : "wxcrafter_bitmaps.cpp"
},
"windows": [{
...

Why?
I install codelite-4.1.5770-mingw4.6.1-wx2.9.4.exe on WinXP SP3
User avatar
eranif
CodeLite Plugin
Posts: 5767
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Portable CodeLite + MinGW + wxWidgets (Windows)

Postby eranif » Wed Sep 12, 2012 9:44 am

hekfan wrote:"Double click on the file wxcrafter.wxcp and you the designer should open on a new tab labeled [wxCrafter]. "

I am not sure where did you get this quote from ...

But, wxCrafter is not distributed with the official codelite as this post mentions http://forums.codelite.org/viewtopic.php?f=9&t=1813 (its a sticky post, that exists in *all* the sub-forums of codelite)
If you wish to join the beta - just send me a PM and I will add you to wxCrafter's forum group (by becoming a wxCrafter forum member, you will be able to access wxCrafter forum + download link)

Eran
Make sure you have read the HOW TO POST thread
Hydaral
CodeLite Curious
Posts: 1
Joined: Tue Oct 30, 2012 6:38 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Portable CodeLite + MinGW + wxWidgets (Windows)

Postby Hydaral » Wed Oct 31, 2012 3:35 am

eranif, do you have any updated instructions for this?

I just tried with v4.1.5770 and it does not work. Whatever I do, CodeLite always reads the configuration from %AppData%.

Even when I move the config files into the CodeLite directory, it doesn't even check first to see if the files are there, it just goes straight ahead and creates new ones in %AppData%.
Quark66
CodeLite Curious
Posts: 5
Joined: Mon Feb 04, 2013 1:58 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Portable CodeLite + MinGW + wxWidgets (Windows)

Postby Quark66 » Thu Feb 07, 2013 3:56 am

Hydaral wrote:eranif, do you have any updated instructions for this?

I just tried with v4.1.5770 and it does not work. Whatever I do, CodeLite always reads the configuration from %AppData%.

Even when I move the config files into the CodeLite directory, it doesn't even check first to see if the files are there, it just goes straight ahead and creates new ones in %AppData%.

.. the same situation: CodeLite 5.0.6213 OS:WIN7/64
Everything OK, no bug, no problems, speed of light + 10% :-) ... But I still fight with "portability" of installation. CodeLite still use %AppData% variable from win registry for reading, creating and saving configuration (e.g. hotkeys and language...).

I tried to make a bat file with:

Code: Select all

set PATH=%PATH%;\PortableApps\CodeLite\MinGW-4.7.1\bin;\PortableApps\CodeLite
set APPDATA=%~d0\PortableApps\CodeLite
set CodeLiteDir=%~d0\PortableApps\CodeLite
rem echo  < %~d0 >     -->this is my disk, sometime J:, somteime E:, F:..depends on PC.
\PortableApps\CodeLite\codelite.exe

And variable APPDATA (pointing to my flash disk) does not mean anything... When I start CL and "hardly" delete C:\users\..\Roaming\CodeLite directory (or do it read only) after the ending of CL is singing: "error 5, canot write to C:..."
Is possible to disable this CL IDE feature?

I study codelite.cpp source from GIT and I found only one thing: if I rename codelite.exe to codelite1.exe for example, than CL build directory %APPDATA%/codelite1/.. others are same.
There is function wx.GetUserDataDir () returns the directory for the user-dependent application data files: $HOME/.appname under Unix, c:/Documents and Settings/username/Application Data/appname under Windows and ~/Library/Application Support/appname under Mac
bla bla bla.. and I dont know how to s:ay "Codelite, my darling, i need to use FLASH drive current directory and subdir for your config files..."

So if someone can help I will be very happy 8-) . Maybe some switch, maybe some environment variable... Or compile new CodeLite.exe from slightly modif. source?
M.Kučera
User avatar
eranif
CodeLite Plugin
Posts: 5767
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Portable CodeLite + MinGW + wxWidgets (Windows)

Postby eranif » Thu Feb 07, 2013 10:34 am

It does not work.
Please submit a feature request and I will work on it.
Requests on the forums tends to get lost...

Eran
Make sure you have read the HOW TO POST thread
edison
CodeLite Curious
Posts: 2
Joined: Tue Sep 23, 2014 9:21 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Portable CodeLite + MinGW + wxWidgets (Windows)

Postby edison » Tue Sep 23, 2014 11:28 am

The CC does not work in my settings:
Snap22.png

Snap23.png

Snap25.png


My compiler is MinGW-w64 4.2 GCC 4.9.1 posix dw2 i686 Rev1 (install by MinGW-w64 Installer), its installstation path is g:\codelite\mingw (the $(CodeLiteDir)\MinGW ).
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 14 guests