-
Notifications
You must be signed in to change notification settings - Fork 0
Set up Build on Eclipse
Here you will find step-by-step instructions to use the Eclipse IDE for building the KeePassXC application.
The below steps are tested on the Linux machine but the same is applicable for another ones.
Your environment is prepared properly:
and the sources are downloaded as described here.
- Select the latest Eclipse release.
- Find the
Eclipse IDE for C/C++ Developers
section and download needed platform specific package. - Complete the installation according to your platform.
- Open the
File > Imports... > C/C++ > Existing Code as Makefile Project
, clickNext>
. - Specify a
Project Name
askeepassxc
, specifyExisting Code Location
usingBrowse...
button, selectLinux GCC
as a toolchain, clickFinish
. - In the
Project Explorer
you will get new project.
- Open the
Build Target
window using theWindow > Show View > Build Target
menu. It should appear on the right, with theOutline
window. - Make sure you have the
build
folder or create it.CMake
will run with this folder as its working directory. - Right click on the
build
folder and selectNew...
command. TheCreate Build Target
dialog will appear:- Provide
Target name
asRelease
. - In
Build Target
deselectSame as the target name
and make sure that theBuild target
field is empty. - In
Build Command
deselectUse builder settings
and set theBuild command
toNote, you can specify any build option(s) supported by this project.cmake -DWITH_XC_ALL=ON -DCMAKE_BUILD_TYPE=Release ..
- Keep the rest fields by default as is and press OK.
- Provide
Next, setup the builder to run the Makefiles
that CMake
builds.
- Right click on the
keepassxc
project and selectProperties
. - Select
C/C++ Build
.- Open the
Manage Configurations...
and set theRelease
as active, clickOK
. - Select the
Configuration
toRelease [Active]
.- On the
Builder Settings
tab:-
Deselect
Use default build command
and specify theBuild command
:make
. -
Deselect
Generate Makefiles automatically
. -
Specify the
Build directory
field:${workspace_loc:/keepassxc/build}
. You can use theWorkspace...
button to select it manually. -
The form should appear as shown below:
-
- On the
Behavior
tab:-
Select
Use custom build arguments
and specify theBuild arguments
as-j4
or-j8
(it depends how many available CPU cores you have). -
Select
Build (Incremental build)
and specify the target nameall
. -
Select
Clean
and specify the target nameclean
. -
Click
Apply and Close
.
-
- On the
- Open the
- Set the
Release
configuration to build as active by theProject > Build Configurations > Set Active
command.
- In the
Build Targets
window double click onRelease
to generate the GNU Make build system.
Expected execution time is couple seconds. Do it every time when you got the latest code or changed theCMakeLists.txt
. - Build is possible by different ways:
- From main menu:
Project > Build Project
. - From toolbar:
Hammer
icon - From project context menu:
Build Configurations > Build All
.
- From main menu:
- Run is possible by different ways:
- From main menu:
Run > Run
. - From toolbar:
Run
icon - From project context menu:
Run as > Local C/C++ Application > keepassxc > OK
.
- From main menu: