Skip to content

Commit 93d5ef1

Browse files
committed
Copyedit building the GUI
1 parent 52e6cea commit 93d5ef1

27 files changed

+177
-476
lines changed

doc/Client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
:glob:
77
:titlesonly:
88
9-
client/GUI-Getting-Started
9+
client/GUI-Building
1010
client/GUI-Coding
1111
client/GUI-Testing
1212
client/GUI-Eclipse

doc/Script-Generator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ script_generator/*
2222
| Standalone app build directories | `base/uk.ac.isis.scriptgenerator/*` |
2323

2424
## Eclipse build
25-
To build and run the app through eclipse, the script generator product is found in `base\uk.ac.stfc.isis.scriptgenerator.client.product`. The instructions for setting up eclipse and loading the target platform (necessary for the script generator) are found in the instructions for the [main IBEX GUI setup](/client/getting_started/Building-the-GUI)
25+
To build and run the app through eclipse, the script generator product is found in `base\uk.ac.stfc.isis.scriptgenerator.client.product`. The instructions for setting up eclipse and loading the target platform (necessary for the script generator) are found in the instructions for the [main IBEX GUI setup](/client/build/Building-the-GUI)
2626

2727
{#scriptgenerator_enable_perspective}
2828
### Adding the perspective into the client

doc/client/GUI-Building.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Building
2+
3+
```{toctree}
4+
:glob:
5+
:titlesonly:
6+
7+
compiling/*
8+
```

doc/client/GUI-Getting-Started.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

doc/client/GUI-Troubleshooting.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ The following pages also contain GUI troubleshooting information for specific pr
1111
troubleshooting/*
1212
```
1313

14+
## Display resolution & scaling
15+
16+
If the GUI loads up but items are the wrong size, you may need to change your display settings. The exact settings that
17+
you need may vary from computer to computer. This is a common issue on Windows 10 machines due to the OS' scaling
18+
setting for text, icons etc. that is meant to ensure they do not look too small on high screen resolutions.
19+
20+
Generally a resolution of 1920 x 1080 with a scaling factor of 100% should look correct on standard screens. You can
21+
increase both of those settings slightly if you feel like the display elements look uncomfortably small.
22+
1423
## IBEX appears fullscreen with top menu items hidden
1524

1625
Solution: right click inside any OPI and select "exit full screen".
@@ -95,7 +104,6 @@ Add `Eclipse-BundleShape: dir` in the `MANIFEST.MF`; see the `.opis` `MANIFEST.M
95104
This makes the maven build build the directory into a directory rather than a jar, which is sometimes necessary to let eclipse then "see" the files natively on the filesystem. If you look in the `plugins/` folder of a built client you should see a folder for `.opis` but a `.jar` for most other ibex modules - except for a few that need to be built as directories, as you may be finding.
96105

97106

98-
99107
## Other issues
100108
### Remote debugging with Eclipse
101109
The following has been done to ensure that it is possible to debug the IBEX GUI running on any particular instrument:
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Building the GUI
2+
3+
:::{important}
4+
Before following this guide, ensure you have completed the following steps from
5+
[the first-time installation guide](/overview/First-Time-Build):
6+
- [Install Java JDK](#first_time_install_java)
7+
- [Install Maven](#first_time_install_maven)
8+
- [Install Git](#first_time_install_git)
9+
- [Install Python (Uktena)](#first_time_install_uktena)
10+
:::
11+
12+
{#gui_build_checkout_code}
13+
## Checking out the code
14+
15+
Development builds of the IBEX GUI are conventionally located in `c:\instrument\dev`. Create this folder if it
16+
doesn't already exist.
17+
18+
From a windows command prompt, navigate to `c:\instrument\dev` and run:
19+
20+
```
21+
git clone --recursive https://github.com/ISISComputingGroup/ibex_gui.git
22+
```
23+
24+
The code for the IBEX GUI will now be located in `c:\instrument\dev\ibex_gui`.
25+
26+
A [pre-commit hook](https://github.com/ISISComputingGroup/IBEX/issues/4786) should now be installed; to do this, run:
27+
28+
```
29+
cd c:\instrument\dev\ibex_gui\build
30+
install_pre_commit_hook.bat
31+
```
32+
33+
{#gui_build_install_eclipse}
34+
## Installing Eclipse
35+
36+
You must use a version of eclipse which supports the RCP and Java versions currently in use by the client. There are
37+
two options for this:
38+
- Use the most recent version in `\\isis\inst$\Kits$\CompGroup\ICP\Developer Tools`
39+
- Download a recent Eclipse version directly from
40+
[the eclipse website](https://www.eclipse.org/downloads/packages/); choose the package for "RCP and RAP developers"
41+
42+
By convention eclipse versions are installed into `c:\tools`, for example in
43+
`c:\tools\eclipse-rcp-2024-06-R-win32-x86_64`.
44+
45+
After installing eclipse from either of the above sources, you will need to add the line
46+
```
47+
-Djdk.util.zip.disableZip64ExtraFieldValidation=true
48+
```
49+
to the end of `eclipse.ini` (located next to the `eclipse.exe` executable), if it is not already present.
50+
51+
{#gui_build_via_eclipse}
52+
## Building in Eclipse
53+
54+
The first time the Eclipse IDE is started, it will ask you for a folder to use as a workspace.
55+
Unless you have a specific reason to choose a different location, use `c:\Instrument\dev\eclipse_workspaces\ibex_gui`
56+
(create this folder if it doesn't already exist).
57+
58+
![](eclipse_workspace_selection.png)
59+
60+
From the menu bar choose File -> Import -> General -> Existing Projects into Workspace.
61+
Choose "Select root directory" and browse to `c:\Instrument\dev\ibex_gui\base`. You should now see a list of plugins
62+
to import with names like `uk.ac.stfc.isis.ibex.*`. Eclipse should automatically select everything so you just need
63+
to click "Finish" to add them to the project.
64+
65+
:::{tip}
66+
If "Marketplace solutions available" dialogues appear, click cancel as these will be obtained later.
67+
:::
68+
69+
<img src="eclipse_import_ibex_gui.png" width=400>
70+
71+
From the "Project Explorer" tab on the left, expand the target platform folder (labelled as
72+
`uk.ac.stfc.isis.ibex.targetplatform`), double click on the `targetplatform.target` file and choose
73+
"Set as Active Target Platform". This may take some time as dependencies are downloaded - there is a progress bar
74+
in the very bottom-right of the Eclipse IDE.
75+
76+
Once the target platform has finished downloading, the target platform view should look like this:
77+
78+
<img src="eclipse_target_platform_view.png" width=600>
79+
80+
To run the application from within Eclipse: open `ibex.product` from the `uk.ac.stfc.isis.ibex.e4.client.product`
81+
folder, select "Launch an Eclipse application". The IBEX GUI should now open.
82+
83+
Next, From the menu bar choose Run->Run configurations and select `ibex.product` from the left hand list under
84+
"Eclipse Application". In the "Main" tab, in **Run configurations**, tick the "Clear" tick box and untick the
85+
"Ask for confirmation before clearing".
86+
87+
<img src="eclipse_clear_workspace.png" width=400>
88+
89+
In the "Configuration" tab tick the "Clear the configuration area before launching" tick box.
90+
Click "Apply" and select "Run".
91+
92+
:::{tip}
93+
If you see a `java.lang.UnsupportedClassVersionError` error:
94+
- Select Window -> Preferences -> Java -> Compiler
95+
- Set compliance level to 21.
96+
:::
97+
98+
:::{tip}
99+
If you see a "Plugin execution not covered by lifecycle configuration" error:
100+
- From the menu bar choose: Window -> Preferences -> Maven -> Errors/Warnings
101+
- Set "Plugin execution not covered by lifecycle configuration" to Ignore
102+
:::
103+
104+
Lastly, you should [set up checkstyle](../eclipse/Checkstyle-setup).
105+
106+
If you did not manage to build or launch the IBEX client using these steps, there are troubleshooting notes for eclipse
107+
[here](../eclipse/Common-Eclipse-Issues) and for the GUI in general [here](../GUI-Troubleshooting).
108+
109+
{#gui_build_via_maven}
110+
## Building via Maven
111+
112+
Firstly, ensure you have a recent Maven version installed. Generally a suitable version will be the highest version
113+
number in `\\isis\inst$\Kits$\CompGroup\ICP\Binaries`. You can double-check your current Maven version by running
114+
`mvn -v` in a command prompt.
115+
116+
To build using Maven, run:
117+
118+
```
119+
cd c:\Instrument\dev\ibex_gui\build
120+
build.bat
121+
```
122+
123+
Once the build finishes, the IBEX client executable can be found in `.\built_client\`.

doc/client/getting_started/Maven-and-Tycho.md renamed to doc/client/compiling/Maven-and-Tycho.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
# Maven and Tycho
22

3-
The IBEX GUI is built using Tycho which is an extension of Maven designed for building Eclipse RCP products.
3+
The IBEX GUI is built using Tycho, which is an extension of Maven designed for building Eclipse RCP products.
44

55
This document provides a brief overview of both Maven and Tycho.
66

77
## Maven ##
88

99
The official description:
1010

11-
_Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information._
11+
> _Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model
12+
> (POM), Maven can manage a project's build, reporting and documentation from a central piece of information._
1213
13-
In simple terms:
14-
15-
_Maven is a build automation tool used primarily for Java projects._
14+
In simple terms, Maven is a build automation tool used primarily for Java projects.
1615

1716
### What is a POM file? ###
1817
An XML file that describes the software project being built, its dependencies on other external modules and components, the build order, directories, and required plug-ins.
71.5 KB
Loading
46.7 KB
Loading
96.4 KB
Loading

0 commit comments

Comments
 (0)