COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 08-11-2017, 04:17 AM   #1
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default OpenURL() problem on OSX

I find a problem with OpenURL() on OSX 10.9

Do nothing when I call OpenURL()

Is there any known issue?

Or maybe problems with operating system and the default browser?
__________________
Audio plugins | BrainWaveProducer | EmRysRa
SaschArt is offline   Reply With Quote
Old 08-11-2017, 07:33 AM   #2
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,067
Default

This might work.

ShellExecuteA(NULL, ("open"), "http://forum.cockos.com/forumdisplay.php?f=20", NULL, NULL, SW_SHOWNORMAL);
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 08-11-2017, 07:50 AM   #3
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Note that SWELL's ShellExecute from vanilla WDL doesn't support https links.

[PATCH] SWELL: add support for https links in ShellExecute
cfillion is offline   Reply With Quote
Old 08-12-2017, 12:35 AM   #4
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default

Please guys read my message!

The problem is on Mac OSX not on windows. ShellExecute it's an windows command


OSX 10.5 - OpenURL() working

OSX 10.9 - OpenURL() not working
__________________
Audio plugins | BrainWaveProducer | EmRysRa
SaschArt is offline   Reply With Quote
Old 08-12-2017, 04:03 AM   #5
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

WDL's SWELL provides an implementation of ShellExecute for macOS and Linux.
cfillion is offline   Reply With Quote
Old 08-12-2017, 08:12 AM   #6
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default

On WDL (Tale and Ol) the function for Mac is
Code:
bool IGraphicsMac::OpenURL(const char* url, const char* msgWindowTitle, const char* confirmMsg, const char* errMsgOnFailure)
{
  #pragma REMINDER("Warning and error messages for OpenURL not implemented")
  NSURL* pURL = 0;
  if (strstr(url, "http"))
  {
    pURL = [NSURL URLWithString:ToNSString(url)];
  }
  else
  {
    pURL = [NSURL fileURLWithPath:ToNSString(url)];
  }
  if (pURL)
  {
    bool ok = ([[NSWorkspace sharedWorkspace] openURL:pURL]);
    // [pURL release];
    return ok;
  }
  return true;
}
__________________
Audio plugins | BrainWaveProducer | EmRysRa
SaschArt is offline   Reply With Quote
Old 08-12-2017, 03:52 PM   #7
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

seems to work for me, is there an error in the xcode console?
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 08-13-2017, 01:54 AM   #8
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default

Quote:
Originally Posted by olilarkin View Post
seems to work for me, is there an error in the xcode console?
Nope is not any error in the xcode console.
__________________
Audio plugins | BrainWaveProducer | EmRysRa
SaschArt is offline   Reply With Quote
Old 08-13-2017, 04:26 AM   #9
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

what's the url?
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 08-13-2017, 04:32 AM   #10
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

okay looks like it won't open https: links. I'm midway through a lot of changes at the moment,but in the meantime you can fix it with this modification to IGraphicsMac.mm

diff --git a/WDL/IPlug/IGraphicsMac.mm b/WDL/IPlug/IGraphicsMac.mm
index 8c80a65c2f..8447c347d0 100644
--- a/WDL/IPlug/IGraphicsMac.mm
+++ b/WDL/IPlug/IGraphicsMac.mm
@@ -701,7 +701,7 @@ - (BOOL)canBecomeKeyWindow {return YES;}
{
#pragma REMINDER("Warning and error messages for OpenURL not implemented")
NSURL* pURL = 0;
- if (strstr(url, "http"))
+ if (url && (!strnicmp(url,"http://", 7) || !strnicmp(url,"https://", 8)))
{
pURL = [NSURL URLWithString:ToNSString(url)];
}
oli-mbp:IPlug oli$
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 08-13-2017, 11:31 AM   #11
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default

Oli cannot see the difference

Condition from
if (strstr(url, "http"))
{
pURL = [NSURL URLWithString:ToNSString(url)];
}

Is also met for https, for example url[]="https://www.google.com" match the condition.

What did you just add caps look "HTTPS://WWW.GOOGLE.COM"
__________________
Audio plugins | BrainWaveProducer | EmRysRa
SaschArt is offline   Reply With Quote
Old 08-13-2017, 12:59 PM   #12
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

Okay please tell me the Url is not working.
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 08-14-2017, 01:57 AM   #13
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default

Quote:
Originally Posted by olilarkin View Post
Okay please tell me the Url is not working.
https://vst.saschart.com

OSX 10.9 - not working
__________________
Audio plugins | BrainWaveProducer | EmRysRa
SaschArt is offline   Reply With Quote
Old 08-14-2017, 02:02 AM   #14
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

In VST and audio unit? Which host? Which STK are you building against?
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 08-14-2017, 06:50 AM   #15
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default

Quote:
Originally Posted by olilarkin View Post
In VST and audio unit? Which host? Which STK are you building against?
Both VST and AU, tested on Reaper and Logic Pro
__________________
Audio plugins | BrainWaveProducer | EmRysRa
SaschArt is offline   Reply With Quote
Old 08-14-2017, 07:00 AM   #16
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

which sdk?
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 08-14-2017, 07:06 AM   #17
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

it must be something wrong on your system with the default browser. your url works fine on my machine, with different sdks. I'm on 10.12
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 08-14-2017, 07:43 AM   #18
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default

Quote:
Originally Posted by olilarkin View Post
it must be something wrong on your system with the default browser. your url works fine on my machine, with different sdks. I'm on 10.12
Thanks olilarkin for your great help !!!
__________________
Audio plugins | BrainWaveProducer | EmRysRa
SaschArt is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.