Building codelite from sources (Windows)

CodeLite installation/troubleshooting forum
stahta01
CodeLite Enthusiast
Posts: 39
Joined: Thu Dec 29, 2011 10:07 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building CodeLite - Last Hope

Post by stahta01 »

https://github.com/eranif/codelite/pull/2794

Submitted PR with what is the fix in my opinion for the OP problem.

Tim S.

zzz7net

Re: Building CodeLite - Last Hope

Post by zzz7net »

Finally everything worked out!
It seems the solution is updating CodeLite from version 15.0.0 to 15.0.6.

Though, I did not reach my goal —
to make the CodeLite look like a normal application
with a Windows GUI.

After building the CodeLite 15.0.7 only scrollbar controls looks native.
If you will open official wxWidget website you'll see the following:

wxWidgets gives applications a truly native look and feel because
it uses the platform's native API rather than emulating the GUI

Yes, you can find amd64.manifest file in the wxWidget include folder.
But I don't have the information on how to use it for the building
a native Windows CodeLite UI. If you do, please share.

You do not have the required permissions to view the files attached to this post.
zzz7net

Re: Building codelite from sources (Windows)

Post by zzz7net »

Here is an instruction that you can use

CodeLite Building Guide

! «Microsoft Windows»

% Prepare a working environment

• Download and install MSYS2 (https://www.msys2.org)
If this is first time running of MSYS2:

• Start by executing msys2_shell.cmd
It will create the files and settings necessary for it
to function properly. After this initial run you MUST
restart MSYS2 so that the settings are correct.

• Run "MSYS2 MSYS" from Start menu.
Then you can update the package database and base packages
to their latest versions. MSYS2 comes with a ported version
of the 'Pacman' (package manager known from Arch Linux).
Unless your setup file is very recent, it will take two steps:

  • Enter the following command: pacman -Syu
  • Update the rest of the packages: pacman -Su

• Now MSYS2 is ready for you. You will probably want to
install both GCC and Clang compilers along with other
base tools as described here:

Code: Select all

pacman -S mingw-w64-x86_64-toolchain
pacman -S mingw-w64-clang-x86_64-toolchain
pacman -S mingw-w64-x86_64-cmake
pacman -S --needed base-devel
pacman -S unzip
pacman -S git

• Finally, consider adding the MinGW and/or Clang <bin>
subdirectory to your Windows PATH environment variable.

Code: Select all

~\msys\mingw64\bin;
~\msys\clang64\bin;

! «Other things to note with MSYS2»

• In order to copy/paste in MSYS2 shell,
use the [Ctrl/Shift] + [Insert] keys

• Once you’ve installed the 'man pages' you can use
[man pacman] command to read up on some of its options.

• To start building using the mingw-w64 GCC,
close "MSYS2 MSYS" and run "MSYS MinGW 64-bit" from Start menu.
Now you can call <make> or <gcc> to build software for Windows.

% Build wxWidgets from sources

• Open 'MSYS2' terminal, and clone wxWidgets sources:

Code: Select all

git clone https://github.com/wxWidgets/wxWidgets
cd wxWidgets
git submodule update --init

• For a 'Release' build of wxWidgets, run this:

Code: Select all

mkdir wx-release
cd wx-release
cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DwxBUILD_DEBUG_LEVEL=0
mingw32-make -j$(nproc)

• For a 'Debug' build of wxWidgets, run this:

Code: Select all

mkdir wx-debug
cd wx-debug
cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DwxBUILD_DEBUG_LEVEL=1
mingw32-make -j$(nproc)

• Copy wxWidgets 'include' folder to wxWidgets/wx-release

% Build CodeLite from sources

• Return to the home directory with this command:

Code: Select all

cd ~

• Open 'MSYS2' terminal, and clone CodeLite sources:

Code: Select all

git clone https://github.com/eranif/codelite.git

• Close 'MSYS2' terminal

• Download and install CodeLite for Windows (64 bit)

• Open the workspace CodeLiteIDE.workspace
(located in the CodeLite's sources folder)

• Set an appropriate workspace and project environment, e.g.

Code: Select all

WXWIN=C:\msys\home\Admin\wxWidgets\wx-release
WXCFG=gcc_x64_dll\mswu
PATH=$WXWIN\lib\gcc_x64_dll;../sdk/clang/lib;../sdk/libssh/lib;$(PATH)

• Make sure that the project CodeLiteIDE is selected.
(the active project uses bold font)

• Select the Win_x64_Release build configuration and click F7

• When the compilation is over, close the workspace and the IDE

• To update your installation with the new CodeLite, close
CodeLite and from a cmd.exe window (opened as Administrator),
navigate to 'Runtime' subdirectory in the CodeLite's sources
folder. Edit and only then run the file 'update64.bat'

Post Reply