Skip to content

Commit 5bd9834

Browse files
committed
Merge branch 'develop'
2 parents a1a56f7 + 7ee7d76 commit 5bd9834

File tree

19 files changed

+544
-71
lines changed

19 files changed

+544
-71
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ bin
1515
/.idea
1616
/.idea_modules
1717
/.worksheet
18+
/installer/media/
19+
*.install4j~

README.md

+61-28
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,21 @@ ScalaFX Ensemble
22
================
33

44
ScalaFX Ensemble provides a gallery of over 60 sample applications illustrating how
5-
[ScalaFX](http://scalafx.org) can be used for creation of user interfaces controls, charts, graphics, media and web views.
5+
[ScalaFX] can be used for creation of user interfaces controls, charts, graphics, media and web views.
66

77
![ScalaFX Ensemble Application - Demo navigation](http://scalafx.github.io/scalafx-ensemble/images/ScalaFX_Ensemble-grid-50p.png)
88

99
![ScalaFX Ensemble Application - Demo tab](http://scalafx.github.io/scalafx-ensemble/images/ScalaFX_Ensemble-demo-50p.png)
1010
![ScalaFX Ensemble Application - Demo source](http://scalafx.github.io/scalafx-ensemble/images/ScalaFX_Ensemble-source-50p.png)
1111

1212
Each example can be executed within the ScalaFX Ensemble application, its source code can be easily seen there too.
13-
Example can be saved, from within ScalaFX Ensemble application, as an stand-alone [SBT](http://www.scala-sbt.org/) project,
14-
with option to convert to [Eclipse](http://www.eclipse.org/) or [IntelliJ IDEA](http://www.jetbrains.com/idea/) project.
13+
Example can be saved, from within ScalaFX Ensemble application, as an stand-alone [SBT] project. [IntelliJ IDEA] can load SBT projects if you have IntelliJ's Scala plugin installed. SBT projects can be converted to [Eclipse] projects using [sbteclipse] plugin.
1514

1615
ScalaFX Ensemble can be used by ScalaFX beginners as a set of examples and by more experienced users as a visual
1716
reference. Larger size screenshots and information about changes can be found on the
18-
[ScalaFX Ensemble Home Page](http://scalafx.github.com/scalafx-ensemble/).
19-
20-
This project is inspired by [JavaFX Ensemble](http://www.oracle.com/technetwork/java/javafx/samples/index.html).
21-
22-
Larger size screenshots and information about changes can be found on the
23-
[ScalaFX Ensemble Home Page](http://scalafx.github.com/scalafx-ensemble/)
17+
[ScalaFX Ensemble Home Page].
2418

19+
This project is inspired by [JavaFX Ensemble].
2520

2621
How to run ScalaFX Ensemble
2722
---------------------------
@@ -33,29 +28,45 @@ In the future, we will also provide an excitable version.
3328

3429
To compile and run the project you only need to have:
3530

36-
* [Java 11 JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
37-
* [SBT](http://www.scala-sbt.org/) (v.1 or newer) installed.
38-
* ScalaFX Ensemble source code
31+
* [Java JDK] 11 or newer
32+
* [SBT] 1 or newer
33+
* ScalaFX Ensemble source code. All missing dependencies, including proper version of Scala and ScalaFX, will be downloaded by SBT.
3934

40-
All missing dependencies, including proper version of Scala and ScalaFX, will be downloaded by SBT.
35+
Alternatively you can download a stand-alone installer from the [Releases], see [Stand-Alone Application](#stand-alone-application) below.
4136

42-
The older version of ScalaFX Ensemble for ScalaFX 8 on branch [SFX-8](https://github.com/scalafx/scalafx-ensemble/tree/SFX-8), ScalaFX 2.2 (Java 1.7) is on branch
37+
The older version of ScalaFX Ensemble for ScalaFX 8 are on branch [SFX-8](https://github.com/scalafx/scalafx-ensemble/tree/SFX-8), ScalaFX 2.2 (Java 1.7) is on branch
4338
[SFX-2](https://github.com/scalafx/scalafx-ensemble/tree/SFX-2).
4439

4540
### Compile and Run using SBT ###
4641

47-
Once you have [JDK 11](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
48-
and [SBT](http://www.scala-sbt.org/) installed, you can compile and run ScalaFX Ensemble from command prompt using `sbt`:
42+
Once you have [Java JDK] and [SBT] installed, you can compile and run ScalaFX Ensemble from command prompt using `sbt`:
4943

5044
1. Open command prompt
5145
2. Change directory to where you saved the ScalaFX Ensemble source code (directory containing this README file).
5246
3. Type `sbt run`
5347

5448
When run the very first time, SBT will download all needed dependencies including Scala and ScalaFX.
5549

50+
### Saving and Building Individual Examples
51+
52+
ScalaFX Ensemble Application gives you ability to save each example as a separate SBT project. You can then build and run that example.
53+
54+
To save an example as a stand-alone SBT project:
55+
56+
1. Start ScalaFX Ensemble Application
57+
2. Select an an example from the panel on the left. For instance "Charts" > "Adv Candle Stick Chart"
58+
3. Select on "Source" tab above the example
59+
4. Select "Save SBT Project..." then select **empty** directory where to save the project
60+
61+
To run the saved example, assuming that you have [SBT] and JDK installed:
62+
63+
1. From a command line prompt navigate to the directory you saved the example
64+
2. At command line type: `sbt run`. This will download necessary dependencies, build, and run the example.
65+
66+
5667
### Compile and Run using Intellij IDEA ###
5768

58-
[IntelliJ IDEA](http://www.jetbrains.com/idea/) with Scala plugin can import project settings from an SBT configuration.
69+
[IntelliJ IDEA] with Scala plugin can import project settings from an SBT configuration.
5970
Simply select `File > Import Project...` and point to location of the ScalaFX Ensemble `build.sbt`.
6071

6172
Ensemble requires some resources to be generated from the sources to run.
@@ -65,32 +76,39 @@ To best way to run it is be defining an SBT task in Run Configuration:
6576
3. Give it a name "Ensemble"
6677
3. In "Task" field type "run" and click OK
6778

79+
Stand-Alone Application
80+
-----------------------
81+
82+
Installer for stand-alone version of ScalaFX Ensemble Application are available for Windows, Mac OS, and Linux from the [Releases] page.
6883

69-
Project Status
70-
--------------
84+
![Install4J](https://www.ej-technologies.com/images/product_banners/install4j_medium.png)
7185

72-
This project is in a "stable" pre-release state, the main missing future planned for the first release is support
73-
for building native executables.
86+
Installers are created using [Install4J] and the [sbt-install4j] plugin.
7487

88+
Building Installers
89+
-------------------
90+
To build an installer you need to have [Install4J] installed.
7591

76-
Creating Native Installer
77-
-------------------------
78-
To create a native installer for current OS (Windows, Linux or MacOSX) issue following command:
92+
Use SBT task `install4j -m _os_`, for instance to create Windows installer:
7993

8094
```
81-
sbt jdkPackager:packageBin
95+
sbt> install4j -m windows
8296
```
8397

98+
Note that due to native dependencies in JavaFX distribution you have to build installer on a destination OS. Current SBT setup does not allow for cross-building on different OS. It is technically possible but not currently implemented in this project.
99+
100+
For more information about `install4j` see [sbt-install4j].
101+
84102
Mailing list
85103
------------
86104

87105
To post questions or send feedback about ScalaFX Ensemble or ScalaFX in general, please use ScalaFX discussion groups:
88106

89-
* [scalafx-user](https://groups.google.com/forum/?fromgroups#!forum/scalafx-users) - for users of ScalaFX
107+
* [scalafx-user] - for users of ScalaFX
90108

91-
* [scalafx-dev](https://groups.google.com/forum/?fromgroups#!forum/scalafx-dev) - for ScalaFX contributors/committers
109+
* [scalafx-dev] - for ScalaFX contributors/committers
92110

93-
* [ScalaFX](https://stackoverflow.com/questions/tagged/scalafx) on StackOverflow
111+
* [ScalaFX on StackOverflow](https://stackoverflow.com/questions/tagged/scalafx)
94112

95113

96114
License
@@ -121,3 +139,18 @@ AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
121139
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
122140
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
123141

142+
[Apache2]: https://www.apache.org/licenses/LICENSE-2.0.html
143+
[Eclipse]: http://www.eclipse.org/
144+
[Install4J]: https://www.ej-technologies.com/products/install4j/overview.html
145+
[IntelliJ IDEA]: http://www.jetbrains.com/idea/
146+
[Java JDK]: http://www.oracle.com/technetwork/java/javase/downloads/index.html
147+
[JavaFX Ensemble]: http://www.oracle.com/technetwork/java/javafx/samples/index.html
148+
[sbt-install4j]: https://github.com/jpsacha/sbt-install4j
149+
[sbteclipse]: https://github.com/sbt/sbteclipse
150+
[SBT]: http://www.scala-sbt.org/
151+
152+
[ScalaFX]: http://scalafx.org
153+
[scalafx-dev]: https://groups.google.com/forum/?fromgroups#!forum/scalafx-dev
154+
[scalafx-user]: https://groups.google.com/forum/?fromgroups#!forum/scalafx-users
155+
[ScalaFX Ensemble Home Page]: http://scalafx.github.com/scalafx-ensemble/
156+
[Releases]: https://github.com/scalafx/scalafx-ensemble/releases

build.sbt

+1-28
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
name := "ScalaFX Ensemble"
44

5-
version := "1.13.0"
5+
version := "1.13.1-SNAPSHOT"
66

77
organization := "org.scalafx"
88

@@ -78,30 +78,3 @@ resourceGenerators in Compile += Def.task {
7878
}.taskValue
7979

8080
mainClass in Compile := Some("scalafx.ensemble.Ensemble")
81-
mainClass in assembly := Some("scalafx.ensemble.Ensemble")
82-
83-
//
84-
// Configuration for sbt-native-packager / JDKPackagerPlugin
85-
//
86-
87-
enablePlugins(JDKPackagerPlugin)
88-
89-
maintainer := "ScalaFX Organization (scalafx.org)"
90-
packageSummary := "Collection of live ScalaFX examples"
91-
packageDescription := "An application demonstrating ScalaFX code samples."
92-
93-
lazy val iconGlob = sys.props("os.name").toLowerCase match {
94-
case os if os.contains("mac") => "*.icns"
95-
case os if os.contains("win") => "*.ico"
96-
case _ => "*.png"
97-
}
98-
99-
jdkAppIcon := (sourceDirectory.value ** iconGlob).getPaths.headOption.map(file)
100-
jdkPackagerType := "installer"
101-
102-
// this is to help ubuntu 15.10
103-
antPackagerTasks in JDKPackager := (antPackagerTasks in JDKPackager).value orElse {
104-
for {
105-
f <- Some(file("/usr/lib/jvm/java-8-oracle/lib/ant-javafx.jar")) if f.exists()
106-
} yield f
107-
}

install4j.sbt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//
2+
// Install4J Setup
3+
//
4+
5+
exportJars := true
6+
7+
enablePlugins(SBTInstall4J)
8+
//install4jcFile := file("C:/Program Files/install4j8/bin/install4jc.exe")
9+
install4jProjectFile := "installer/ScalaFX_Ensemble.install4j"
10+
install4jRelease := version.value
11+
//install4jVerbose := true

0 commit comments

Comments
 (0)