mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
Iceweasel: cleanup patchset
This commit is contained in:
@@ -5967,133 +5967,6 @@ index dbd9993..1431340 100644
|
||||
# endif
|
||||
# include <sys/types.h>
|
||||
# include <signal.h>
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 80b3432f922d218af6fe97b5e11dd1c7f278367d Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 6 Apr 2025 10:13:00 +1000
|
||||
Subject: Add simple launcher app
|
||||
|
||||
|
||||
diff --git a/tools/haiku-launcher/launcher.cpp b/tools/haiku-launcher/launcher.cpp
|
||||
new file mode 100644
|
||||
index 0000000..86a9f22
|
||||
--- /dev/null
|
||||
+++ b/tools/haiku-launcher/launcher.cpp
|
||||
@@ -0,0 +1,111 @@
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
+#include <errno.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+#include <Application.h>
|
||||
+#include <Alert.h>
|
||||
+#include <String.h>
|
||||
+#include <Resources.h>
|
||||
+#include <Roster.h>
|
||||
+#include <Mime.h>
|
||||
+#include <Path.h>
|
||||
+#include <AppFileInfo.h>
|
||||
+#include <kernel/image.h>
|
||||
+
|
||||
+class BrowserLauncherApp : public BApplication {
|
||||
+ public:
|
||||
+ BrowserLauncherApp(const char *signature, int argc, char **argv);
|
||||
+ ~BrowserLauncherApp() {};
|
||||
+
|
||||
+ virtual void RefsReceived(BMessage *pmsg);
|
||||
+ virtual void ArgvRecieved(int32 argc, char**argv);
|
||||
+ virtual void ReadyToRun();
|
||||
+ BString GetBinPath(void);
|
||||
+
|
||||
+ private:
|
||||
+ BString fCommandLine;
|
||||
+};
|
||||
+
|
||||
+BrowserLauncherApp::BrowserLauncherApp(const char *signature, int argc, char **argv)
|
||||
+ : BApplication(signature)
|
||||
+{
|
||||
+ ArgvRecieved(argc, argv);
|
||||
+}
|
||||
+
|
||||
+BString
|
||||
+BrowserLauncherApp::GetBinPath(void)
|
||||
+{
|
||||
+ BPath binPath;
|
||||
+
|
||||
+ image_info info;
|
||||
+ int32 cookie = 0;
|
||||
+
|
||||
+ while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
|
||||
+ if (info.type == B_APP_IMAGE) {
|
||||
+ binPath.SetTo(info.name);
|
||||
+ binPath.GetParent(&binPath);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ binPath.Append("Iceweasel");
|
||||
+
|
||||
+ return binPath.Path();
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+BrowserLauncherApp::RefsReceived(BMessage *pmsg)
|
||||
+{
|
||||
+ fCommandLine = GetBinPath();
|
||||
+
|
||||
+ entry_ref ref;
|
||||
+ for (int32 i = 0; pmsg->FindRef("refs", i, &ref) == B_OK; i++) {
|
||||
+ BPath file = BPath(&ref);
|
||||
+ fCommandLine += " \"";
|
||||
+ fCommandLine += file.Path();
|
||||
+ fCommandLine += "\"";
|
||||
+ }
|
||||
+
|
||||
+ BString url;
|
||||
+ for (int32 i = 0; pmsg->FindString("url", i, &url) == B_OK; i++) {
|
||||
+ fCommandLine += " \"";
|
||||
+ fCommandLine += url;
|
||||
+ fCommandLine += "\"";
|
||||
+ }
|
||||
+
|
||||
+ fCommandLine += " &";
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+BrowserLauncherApp::ArgvRecieved(int32 argc, char**argv)
|
||||
+{
|
||||
+ BMessage message(B_REFS_RECEIVED);
|
||||
+ for (int i = 1; i < argc; i++) {
|
||||
+ const char* url = argv[i];
|
||||
+ BEntry entry(argv[i], true);
|
||||
+ BPath path;
|
||||
+ if (entry.Exists() && entry.GetPath(&path) == B_OK)
|
||||
+ url = path.Path();
|
||||
+ message.AddString("url", url);
|
||||
+ }
|
||||
+ RefsReceived(&message);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+BrowserLauncherApp::ReadyToRun()
|
||||
+{
|
||||
+ if (!fCommandLine.IsEmpty())
|
||||
+ system(fCommandLine.String());
|
||||
+
|
||||
+ Quit();
|
||||
+}
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ BrowserLauncherApp application("application/x-vnd.iceweasel-launcher", argc, argv);
|
||||
+ application.Run();
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
diff --git a/third_party/rust/quinn-udp/.cargo-checksum.json b/third_party/rust/quinn-udp/.cargo-checksum.json
|
||||
index 2ada89f..33a4a07 100644
|
||||
--- a/third_party/rust/quinn-udp/.cargo-checksum.json
|
||||
|
||||
Reference in New Issue
Block a user