Tyrrrz / DiscordChatExporter

Exports Discord chat logs to a file
MIT License
7.29k stars 668 forks source link

Bundle the app for MacOS #1249

Open Tyrrrz opened 1 month ago

Tyrrrz commented 1 month ago

Version

v2.43.3

Flavor

GUI (Graphical User Interface), CLI (Command-Line Interface)

Platform

OSX

Export format

No response

Steps to reproduce

Explained below

Details

If you try to run the app after downloading, it won't launch due to macOS's security policies. You need to manually bypass the app signing check to work around this issue: https://github.com/Tyrrrz/DiscordChatExporter/discussions/1234#discussioncomment-9640812

Packaging the app as .app bundle may help resolve this issue. Ideally, we'd want to integrate the bundling stage in the existing CI process.

Checklist

toadchild commented 1 month ago

Commenting from the other thread, since I brought up the app bundle.

If you have an unsigned bundle, it is treated similarly to how Windows treats an unsigned .exe file. You have to right click -> open the first time in order to confirm that you want to run unsigned code, but after that it remembers the app and won't prompt you again.

I haven't done mac app stuff in a while, but iirc there's nothing magic about what xcode does when making a .app bundle. You just need the correct layout and an info.plist file that tells the OS how to set up the runtime.

https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW19