Page 1 of 1
Is CodeLite Portable?
Posted: Wed Feb 18, 2009 11:40 pm
by milkman82
Hey I just found about about this IDE and tested it on a virtual machine it seems very robust.
I am trying to find a IDE I can stick on a USB stick and take with me. I am wondering if anyone's tried that with CodeLite. I am currently using Code::Blocks but It's kinda buggy.
Thanks in advance!
Re: Is CodeLite Portable?
Posted: Wed Feb 18, 2009 11:43 pm
by eranif
You can copy the entire installation directory (e.g. C:\Program Files\CodeLite\) onto a USB stick and it will work fine.
On Linux, this might be more tricky (you need the entire WX libraries and other shared object, just try and run ldd on codelite)
Eran
Re: Is CodeLite Portable?
Posted: Thu Feb 19, 2009 6:59 am
by milkman82
It runs okay from the USB drive but I also run the MinGW compiler from my USB drive but I can't figure out how to point CodeLite to the gcc/g++ file on my USB drive.
Re: Is CodeLite Portable?
Posted: Thu Feb 19, 2009 10:29 am
by eranif
Lets assume that your USB driver name is E:\, and the MinGW tools are located at E:\MinGW\bin
Define new environment variable (settings -> environment variable) USB_MINGW with value E:\MinGW\bin
In the tool chain of the 'gnu g++' compiler add $(USB_MINGW)/ to every tool in the Tools entry (the toolchain is set in 'settings -> build settings -> gnu g++ -> Tools'):
So instead of the Compiler Name: g++, you should now have Compiler Name: $(USE_MINGW)/g++ and so on)
Change the Make tool set in 'settings -> build settings -> build systems -> Build Tool' into $(USB_MINGW)/mingw32-make.exe
From this point on codelite will search for the tools set in the $(USB_MINGW). To point it to another location, simply change the value of USB_MINGW
EDIT:
It will probably be a good idea to do this for the 'gnu gcc' compiler as well
Eran
Re: Is CodeLite Portable?
Posted: Sat Feb 21, 2009 12:34 am
by milkman82
It's not letting me build. Giving me this error:
----------Build Started--------
"G:\PortableApps\CodeLite\MinGW-3.4.5\bin\/mingw32-make.exe " -j 2 -f "Portable_wsp.mk"
----------Building project:[ School_Project - Debug ]----------
/usr/bin/sh: G:PortableAppsCodeLiteMinGW-3.4.5bin: command not found
mingw32-make[1]: *** [Debug/Testing_Part_Deux.o.d] Error 127
mingw32-make.exe : *** [All] Error 2
----------Build Ended----------
0 errors, 0 warnings
EDIT: I also tried after moving MinGW to the base directory and remapping the Environment Variable. It didn't make any difference.
EDIT#2: Well I messed around with it some more and it seems it wants forward slashes when you define USB_MINGW, so it'd be G:/MinGW3.4.5/bin in my case. That seemed to improve it, but its still not compiling. It says it can't find my source.
----------Build Started--------
"G:/MinGW-3.4.5/bin/mingw32-make.exe " -j 2 -f "School_Project.mk" ./Debug/Testing_Part_Deux.o
----------Building project:[ School_Project - Debug ] (Single File Build)----------
G:/MinGW-3.4.5/bin/g++ -c "G:/PortableApps/CodeLite/Portable/School_Project/Testing_Part_Deux.cpp" -g -o ./Debug/Testing_Part_Deux.o "-I."
g++.exe: G:/PortableApps/CodeLite/Portable/School_Project/Testing_Part_Deux.cpp -g: No such file or directory
g++.exe: no input files
mingw32-make.exe : *** [Debug/Testing_Part_Deux.o] Error 1
----------Build Ended----------
0 errors, 0 warnings
I definitely have this file at that location on my USB though.
Re: Is CodeLite Portable?
Posted: Sat Feb 21, 2009 4:25 am
by eranif
g++.exe: G:/PortableApps/CodeLite/Portable/School_Project/Testing_Part_Deux.cpp -g: No such file or directory
I wonder why the -g is included in the file name...
Have you tried running this command from the CMD shell:
Code: Select all
G:/MinGW-3.4.5/bin/g++ -c "G:/PortableApps/CodeLite/Portable/School_Project/Testing_Part_Deux.cpp" -g -o ./Debug/Testing_Part_Deux.o "-I."
Are you using MSYS? (/usr/bin/sh) - in any case try setting (within codeite) environment variable name SHELL with value set to CMD.EXE (settings -> environment variables...)
Eran
Re: Is CodeLite Portable?
Posted: Sat Feb 21, 2009 4:35 am
by milkman82
I just tried putting it directly in the command line, this is what I got:
Code: Select all
C:\>
C:\>
C:\> G:/MinGW-3.4.5/bin/g++ -c "G:/PortableApps/CodeLite/Portable/School_Proj
ect/Testing_Part_Deux.cpp" -g -o ./Debug/Testing_Part_Deux.o "-I."
G:/PortableApps/CodeLite/Portable/School_Project/Testing_Part_Deux.cpp:10:2: war
ning: no newline at end of file
Assembler messages:
FATAL: can't create ./Debug/Testing_Part_Deux.o: No such file or directory
C:\>
Up, nevermind it worked(Adding SHELL-CMD.exe)! I got it to run with expected output. Thanks a ton! BTW, what's MSYS?
Re: Is CodeLite Portable?
Posted: Sat Feb 21, 2009 4:37 am
by eranif
It looks like it is working from the command line (ignore the assembler message)
Have you tried setting the SHELL environment variable to CMD.EXE like I suggested?
Eran
Re: Is CodeLite Portable?
Posted: Sat Feb 21, 2009 4:39 am
by milkman82
Yeah it worked sry should have tried that before posting.