Skip to content

Commit

Permalink
charset enforcer inside launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrogen2oxygen committed Dec 19, 2022
1 parent 142bf7d commit b38365e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
- name: Upload Artifact - Make Directory
run: |
mkdir -p finalApproach;
cp server/target/server-1.1.1.jar finalApproach/server.jar;
cp updater/target/updater-1.1.1-jar-with-dependencies.jar finalApproach/launcher.jar;
cp updater/target/updater-1.1.1-jar-with-dependencies.jar finalApproach/newlauncher.jar;
cp server/target/server-1.1.2.jar finalApproach/server.jar;
cp updater/target/updater-1.1.2-jar-with-dependencies.jar finalApproach/launcher.jar;
cp updater/target/updater-1.1.2-jar-with-dependencies.jar finalApproach/newlauncher.jar;
cp scripts/start.bat finalApproach/;
- uses: actions/upload-artifact@v3
with:
name: final-approach-1.1.1
name: final-approach-1.1.2
path: finalApproach
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<packaging>pom</packaging>

<properties>
<revision>1.1.1</revision>
<revision>1.1.2</revision>
<version.info>Removed NitriteDB as main database, instead using ObjectMapper and plain JSON (faster and stable)</version.info>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<relativePath/> <!-- lookup parent from repository -->
</parent>

<version>1.1.1</version>
<version>1.1.2</version>
<groupId>de.pietro.lusso</groupId>
<artifactId>server</artifactId>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import javax.annotation.PostConstruct;
import java.io.*;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.attribute.FileTime;
import java.text.ParseException;
Expand Down Expand Up @@ -58,6 +59,8 @@ public class DatabaseService {
@PostConstruct
public void initService() throws Exception {

System.out.println(Charset.defaultCharset());

objectMapper = new ObjectMapper();
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public class FinalApproachLauncher extends JFrame {
private ObjectMapper objectMapper;
private Process proc;
private boolean stop = false;
private static String jarStarterCommand = "java -jar server.jar";;
private static String jarStarterCommand = "java -Dfile.encoding=UTF-8 -jar server.jar";;

public static void main(String [] args) throws IOException, InterruptedException {
System.out.println("FinalApproachLauncher ...");
System.out.println("FinalApproachLauncher 1.1.1 ...");
if (args.length > 0) {
jarStarterCommand = "";
for (String arg : args) {
Expand Down Expand Up @@ -202,6 +202,7 @@ private boolean checkForUpdates() {
downloadUpdate(remoteVersion);
objectMapper.writeValue(versionInfoFile, remoteVersion);
versionInfo = remoteVersion;
setTitle("Final-Approach Launcher - Version " + versionInfo);
return true;
} else {
System.out.println("same old version");
Expand Down

0 comments on commit b38365e

Please sign in to comment.