mirror of
https://gitlab.com/cc-ru/ocelot/ocelot-desktop.git
synced 2025-12-20 02:59:19 +01:00
Version 1.1.0 & commit hash tracking
This commit is contained in:
parent
d13b442993
commit
c4cc0c0af7
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
# SBT
|
||||
target/
|
||||
/.bsp/
|
||||
|
||||
# Gradle
|
||||
/.gradle
|
||||
|
||||
@ -21,7 +21,7 @@ build:
|
||||
- sbt assembly
|
||||
artifacts:
|
||||
paths:
|
||||
- target/scala-2.13/ocelot-desktop-assembly-0.1.jar
|
||||
- target/scala-2.13/ocelot-desktop.jar
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
@ -31,7 +31,7 @@ pages:
|
||||
script:
|
||||
- rm -rf public
|
||||
- mkdir public
|
||||
- cp target/scala-2.13/ocelot-desktop-assembly-0.1.jar public/ocelot.jar
|
||||
- cp target/scala-2.13/ocelot-desktop.jar public/ocelot.jar
|
||||
cache: {}
|
||||
artifacts:
|
||||
paths:
|
||||
|
||||
@ -90,6 +90,13 @@ A few smaller features are worth mentioning, too:
|
||||
## Download
|
||||
Decided to give Ocelot Desktop a shot? [**Download** the latest build][download].
|
||||
|
||||
## How to build it?
|
||||
Just import the project in your favorite IDE.
|
||||
Make sure to have Scala and SBT installed (manually or through IDE).
|
||||
|
||||
Use `sbt run` to start Ocelot Desktop. Use `sbt assembly` to generate JAR file.
|
||||
(It will appear at `target/scala-2.13/ocelot-desktop.jar` location.)
|
||||
|
||||
## Credits
|
||||
- **LeshaInc**, the author and maintainer of Ocelot Desktop.
|
||||
- **Totoro**, the creator of ocelot-brain and ocelot-online.
|
||||
|
||||
14
build.sbt
14
build.sbt
@ -1,10 +1,18 @@
|
||||
name := "ocelot-desktop"
|
||||
version := "0.1"
|
||||
version := "1.1.0"
|
||||
scalaVersion := "2.13.8"
|
||||
|
||||
lazy val root = project.in(file("."))
|
||||
.dependsOn(brain % "compile->compile")
|
||||
.aggregate(brain)
|
||||
.enablePlugins(BuildInfoPlugin)
|
||||
.settings(
|
||||
buildInfoKeys := Seq[BuildInfoKey](
|
||||
BuildInfoKey.action("commit") {
|
||||
scala.sys.process.Process("git rev-parse HEAD").!!.trim
|
||||
}, version
|
||||
)
|
||||
)
|
||||
|
||||
lazy val brain = ProjectRef(file("lib/ocelot-brain"), "ocelot-brain")
|
||||
|
||||
@ -21,7 +29,9 @@ libraryDependencies += "org.lwjgl.lwjgl" % "lwjgl-platform" % lwjglVersion class
|
||||
|
||||
libraryDependencies += "org.jcraft" % "jorbis" % "0.0.17"
|
||||
|
||||
assemblyMergeStrategy in assembly := {
|
||||
assembly / assemblyMergeStrategy := {
|
||||
case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
|
||||
case _ => MergeStrategy.first
|
||||
}
|
||||
|
||||
assembly / assemblyJarName := s"ocelot-desktop.jar"
|
||||
|
||||
@ -1 +1 @@
|
||||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")
|
||||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0")
|
||||
|
||||
@ -1 +1 @@
|
||||
sbt.version = 1.3.12
|
||||
sbt.version = 1.7.1
|
||||
|
||||
1
project/buildinfo.sbt
Normal file
1
project/buildinfo.sbt
Normal file
@ -0,0 +1 @@
|
||||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
|
||||
@ -1,5 +1,6 @@
|
||||
package ocelot.desktop
|
||||
|
||||
import buildinfo.BuildInfo
|
||||
import li.flor.nativejfilechooser.NativeJFileChooser
|
||||
import ocelot.desktop.audio.{Audio, SoundSource}
|
||||
import ocelot.desktop.ui.UiHandler
|
||||
@ -44,6 +45,7 @@ object OcelotDesktop extends Logging {
|
||||
|
||||
def mainInner(args: mutable.HashMap[Argument, Option[String]]): Unit = {
|
||||
logger.info("Starting up Ocelot Desktop")
|
||||
logger.info(s"Version: ${BuildInfo.version} (${BuildInfo.commit.take(7)})")
|
||||
splashScreen.setStatus("Initializing brain...", 0.10f)
|
||||
Ocelot.initialize(LogManager.getLogger(Ocelot))
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package ocelot.desktop.ui.swing
|
||||
|
||||
import buildinfo.BuildInfo
|
||||
|
||||
import java.awt.Window.Type
|
||||
import java.awt.{BorderLayout, Color, Dimension, Insets, Rectangle}
|
||||
import java.time.Year
|
||||
@ -45,7 +47,7 @@ class SplashScreen extends JDialog {
|
||||
// Application version
|
||||
private val applicationVersion: JLabel = addLabel(
|
||||
new Rectangle(0, 0, Width, Height),
|
||||
s"Version: 1.0.0",
|
||||
s"Version: ${BuildInfo.version} (${BuildInfo.commit.take(7)})",
|
||||
SwingConstants.LEFT,
|
||||
SwingConstants.BOTTOM
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user