Skip to content

Commit 7ee7d76

Browse files
committed
Create installer using install4j #25
1 parent 72fffb4 commit 7ee7d76

File tree

17 files changed

+547
-33
lines changed

17 files changed

+547
-33
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
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

Lines changed: 65 additions & 24 deletions
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,24 +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.
83+
84+
![Install4J](https://www.ej-technologies.com/images/product_banners/install4j_medium.png)
85+
86+
Installers are created using [Install4J] and the [sbt-install4j] plugin.
87+
88+
Building Installers
89+
-------------------
90+
To build an installer you need to have [Install4J] installed.
91+
92+
Use SBT task `install4j -m _os_`, for instance to create Windows installer:
6893

69-
Project Status
70-
--------------
94+
```
95+
sbt> install4j -m windows
96+
```
7197

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.
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.
7499

100+
For more information about `install4j` see [sbt-install4j].
75101

76102
Mailing list
77103
------------
78104

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

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

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

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

87113

88114
License
@@ -113,3 +139,18 @@ AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
113139
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
114140
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
115141

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

install4j.sbt

Lines changed: 11 additions & 0 deletions
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)