Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsacha committed Apr 6, 2019
2 parents 6692495 + c6f90dd commit 3bf4337
Show file tree
Hide file tree
Showing 12 changed files with 992 additions and 72 deletions.
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
sudo: false

language: scala
scala:
- 2.12.8

jdk:
- oraclejdk8

install: true

script:
- java -version
- sbt test

branches:
only:
- master
- develop

69 changes: 63 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
sbt-install4j
=============

[![Build Status](https://travis-ci.org/jpsacha/sbt-install4j.svg?branch=master)](https://travis-ci.org/jpsacha/sbt-install4j) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.jpsacha/sbt-install4j/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.jpsacha/sbt-install4j)


[SBT] plugin for building installers with [Install4J].


Usage
-----

Expand All @@ -24,12 +28,26 @@ enablePlugins(SBTInstall4J)
install4jProjectFile := "installer/example.install4j"
```

### Available Tasks and Settings
## Available Tasks and Settings

SBT tasks provided by `sbt-install4j` plugin:

* `install4j` : Task -
Builds Install4J project
Builds Install4J project. Simple usage from SBT REPL
```
sbt> install4j
```
It will build project defined in by setting `install4jProjectFile`

It can take optional arguments that are passed by to the Install4J compiler.
Refer to `install4jc` documentation in [Install4J Help](https://www.ej-technologies.com/resources/install4j/help/doc/#install4j.cli) for list of supported command line options. You can print option summary from SBT REPL using
```
sbt> install4j --help
```
Example of only building `windows` media type
```
sbt> install4j -m windows
```

* `install4jCopyDependedJars` : Task -
Copies project dependencies to directory `install4jDependedJarsDir`
Expand All @@ -43,13 +61,14 @@ SBT settings provided by `sbt-install4j` plugin:
* `install4jCopyDependedJarsEnabled` : Boolean -
if `true` dependent jars will be copies, if `false` they will be not.

* `install4jHomeDir` : File -
Install4J installation directory. It assumes that Install4J compiler is in subdirectory `bin/install4jc.exe`
* `install4jcFile` : File - Location of the install4j's command line compiler `install4jc[.exe]`. It can be found in the `bin` directory of the install4j installation. Default can be set with environment variable `INSTALL4JC_FILE`.

* `install4jProjectFile` : String - The install4j project file that should be build.
* `install4jProjectFile` : String - Relative path to the install4j project file that should be build.

* `install4jDependedJarsDir` : String -
Location where dependent jars will be copied.

* `install4jExtraOptions` : Seq[String] - "Additional command line options passed to the compiler."

* `install4jVerbose` : Boolean -
Enables verbose mode.
Expand All @@ -61,7 +80,45 @@ SBT settings provided by `sbt-install4j` plugin:
* `install4jCompilerVariables` : Map[String, String] -
Override a compiler variable with a different value.
In the map, the `key` is variable's name, the `value` is variable's value.

* `install4jHomeDir` : File - __Deprecated__. Install4J installation directory. It assumes that Install4J compiler is in subdirectory `bin`. Default can be set with environment variable `INSTALL4J_HOME`. This option is deprecated, use environment variable `INSTALL4JC_FILE` or setting `install4jcFile` instead.

## Determining location of Install4J compiler

The `sbt-install4j` executes Install4J compiler. It needs to know its location. It will attempts to determine location base on the OS used. On Windows it is assumed to be:
```
C:\Program Files\Install4J7\bin\intall4jc.exe
```

On Mac OS X:
```
/Applications/install4j.app/Contents/Resources/app/bin/install4jc
```

On Linux:
```
/opt/install4j/bin/install4jc
```

If the Install4J is installed in a different location you can specify location of the compiler using the environment variable `INSTALL4JC_FILE` or setting `install4jcFile`. For multi-platform builds it is preferred to use the environment variable `INSTALL4JC_FILE`.

## Tips & Tricks

To see debugging information set SBT logging level to `debug`:
```cmd
sbt> debug
```
Look in the log for lines prefixed with `[debug] [sbt-install4j]`.


## License

sbt-install4j is licensed under [Apache 2.0 license][Apache2].




[Install4J]: https://www.ej-technologies.com/products/install4j/overview.html
[SBT]: http://www.scala-sbt.org/
[SBT]: http://www.scala-sbt.org/
[Apache2]: https://www.apache.org/licenses/LICENSE-2.0.html
8 changes: 5 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ sbtPlugin := true

name := "sbt-install4j"
organization := "com.github.jpsacha"
version := "1.2.0"
version := "1.3.0-SHAPSHOT"

homepage := Some(url("http://github.com/jpsacha/sbt-install4j"))
organizationHomepage := Some(url("http://ij-plugins.sf.net"))
startYear := Some(2014)
licenses := Seq("GPLv3" -> url("http://www.gnu.org/licenses/gpl.html"))
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html"))
description := "SBT plugin for building installers with Install4J."

scalaVersion := "2.12.3"
scalaVersion := "2.12.8"

scalacOptions := Seq("-deprecation", "-unchecked")

libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.7" % "test"

publishArtifact in(Test, packageBin) := false
publishArtifact in(Test, packageDoc) := false
publishArtifact in(Test, packageSrc) := false
Expand Down
4 changes: 2 additions & 2 deletions example/build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name := "sbt-install4j-example"
organization := "ij-plugins.sf.net"
version := "1.2.01"
version := "1.3.0-SHAPSHOT"

scalaVersion := "2.12.3"
scalaVersion := "2.12.8"

// Set the prompt (for this build) to include the project id.
shellPrompt in ThisBuild := { state => "sbt:"+Project.extract(state).currentRef.project + "> " }
Expand Down
Loading

0 comments on commit 3bf4337

Please sign in to comment.