How to run a hidden standalone under OSX?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to run a hidden standalone under OSX?

Mike Kerner via use-livecode
I am trying to have my main application (an LC standalone) run a helper
app (another LC standalone) under OSX. The helper app is "headless" - it
displays no windows or user interaction. The main application
communicates with the helper through sockets and shuts it down after it
has done the data processing it does.

Under Windows, I can just use "launch" and it appears in the Windows
process list when you press Control-Alt-Delete, but does NOT appear in
the Windows task bar.

Under OSX (testing under 10.9.5), I have tried "launch" and  get
shell("open -a" && quote & tHelper & quote && "-n -j") and get
shell(quote & tHelper & quote && "-ui") and possible some other
variation I have forgotten.

Whatever I do, the App appears in the Dock. No app windows, but it
always appears in the Dock.

Is there any way under OSX to make launch/run/open a standalone under
script control where it really is a background process and in no way
appear to the user?


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to run a hidden standalone under OSX?

Mike Kerner via use-livecode
On Wed, Feb 15, 2017 at 12:09 PM, Paul Dupuis via use-livecode <
[hidden email]> wrote:

> Is there any way under OSX to make launch/run/open a standalone under
> script control where it really is a background process and in no way
> appear to the user?
>

perhaps a & at the end of the shell() command to launch it as a background
process?

This is a very real need with livecode not having multiple threads.

--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

AW: Re: How to run a hidden standalone under OSX?

Mike Kerner via use-livecode
In reply to this post by Mike Kerner via use-livecode
Someone else here in the office already solved this. I was just slow to
read my emails I guess.

The answer is:

On OS X, you can do this by adding
  LSUIElement true
to its Info.plist file (within the application bundle).

It's probably easiest to do this with Property List Editor which is part
of the OS X development tools - doesn't look like the Standalone Builder
has a place to do it.


On 2/15/2017 3:09 PM, Paul Dupuis via use-livecode wrote:

> I am trying to have my main application (an LC standalone) run a helper
> app (another LC standalone) under OSX. The helper app is "headless" - it
> displays no windows or user interaction. The main application
> communicates with the helper through sockets and shuts it down after it
> has done the data processing it does.
>
> Under Windows, I can just use "launch" and it appears in the Windows
> process list when you press Control-Alt-Delete, but does NOT appear in
> the Windows task bar.
>
> Under OSX (testing under 10.9.5), I have tried "launch" and  get
> shell("open -a" && quote & tHelper & quote && "-n -j") and get
> shell(quote & tHelper & quote && "-ui") and possible some other
> variation I have forgotten.
>
> Whatever I do, the App appears in the Dock. No app windows, but it
> always appears in the Dock.
>
> Is there any way under OSX to make launch/run/open a standalone under
> script control where it really is a background process and in no way
> appear to the user?
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to run a hidden standalone under OSX?

Mike Kerner via use-livecode
I have a helper app which uses Applescript to communicate what I want it to do. I call it Spinner, and all it does is display a model window with a message and a spinning indicator. If I set it's LSUIElement to true, can I still have it show or hide it's window? All I really want is for the app to not have the icon in the dock as you expressed, but I DO want the user to see it when I show it's window.

I've also toyed with the idea of having a translucent window I can set to the size of the current app window to give it a kind of screen back effect. I don't think that will work on Windows though.

Bob S


> On Feb 15, 2017, at 12:58 , Paul Dupuis via use-livecode <[hidden email]> wrote:
>
> Someone else here in the office already solved this. I was just slow to
> read my emails I guess.
>
> The answer is:
>
> On OS X, you can do this by adding
>  LSUIElement true
> to its Info.plist file (within the application bundle).
>
> It's probably easiest to do this with Property List Editor which is part
> of the OS X development tools - doesn't look like the Standalone Builder
> has a place to do it.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to run a hidden standalone under OSX?

Mike Kerner via use-livecode
On 2/15/2017 4:14 PM, Bob Sneidar via use-livecode wrote:
> I have a helper app which uses Applescript to communicate what I want it to do. I call it Spinner, and all it does is display a model window with a message and a spinning indicator. If I set it's LSUIElement to true, can I still have it show or hide it's window? All I really want is for the app to not have the icon in the dock as you expressed, but I DO want the user to see it when I show it's window.

Hi Bob,

I'm sorry, I don't know whether the LSUIElement flag would suppress any
windows - I don't think it would, but you'd need to test it.

Manually edit the info.plist file and just add these 2 lines:
    <key>LSUIElement</key>
    <true/>
AFTER the <dict> tag (3rd line or so)
and BEFORE the <key>CFBundleDevelopmentRegion</key> line

Hope that helps.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode