Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c5d09b3
Can detect and launch AppImages - version detection and resume game n…
Feb 21, 2026
e3735e0
Can detect and launch AppImages.
Feb 21, 2026
c0a9bd3
Can detect and launch AppImages and FlatPaks, both for version and de…
Feb 26, 2026
da242fa
Aligh splash screen to background
Feb 26, 2026
d8e3810
Print number of oolite connections on shutdown
Feb 27, 2026
2621c15
Reduce urge to extract Flatpak and AppImage to get version info
Mar 7, 2026
c4e1396
Reduce urge to extract Flatpak and AppImage to get debug support
Mar 8, 2026
0f90429
Do not complain about OoliteStarter's own OXP, even if the author
Apr 3, 2026
7383de3
Show hidden directories to fix #10.
Apr 6, 2026
955990b
Upgrade to more secure logging framework
Apr 6, 2026
fec23ed
Have a bias for scanning the user's home to improve on #11.
Apr 6, 2026
41b47a4
Improve Javadoc and logging
Apr 8, 2026
3e501c9
Better visualize intent of download button
Apr 8, 2026
dc814dc
Better visualize intent of download button
Apr 8, 2026
df85bef
The release appimages names start with capital O while the prerelease…
Apr 9, 2026
a7f15cf
In case of matching problems better pinpoint where the problem occurr…
Apr 9, 2026
943de85
React to Node.js 20 deprecation warning
Apr 9, 2026
2e5dcff
Fix logging actual values
Apr 9, 2026
4c6e88f
Fix logging actual values (#13)
Apr 9, 2026
1935698
Add more tracing to find out issues on user side
Apr 10, 2026
ef4bd3c
Add more tracing to find out issues on user side (#11)
Apr 11, 2026
28951f6
Prevent splash during probes (#14)
Apr 11, 2026
897e620
Warn when skipping a duplicate installation and prevent scanning the …
Apr 11, 2026
14a9f20
Oolite sometimes is picky on which command line option is last. Try t…
Apr 11, 2026
007791a
Make it more obvious how users can update their expansions. (#15)
Apr 11, 2026
c9f4fd7
Make it more obvious how users can update their expansions. (#15)
Apr 11, 2026
a77f1ef
Oolite may simply need to have options as separate arguments. (#14)
Apr 11, 2026
969b0af
Scan directories that are symlinked at least once. (#11)
Apr 12, 2026
14234b2
Prevent splash during probes (#14)
Apr 12, 2026
7bd52b1
It was never intended to update many expansions in one action. The po…
Apr 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
FLAVOR2: ${{ steps.output1.outputs.FLAVOR2 }}
steps:
- name: Checkout project
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:

steps:
- name: Checkout project
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
distribution: 'adopt'

- name: Checkout project
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
path: oolitestarter
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
distribution: 'adopt'

- name: Checkout project
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
path: oolitestarter
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
distribution: 'adopt'

- name: Checkout project
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
path: oolitestarter
Expand Down Expand Up @@ -411,7 +411,7 @@ jobs:
#
# steps:
# - name: Checkout project
# uses: actions/checkout@v4
# uses: actions/checkout@v6
# with:
# fetch-depth: 0
# path: oolitestarter
Expand Down
2 changes: 1 addition & 1 deletion checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<!-- Checks for Size Violations. -->
<!-- See https://checkstyle.org/config_sizes.html -->
<module name="FileLength">
<property name="max" value="2700"/>
<property name="max" value="2800"/>
</module>
<!-- TODO: This is a lot of work, despite easy to resolve.
<module name="LineLength">
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.25.1</version>
<version>2.25.3</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.25.1</version>
<version>2.25.3</version>
<scope>runtime</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j2-impl ->
Expand All @@ -274,7 +274,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>2.25.1</version>
<version>2.25.3</version>
<scope>runtime</scope>
</dependency>

Expand Down
9 changes: 6 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ left, and those already installed on the right.

One of the expansions is selected, and in the bottom you see additional
information about the selection. The buttons in the middle allow to Install,
Download, Remove and Delete.
Download, Remove and Delete. Installation of a newer expansion over an older one
will result in an update.

You can sort and filter the list of expansions by clicking the button on the
top right of the lists.
Expand All @@ -215,10 +216,12 @@ lifecycle through install and remove. Other expansions can be installed by
giving a Download URL, will be stored in the Addons folder and will get deleted
afterwards.

#### Install
#### Install/Update

Installs an OXZ from the Expansion Manager's manifest into the ManagedAddons
folder.
folder. If a previous version of this expansion is already installed, it will be
overwritten. In this case the action performs an update. You can but do not have
to remove the old version first.

#### Download

Expand Down
46 changes: 37 additions & 9 deletions src/main/java/oolite/starter/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.time.Duration;
import java.time.Instant;
Expand Down Expand Up @@ -71,9 +73,9 @@ public class Configuration {
* Creates a new Configuration instance.
* Finds the platform specific configuration file to initialize.
*/
public Configuration() throws MalformedURLException {
public Configuration() throws MalformedURLException, URISyntaxException {
expansionManagerURLs = new ArrayList<>();
expansionManagerURLs.add(new URL(DEFAULT_URL));
expansionManagerURLs.add(new URI(DEFAULT_URL).toURL());

installations = new ArrayList<>();
updateCheckInterval = Duration.ofDays(7);
Expand All @@ -85,7 +87,7 @@ public Configuration() throws MalformedURLException {
*
* @param the configuration file to load
*/
public Configuration(File f) throws IOException, ParserConfigurationException, SAXException, XPathExpressionException {
public Configuration(File f) throws IOException, ParserConfigurationException, SAXException, XPathExpressionException, URISyntaxException {
this();

this.loadConfiguration(f);
Expand All @@ -112,7 +114,7 @@ public Duration getUpdateCheckInterval() {
*
* @param f the file to load
*/
public final void loadConfiguration(File f) throws ParserConfigurationException, SAXException, IOException, XPathExpressionException {
public final void loadConfiguration(File f) throws ParserConfigurationException, SAXException, IOException, XPathExpressionException, URISyntaxException {
DocumentBuilder db = DocumentBuilderFactory.newDefaultInstance().newDocumentBuilder();
Document doc = db.parse(f);
XPath xpath = XPathFactory.newDefaultInstance().newXPath();
Expand All @@ -124,7 +126,7 @@ public final void loadConfiguration(File f) throws ParserConfigurationException,
ArrayList<URL> urls = new ArrayList<>();
for (int i = 0; i< nl.getLength(); i++) {
Element eExpansionManagerUrl = (Element)nl.item(i);
urls.add(new URL(eExpansionManagerUrl.getTextContent()));
urls.add(new URI(eExpansionManagerUrl.getTextContent()).toURL());
}
expansionManagerURLs = urls;

Expand All @@ -147,7 +149,7 @@ public final void loadConfiguration(File f) throws ParserConfigurationException,
Installation inst = new Installation();
inst.setHomeDir(xpath.evaluate("HomeDir", eInstallation));
inst.setVersion(xpath.evaluate("Version", eInstallation));
inst.setExcecutable(xpath.evaluate("Executable", eInstallation));
inst.setExecutable(xpath.evaluate("Executable", eInstallation));
inst.setSavegameDir(xpath.evaluate("SaveGameDir", eInstallation));
inst.setAddonDir(xpath.evaluate("AddonDir", eInstallation));
inst.setDeactivatedAddonDir(xpath.evaluate("DeactivatedAddonDir", eInstallation));
Expand Down Expand Up @@ -235,7 +237,7 @@ public final void saveConfiguration(File f) throws ParserConfigurationException,
eInstallation.appendChild(e);

e = doc.createElement("Executable");
e.setTextContent(installation.getExcecutable());
e.setTextContent(installation.getExecutable());
eInstallation.appendChild(e);

e = doc.createElement("SaveGameDir");
Expand Down Expand Up @@ -388,16 +390,42 @@ public File getSaveGameDir() {
return new File(activeInstallation.getSavegameDir());
}

// /**
// * Returns the command to execute for running Oolite.
// *
// * @return the command
// */
// public String getOoliteCommand() {
// if (activeInstallation == null) {
// throw new IllegalStateException(CONF_NO_ACTIVE_INSTALLATION);
// }
// return activeInstallation.getExecutable();
// }

/**
* Returns the command to execute for running Oolite.
*
* @return the command
*/
public String getOoliteCommand() {
public List<String> getOoliteCommand() {
log.debug("getOoliteCommand()");

if (activeInstallation == null) {
throw new IllegalStateException(CONF_NO_ACTIVE_INSTALLATION);
}
return activeInstallation.getExcecutable();

String exe = activeInstallation.getExecutable();
List<String> result = new ArrayList<>();
if (exe.startsWith("flatpak ")) {
String[] parts = exe.split("\\s+");
for (String part: parts) {
result.add(part);
}
} else {
result.add(exe);
}

return result;
}

/**
Expand Down
22 changes: 20 additions & 2 deletions src/main/java/oolite/starter/MainFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.io.File;
import java.io.IOException;
import java.lang.module.ModuleDescriptor;
import java.net.URISyntaxException;
import java.time.Duration;
import java.time.Instant;
import java.util.List;
Expand Down Expand Up @@ -58,6 +59,12 @@ public class MainFrame extends javax.swing.JFrame {

private static transient JFrame newSplash;

/**
* This SwingWorker will initialize OoliteStarter by reading configuration,
* scanning the disk for savegames and installed expansions and downloading
* the expansion catalog.
* Finally it displays the main screen.
*/
private static class InitFrameSwingWorker extends SwingWorker<MainFrame, Object> {

private GithubVersionChecker gvc;
Expand Down Expand Up @@ -227,7 +234,7 @@ protected void done() {
/**
* Creates new form MainFrame.
*/
public MainFrame() throws IOException, SAXException, ParserConfigurationException, XPathExpressionException {
public MainFrame() throws IOException, SAXException, ParserConfigurationException, XPathExpressionException, URISyntaxException {
initComponents();
setInstallationTitle(null);
setIconImage(new ImageIcon(getClass().getResource("/images/Mr_Gimlet_transparent.png")).getImage());
Expand Down Expand Up @@ -396,7 +403,14 @@ protected boolean isInstallationsValid() {
log.debug("isInstallationsValid()");

for (Installation i: configuration.getInstallations()) {
File f = new File(i.getExcecutable());
// todo: move all this checking into the Installation class
// then it is easier to distinguish bare, flatpak and appimage installations

String executable = i.getExecutable();
if (executable == null) {
return false;
}
File f = new File(executable);
if (!f.isFile()) {
log.warn("File {} not found.", f);
return false;
Expand Down Expand Up @@ -579,6 +593,10 @@ private static void setLookAndFeel() {
//</editor-fold>
}

/**
* Starts the UI by showing a splash screen and triggering the background
* swing worker to do the needful.
*/
private static void startupUI() {
log.info("{} {} starting up...", MainFrame.class.getPackage().getImplementationTitle(), MainFrame.class.getPackage().getImplementationVersion());

Expand Down
Loading
Loading