Skip to content
Snippets Groups Projects
Commit 267c59fe authored by Philipp Stenkamp's avatar Philipp Stenkamp
Browse files

Gave the e(fx)clipse Build System a first try, successfully created a

Native Package which can run on its own, the Windows Installer does not
work yet.
parent f0a8989f
No related branches found
No related tags found
No related merge requests found
Showing
with 276 additions and 3 deletions
/common/
/gui/
<?xml version="1.0" encoding="ASCII"?>
<anttasks:AntTask xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:anttasks="http://org.eclipse.fx.ide.jdt/1.0" buildDirectory="${project}/build">
<deploy>
<application name="TestMopped"/>
<info/>
<deploy packagingFormat="exe">
<application name="TestMopped" mainclass="gui.MainApp" version="0.9" toolkit="fx"/>
<info title="M&#xe4;rklin Control" vendor="lf.ps"/>
</deploy>
<signjar/>
</anttasks:AntTask>
<?xml version="1.0" encoding="UTF-8"?>
<project name="VINF_MaerklinControl" default="do-deploy" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">
<target name="init-fx-tasks">
<path id="fxant">
<filelist>
<file name="${java.home}\..\lib\ant-javafx.jar"/>
<file name="${java.home}\lib\jfxrt.jar"/>
<file name="${basedir}"/>
</filelist>
</path>
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpathref="fxant"/>
</target>
<target name="setup-staging-area">
<delete dir="externalLibs" />
<delete dir="project" />
<delete dir="projectRefs" />
<mkdir dir="externalLibs" />
<copy todir="externalLibs">
<fileset dir="D:\Users\Philipp\gitlab\VInf\Praktikum\VINF_MaerklinControl">
<filename name="controlsfx-8.40.12.jar"/>
</fileset>
</copy>
<mkdir dir="project" />
<copy todir="project">
<fileset dir="D:\Users\Philipp\gitlab\VInf\Praktikum\VINF_MaerklinControl">
<include name="src/**" />
</fileset>
</copy>
<mkdir dir="projectRefs" />
</target>
<target name='do-compile'>
<delete dir="build" />
<mkdir dir="build/src" />
<mkdir dir="build/libs" />
<mkdir dir="build/classes" />
<!-- Copy project-libs references -->
<copy todir="build/libs">
<fileset dir="externalLibs">
<include name="controlsfx-8.40.12.jar"/>
</fileset>
</copy>
<!-- Copy project references -->
<!-- Copy project sources itself -->
<copy todir="build/src">
<fileset dir="project/src">
<include name="**/*"/>
</fileset>
</copy>
<javac includeantruntime="false" source="1.8" target="1.8" srcdir="build/src" destdir="build/classes" encoding="Cp1252">
<classpath>
<fileset dir="build/libs">
<include name="*"/>
</fileset>
</classpath>
</javac>
<!-- Copy over none Java-Files -->
<copy todir="build/classes">
<fileset dir="project/src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="do-deploy" depends="setup-staging-area, do-compile, init-fx-tasks">
<delete file="dist"/>
<delete file="deploy" />
<mkdir dir="dist" />
<mkdir dir="dist/libs" />
<copy todir="dist/libs">
<fileset dir="externalLibs">
<include name="*" />
</fileset>
</copy>
<fx:resources id="appRes">
<fx:fileset dir="dist" includes="VINF_MaerklinControl.jar"/>
<fx:fileset dir="dist" includes="libs/*"/>
<fx:fileset dir="dist" includes="res/**"/>
</fx:resources>
<fx:application id="fxApplication"
name="Märklin Control"
mainClass="gui.MainApp"
toolkit="fx"
version="0.9"
/>
<mkdir dir="build/classes/META-INF" />
<fx:jar destfile="dist/VINF_MaerklinControl.jar">
<fx:application refid="fxApplication"/>
<fileset dir="build/classes">
</fileset>
<fx:resources refid="appRes"/>
<manifest>
<attribute name="Implementation-Vendor" value="lf.ps"/>
<attribute name="Implementation-Title" value="Märklin Control"/>
<attribute name="Implementation-Version" value="0.9"/>
<attribute name="JavaFX-Feature-Proxy" value="None"/>
</manifest>
</fx:jar>
<mkdir dir="deploy" />
<!-- Need to use ${basedir} because somehow the ant task is calculating the directory differently -->
<fx:deploy
embedJNLP="false"
extension="false"
includeDT="false"
offlineAllowed="true"
outdir="${basedir}/deploy"
outfile="VINF_MaerklinControl" nativeBundles="exe"
updatemode="background" >
<fx:platform basedir="${java.home}"/>
<fx:info title="VINF_MaerklinControl" vendor="lf.ps"/>
<fx:application refId="fxApplication"/>
<fx:resources refid="appRes"/>
</fx:deploy>
</target>
</project>
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Slider?>
<?import javafx.scene.control.ToggleButton?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gui.view.EngineController">
<children>
<VBox alignment="BOTTOM_CENTER" prefHeight="200.0" prefWidth="100.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0">
<children>
<ImageView fx:id="engineImage" fitHeight="50.0" fitWidth="150.0" pickOnBounds="true" preserveRatio="true">
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin></ImageView>
<Slider fx:id="engineSpeedSlider" showTickLabels="true" showTickMarks="true" />
<HBox alignment="CENTER" prefWidth="300.0">
<children>
<ToggleButton fx:id="engineRevButton" mnemonicParsing="false" onAction="#handleEngineDirection" text="&lt;">
<toggleGroup>
<ToggleGroup fx:id="direction" />
</toggleGroup></ToggleButton>
<ChoiceBox fx:id="engineChoiceBox" prefWidth="150.0" />
<ToggleButton fx:id="engineFwdButton" mnemonicParsing="false" onAction="#handleEngineDirection" text="&gt;" toggleGroup="$direction" />
</children>
</HBox>
</children>
<opaqueInsets>
<Insets right="9.0" />
</opaqueInsets>
</VBox>
</children>
</AnchorPane>
File added
File added
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import org.controlsfx.control.StatusBar?>
<BorderPane prefHeight="600.0" prefWidth="340.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gui.view.RootLayoutController">
<top>
<MenuBar BorderPane.alignment="CENTER">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" text="Delete" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="About" />
</items>
</Menu>
</menus>
</MenuBar>
</top>
<center>
<TabPane fx:id="rootTabPane" prefHeight="200.0" prefWidth="200.0" tabClosingPolicy="UNAVAILABLE" BorderPane.alignment="CENTER">
<tabs>
</tabs>
</TabPane>
</center>
<bottom>
<VBox alignment="TOP_CENTER" BorderPane.alignment="CENTER">
<children>
<Button fx:id="emergencyStop" mnemonicParsing="false" onAction="#emergencyStopHandler" prefHeight="50.0" prefWidth="300.0" style="-fx-background-color: red;" text="NOTAUS" textFill="WHITE">
<padding>
<Insets bottom="10.0" left="5.0" right="5.0" top="5.0" />
</padding>
<font>
<Font name="System Bold" size="14.0" />
</font>
<VBox.margin>
<Insets bottom="10.0" top="10.0" />
</VBox.margin>
</Button>
<StatusBar fx:id="statusBar" />
</children>
</VBox>
</bottom>
</BorderPane>
File added
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gui.view.SettingsController">
<children>
<VBox prefHeight="200.0" prefWidth="100.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="20.0">
<children>
<Label text="Server-IP" />
<TextField fx:id="serverIP" prefHeight="25.0" prefWidth="158.0" text="127.0.0.1">
<VBox.margin>
<Insets top="5.0" />
</VBox.margin>
</TextField>
<Button fx:id="connectButton" mnemonicParsing="false" onAction="#connectHandler" text="Verbindung herstellen">
<VBox.margin>
<Insets top="5.0" />
</VBox.margin>
</Button>
</children>
<padding>
<Insets top="20.0" />
</padding>
</VBox>
</children>
</AnchorPane>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment