Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dino+ no longer compiles with MinGW #77

Closed
mxlgv opened this issue Jun 9, 2024 · 0 comments · Fixed by #79
Closed

Dino+ no longer compiles with MinGW #77

mxlgv opened this issue Jun 9, 2024 · 0 comments · Fixed by #79

Comments

@mxlgv
Copy link
Owner

mxlgv commented Jun 9, 2024

After updating MinGW Dino+ does not build. One of the problems is with HINSTANCE.
Suggested fix:

diff --git a/libdino/src/service/util.vala b/libdino/src/service/util.vala
index 496994c8..22708c74 100644
--- a/libdino/src/service/util.vala
+++ b/libdino/src/service/util.vala
@@ -6,7 +6,7 @@ namespace Dino {
 public class Util {
     #if _WIN32
     [CCode (cname = "ShellExecuteA", cheader_filename = "windows.h")]
-    private static extern int ShellExecuteA(int* hwnd, string operation, string file, string parameters, string directory, int showCmd);
+    private static extern int* ShellExecuteA(int* hwnd, string operation, string file, string parameters, string directory, int showCmd);

     [CCode (cname = "CoInitialize", cheader_filename = "windows.h")]
     private static extern int CoInitialize(void* reserved);
@@ -14,7 +14,7 @@ public class Util {
     [CCode (cname = "CoUninitialize", cheader_filename = "windows.h")]
     private static extern void CoUninitialize();

-    private static int ShellExecute(string operation, string file) {
+    private static int* ShellExecute(string operation, string file) {
         CoInitialize(null);
         var result = ShellExecuteA(null, operation, file, null, null, 1);
         CoUninitialize();

The second error is related to Yolort:

C:/msys64/home/user/dino/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.Notifications.h:554:173: error: conversion from 'winrt::impl::bind_in<std::chrono::time_point<winrt::clock, std::chrono::duration<long long int, std::ratio<1, 10000000
> > > >' to 'int64_t' {aka 'long long int'} is ambiguous
  554 |         check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationFactory)->CreateScheduledToastNotificationRecurring(*(void**)(&content), impl::bind_in(deliveryTime), impl::bind_in(snoozeInterval), maximumSnoozeCount, &value));

There is no solution yet...

@mxlgv mxlgv linked a pull request Jun 9, 2024 that will close this issue
@mxlgv mxlgv closed this as completed in #79 Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant