feat: register as zip/mrpack handler on macOS
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
This commit is contained in:
parent
7a8c963722
commit
a406aeb3ea
@ -44,5 +44,28 @@
|
||||
<string>${MACOSX_SPARKLE_UPDATE_PUBLIC_KEY}</string>
|
||||
<key>SUFeedURL</key>
|
||||
<string>${MACOSX_SPARKLE_UPDATE_FEED_URL}</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>zip</string>
|
||||
<string>mrpack</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Prism Launcher instance</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>TEXT</string>
|
||||
<string>utxt</string>
|
||||
<string>TUTX</string>
|
||||
<string>****</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -943,6 +943,13 @@ bool Application::event(QEvent* event) {
|
||||
emit clickedOnDock();
|
||||
}
|
||||
m_prevAppState = ev->applicationState();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::FileOpen) {
|
||||
auto ev = static_cast<QFileOpenEvent*>(event);
|
||||
m_mainWindow->droppedURLs({ ev->url() });
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return QApplication::event(event);
|
||||
|
Loading…
Reference in New Issue
Block a user