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>
|
<string>${MACOSX_SPARKLE_UPDATE_PUBLIC_KEY}</string>
|
||||||
<key>SUFeedURL</key>
|
<key>SUFeedURL</key>
|
||||||
<string>${MACOSX_SPARKLE_UPDATE_FEED_URL}</string>
|
<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>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -943,6 +943,13 @@ bool Application::event(QEvent* event) {
|
|||||||
emit clickedOnDock();
|
emit clickedOnDock();
|
||||||
}
|
}
|
||||||
m_prevAppState = ev->applicationState();
|
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
|
#endif
|
||||||
return QApplication::event(event);
|
return QApplication::event(event);
|
||||||
|
Loading…
Reference in New Issue
Block a user