Skip to content

Commit

Permalink
[GTK] Create launch configuration and recompile Linux binaries
Browse files Browse the repository at this point in the history
The Linux binaries are now created via an Ant script executed via Maven.
This script calls "cmake ." and "make", and then overwrites the old
binaries with the ones that have just been created.

See eclipse-windowbuilder#871
  • Loading branch information
ptziegler committed Sep 16, 2024
1 parent fffb8d9 commit fbe00c8
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
21 changes: 21 additions & 0 deletions org.eclipse.wb.os.linux/Build-native-linux-binaries.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
<intAttribute key="M2_COLORS" value="0"/>
<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
<stringAttribute key="M2_GOALS" value="clean antrun:run@build-native-binaries"/>
<booleanAttribute key="M2_NON_RECURSIVE" value="true"/>
<booleanAttribute key="M2_OFFLINE" value="false"/>
<stringAttribute key="M2_PROFILES" value=""/>
<listAttribute key="M2_PROPERTIES"/>
<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
<intAttribute key="M2_THREADS" value="1"/>
<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
<stringAttribute key="M2_USER_SETTINGS" value=""/>
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${git_work_tree:org.eclipse.wb.os.linux}/"/>
</launchConfiguration>
Binary file modified org.eclipse.wb.os.linux/os/linux/x86_64/libwbp3.so
Binary file not shown.
52 changes: 52 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,58 @@
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>build-native-binaries</id>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<echo>Generating native binaries for os=${os.name}</echo>
<if><equals arg1="${os.name}" arg2="Linux" />
<then>
<property name="gtk.so.file" value="libwbp3.so"/>
<property name="gtk.src.dir" value="${project.basedir}/org.eclipse.wb.os.linux/"/>
<property name="gtk.build.dir" value="${project.build.directory}/gtk-tmp"/>
<property name="gtk3.build.dir" value="${gtk.build.dir}/gtk3"/>
<copy todir="${gtk.build.dir}">
<fileset dir="${gtk.src.dir}/native/gtk"/>
</copy>
<echo>Create build files</echo>
<exec dir="${gtk3.build.dir}" executable="cmake" failonerror="true">
<arg line="."/>
</exec>
<echo>Create "shared object" file</echo>
<exec dir="${gtk3.build.dir}" executable="make" failonerror="true" />
<echo>Copy "shared object" to fragment</echo>
<copy todir="${gtk.src.dir}/os/linux/x86_64">
<fileset dir="${gtk3.build.dir}" includes="${gtk.so.file}"/>
</copy>
</then>
</if>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down

0 comments on commit fbe00c8

Please sign in to comment.