+12
-1
README.md
+12
-1
README.md
···
25
- renaming `steam_id_remote` dictionnary key to `remote_steam_id` to fix network spam detection that resulted in timeouts
26
- prevent the game from crashing when saving the options by not setting any values to `OS.windowed_borderless` because setting a value to it crashes the game somehow
27
28
## How to make a mod?
29
30
As you can see in the `example_mods` folder, a mod has typically two folders and a single `manifest.json` file having the following structure:
31
-
```json
32
{
33
"name": "Ship Mod", // Mod name
34
"author": "Estym", // Author
···
25
- renaming `steam_id_remote` dictionnary key to `remote_steam_id` to fix network spam detection that resulted in timeouts
26
- prevent the game from crashing when saving the options by not setting any values to `OS.windowed_borderless` because setting a value to it crashes the game somehow
27
28
+
29
+
## How to install a mod?
30
+
31
+
When running the software for the first time and building webfishing, you'll notice that a `mods` folder has appeared in the folder where the installer is.
32
+
33
+
In order to install a mod, just copy a mod folder in it, a mod folder has a `manifest.json` file in it.
34
+
35
+
After that, run the installer again ! It will tell you in the terminal if the mod is installed or if something went wrong.
36
+
37
+
Here's a small mod list : [link to the mod list](modlist.md)
38
+
39
## How to make a mod?
40
41
As you can see in the `example_mods` folder, a mod has typically two folders and a single `manifest.json` file having the following structure:
42
+
```jsonc
43
{
44
"name": "Ship Mod", // Mod name
45
"author": "Estym", // Author
+7
modlist.md
+7
modlist.md
+34
-14
src/main.rs
+34
-14
src/main.rs
···
9
use std::fs::File;
10
use std::io::{Read, Write};
11
use std::path::Path;
12
-
use std::process::Command;
13
use std::time::Duration;
14
use steamlocate::SteamDir;
15
use sudo::RunningAs;
···
59
async fn download_godot_steam_template() {
60
println!("Downloading GodotSteam template...");
61
let res = reqwest::get(
62
-
"https://github.com/GodotSteam/GodotSteam/releases/download/v3.24/macos-g353-s159-gs324.zip",
63
)
64
.await
65
.expect("Could not download godotsteam template");
···
89
90
fn build_webfishing_macos(webfishing_path: &Path) {
91
let template_path = Path::new("build/osx_template.app");
92
Command::new("rm")
93
.current_dir(template_path)
94
.arg("Contents/MacOS/godot_osx_debug.universal")
···
137
.expect("Could not copy webfishing.app");
138
}
139
140
#[tokio::main]
141
async fn main() {
142
-
if sudo::check() != RunningAs::Root {
143
-
println!("You need to be root to run this program");
144
}
145
-
sudo::escalate_if_needed().expect("Could not escalate");
146
147
set_current_dir(
148
current_exe()
···
223
.write(bytes)
224
.expect("Could not write to webfishing.pck");
225
226
-
Command::new("xattr")
227
-
.arg("-cr")
228
-
.arg("build/webfishing.app")
229
-
.output()
230
-
.expect("Could not execute xattr");
231
232
-
println!("Webfishing is in the build folder !");
233
234
-
Text::new("Press Enter to quit")
235
-
.prompt()
236
-
.expect("Could not confirm to quit");
237
}
···
9
use std::fs::File;
10
use std::io::{Read, Write};
11
use std::path::Path;
12
+
use std::process::{exit, Command};
13
use std::time::Duration;
14
use steamlocate::SteamDir;
15
use sudo::RunningAs;
···
59
async fn download_godot_steam_template() {
60
println!("Downloading GodotSteam template...");
61
let res = reqwest::get(
62
+
"https://codeberg.org/godotsteam/godotsteam/releases/download/v3.24/macos-g353-s159-gs324.zip",
63
)
64
.await
65
.expect("Could not download godotsteam template");
···
89
90
fn build_webfishing_macos(webfishing_path: &Path) {
91
let template_path = Path::new("build/osx_template.app");
92
+
93
Command::new("rm")
94
.current_dir(template_path)
95
.arg("Contents/MacOS/godot_osx_debug.universal")
···
138
.expect("Could not copy webfishing.app");
139
}
140
141
+
fn sign_webfishing() {
142
+
Command::new("xattr")
143
+
.arg("-cr")
144
+
.arg("build/webfishing.app")
145
+
.output()
146
+
.expect("Could not execute xattr");
147
+
148
+
Command::new("rm")
149
+
.arg("build/signing-step")
150
+
.output()
151
+
.expect("Could not remove signing-step file");
152
+
153
+
println!("Webfishing is in the build folder !");
154
+
155
+
Text::new("Press Enter to quit")
156
+
.prompt()
157
+
.expect("Could not confirm to quit");
158
+
159
+
160
+
}
161
+
162
#[tokio::main]
163
async fn main() {
164
+
if sudo::check() == RunningAs::Root && Path::new("build/signing-step").exists() {
165
+
sign_webfishing();
166
+
exit(0);
167
}
168
169
set_current_dir(
170
current_exe()
···
245
.write(bytes)
246
.expect("Could not write to webfishing.pck");
247
248
+
File::create("build/signing-step").expect("Could not create signing step file");
249
250
+
if sudo::check() != RunningAs::Root {
251
+
println!("In order to sign the app, you need to be root");
252
+
sudo::escalate_if_needed().expect("Could not escalate");
253
+
exit(1);
254
+
}
255
256
+
sign_webfishing();
257
}