Skip to content

Commit

Permalink
Update to Java 15, fix browser bug
Browse files Browse the repository at this point in the history
  • Loading branch information
marcocipriani01 committed Jan 1, 2021
1 parent a32e7e0 commit 3146a77
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 27 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ThunderFocus is an all-in-one focuser and power box (dew heater controller) desi

The firmware can run on both Arduino and Teensy, with the only difference being the RTC support and the speed of the MCU. Thanks to the firmware configuration file, you can select only the features you need and remove the unnecessary: the control software will detect the available features and display only the options supported by the board, so you won't need to modify other files.

The user interface is platform-independent and works seamless across computers and boards like Raspberry Pi, with the only requirement being Java 14 (bundled in the Windows installer): in this way, you get the same experience no matter what OS you run. Moreover, it uses [INDIForJava](http://indiforjava.sourceforge.net/stage/index.html) for INDI/KStars compatibility and a special ASCOM driver for Windows compatibility. As a bonus, it can also be controlled using the [IPARCOS Android app](https://marcocipriani01.github.io/projects/IPARCOS) when the INDI server is enabled!
The user interface is platform-independent and works seamless across computers and boards like Raspberry Pi, with the only requirement being Java 15 (bundled in the Windows installer): in this way, you get the same experience no matter what OS you run. Moreover, it uses [INDIForJava](http://indiforjava.sourceforge.net/stage/index.html) for INDI/KStars compatibility and a special ASCOM driver for Windows compatibility. As a bonus, it can also be controlled using the [IPARCOS Android app](https://marcocipriani01.github.io/projects/IPARCOS) when the INDI server is enabled!

## Features

Expand Down Expand Up @@ -47,21 +47,21 @@ Get [the latest release](https://github.com/marcocipriani01/ThunderFocus/release

**Skip the Java installation if you already have it installed!**

Install the latest Java Development Kit available, version 14 or greater. On Ubuntu:
Install the latest Java Development Kit available, version 15 or greater. On Ubuntu:

- `sudo apt update`
- `sudo apt install openjdk-14-jdk`
- `sudo apt install openjdk-15-jdk`

Raspberry Pi OS or Astroberry:

- Download the latest [AdoptOpenJDK](https://adoptopenjdk.net/releases.html) JRE or JDK (recommended: version 14, HotSpot JVM)
- Download the latest [AdoptOpenJDK](https://adoptopenjdk.net/releases.html) JRE or JDK (recommended: version 15, HotSpot JVM)
- Run `sudo mkdir /usr/java/`
- Extract the archive: `sudo tar -zxf AdoptOpenJDK.tar -C /usr/java/` (change the filename accordingly to what you downloaded)
- Run `echo 'export PATH=$PATH:/usr/java/' | sudo tee -a /etc/profile`

### macOS, Windows 32-bit and other Linux distros

Install Java version 14 or greater depending on your OS and then use the `.jar` ThunderFocus release. Someday I will add a macOS installer...
Install Java version 15 or greater depending on your OS and then use the `.jar` ThunderFocus release. Someday I will add a macOS installer...

## Using the control software

Expand Down Expand Up @@ -137,7 +137,7 @@ The firmware is pretty much motor/driver-agnostic. Just make sure to select the

### Building the control software `jar` files

1. Install a [Java Development Kit](https://www.oracle.com/java/technologies/javase-downloads.html), version 14 or greater
1. Install a [Java Development Kit](https://www.oracle.com/java/technologies/javase-downloads.html), version 15 or greater
2. Install [IntelliJ IDEA community](https://www.jetbrains.com/idea/)
3. Open `ThunderFocus-GUI` inside IntelliJ
4. Just run the only configuration in the project, it will build the artifacts for you and place them in the right places
Expand All @@ -150,7 +150,7 @@ Requires the `jar` files. Make sure to follow the previous step.
2. Open `ThunderFocusASCOM` inside Visual Studio
3. Compile the _Release_ configuration (do not run it)
4. Extract a copy of the [AdoptOpenJDK](https://adoptopenjdk.net/releases.html) in the `JRE-bundle` folder
- Recommended: _OpenJDK 14_ with _HotSpot VM_, Windows x64
- Recommended: _OpenJDK 15_ with _HotSpot VM_, Windows x64
5. Open `InnoSetup.iss` and make the necessary changes to the file:
- Replace `D:\ThunderFocus\` with the path to the ThunderFocus repository in your computer
6. Compile and run the Inno Setup file: it will create the Windows installer in the `Installers` folder
Expand All @@ -165,7 +165,7 @@ Requires the `jar` files and a Debian installation with `dpkg-deb`. Note: the De

## Used libraries

- [OpenJDK 14](https://openjdk.java.net/) by Oracle, [GPL v2 license with linking exception](https://openjdk.java.net/legal/gplv2+ce.html)
- [OpenJDK 15](https://openjdk.java.net/) by Oracle, [GPL v2 license with linking exception](https://openjdk.java.net/legal/gplv2+ce.html)
- [AdoptOpenJDK builds](https://adoptopenjdk.net/index.html) with HotSpot VM, by AdoptOpenJDK, [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0.html)
- [INDIForJava](http://indiforjava.sourceforge.net/stage/index.html) by Sergio Alonso and Richard van Nieuwenhoven, [LGPL v3 license](http://indiforjava.sourceforge.net/stage/license.html)
- [ASCOM .NET libraries](https://www.ascom-standards.org/) by The ASCOM Initiative, [ASCOM Open Source License](https://github.com/ASCOMInitiative/ASCOMPlatform/blob/master/LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion ThunderFocus-GUI/About tab HTML - EN.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p>More projects at <a href="https://marcocipriani01.github.io/">marcocipriani01.github.io</a>!</p>
<p>Used libraries:</p>
<ul type="disc">
<li><a href="https://openjdk.java.net/">OpenJDK 14</a> by Oracle, <a href="https://openjdk.java.net/legal/gplv2+ce.html">GPL v2 license with linking exception</a></li>
<li><a href="https://openjdk.java.net/">OpenJDK</a> by Oracle, <a href="https://openjdk.java.net/legal/gplv2+ce.html">GPL v2 license with linking exception</a></li>
<li><a href="https://adoptopenjdk.net/index.html">AdoptOpenJDK builds</a> with HotSpot VM, by AdoptOpenJDK, <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 license</a></li>
<li><a href="http://indiforjava.sourceforge.net/stage/index.html">INDIForJava</a> by Sergio Alonso and Richard van Nieuwenhoven, <a href="http://indiforjava.sourceforge.net/stage/license.html">LGPL v3 license</a></li>
<li><a href="https://www.ascom-standards.org/">ASCOM .NET libraries</a>, by The ASCOM Initiative, <a href="https://github.com/ASCOMInitiative/ASCOMPlatform/blob/master/LICENSE.txt">ASCOM Open Source License</a></li>
Expand Down
2 changes: 1 addition & 1 deletion ThunderFocus-GUI/About tab HTML - IT.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p>Altri progetti alla pagina <a href="https://marcocipriani01.github.io/">marcocipriani01.github.io</a>!</p>
<p>Librerie utilizzate:</p>
<ul type="disc">
<li><a href="https://openjdk.java.net/">OpenJDK 14</a> di Oracle, <a href="https://openjdk.java.net/legal/gplv2+ce.html">licenza GPL v2 con eccezione linking</a></li>
<li><a href="https://openjdk.java.net/">OpenJDK</a> di Oracle, <a href="https://openjdk.java.net/legal/gplv2+ce.html">licenza GPL v2 con eccezione linking</a></li>
<li><a href="https://adoptopenjdk.net/index.html">AdoptOpenJDK builds</a> con HotSpot VM, di AdoptOpenJDK, <a href="https://www.apache.org/licenses/LICENSE-2.0">licenza Apache 2.0</a></li>
<li><a href="http://indiforjava.sourceforge.net/stage/index.html">INDIForJava</a> di Sergio Alonso e Richard van Nieuwenhoven, <a href="http://indiforjava.sourceforge.net/stage/license.html">licenza LGPL v3</a></li>
<li><a href="https://www.ascom-standards.org/">ASCOM .NET libraries</a>, The ASCOM Initiative, <a href="https://github.com/ASCOMInitiative/ASCOMPlatform/blob/master/LICENSE.txt">ASCOM Open Source License</a></li>
Expand Down
17 changes: 2 additions & 15 deletions ThunderFocus-GUI/src/marcocipriani01/thunderfocus/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ public static String getIP(boolean localhost) throws SocketException, IllegalSta
}

public static void openBrowser(String url, JFrame frame) {
Desktop desktop;
try {
Desktop desktop;
if (Desktop.isDesktopSupported() && (desktop = Desktop.getDesktop()).isSupported(Desktop.Action.BROWSE)) {
desktop.browse(new URI(url));
} else if (Main.OPERATING_SYSTEM == OperatingSystem.LINUX) {
Expand All @@ -139,20 +139,7 @@ public static void openBrowser(String url, JFrame frame) {
}

public static void openBrowser(HyperlinkEvent uri, JFrame frame) {
Desktop desktop;
try {
if (Desktop.isDesktopSupported() && (desktop = Desktop.getDesktop()).isSupported(Desktop.Action.BROWSE)) {
desktop.browse(uri.getURL().toURI());
} else if (System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH).contains("nux")) {
Runtime.getRuntime().exec("xdg-open " + uri.toString());
} else {
throw new UnsupportedOperationException("Browser support not found.");
}
} catch (Exception ex) {
ex.printStackTrace();
JOptionPane.showMessageDialog(frame,
i18n("browser.error"), APP_NAME, JOptionPane.ERROR_MESSAGE);
}
openBrowser(uri.getDescription().replace("\\", ""), frame);
}

public static String getAppVersion() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ascom.tooltip=ASCOM bridge status.
ok.tooltip=Connected and working
err.tooltip=Not connected or in error state
timeout.tooltip=Timeout state
about=<html>\n <head></head>\n <body>\n <p><strong>ThunderFocus&nbsp;</strong> is an open-source control software for compatible focuser, developed by <strong>Marco Cipriani</strong>. The source code is available on <a href="https://github.com/marcocipriani01/ThunderFocus">GitHub</a> and is issued under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU General Public License version 3</a>. By using this software, you accept all the terms of its license.</p>\n <p>More projects at <a href="https://marcocipriani01.github.io/">marcocipriani01.github.io</a>!</p>\n <p>Used libraries:</p>\n <ul type="disc">\n <li><a href="https://openjdk.java.net/">OpenJDK 14</a> by Oracle, <a href="https://openjdk.java.net/legal/gplv2+ce.html">GPL v2 license with linking exception</a></li>\n <li><a href="https://adoptopenjdk.net/index.html">AdoptOpenJDK builds</a> with HotSpot VM, by AdoptOpenJDK, <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 license</a></li>\n <li><a href="http://indiforjava.sourceforge.net/stage/index.html">INDIForJava</a> by Sergio Alonso and Richard van Nieuwenhoven, <a href="http://indiforjava.sourceforge.net/stage/license.html">LGPL v3 license</a></li>\n <li><a href="https://www.ascom-standards.org/">ASCOM .NET libraries</a>, by The ASCOM Initiative, <a href="https://github.com/ASCOMInitiative/ASCOMPlatform/blob/master/LICENSE.txt">ASCOM Open Source License</a></li>\n <li><a href="https://github.com/java-native/jssc">jssc</a> by java-native e scream3r, <a href="https://github.com/java-native/jssc/blob/master/LICENSE.txt">LGPL v3 license</a></li>\n <li><a href="https://github.com/JFormDesigner/FlatLaf/">FlatLaf</a> by JFormDesigner, <a href="https://github.com/JFormDesigner/FlatLaf/blob/master/LICENSE">Apache 2.0 license</a></li>\n <li><a href="https://github.com/google/gson">Gson</a> by Google, <a href="https://github.com/google/gson/blob/master/LICENSE">Apache 2.0 license</a></li>\n <li><a href="https://material.io/resources/icons/">Material icons</a> by Google, <a href="https://www.apache.org/licenses/LICENSE-2.0.html">Apache 2.0 license</a></li>\n <li><a href="https://github.com/arduino/Arduino">Arduino Core APIs</a> by Arduino, <a href="https://github.com/arduino/Arduino/blob/master/license.txt">LGPL v3 license</a></li>\n <li><a href="https://www.airspayce.com/mikem/arduino/AccelStepper/">AccelStepper</a> by Mike McCauley (with changes), <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPL v3 license</a></li>\n <li><a href="https://github.com/PaulStoffregen/Time">Arduino Time Library</a> by Michael Margolis, <a href="https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">LGPL v2.1 license</a></li>\n <li><a href="https://github.com/KenWillmott/SolarPosition">SolarPosition library</a> by Ken Willmott\n <ul type="disc">\n <li>Based upon <a href="http://www.instesre.org/ArduinoDocuments.htm">Arduino Uno and Solar Position Calculations</a>, © David R. Brooks, issued under the <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons BY-NC-ND 4.0 International License</a></li>\n <li>Uses equations from <a href="https://www.willbell.com/math/mc1.HTM"><i>Astronomical Algorithms</i> by Jean Meeus</a>, published by Willmann-Bell, Inc., Richmond, VA</li>\n </ul>\n <li><a href="https://www.flaticon.com/free-icon/telescope_547425?term=telescope&page=1&position=9&related_item_id=547425">Telescope icon</a> by Freepik, <a href="https://www.freepikcompany.com/legal#nav-flaticon">Flaticon license</a></li>\n </ul>\n </body>\n</html>
about=<html>\n <head></head>\n <body>\n <p><strong>ThunderFocus&nbsp;</strong> is an open-source control software for compatible focuser, developed by <strong>Marco Cipriani</strong>. The source code is available on <a href="https://github.com/marcocipriani01/ThunderFocus">GitHub</a> and is issued under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU General Public License version 3</a>. By using this software, you accept all the terms of its license.</p>\n <p>More projects at <a href="https://marcocipriani01.github.io/">marcocipriani01.github.io</a>!</p>\n <p>Used libraries:</p>\n <ul type="disc">\n <li><a href="https://openjdk.java.net/">OpenJDK</a> by Oracle, <a href="https://openjdk.java.net/legal/gplv2+ce.html">GPL v2 license with linking exception</a></li>\n <li><a href="https://adoptopenjdk.net/index.html">AdoptOpenJDK builds</a> with HotSpot VM, by AdoptOpenJDK, <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 license</a></li>\n <li><a href="http://indiforjava.sourceforge.net/stage/index.html">INDIForJava</a> by Sergio Alonso and Richard van Nieuwenhoven, <a href="http://indiforjava.sourceforge.net/stage/license.html">LGPL v3 license</a></li>\n <li><a href="https://www.ascom-standards.org/">ASCOM .NET libraries</a>, by The ASCOM Initiative, <a href="https://github.com/ASCOMInitiative/ASCOMPlatform/blob/master/LICENSE.txt">ASCOM Open Source License</a></li>\n <li><a href="https://github.com/java-native/jssc">jssc</a> by java-native e scream3r, <a href="https://github.com/java-native/jssc/blob/master/LICENSE.txt">LGPL v3 license</a></li>\n <li><a href="https://github.com/JFormDesigner/FlatLaf/">FlatLaf</a> by JFormDesigner, <a href="https://github.com/JFormDesigner/FlatLaf/blob/master/LICENSE">Apache 2.0 license</a></li>\n <li><a href="https://github.com/google/gson">Gson</a> by Google, <a href="https://github.com/google/gson/blob/master/LICENSE">Apache 2.0 license</a></li>\n <li><a href="https://material.io/resources/icons/">Material icons</a> by Google, <a href="https://www.apache.org/licenses/LICENSE-2.0.html">Apache 2.0 license</a></li>\n <li><a href="https://github.com/arduino/Arduino">Arduino Core APIs</a> by Arduino, <a href="https://github.com/arduino/Arduino/blob/master/license.txt">LGPL v3 license</a></li>\n <li><a href="https://www.airspayce.com/mikem/arduino/AccelStepper/">AccelStepper</a> by Mike McCauley (with changes), <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPL v3 license</a></li>\n <li><a href="https://github.com/PaulStoffregen/Time">Arduino Time Library</a> by Michael Margolis, <a href="https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">LGPL v2.1 license</a></li>\n <li><a href="https://github.com/KenWillmott/SolarPosition">SolarPosition library</a> by Ken Willmott\n <ul type="disc">\n <li>Based upon <a href="http://www.instesre.org/ArduinoDocuments.htm">Arduino Uno and Solar Position Calculations</a>, © David R. Brooks, issued under the <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons BY-NC-ND 4.0 International License</a></li>\n <li>Uses equations from <a href="https://www.willbell.com/math/mc1.HTM"><i>Astronomical Algorithms</i> by Jean Meeus</a>, published by Willmann-Bell, Inc., Richmond, VA</li>\n </ul>\n <li><a href="https://www.flaticon.com/free-icon/telescope_547425?term=telescope&page=1&position=9&related_item_id=547425">Telescope icon</a> by Freepik, <a href="https://www.freepikcompany.com/legal#nav-flaticon">Flaticon license</a></li>\n </ul>\n </body>\n</html>
in1=In
one.step=One step
one.step.tooltip=Move one step only.
Expand Down
Loading

0 comments on commit 3146a77

Please sign in to comment.