MegaAntiCheat / client-backend

GNU General Public License v3.0
117 stars 24 forks source link

[Enhancement] A windows icon for client_backend.exe #154

Closed MaxOhNoo closed 2 months ago

MaxOhNoo commented 2 months ago

wojack mega anticheat

I gave client_backend.exe a windows icon. It's got all the default icon resolutions that windows needs (256x256, 48x48, etc.). I implemented the .ico file into the exe through the Resource Hacker decompiler https://www.angusj.com/resourcehacker/

image

Here's the .ico file and the modified client_backend.exe, because GitHub won't let me upload them directly.

icon.zip

Bash-09 commented 2 months ago

We will not be publishing executable files from anybody other than the main developers on this repository.

If we add an icon on Windows it would be preferable for it to be performed as part of the build process, e.g. like is outlined in this stackoverflow post which I'll summarise below:

Include the winresource crate and add the following to build.rs:

use std::{env, io};
use winresource::WindowsResource;

fn main() -> io::Result<()> {
    if env::var_os("CARGO_CFG_WINDOWS").is_some() {
        WindowsResource::new()
            // This path can be absolute, or relative to your crate root.
            .set_icon("assets/icon.ico")
            .compile()?;
    }
    Ok(())
}
Bash-09 commented 2 months ago

Also I think it would be cool if the icon was transparent instead of having the white background.

MaxOhNoo commented 2 months ago

I'll make a pull request soon, using embed-resource cause winresource doesn't work. How's the icon? megascatterbomb

MaxOhNoo commented 2 months ago

Moved to https://github.com/MegaAntiCheat/client-backend/pull/155 Feel free to close this issue