Skip to content

Commit 823aeba

Browse files
committed
Simplify Gtk development tools
* Remove unneeded and outdated scripts. * Update install_sysdeps.sh for current Fedora * Improve gtk-dev-guide for the facts that there is only one repo, .classpath files don't have to be edited, gtk4 is built by default and etc.
1 parent 92fe367 commit 823aeba

5 files changed

Lines changed: 24 additions & 311 deletions

File tree

bundles/org.eclipse.swt.tools/gtk/readme.md renamed to bundles/org.eclipse.swt.tools/gtk/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ but only during development work.
77
For example install_sysdeps.sh (on linux), is aimed at installing packages that are
88
required to be able to build swt native glue code.
99

10-
For more details, see the description inside each script.

bundles/org.eclipse.swt.tools/gtk/clone_build_gtk_debug.sh

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

bundles/org.eclipse.swt.tools/gtk/install_sysdeps.sh

Lines changed: 18 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,45 @@
88
# 2) Add a case to the case statement below.
99
# 3) Add a function to handle your distribution.
1010

11+
GREEN='\033[0;32m'
12+
RED='\033[0;31m'
13+
NC='\033[0m' # No Color
1114

1215
func_echo_plus () {
1316
# Echo function that prints output in green to distinguish it from sub-shell output.
14-
GREEN='\033[0;32m'
15-
NC='\033[0m' # No Color
1617
echo -e "${GREEN}${@}${NC}"
1718
}
1819

1920
func_echo_error () {
2021
# As above, but in red. Also pre-appends '***' to output.
21-
RED='\033[0;31m'
22-
NC='\033[0m' # No Color
23-
echo -e "${RED}*** ${@}${NC}"
22+
echo -e "${RED}*** ${@}${NC}"
2423
}
2524

2625
func_configure_fedora () {
27-
FEDORA_VERSION=$(cat /etc/system-release | cut -f3 -d" ")
28-
if [ "$FEDORA_VERSION" -lt "21" ]; then
29-
INSTALL_CMD="yum"
30-
else
31-
INSTALL_CMD="dnf"
32-
fi
33-
3426

3527
func_echo_plus "Installing C Development Tools"
36-
set -x
37-
sudo $INSTALL_CMD -y groups install "C Development Tools and Libraries"
38-
39-
func_echo_plus "Installing Java 11 development packages that include jni.h for JNI bindings."
40-
sudo $INSTALL_CMD -y install java-11-openjdk-devel.x86_64
28+
sudo dnf -y groups install "C Development Tools and Libraries"
4129

42-
func_echo_plus "Installing Gtk3 development packages"
43-
sudo $INSTALL_CMD -y install gtk3-devel
30+
func_echo_plus "Installing Java development packages that include jni.h for JNI bindings."
31+
sudo dnf -y install java-25-openjdk-devel
4432

45-
func_echo_plus "Installing X11 Development libraries. Someday when wayland takes over these will not be needed..."
46-
# Deals with error: "#include <X11/Intrinsic.h>, #include <X11/extensions/XTest.h>" build errors)
47-
sudo $INSTALL_CMD -y install libXt-devel
33+
func_echo_plus "Installing Gtk development packages"
34+
sudo dnf -y install gtk3-devel gtk4-devel
4835

4936
func_echo_plus "Install Mesa (OpenGL headers)"
5037
# Deals with error: "/usr/bin/ld: cannot find -lGLU collect2: error: ld returned 1 exit status"
51-
sudo $INSTALL_CMD -y install mesa-libGLU-devel
38+
sudo dnf -y install mesa-libGLU-devel
5239

5340
func_echo_plus "Done"
5441
}
5542

5643

57-
LINUX_DISTRO=$(cat /etc/system-release | cut -f1 -d" ")
58-
if [ "$LINUX_DISTRO" = "" ]; then
59-
func_echo_error "Error, could not identify your distribution"
60-
exit
44+
if [ -f /etc/os-release ]; then
45+
. /etc/os-release
46+
LINUX_DISTRO="$ID"
47+
else
48+
echo "Error: cannot identify distribution"
49+
exit 1
6150
fi
6251

6352
DISTRO_NOT_KNOWN_MSG="
@@ -66,14 +55,13 @@ Consider updating this script for your distribution.
6655
In general, You should install the following packages:
6756
- C Development tools (usually comes in a 'group install')
6857
- java-*-openjdk-devel (depending on current version of java)
69-
- gtk3-devel
70-
- libXt-devel
58+
- gtk3-devel and gtk4-devel
7159
- mesa-libGLU-devel
7260
"
7361

7462

7563
case "$LINUX_DISTRO" in
76-
"Fedora")
64+
"fedora")
7765
func_echo_plus "Fedora found. Installing packages..."
7866
func_configure_fedora
7967
;;
@@ -85,10 +73,3 @@ case "$LINUX_DISTRO" in
8573
;;
8674
esac
8775

88-
89-
# check if .classpath exists in swt project.
90-
if [ -a "../org.eclipse.swt/.classpath" ]; then
91-
func_echo_plus ".classpath found, you are good to go";
92-
else
93-
func_echo_error "Warning: ../org.eclipse.swt/.classpath not found. Normally you rename ../org.eclipse.swt/.classpath_gtk to ../*/.classpath manually"
94-
fi

bundles/org.eclipse.swt.tools/gtk/rebuild_swt_natives_wrapper.sh

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

0 commit comments

Comments
 (0)