-
Notifications
You must be signed in to change notification settings - Fork 2
Building the GUI
Wiki > The GUI > Getting started > Building the GUI
Before building and running the GUI please make sure you have followed the steps from here: First time installing and building (Windows). In particular make sure Git and genie_python are installed.
We have a book which should serve as a reasonable introduction to the Eclipse RCP platform: 'Eclipse Rich Client Platform' by McAffer, Lemieux and Aniszczyk. There is also a basic introduction at http://www.vogella.com/tutorials/EclipseRCP/article.html.
Create a directory for where you want your IBEX GUI to reside (e.g. C:\Instrument\Dev
). From an appropriate Git console (e.g. Git Bash) navigate to your directory and run:
git clone https://github.com/ISISComputingGroup/ibex_gui.git
You must use a version of eclipse >= 2019-06, earlier versions will fail to build the client. An appropriate version is available at \\isis\inst$\Kits$\CompGroup\ICP\Developer Tools
, simply unzip the the latest version folder to your chosen location for Eclipse and use the provided workspace. You can choose to download Eclipse directly from the eclipse website, choose the package for "RCP and RAP developers". If you download from the website you should use version 4.26.
These are the steps needed to run the GUI via Eclipse:
- First, create a new workspace (example name: ibex_workspace_E4).
- Then
git checkout master
from where the IBEX code was cloned to (if it's a fresh clone, it should already be on this branch). - Install the pre-commit hook (see https://github.com/ISISComputingGroup/ibex_developers_manual/wiki/Building-the-GUI#installing-the-git-hooks)
- Start Eclipse IDE and select the workspace and use "Browse" to create and select the new workspace folder.
- From the menu bar choose File->Import->General->Existing Projects into Workspace. Choose "Select root directory" and browse to
<IBEX Clone Path>\base
. You should now see a list of plugins to import with names likeuk.ac.stfc.isis.ibex.*
. Eclipse should automatically select everything so you just need to click "Finish" to add them to the project - Expand the target platform folder (labelled as
uk.ac.stfc.isis.ibex.targetplatform
), double click on the target file and choose "Set as Target Platform". This may take some time as parts of CS-Studio and DAWN are downloaded. It may also be required to update the Locations in use should some packages appear to be missing. - Then select Project->Clean from the menu bar.
- To run the application from within Eclipse: open "ibex.product" from the
uk.ac.stfc.isis.ibex.e4.client.product
folder, select "Launch an Eclipse application". - Next, From the menu bar choose Run->Run configurations and select "ibex.product" from the left hand list under "Eclipse Application".
- In the "Main" tab tick the "Clear" tick box and in the "Configuration" tab tick the "Clear the configuration area before launching" tick box. Click "Apply" and select "Run".
- When a dialogue box asking if you want to clear the run-time workspace data click "Yes". This dialogue box will appear every time you run the E4 build of IBEX from within Eclipse.
IBEX should now build but there will probably be some errors. You can clear them following the procedure below.
Important Notes:
- you will need JDK 17 installed to launch the IBEX GUI successfully.
- you should also set up the checkstyle, do it sooner than later as it may prevent potential errors
- From the menu bar choose: Window->Preferences
- Expand Maven and choose Errors/Warnings
- Set "Plugin execution not covered by lifecycle configuration" to Warning or Ignore
e.g. uk.ac.stfc.isis.ibex.targetplatform [ibex_gui_e4 master]
Not for new starters: this should already have been done by eclipse so unless you do not see [ibex_gui_e4 master]
next to the name of a plugin/package you do not need to do any of the following.
- Select all plugins (ctrl-a)
- Right-click on any one plugin and select
Team -> Share Project
- Click
Finish
- The repository and branch names should now be displayed after each plugin as above
As part of https://github.com/ISISComputingGroup/IBEX/issues/4786 a git hook was put into the gui repository. To install this hook you must run build/install_pre_commit_hook.bat
.
- Ensure your maven version is >= 3.6.0, excluding 3.6.1 as that version has a bug
- Double check that your maven is the correct version by running
mvn -v
in a new command window. Older versions will give you very hard to diagnose build errors - From the command line, navigate to the
.\build\
directory in the IBEX code (one directory under the root, which should beibex_gui\
). - Run
build.bat
- Wait for a few minutes while it builds
- After the build finishes it can be found in
.\built_client\
If the GUI loads up but items are the wrong size, you may need to change your display settings. The exact settings that you need may vary from computer to computer. This is a common issue on Windows 10 machines due to the OS' scaling setting for text, icons etc. that is meant to ensure they do not look too small on high screen resolutions.
Generally a resolution of 1920 x 1080 with a scaling factor of 100% should look correct on standard screens. You can increase both of those settings slightly if you feel like the display elements look uncomfortably small.
Errors can occur if the wrong version of Java is installed for your OS. For example, the x86
version can differ from the x64
version and can cause issues when building the GUI.
Sometimes eclipse will tell you that you have errors when you open it. The following operations (may) help.
- Refresh, clean and build all projects. Select all projects, press F5 to refresh, then go to
Project -> Clean
to clean all projects. - Go to
Run -> Run Configurations -> Plugins
and press "Add required plugins". You can now validate/apply your choice. - In
uk.ac.stfc.isis.ibex.targetplatform
, openuk.ac.stfc.isis.ibex.targetplatform.target
and click "set as target platform". - If you have done all these steps and it still doesn't work, there is more troubleshooting information here.
- If all else fails, delete all the projects from eclipse's workspace and reimport them.
Eclipse can automatically set the Java standard for some projects to 1.8
. If you are seeing errors such as var cannot be assigned to a type
on certain projects, navigate to the project in the explorer, then right-click and choose Properties->Java Compiler->Configure Workspace Settings, and then set the required Java standard to 11
.
Additional support can be found here.