Java-Installer/README.md

65 lines
2.3 KiB
Markdown
Raw Normal View History

2022-01-15 20:47:23 +00:00
# Purpose
2024-01-19 16:33:54 +00:00
This project provides a simple installation tool for installing your java application for the operating systems *windows* and *linux*.
2022-01-15 20:47:23 +00:00
If you want to use a simple installer instead of the installation method the operating systems ships with (like *msi* or *dpkg packages*) feel free to use this installer.
2024-01-19 16:33:54 +00:00
It can be used for a **single jar file** with a few dependencies.
2022-01-15 20:47:23 +00:00
# Features
### Windows and Linux
* quiet installation without opening a command prompt
* installation of **fonts** from the source folder (*.tft*)
2024-01-19 16:33:54 +00:00
* dynamic download of the jar file from a webserver.
2022-01-15 20:47:23 +00:00
Basic auth for downloading the executable is supported
* install the program *portable* in a single folder
* creating a **desktop** and a **start menu** entry with a custom icon
* a **launch script** for opening the application will be provided
* put your application into the autostart folder of the operating system *(for GUI applications)*
2022-01-15 20:47:23 +00:00
### Windows
2024-01-19 16:33:54 +00:00
* besides the removal via the launch script an **uninstall** entry in the *contol center* will be created
* installation of the programm only for the current **user** → no need of administrator rights
2022-01-15 20:47:23 +00:00
### Linux
* creation of a *systemd* unit file to run the program as a **service**
# Getting started
## How to get
2024-01-19 16:33:54 +00:00
You can build the library by yourself or use the provided version in the [Maven Central Repository](https://central.sonatype.com/artifact/de.rpjosh/installer).
## Usage
2022-01-15 20:47:23 +00:00
The usage of the library is very simple. See the below code snippet for a short example.
2024-01-19 16:33:54 +00:00
```java
2022-01-15 20:47:23 +00:00
InstallConfig conf = new InstallConfig (
"myCompany",
"2.0.0",
"MyApplicationName",
"My long application name")
;
2024-01-19 16:33:54 +00:00
// You can specify the various options via the InstallConfig object
2022-01-15 20:47:23 +00:00
conf.setDownloadURLForProgramm(URL, BASIC_AUTH_USER, BASIC_AUTH_PASSWORD);
... // see the javadoc for more options
2024-01-19 16:33:54 +00:00
// After configuring you can install the application
2022-01-15 20:47:23 +00:00
Installer installer = new Installer(conf);
installer.installProgramm(args);
2024-01-19 16:33:54 +00:00
// Whether the installation was successful (0) or erroneous (>0)
2022-01-15 20:47:23 +00:00
System.out.println(installer.getResponseCode());
```
2022-01-15 20:47:23 +00:00
# License
2024-01-19 16:33:54 +00:00
This project is licensed under the GPLv3. Please see the [LICENSE](LICENSE) file for a full license.
2022-01-15 20:47:23 +00:00
# Need help?
2024-01-19 16:33:54 +00:00
You can check out the 📖️ Javadocs for more information.
2022-01-15 20:47:23 +00:00
If that didn't help you feel free to create an issue or open a pull request 📣️