Skip to content

Commit

Permalink
Release 1.0.2 [PREVIEW] - [SNAPSHOT_003]
Browse files Browse the repository at this point in the history
- Verbesserte Validierung (Doppelte Elementnamen/Attribute/Methoden sind nicht mehr erlaubt, Fehlerhafte Eingaben werden hervorgehoben)

- Speicheroptimierung (Es wird weniger Arbeitsspeicher benötigt)
  • Loading branch information
encrypTimM committed Jun 17, 2022
1 parent 7176df0 commit 8ec4bdb
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 12 deletions.
5 changes: 4 additions & 1 deletion linux_deb_auslieferung.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ OUT="auslieferung/${VERSION}/Linux/deb"
MODULE_PATH="${INPUT}/lib"
MAIN_MODULE="classifier"
MAIN_CLASS="io.github.aid_labor.classifier.main.Hauptfenster"
JAVA_OPTIONEN="--add-opens javafx.graphics/javafx.scene=org.controlsfx.controls"

# Weitere Befehle fuer jpackage:
# App Icon aendern: --icon "path/to/icon.png"
Expand Down Expand Up @@ -58,7 +59,8 @@ jpackage \
--dest "${OUT}" \
--module-path "${MODULE_PATH}" \
--module-path "${INPUT}" \
--module "${MAIN_MODULE}/${MAIN_CLASS}"
--module "${MAIN_MODULE}/${MAIN_CLASS}" \
--java-options "${JAVA_OPTIONEN}"

echo ""

Expand All @@ -80,6 +82,7 @@ jpackage \
--module-path "${MODULE_PATH}" \
--module-path "${INPUT}/${MAIN_JAR}" \
--module "${MAIN_MODULE}/${MAIN_CLASS}" \
--java-options "${JAVA_OPTIONEN}" \
--linux-menu-group "${LINUX_MENU_GROUP}" \
--linux-shortcut \
--linux-rpm-license-type "${LINUX_RPM_LICENSE_TYPE}"
Expand Down
20 changes: 13 additions & 7 deletions linux_rpm_auslieferung.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
cd "$(dirname "$0")" # zum Pfad dieses Skriptes wechseln
PROJEKT_PFAD=$(dirname "$0")

# ---- Benoetigte Informationen in Variablen speichern ------------------------------------------------
# Mit den folgeneden Variablen koennen die Grundlegenden Daten fuer das Projekt # eingestellt werden:
Expand All @@ -18,6 +19,7 @@ OUT="auslieferung/${VERSION}/Linux/rpm"
MODULE_PATH="${INPUT}/lib"
MAIN_MODULE="classifier"
MAIN_CLASS="io.github.aid_labor.classifier.main.Hauptfenster"
JAVA_OPTIONEN="--add-opens javafx.graphics/javafx.scene=org.controlsfx.controls"

# Weitere Befehle fuer jpackage:
# App Icon aendern: --icon "path/to/icon.png"
Expand Down Expand Up @@ -59,7 +61,8 @@ jpackage \
--dest "${OUT}" \
--module-path "${MODULE_PATH}" \
--module-path "${INPUT}" \
--module "${MAIN_MODULE}/${MAIN_CLASS}"
--module "${MAIN_MODULE}/${MAIN_CLASS}" \
--java-options "${JAVA_OPTIONEN}"

echo ""

Expand All @@ -80,6 +83,7 @@ jpackage \
--module-path "${MODULE_PATH}" \
--module-path "${INPUT}/${MAIN_JAR}" \
--module "${MAIN_MODULE}/${MAIN_CLASS}" \
--java-options "${JAVA_OPTIONEN}" \
--linux-menu-group "${LINUX_MENU_GROUP}" \
--linux-shortcut \
--linux-rpm-license-type "${LINUX_RPM_LICENSE_TYPE}"
Expand All @@ -88,7 +92,9 @@ echo ""
mv "./${OUT}/classifier-${VERSION}-1.x86_64.rpm" "./${OUT}/${NAME}-${VERSION}-linux.rpm"

echo "Entpacke App nach ./${OUT}/${NAME}-${VERSION}"
rpm2cpio "./${OUT}/${NAME}-${VERSION}-linux.rpm" | cpio -idm -D "./${OUT}/${NAME}-${VERSION}"
cd "./${OUT}"
mkdir "${NAME}-${VERSION}"
rpm2cpio "${NAME}-${VERSION}-linux.rpm" | (cd "${NAME}-${VERSION}" && cpio -idm)
echo ""
echo "Erzeuge Installer-Skript"
echo "#!/bin/sh
Expand All @@ -101,8 +107,8 @@ chmod +x ./opt/*/bin/*
cp -r --copy-contents ./opt/* /opt/
mkdir --parents /usr/share/applications
cp --copy-contents ./opt/*/lib/*.desktop /usr/share/applications/
" > "./${OUT}/${NAME}-${VERSION}/install.sh"
chmod 555 "./${OUT}/${NAME}-${VERSION}/install.sh"
" > "${NAME}-${VERSION}/install.sh"
chmod 555 "${NAME}-${VERSION}/install.sh"
echo "Erzeuge Uninstaller-Skript"
echo "#!/bin/sh
if [ \$(/usr/bin/id -u) -ne 0 ]; then
Expand All @@ -113,12 +119,12 @@ fi
rm -rf /opt/${NAME_KLEIN}
rm /usr/share/applications/${NAME_KLEIN}-${NAME}.desktop
rm -rf ~/.config/${NAME}
" > "./${OUT}/${NAME}-${VERSION}/uninstall.sh"
" > "${NAME}-${VERSION}/uninstall.sh"

chmod 555 "./${OUT}/${NAME}-${VERSION}/uninstall.sh"
chmod 555 "${NAME}-${VERSION}/uninstall.sh"

echo "Erzeuge Archiv ${OUT}/${NAME}-${VERSION}-linux-install.tar.gz"
tar -C "./${OUT}" -czf "./${OUT}/${NAME}-${VERSION}-linux.tar.gz" "${NAME}-${VERSION}"
tar -czf "${NAME}-${VERSION}-linux-install.tar.gz" "${NAME}-${VERSION}"

echo ""
echo ""
Expand Down
3 changes: 3 additions & 0 deletions mac_auslieferung.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ OUT="auslieferung/${VERSION}/macOS/app"
MODULE_PATH="${INPUT}/lib"
MAIN_MODULE="classifier"
MAIN_CLASS="io.github.aid_labor.classifier.main.Hauptfenster"
JAVA_OPTIONEN="--add-opens javafx.graphics/javafx.scene=org.controlsfx.controls"

# Weitere Befehle fuer jpackage:
# App Icon aendern: --icon "path/to/icon.png"
Expand Down Expand Up @@ -61,6 +62,7 @@ jpackage \
--module-path "${MODULE_PATH}" \
--module-path "${INPUT}" \
--module "${MAIN_MODULE}/${MAIN_CLASS}" \
--java-options "${JAVA_OPTIONEN}" \
--mac-package-name "${MAC_PACKAGE_NAME}" \
--mac-package-identifier "${MAC_PACKAGE_ID}"

Expand All @@ -84,6 +86,7 @@ jpackage \
--module-path "${MODULE_PATH}" \
--module-path "${INPUT}/${MAIN_JAR}" \
--module "${MAIN_MODULE}/${MAIN_CLASS}" \
--java-options "${JAVA_OPTIONEN}" \
--mac-package-name "${MAC_PACKAGE_NAME}" \
--mac-package-identifier "${MAC_PACKAGE_ID}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,12 +504,12 @@ public static <T> void beobachteSchwach(Node node, ObservableValue<T> property,
ueberwacherProp = new ArrayList<ChangeListener<?>>();
node.getProperties().put(LISTENERS_KEY, ueberwacherProp);
}

var liste = ueberwacherProp; // Hilfe fuer Lambda Ausdruck
List<ChangeListener<?>> ueberwacherListe;
try {
ueberwacherListe = (List<ChangeListener<?>>) ueberwacherProp;
} catch (Exception e) {
log.severe(() -> "falscher Typ fuer UberwacherListe");
log.severe(() -> "[" + node + "] falscher Typ fuer UberwacherListe: " + liste);
return;
}

Expand All @@ -521,12 +521,18 @@ public static <T> void beobachteSchwach(Node node, ObservableValue<T> property,
public static void entferneSchwacheBeobachtung(Node node) {
var ueberwacherProp = node.getProperties().remove(LISTENERS_KEY);

if (ueberwacherProp == null) {
log.finest("[" + node + "] keine Beobachter zu entfernen");
return;
}

List<ChangeListener<?>> ueberwacherListe;
try {
ueberwacherListe = (List<ChangeListener<?>>) ueberwacherProp;
ueberwacherListe.clear();
log.finer("[" + node + "] Beobachter entfernt");
} catch (Exception e) {
log.severe(() -> "falscher Typ fuer UberwacherListe");
log.severe(() -> "[" + node + "] falscher Typ fuer UberwacherListe: " + ueberwacherProp);
}
}

Expand Down
6 changes: 5 additions & 1 deletion windows_auslieferung.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ set MODULE_PATH="%INPUT%\lib"
set MAIN_JAR="%INPUT%\classifier-%VERSION%.jar"
set MAIN_MODULE=classifier
set MAIN_CLASS=io.github.aid_labor.classifier.main.Hauptfenster
set JAVA_OPTIONEN="--add-opens javafx.graphics/javafx.scene=org.controlsfx.controls"

rem Weitere Befehle fuer jpackage:
rem App Icon aendern: --icon "path/to/icon.png"
Expand Down Expand Up @@ -51,7 +52,8 @@ jpackage ^
--dest %OUT% ^
--module-path %MODULE_PATH% ^
--module-path %MAIN_JAR% ^
--module %MAIN_MODULE%/%MAIN_CLASS%
--module %MAIN_MODULE%/%MAIN_CLASS% ^
--java-options %JAVA_OPTIONEN%
@echo off
echo.
echo Installer fuer Windows werden erzeugt.
Expand All @@ -76,6 +78,7 @@ jpackage ^
--module-path %MODULE_PATH% ^
--module-path %MAIN_JAR% ^
--module %MAIN_MODULE%/%MAIN_CLASS% ^
--java-options %JAVA_OPTIONEN% ^
--win-dir-chooser ^
--win-shortcut ^
--win-menu ^
Expand Down Expand Up @@ -105,6 +108,7 @@ jpackage ^
--module-path %MODULE_PATH% ^
--module-path %MAIN_JAR% ^
--module %MAIN_MODULE%/%MAIN_CLASS% ^
--java-options %JAVA_OPTIONEN% ^
--win-dir-chooser ^
--win-shortcut ^
--win-menu ^
Expand Down

0 comments on commit 8ec4bdb

Please sign in to comment.