This project is still in beta.
KtSignage is a Simple smart display application worked on Kotlin.
$ chmod +x gradlew # at only the first time
$ ./gradlew run
KtSignage is designed based on MVVM (Model-View-ViewModel).
- MyApp : App
- has the own coroutine scope whose lifecycle depends on this application one's (we can access with
MyApp.applicationScope
)
- has the own coroutine scope whose lifecycle depends on this application one's (we can access with
- View Layer
- constructs TornadoFX (JavaFV) View hierarchy
- has
MainView
as the primary view of this application
- ViewModel Layer
- has the own coroutine scope (
viewModelScope
whose default dispatcher isDispatchers.JavaFX
)
- has the own coroutine scope (
- Model Layer
- includes
data class
and DAO (Data Access Object) likePreferencesDao
- DAOs must have the own interfaces to debug easily
- includes
If you use OpenJFX, add the following implementation
into build.gradle.kts
.
dependencies {
// ...
// If your path to "OpenJFX lib" is different from the following one, change yours.
implementation(fileeTree("dir" to "/usr/share/openjfx/lib", "include" to arrayOf("*.jar")))
// ...
}
- Download OpenJFX directly from https://openjfx.io/.
- Copy
*.so
files into/usr/share/openjfx/lib
. (IfimageView
is not displayed, replace all files (including*.jar
) in OpenJFX downloaded from official web.)