Skip to content

Commit d5b27fb

Browse files
committed
Console-less launch
1 parent 5ecbe44 commit d5b27fb

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Stub launcher for Sonic 4 on PC
33

44
This executable replaces your `SonicLauncher.exe` with a stub to launch the extracted `jar` file for the Sonic the Hedgehog 4 - Episode 1 launcher.
55

6-
## Info
7-
The Sonic 4 EP1 Launcher is a Java app wrapped into an `exe` with `Launch4j`. Unfortunately, it targets Java 6 and nothing else. Thus, we are unable to launch and configure the settings and controls. This stub aims to replace the `Launch4j` wrapper so as to restore Steam status intergration and allow usage of a modern version of java.
6+
## Background Info
7+
The Sonic 4 EP1 Launcher is a Java app wrapped into an `exe` with `Launch4j`. Unfortunately, it targets Java 6 and nothing else. Thus, we are unable to launch and configure the settings and controls. This stub aims to replace the `Launch4j` wrapper so as to restore Steam status intergration and allow usage of a modern version of Java.
88

99
## Prerequisites
1010
- Sonic 4 Episode 1 (PC)
@@ -42,11 +42,12 @@ Right-click the stub launcher and click on properties. At the bottom of the wind
4242
1. Make sure you have MinGW installed.
4343
- I used MinGW-W64-builds-4.3.5
4444
2. Add the MinGW `bin` folder to PATH
45-
3. Clone the repository, navigate to it and execute `gcc main.c -o main`
45+
3. Clone the repository, navigate to it and execute `gcc main.c -Wl,-subsystem,windows -o main`
4646
4. Follow install instructions
4747

4848
## "Issues"
49-
- Stub launcher does not run silently, thus creating a console window
49+
- ~~Stub launcher does not run silently, thus creating a console window~~
50+
- Fixed in release v1.0
5051
- This isn't a native rewrite and/or replacement for the launcher
5152

5253
## Licensing

main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include <process.h>
1+
#include <windows.h>
22

33
int main() {
4-
system("java -jar SonicLauncher.jar");
4+
WinExec("java -jar SonicLauncher.jar", SW_HIDE);
55
return 1;
66
}

0 commit comments

Comments
 (0)