Skip to content

Commit

Permalink
Restructure + add end message
Browse files Browse the repository at this point in the history
Closes #1
  • Loading branch information
skytasul authored and skytasul committed Jul 28, 2023
1 parent aa64562 commit 7d5e12c
Show file tree
Hide file tree
Showing 20 changed files with 153 additions and 34 deletions.
25 changes: 18 additions & 7 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/bin/
/build/
/nee-properties
/target/
/dependency-reduced-pom.xml
6 changes: 6 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
Expand Down
8 changes: 8 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ A GUI tool to make Noesis file export much easier.
## Requirements
You **must** have downloaded and installed [Noesis](http://www.richwhitehouse.com/index.php?content=inc_projects.php&showproject=91).

NoesisEasyExport requires Java to run. It has been built on Java 8, but up to Java 13 should work fine, as long as you have installed the JavaFX runtime.
NoesisEasyExport requires a Java 11 environment to run.

## How to run it?
You should be able to double-click on the .jar file to run the program. Otherwise, run `java -jar NoesisEasyExport.jar` into a console to start the app.
You should be able to double-click on the .jar file to run the program. Otherwise, run `java -jar NoesisEasyExport.jar` in a console to start the app.

## GUI showcase
![empty form](src/images/demo-empty.png)
![empty form](demo-empty.png)

As you can see, almost every feature of Noesis is present here.

Expand All @@ -22,4 +22,4 @@ To be able to start the process, you must have chosen:

Here is what is looks like when used:

![filled form](src/images/demo-filled.png)
![filled form](demo-filled.png)
8 changes: 0 additions & 8 deletions build.fxbuild

This file was deleted.

File renamed without changes
File renamed without changes
74 changes: 74 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.skytasul</groupId>
<artifactId>noesiseasyexport</artifactId>
<version>1.0.1</version>
<name>Noesis Easy Export</name>
<description>A tool to make Noesis file export much easier</description>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>11</release>
</configuration>
</plugin>

<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<configuration>
<mainClass>fr.skytasul.noesiseasyexport.Main</mainClass>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>fr.skytasul.noesiseasyexport.Launcher</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>11</version>
<classifier>win</classifier>
</dependency>
</dependencies>


</project>
10 changes: 10 additions & 0 deletions src/main/java/fr/skytasul/noesiseasyexport/Launcher.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package fr.skytasul.noesiseasyexport;

public class Launcher {

public static void main(String[] args) {
// otherwise java complains about missing JavaFX runtime components...
Main.main(args);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ public void start(Stage primaryStage) {
instance = this;
try {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(getClass().getResource("Main.fxml"));
loader.setLocation(getClass().getResource("/fxml/Main.fxml"));
AnchorPane rootLayout = (AnchorPane) loader.load();

Scene scene = new Scene(rootLayout);
primaryStage.setTitle("Noesis easy export");
primaryStage.setResizable(false);
primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/images/icon16.png")));
primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/images/icon32.png")));
primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/images/icon48.png")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@

import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.Dialog;
import javafx.scene.control.ListView;
import javafx.scene.control.SelectionMode;
import javafx.scene.control.TextArea;
Expand Down Expand Up @@ -244,6 +247,11 @@ private void startButton() {
while ((s = inStreamReader.readLine()) != null) {
System.out.println(s);
}

System.out.println();
System.out.println();
System.out.println("Extraction finished!");
new Alert(AlertType.INFORMATION, "Extraction finished!").showAndWait();
}catch (IOException e) {
e.printStackTrace();
e.printStackTrace(out);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
<?import javafx.scene.control.TitledPane?>
<?import javafx.scene.effect.Glow?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Line?>
<?import javafx.scene.text.Font?>

<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="445.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.skytasul.noesiseasyexport.MainController">
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="460.0" prefWidth="664.0" xmlns="http://javafx.com/javafx/20.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.skytasul.noesiseasyexport.MainController">
<children>
<TitledPane animated="false" layoutX="384.0" layoutY="14.0" prefHeight="218.0" prefWidth="202.0" text="Options">
<TitledPane animated="false" layoutX="431.0" layoutY="14.0" prefHeight="220.0" prefWidth="218.0" text="Options" AnchorPane.rightAnchor="15.0">
<content>
<VBox prefHeight="160.0" prefWidth="200.0" spacing="10.0">
<VBox prefHeight="194.0" prefWidth="272.0" spacing="10.0">
<children>
<CheckBox fx:id="flipUVs" mnemonicParsing="false" text="Flip UV" />
<CheckBox fx:id="rotate90" mnemonicParsing="false" text="Rotate 90°" />
Expand All @@ -34,30 +35,34 @@
</VBox>
</content>
</TitledPane>
<ListView fx:id="files" layoutX="14.0" layoutY="14.0" prefHeight="189.0" prefWidth="364.0" />
<TextField fx:id="destination" layoutX="76.0" layoutY="239.0" onKeyTyped="#destinationEdit" prefHeight="25.0" prefWidth="304.0" promptText="Destination..." />
<Button layoutX="14.0" layoutY="239.0" mnemonicParsing="false" onAction="#browseButton" prefHeight="25.0" prefWidth="57.0" text="Browse" />
<Button layoutX="129.0" layoutY="207.0" mnemonicParsing="false" onAction="#clearButton" text="Clear" />
<Button layoutX="14.0" layoutY="207.0" mnemonicParsing="false" onAction="#selectButton" text="Select" />
<Button layoutX="66.0" layoutY="207.0" mnemonicParsing="false" onAction="#removeButton" text="Remove" />
<Button fx:id="extract" disable="true" layoutX="472.0" layoutY="239.0" mnemonicParsing="false" onAction="#startButton" prefHeight="25.0" prefWidth="114.0" text="Start extraction">
<ListView fx:id="files" layoutX="14.0" layoutY="14.0" prefHeight="189.0" prefWidth="401.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="249.0" />
<TextField fx:id="destination" layoutX="92.0" layoutY="239.0" onKeyTyped="#destinationEdit" prefHeight="25.0" prefWidth="324.0" promptText="Destination..." AnchorPane.leftAnchor="92.0" AnchorPane.rightAnchor="248.0" />
<Button layoutX="14.0" layoutY="239.0" mnemonicParsing="false" onAction="#browseButton" prefHeight="25.0" prefWidth="71.0" text="Browse" />
<Button fx:id="extract" disable="true" layoutX="522.0" layoutY="239.0" mnemonicParsing="false" onAction="#startButton" prefHeight="25.0" prefWidth="128.0" text="Start extraction" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="239.0">
<font>
<Font name="System Bold" size="12.0" />
</font>
</Button>
<ChoiceBox fx:id="type" layoutX="384.0" layoutY="239.0" prefHeight="25.0" prefWidth="84.0" />
<TextArea fx:id="console" editable="false" layoutX="14.0" layoutY="274.0" prefHeight="159.0" prefWidth="572.0" promptText="Console output..." wrapText="true">
<ChoiceBox fx:id="type" layoutX="431.0" layoutY="239.0" prefHeight="25.0" prefWidth="84.0" AnchorPane.rightAnchor="149.0" AnchorPane.topAnchor="239.0" />
<TextArea fx:id="console" editable="false" layoutX="14.0" layoutY="274.0" prefHeight="159.0" prefWidth="572.0" promptText="Console output..." wrapText="true" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="287.0">
<font>
<Font name="Consolas" size="12.0" />
</font>
</TextArea>
<Button fx:id="exe" layoutX="335.0" layoutY="207.0" mnemonicParsing="false" onAction="#exeButton" prefHeight="25.0" prefWidth="43.0" text=".exe" textFill="#6e271f">
<Button fx:id="exe" layoutX="364.0" layoutY="207.0" mnemonicParsing="false" onAction="#exeButton" prefHeight="25.0" prefWidth="51.0" text=".exe" textFill="#6e271f" AnchorPane.rightAnchor="249.0">
<font>
<Font name="System Bold" size="12.0" />
</font>
<effect>
<Glow level="0.2" />
</effect>
</Button>
<HBox layoutX="14.0" layoutY="207.0" prefHeight="25.0" prefWidth="366.0" spacing="10.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="284.0">
<children>
<Button mnemonicParsing="false" onAction="#selectButton" text="Select" />
<Button mnemonicParsing="false" onAction="#removeButton" text="Remove" />
<Button mnemonicParsing="false" onAction="#clearButton" text="Clear" />
</children>
</HBox>
</children>
</AnchorPane>
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 7d5e12c

Please sign in to comment.