mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2026-10-24 23:02:27 +00:00
Initial stab at modules. Cannot do a modular package until ALL automatic modules are resolved.
This commit is contained in:
1 parent
33d04cbff5
commit
e42a02bf9f
5 files changed
+136
No files matched your search
@@ -18,6 +18,11 @@ dependencies {
|
||||
implementation 'org.slf4j:slf4j-jdk14:2.0.19'
|
||||
}
|
||||
|
||||
tasks.register("copyDependencies", Copy) {
|
||||
from(configurations.runtimeClasspath).into(layout.buildDirectory.dir("jars"))
|
||||
}
|
||||
build.dependsOn("copyDependencies")
|
||||
|
||||
javafx {
|
||||
version = '25.0.4'
|
||||
modules = ['javafx.controls', 'javafx.graphics']
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
module org.applecommander.javafx {
|
||||
requires atlantafx.base;
|
||||
requires java.prefs;
|
||||
requires javafx.base;
|
||||
requires javafx.controls;
|
||||
requires javafx.graphics;
|
||||
requires org.applecommander.api;
|
||||
}
|
||||
@@ -29,6 +29,10 @@ dependencies {
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.compilerArgs += ['--module-path', classpath.asPath]
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
import com.webcodepro.applecommander.storage.DiskFactory;
|
||||
import org.applecommander.filestore.FileStoreFactory;
|
||||
import org.applecommander.source.Source;
|
||||
|
||||
module org.applecommander.api {
|
||||
requires java.desktop;
|
||||
requires java.logging;
|
||||
requires com.google.gson;
|
||||
requires org.apache.commons.csv;
|
||||
|
||||
// TODO automatic modules
|
||||
requires acdasm;
|
||||
requires bastools.api;
|
||||
requires ShrinkItArchive;
|
||||
|
||||
// Legacy APIs
|
||||
exports com.webcodepro.applecommander.storage;
|
||||
exports com.webcodepro.applecommander.storage.compare;
|
||||
exports com.webcodepro.applecommander.storage.filters;
|
||||
exports com.webcodepro.applecommander.storage.filters.imagehandlers;
|
||||
exports com.webcodepro.applecommander.storage.os.cpm;
|
||||
exports com.webcodepro.applecommander.storage.os.dos33;
|
||||
exports com.webcodepro.applecommander.storage.os.gutenberg;
|
||||
exports com.webcodepro.applecommander.storage.os.nakedos;
|
||||
exports com.webcodepro.applecommander.storage.os.pascal;
|
||||
exports com.webcodepro.applecommander.storage.os.prodos;
|
||||
exports com.webcodepro.applecommander.storage.os.rdos;
|
||||
exports com.webcodepro.applecommander.ui;
|
||||
exports com.webcodepro.applecommander.util;
|
||||
exports com.webcodepro.applecommander.util.readerwriter;
|
||||
exports com.webcodepro.applecommander.util.filestreamer;
|
||||
|
||||
// FormattedDisk discovery mechanisms
|
||||
uses DiskFactory;
|
||||
provides com.webcodepro.applecommander.storage.DiskFactory
|
||||
with com.webcodepro.applecommander.storage.os.cpm.CpmDiskFactory,
|
||||
com.webcodepro.applecommander.storage.os.dos33.DosDiskFactory,
|
||||
com.webcodepro.applecommander.storage.os.gutenberg.GutenbergDiskFactory,
|
||||
com.webcodepro.applecommander.storage.os.nakedos.NakedosDiskFactory,
|
||||
com.webcodepro.applecommander.storage.os.pascal.PascalDiskFactory,
|
||||
com.webcodepro.applecommander.storage.os.prodos.ProdosDiskFactory,
|
||||
com.webcodepro.applecommander.storage.os.rdos.RdosDiskFactory;
|
||||
|
||||
// Revised APIs
|
||||
exports org.applecommander.archive.shrinkit;
|
||||
exports org.applecommander.archive.zip;
|
||||
exports org.applecommander.capability;
|
||||
exports org.applecommander.device;
|
||||
exports org.applecommander.device.nibble;
|
||||
exports org.applecommander.filestore;
|
||||
exports org.applecommander.hint;
|
||||
exports org.applecommander.image;
|
||||
exports org.applecommander.os;
|
||||
exports org.applecommander.os.dos;
|
||||
exports org.applecommander.os.pascal;
|
||||
exports org.applecommander.source;
|
||||
exports org.applecommander.usage;
|
||||
exports org.applecommander.util;
|
||||
|
||||
// FileStore discovery mechanisms
|
||||
uses FileStoreFactory;
|
||||
provides org.applecommander.filestore.FileStoreFactory
|
||||
with org.applecommander.archive.shrinkit.ShrinkitFileStoreFactory,
|
||||
org.applecommander.archive.zip.ZipFileStoreFactory,
|
||||
// Legacy shim
|
||||
com.webcodepro.applecommander.storage.DiskFileStoreFactory;
|
||||
|
||||
// Source discovery mechanisms
|
||||
uses Source.Factory;
|
||||
provides org.applecommander.source.Source.Factory
|
||||
// These are "fromObject" sources
|
||||
with org.applecommander.source.FileSource.Factory,
|
||||
com.webcodepro.applecommander.storage.FileEntrySource.Factory,
|
||||
org.applecommander.source.FileEntrySource.Factory,
|
||||
// These are "fromSource" (wrapper) sources
|
||||
org.applecommander.image.DiskCopyImage.Factory,
|
||||
org.applecommander.image.UniversalDiskImage.Factory,
|
||||
com.webcodepro.applecommander.storage.ShrinkitSourceFactory;
|
||||
}
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
source gradle.properties
|
||||
SUBPROJECT="app/gui-javafx"
|
||||
VERSION="${version//-SNAPSHOT/}"
|
||||
YEAR=$(date +%Y)
|
||||
MAIN_JAR=$(find ${SUBPROJECT}/build/libs -name "gui-javafx-*.jar" -exec basename {} \;)
|
||||
ARCH=$(uname -m)
|
||||
|
||||
echo "Building AppleCommanderFX DEB for:"
|
||||
echo " SUBPROJECT=${SUBPROJECT}"
|
||||
echo " VERSION=${VERSION} (from ${version})"
|
||||
echo " YEAR=${YEAR}"
|
||||
echo " MAIN_JAR=${MAIN_JAR}"
|
||||
echo " ARCH=${ARCH}"
|
||||
|
||||
jpackage \
|
||||
--type deb \
|
||||
--java-options --enable-native-access=ALL-UNNAMED \
|
||||
--app-version "${VERSION}" \
|
||||
--copyright "Copyright ${YEAR}" \
|
||||
--description "AppleCommanderFX is a tool that manipulates Apple ][ disk images. Files may be imported, exported, viewed, or printed with various file filters." \
|
||||
--name "AppleCommanderFX" \
|
||||
--module-path "${SUBPROJECT}/${MAIN_JAR}:${SUBPROJECT}/build/jars" \
|
||||
--module org.applecommander.javafx/org.applecommander.javafx.AppleCommanderFX \
|
||||
--about-url "https://applecommander.org" \
|
||||
--license-file LICENSE \
|
||||
--icon lib/ac-swt-common/src/main/resources/linux/AppleCommander-128x128.png \
|
||||
--linux-deb-maintainer "robgreene@gmail.com" \
|
||||
--linux-menu-group Utility \
|
||||
--linux-rpm-license-type "GPL-2.0-or-later" \
|
||||
--linux-app-category "Utility"
|
||||
|
||||
# There doesn't appear to be a mechanism to set the output name without
|
||||
# changing the application name as well. So we just 'mv' it.
|
||||
SRC=$(find . -name "applecommanderfx*.deb")
|
||||
DST="AppleCommanderFX-${version}-linux-${ARCH}.deb"
|
||||
mv -v ${SRC} ${DST}
|
||||
|
||||
echo "Done!"
|
||||
Reference in new issue
Block a user