MegaAntiCheat / client-backend

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

Windows icon #155

Closed MaxOhNoo closed 2 months ago

MaxOhNoo commented 2 months ago

Giving client-backend.exe a cool little windows icon. Added embed-resource to build dependencies, and added some code to build.rs. Works in all the places it's supposed to. image file explorer (list view) image file explorer (icon view) image windows desktop 2024-06-09 14_17_48-C__Users_Max_Desktop_client_backend exe windows terminal image taskbar

MaxOhNoo commented 2 months ago

Checked and resolved with fmt and clippy.

Bash-09 commented 2 months ago

This looks fine to me. Can someone who actually uses Windows like @lili7h or @megascatterbomb confirm this behaves as expected, and the icon seems fine?

Seercat3160 commented 2 months ago

Is oldicon.ico needed or just left over for some reason?

I think it would be better to have the icon image in the repo in some more universal format (PNG) at full resolution and convert it to the format needed at build time in the build script. That way, the icon could be more easily changed without having to convert, and could be used for other purposes.

lili7h commented 2 months ago

Is oldicon.ico needed or just left over for some reason?

I think it would be better to have the icon image in the repo in some more universal format (PNG) at full resolution and convert it to the format needed at build time in the build script. That way, the icon could be more easily changed without having to convert, and could be used for other purposes.

I was also curious if the rc file was needed or if ico/png was enough

lili7h commented 2 months ago

If those files are in fact relics and arent needed, please force push over them to remove them from the git history

MaxOhNoo commented 2 months ago

oldicon.ico is unneeded. The .rc file is needed for embed-resource because .rc files can also be used for other stuff relating to the exe, like this details panel in the exe properties. image

MaxOhNoo commented 2 months ago

https://crates.io/crates/png-to-ico There's a crate to convert png to ico. I'll give it a try.

MaxOhNoo commented 2 months ago

icon.png will be converted to icon.ico at build time through the ico crate (https://crates.io/crates/ico). Ran cargo fmt and resolved issues with cargo clippy.

MaxOhNoo commented 2 months ago

Also, can I get the source for this icon? image

MaxOhNoo commented 2 months ago

Functions as intended on windows and ubuntu. I'll do the error stuff (https://github.com/MegaAntiCheat/client-backend/pull/155#discussion_r1635633095) soon.

(fmt and clippy of course)

MaxOhNoo commented 2 months ago

Functions as intended. All I did was make the (file) variable (_file) so clippy is happy.

MaxOhNoo commented 2 months ago

Whoops, i put the windows check twice

MaxOhNoo commented 2 months ago

Also, can I get the source for this icon? image

IMO we should use this icon. It’s more memorable and recognizable, especially as a small desktop icon. The one I “made”, even with the outer glow, is still just a brown blob when displayed as a desktop or file explorer icon. Can we get the original asset or should I just rip it from the yt video?

Bash-09 commented 2 months ago

I asked Tuxford on the discord and they sent me these: mac_logo_2.png

MAC.png

The first one is apparently the updated one so maybe try that one first, but I'd try both of them and see which looks better when squashed down as a little pixelated icon

megascatterbomb commented 2 months ago

Subjectively, I definitely prefer the bottom one.

MaxOhNoo commented 2 months ago

mac_logo_2.png

Why does the top one look so stretched? I agree, the bottom one is better. I'll make some screenshots of both.

MaxOhNoo commented 2 months ago

image

The bigger problem with the top icon is that because it is much wider, it leaves a lot of space unused and appears smaller.

MaxOhNoo commented 2 months ago

Icon 1: Glowing megascatterbomb logo 2024-06-09 14_13_14-debug file explorer 2024-06-09 14_15_06- windows desktop 2024-06-09 14_17_48-C__Users_Max_Desktop_client_backend exe terminal

Icon 2: Wide MAC logo 2024-06-13 09_33_24-debug 2024-06-13 09_33_06- 2024-06-13 09_30_32-C__Users_Max_vscode_windows_icon_target_debug_client_backend exe

Icon 3: Square MAC logo: image image 2024-06-13 10_02_45-C__Users_Max_vscode_windows_icon_target_debug_client_backend exe

MaxOhNoo commented 2 months ago

I personally prefer icon 3. When compressed into a tiny icon, you can still make out features like the extended beak and spike at the top right.

Bash-09 commented 2 months ago

I personally prefer icon 3. When compressed into a tiny icon, you can still make out features like the extended beak and spike at the top right.

Yeah I'd say go for it then. Replace the png in this PR with the new one.

megascatterbomb commented 2 months ago

For both potential copyright and aesthetic reasons, I'd suggest switching to this icon that Bushranger has kindly drawn for us. At some point I'm gonna rebrand everything to use this icon, so I might as well put it here.

logo_clean_transparent

MaxOhNoo commented 2 months ago

Sure, I’ll update this pr with the new icon. Shall I make a pr for the rebranding of the frontend, or do you want to do that?

megascatterbomb commented 2 months ago

Sure, I’ll update this pr with the new icon. Shall I make a pr for the rebranding of the frontend, or do you want to do that?

You can do it if you'd like.

Bash-09 commented 2 months ago

Merged manually in 5b8f2e67ef9bfd89a8a338ce54e411b3a5e5d373