···2525- renaming `steam_id_remote` dictionnary key to `remote_steam_id` to fix network spam detection that resulted in timeouts
2626- 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
27272828+2929+## How to install a mod?
3030+3131+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.
3232+3333+In order to install a mod, just copy a mod folder in it, a mod folder has a `manifest.json` file in it.
3434+3535+After that, run the installer again ! It will tell you in the terminal if the mod is installed or if something went wrong.
3636+3737+Here's a small mod list : [link to the mod list](modlist.md)
3838+2839## How to make a mod?
29403041As you can see in the `example_mods` folder, a mod has typically two folders and a single `manifest.json` file having the following structure:
3131-```json
4242+```jsonc
3243{
3344 "name": "Ship Mod", // Mod name
3445 "author": "Estym", // Author
+7
modlist.md
···11+# List of currently existing mods compatible with the webfishing-macos-installer
22+33+## AtProto Webfishing
44+[Repository](https://forgejo.regnault.dev/estym/webfishing-macos-atproto)
55+66+A mod that adds remote saving using a Bluesky account (or a self-hosted PDS)
77+
+34-14
src/main.rs
···99use std::fs::File;
1010use std::io::{Read, Write};
1111use std::path::Path;
1212-use std::process::Command;
1212+use std::process::{exit, Command};
1313use std::time::Duration;
1414use steamlocate::SteamDir;
1515use sudo::RunningAs;
···5959async fn download_godot_steam_template() {
6060 println!("Downloading GodotSteam template...");
6161 let res = reqwest::get(
6262- "https://github.com/GodotSteam/GodotSteam/releases/download/v3.24/macos-g353-s159-gs324.zip",
6262+ "https://codeberg.org/godotsteam/godotsteam/releases/download/v3.24/macos-g353-s159-gs324.zip",
6363 )
6464 .await
6565 .expect("Could not download godotsteam template");
···89899090fn build_webfishing_macos(webfishing_path: &Path) {
9191 let template_path = Path::new("build/osx_template.app");
9292+9293 Command::new("rm")
9394 .current_dir(template_path)
9495 .arg("Contents/MacOS/godot_osx_debug.universal")
···137138 .expect("Could not copy webfishing.app");
138139}
139140141141+fn sign_webfishing() {
142142+ Command::new("xattr")
143143+ .arg("-cr")
144144+ .arg("build/webfishing.app")
145145+ .output()
146146+ .expect("Could not execute xattr");
147147+148148+ Command::new("rm")
149149+ .arg("build/signing-step")
150150+ .output()
151151+ .expect("Could not remove signing-step file");
152152+153153+ println!("Webfishing is in the build folder !");
154154+155155+ Text::new("Press Enter to quit")
156156+ .prompt()
157157+ .expect("Could not confirm to quit");
158158+159159+160160+}
161161+140162#[tokio::main]
141163async fn main() {
142142- if sudo::check() != RunningAs::Root {
143143- println!("You need to be root to run this program");
164164+ if sudo::check() == RunningAs::Root && Path::new("build/signing-step").exists() {
165165+ sign_webfishing();
166166+ exit(0);
144167 }
145145- sudo::escalate_if_needed().expect("Could not escalate");
146168147169 set_current_dir(
148170 current_exe()
···223245 .write(bytes)
224246 .expect("Could not write to webfishing.pck");
225247226226- Command::new("xattr")
227227- .arg("-cr")
228228- .arg("build/webfishing.app")
229229- .output()
230230- .expect("Could not execute xattr");
248248+ File::create("build/signing-step").expect("Could not create signing step file");
231249232232- println!("Webfishing is in the build folder !");
250250+ if sudo::check() != RunningAs::Root {
251251+ println!("In order to sign the app, you need to be root");
252252+ sudo::escalate_if_needed().expect("Could not escalate");
253253+ exit(1);
254254+ }
233255234234- Text::new("Press Enter to quit")
235235- .prompt()
236236- .expect("Could not confirm to quit");
256256+ sign_webfishing();
237257}