Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-26 Thread James Crate via 4D_Tech
On Mar 26, 2021, at 4:17 AM, Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
>> On 26 /03 /2021, at 22:03, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> it is the app that needs to be notarised.
>> 
>> the rules discussed so far are common to all apps, nothing is specific to 4D.
> 
> I understand, it is totally my fault that it doesn’t work in 
> interpreted/debugging mode.

Not exactly your fault. Even if you were creating an app in Xcode you could 
specify camera access in the entitlements section, but it still wouldn’t work 
on 10.15+, and then you’d have to google, and eventually you might find the 
StackOverflow question with an answer specifying the necessary Info.plist keys 
you needed to add. There’s probably a page on the Apple developer documentation 
that indicates which Info.plist keys you need to add to access the camera but 
if it’s there is it’s easy to miss. I recently went through this when updating 
a macOS app; I’ve actually done all this before for a different app and I still 
ended up googling like a newbie doing it for the first time. 

The big difference is that this is not something those that develop only 4D 
normally have to deal with, and 4D’s built-in options for setting up app 
signing are somewhat lacking.

Jim
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-26 Thread Jörg Knebel via 4D_Tech


> On 26 /03 /2021, at 22:03, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> it is the app that needs to be notarised.
> 
> the rules discussed so far are common to all apps, nothing is specific to 4D.

I understand, it is totally my fault that it doesn’t work in 
interpreted/debugging mode.

One PlugIn less to watch out for!

Cheers

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-26 Thread Keisuke Miyako via 4D_Tech
actually the database kind doesn't matter, there is nothing to do for the 
structure file or project.

it is the app that needs to be notarised.

the rules discussed so far are common to all apps, nothing is specific to 4D.
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-26 Thread Jörg Knebel via 4D_Tech


> On 26 /03 /2021, at 17:41, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> info.plist and entitlements are 2 different entities.

Just to clarify one thing: You are talking about “4D Project Mode” all the 
time, do you?

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-26 Thread Jörg Knebel via 4D_Tech
Keisuke,


> On 26 /03 /2021, at 17:41, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> info.plist and entitlements are 2 different entities.

Now I’m totally confused. Where is the “entitlement entity” located? 

I asume it too should be edited with Xcode only?

I never touched Xcode yet but I think there will be a first time for everything 
to make sense out of all that gibberish needed to develop in 4D nowadays.

> the com.apple.security.device.camera key needs to be in entitlements, not 
> info.plist.
> info.plist is where you add NSCameraUsageDescription.
> 
> if you use a code editor to edit either plist file,
> you might want to "plutil -convert xml1" to normalise the file first.
> in general, using a tool other than Xcode will invalidate the plist file.
> 
> but again, all of that is done automatically in the GitHub example I shared 
> earlier.
> you just have added your Apple Developer password to keychain for it to work.

Well, I guess I’m luck not to have to do a handstand and balancing a daed cat 
with my feed at the same time.

Cheers

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-26 Thread Keisuke Miyako via 4D_Tech
info.plist and entitlements are 2 different entities.

the com.apple.security.device.camera key needs to be in entitlements, not 
info.plist.
info.plist is where you add NSCameraUsageDescription.

if you use a code editor to edit either plist file,
you might want to "plutil -convert xml1" to normalise the file first.
in general, using a tool other than Xcode will invalidate the plist file.

but again, all of that is done automatically in the GitHub example I shared 
earlier.
you just have added your Apple Developer password to keychain for it to work.

https://miyako.github.io/2019/06/17/notarization.html
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-25 Thread Jörg Knebel via 4D_Tech
Hi Jim

> On 25 /03 /2021, at 13:31, James Crate via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> So if Jorg wanted to change the entitlements on the 4D.app he uses for 
> development so it could access the camera, he could just re-sign with the new 
> entitlements and his developer ID and notarize a copy of 4D.app with the 
> bundle ID "com.4d.4d”? I never tried this but I just assumed notarization 
> would require a different bundle ID. I guess the combination of bundle ID + 
> developer ID would still be unique, but I guess I just assumed that Apple 
> wouldn’t let that happen.
> 
> Btw, I’m pretty sure camera access requires entries in info.plist in addition 
> to the entitlements but I guess that’s probably already been covered.  It’s 
> also worth noting that the “4D.entitlements” used by 4D’s SignApp.sh has 
> com.apple.security.device.camera set to true so theoretically the only extra 
> thing needed should be the info.plist keys and a built signed notarized app 
> should be allowed to access the camera.


Thanks for sharing your thoughts.

Nothing I tried worked so far.

So, my last attempt to get Keisukes PlugIn working now is to clean my Catalina 
Mac of everything 4D an than reinstall v18.

If this is done I’ll extend the entitlements of 4D by adding the needed pieces 
into the info.plist by using BBEdit eg.


com.apple.security.device.camera



After that, I’ll see if it works within my development (Binary Mode).

I might sign my *.4DB via the terminal.

Cheers
Jörg
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-24 Thread Keisuke Miyako via 4D_Tech
the "--primary-bundle-id" you pass to "xcrun altool" is actually unrelated to 
the app's bundle id; it can be any string and it does not have to unique.

2021/03/25 11:31、James Crate via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
just assumed notarization would require a different bundle ID. I guess the 
combination of bundle ID + developer ID would still be unique, but I guess I 
just assumed that Apple wouldn’t let that happen.

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-24 Thread James Crate via 4D_Tech
On Mar 24, 2021, at 6:09 PM, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
>> Does the —deep option actually work anymore? The signing script I use for an 
>> app compiled with runtime has to sign every executable component in the 
>> built app. 
> 
> yes it works.
> I use --deep to sign every framework, bundle, plugin from the inside out.
> think of it like sealing smaller boxes before putting them inside a larger 
> box and then an even larger box.
> 
> the problem with --deep is that it might miss a few components in case of a 
> complex package
> and that you can not customise the signature of each component inside the app 
> (their entitlements in particular).
> 
> you can try to --deep sign the app in one shot, it may or may not work.

From my experience it no longer works on a complex app like a built 4D app with 
many included frameworks in several different directories. I do still use the 
—deep option for each individual thing that I sign but I just wasn’t sure that 
it actually did anything anymore.

>> have to completely re-sign and notarize a 4D app, which will likely require 
>> changing the bundle ID in the info.plist\
> 
> there is no need to touch the bundle ID for code signing or notarisation.

So if Jorg wanted to change the entitlements on the 4D.app he uses for 
development so it could access the camera, he could just re-sign with the new 
entitlements and his developer ID and notarize a copy of 4D.app with the bundle 
ID "com.4d.4d”? I never tried this but I just assumed notarization would 
require a different bundle ID. I guess the combination of bundle ID + developer 
ID would still be unique, but I guess I just assumed that Apple wouldn’t let 
that happen.

Btw, I’m pretty sure camera access requires entries in info.plist in addition 
to the entitlements but I guess that’s probably already been covered.  It’s 
also worth noting that the “4D.entitlements” used by 4D’s SignApp.sh has 
com.apple.security.device.camera set to true so theoretically the only extra 
thing needed should be the info.plist keys and a built signed notarized app 
should be allowed to access the camera. 


Jim

> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-24 Thread Keisuke Miyako via 4D_Tech

> Does the —deep option actually work anymore? The signing script I use for an 
> app compiled with runtime has to sign every executable component in the built 
> app. 

yes it works.
I use --deep to sign every framework, bundle, plugin from the inside out.
think of it like sealing smaller boxes before putting them inside a larger box 
and then an even larger box.

the problem with --deep is that it might miss a few components in case of a 
complex package
and that you can not customise the signature of each component inside the app 
(their entitlements in particular).

you can try to --deep sign the app in one shot, it may or may not work.

>  have to completely re-sign and notarize a 4D app, which will likely require 
> changing the bundle ID in the info.plist

there is no need to touch the bundle ID for code signing or notarisation.
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-24 Thread James Crate via 4D_Tech
On Mar 20, 2021, at 5:53 PM, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
wrote:

> the above code unfortunately will not grant access to the camera because it 
> is missing 2 critical elements:
> 
> 1. edit "info.plist" to explain what the app needs the camera for
> 2. supply an entitlements file that will be embedded in the code signature
> 
> for examples see https://github.com/miyako/4d-utility-build-application
> 
> in addition, the use of "deep" (sign from the outside in) and "force" 
> (over-write existing signature of plugins and frameworks)
> can work against your objective. again, the above example shows how to sign 
> from the inside out.
> 
> 4D itself does not need access to the camera in order to fully function,
> it is understandable that 4D does not have the permission by default.

Does the —deep option actually work anymore? The signing script I use for an 
app compiled with runtime has to sign every executable component in the built 
app. 

In any case, in order to make this work, Jorg will either have to completely 
re-sign and notarize a 4D app, which will likely require changing the bundle ID 
in the info.plist, which may actually prevent 4D from working. Or, do some 
development, build with Runtime, sign that runtime with appropriate 
entitlements, and test the signed notarized app to see if it’s working yet. 
This just the reality of accessing the camera in today’s world.

Jim Crate
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-22 Thread Jörg Knebel via 4D_Tech
Wayne,

Just for your information.


> On 21 /03 /2021, at 00:41, Wayne Stewart via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> You don’t need to as far as I know.
> 
> A .4db is just a document.
> 
> It’s only the application that needs to be signed. Maybe plug-ins as well
> I’m not sure, but not the .4db

As it turns out it is all bullshit.

All that signing business had some “funny-fuc*-up-crashes” effects but NOTHING 
got me over the line on Mac.

I’ll watch the way 4D is going… 



**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-22 Thread Jörg Knebel via 4D_Tech
Hi John,

Thanks for sharing your procedures.

> On 22 /03 /2021, at 03:31, John J Foster via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hope that helps. If not ask away and I’ll try to remember how I got this all 
> working. It took me time.


Yes it helped.

Finally I have an idea where the “road is heading”.
If necessary I’ll take you up on the offer to ask further questions.

Cheers
Jörg


**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-21 Thread John J Foster via 4D_Tech
Hi Jörg,

Like wayne said!

You have to sign everything required to work with your application: 4D, 
plugins, folders included, resources, etc.

In my case I hand a standalone engined app for Mac and Windows.

I build my standalone 4D app.

I then use Miyako’s BUILD application (or you can move the code inside your 4D 
app source and run from there).

After you create the standalone app you will need to set the path to it in the 
code:

$path:="Macintosh HD:Users:truegold:Documents:AppFolder_v18 Development:Final 
Application:App_Mac.app:"

TEST ($path)
 
And that’s it!

In my case I then use DMG Canvas to upload the app to Apple where it’s gets 
approved and stapled.

Once that’s done I will have an Apple approved DMG that I can upload for my 
customer to download.

On Windows you will need a notary certificate purchase and there are more 
steps. I use INNO installer and various scripts and … Too evolved to discuss 
here.

Oh, I compile and prepare on Mac OS 10.15.6 (now .7). Not the new OS 11. So I 
am not sure which issues I will face once upgrade.

Hope that helps. If not ask away and I’ll try to remember how I got this all 
working. It took me time.

John...

> Hey Champion,
> 
>> On 07 /03 /2021, at 13:59, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com 
>> > wrote:
>> 
>> yes, it does not matter if you are in development or production, compiled or 
>> interpreted.
>> access to the camera requires entitlements, code signature, notarisation, 
>> and not of the plugin, but of the app (4D) itself.
> 
> I successfully signed the compiled application Standalone.app with "Developer 
> ID Application: Jorg Knebel (**)” with the build in function of 4D and 
> verified the signature.
> 
> BUT, how in the fu hell do I sign the interpreted/development (*.4DB) 
> version of my creation?
> 
> Do I have to sign the “*.4DB” and/or the “*.4dbase” thing??
> 
> I’ll use the terminal to sign what ever has to be signed that enables me to 
> continue developing:
> 
> codesign --deep --force --verbose --sign " Knebel (**)>” $Path/To/My/Development
> 
> I would appreciate a definite “How to...” answer, but will accept “this is a 
> total Apple-Fu**-Up”.
> 
> Thanks
> 
> Cheers
> Jörg

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-21 Thread Jörg Knebel via 4D_Tech


> On 21 /03 /2021, at 18:05, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> like I posted earlier, all the steps are implemented in the example:
> 
> https://github.com/miyako/4d-utility-build-application 
> 
Yes of cause.

Cheers
Jörg
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-21 Thread Keisuke Miyako via 4D_Tech
like I posted earlier, all the steps are implemented in the example:

https://github.com/miyako/4d-utility-build-application

2021/03/21 15:41、Jörg Knebel via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
Could you offer a step by step explanation because this is all new to me.

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-21 Thread Jörg Knebel via 4D_Tech


> On 21 /03 /2021, at 11:53, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 1. edit "info.plist" to explain what the app needs the camera for

Do you mean the 4D info.plist?


> 2. supply an entitlements file that will be embedded in the code signature

Entitlements file? 
Sorry, I have now idea what you’re talking about.

Could you offer a step by step explanation because this is all new to me.

Thanks
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-20 Thread Keisuke Miyako via 4D_Tech
I’ll use the terminal to sign what ever has to be signed that enables me to 
continue developing:
codesign --deep --force --verbose --sign "” $Path/To/My/Development

the above code unfortunately will not grant access to the camera because it is 
missing 2 critical elements:

1. edit "info.plist" to explain what the app needs the camera for
2. supply an entitlements file that will be embedded in the code signature

for examples see https://github.com/miyako/4d-utility-build-application

in addition, the use of "deep" (sign from the outside in) and "force" 
(over-write existing signature of plugins and frameworks)
can work against your objective. again, the above example shows how to sign 
from the inside out.

4D itself does not need access to the camera in order to fully function,
it is understandable that 4D does not have the permission by default.

it is not just Apple, the world's view on privacy and surveillance has much 
evolved in the past decade.
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-20 Thread Jörg Knebel via 4D_Tech
Wayne,


> On 21 /03 /2021, at 00:41, Wayne Stewart via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> You don’t need to as far as I know.

Not according to Keisuke:


> On 07 /03 /2021, at 13:59, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com 
> > wrote:
> 
> I will answer in place of Armin;
> 
> yes, it does not matter if you are in development or production, compiled or 
> interpreted.
> access to the camera requires entitlements, code signature, notarisation, and 
> not of the plugin, but of the app (4D) itself.
> 
> Since Keisukes Cupturev2-Plugin does not work either on Catalina and 4Dv18,
> 
> if you satisfy the aforementioned requirements, the plugin will work on 
> Catalina and 4D v18.



> 
> A .4db is just a document.
> 
> It’s only the application that needs to be signed. Maybe plug-ins as well

Well, the Plugin in question is notarised…

I turned off SIP and the gatekeeper in Catalina.

Any further hints?


Thanks 

Cheers
Jörg

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-20 Thread Wayne Stewart via 4D_Tech
Jörg,

You don’t need to as far as I know.

A .4db is just a document.

It’s only the application that needs to be signed. Maybe plug-ins as well
I’m not sure, but not the .4db

Wayne

On Sat, 20 Mar 2021 at 23:30, Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Hey Champion,
>
> > On 07 /03 /2021, at 13:59, Keisuke Miyako via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > yes, it does not matter if you are in development or production,
> compiled or interpreted.
> > access to the camera requires entitlements, code signature,
> notarisation, and not of the plugin, but of the app (4D) itself.
>
> I successfully signed the compiled application Standalone.app with
> "Developer ID Application: Jorg Knebel (**)” with the build in function
> of 4D and verified the signature.
>
> BUT, how in the fu hell do I sign the interpreted/development (*.4DB)
> version of my creation?
>
> Do I have to sign the “*.4DB” and/or the “*.4dbase” thing??
>
> I’ll use the terminal to sign what ever has to be signed that enables me
> to continue developing:
>
> codesign --deep --force --verbose --sign " Knebel (**)>” $Path/To/My/Development
>
> I would appreciate a definite “How to...” answer, but will accept “this is
> a total Apple-Fu**-Up”.
>
> Thanks
>
> Cheers
> Jörg
>
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

-- 

Regards,

Wayne
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-20 Thread Jörg Knebel via 4D_Tech
Hey Champion,

> On 07 /03 /2021, at 13:59, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> yes, it does not matter if you are in development or production, compiled or 
> interpreted.
> access to the camera requires entitlements, code signature, notarisation, and 
> not of the plugin, but of the app (4D) itself.

I successfully signed the compiled application Standalone.app with "Developer 
ID Application: Jorg Knebel (**)” with the build in function of 4D and 
verified the signature.

BUT, how in the fu hell do I sign the interpreted/development (*.4DB) 
version of my creation?

Do I have to sign the “*.4DB” and/or the “*.4dbase” thing??

I’ll use the terminal to sign what ever has to be signed that enables me to 
continue developing:

codesign --deep --force --verbose --sign "” $Path/To/My/Development

I would appreciate a definite “How to...” answer, but will accept “this is a 
total Apple-Fu**-Up”.

Thanks

Cheers
Jörg

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-14 Thread Jörg Knebel via 4D_Tech
Keipsuke,

> On 07 /03 /2021, at 13:59, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I will answer in place of Armin;
> 
> yes, it does not matter if you are in development or production, compiled or 
> interpreted.
> access to the camera requires entitlements, code signature, notarisation, and 
> not of the plugin, but of the app (4D) itself.
> 
> Since Keisukes Cupturev2-Plugin does not work either on Catalina and 4Dv18,
> 
> if you satisfy the aforementioned requirements, the plugin will work on 
> Catalina and 4D v18.

Thanks and sorry for the late answer.

I’ll have another look at it asap.

Cheers
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-06 Thread Keisuke Miyako via 4D_Tech
I will answer in place of Armin;

yes, it does not matter if you are in development or production, compiled or 
interpreted.
access to the camera requires entitlements, code signature, notarisation, and 
not of the plugin, but of the app (4D) itself.

Since Keisukes Cupturev2-Plugin does not work either on Catalina and 4Dv18,

if you satisfy the aforementioned requirements, the plugin will work on 
Catalina and 4D v18.

2021/03/06 19:36、Jörg Knebel via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
Even if I’m still at the development/debugging state, meaning not compiled and 
not even closed to deployment?

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-06 Thread Jörg Knebel via 4D_Tech
Hey Armin,

> On 06 /03 /2021, at 07:38, ADeeg via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> you have to sign and notarize your mac app with the Magic Miyako tool build
> application to enable the needed security settings and get the camera
> access.

Even if I’m still at the development/debugging state, meaning not compiled and 
not even closed to deployment?

Cheers
Jörg
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-05 Thread ADeeg via 4D_Tech
4D Tech mailing list wrote
> Everyone,
> 
> Many thanks for the answers and the tips, it was very helpful.
> 
> I followed up on all the tips and tricks
> 
>   • “./“ Yes and no
>   • $MyShellScript.sh 
>   - hard coded in BBedit
>   - created in 4D 
>   - chmod 755 $MyShellScript.sh 
>   • Prepare POSIX-Pathname with Escape-Routines from Chip (Thanks) and
> Keisuke
> 
>   • shorten the depth of the path
>   $FoDoPath:=System folder(Desktop)
>   $FoDoPath:=Convert path system to POSIX($FoDoPath)
>   $cmd:=$FoDoPath+"imagesnap -w 2.0”
> 
> What ever I tried it would not work when called via LEP but always works
> direct in the terminal.
> 
> Since I use other terminal (UNIX) executable stored in the resource
> folder, I guess there is something wrong with “imagesnap”.
> 
> Since Keisukes Cupturev2-Plugin does not work either on Catalina and
> 4Dv18, so I have to cancel that security feature for the Mac-Version of
> the application. 
> This is the first time in 30 years that I have to do this for the
> Mac-side, otherwise it always was the Windows-side with this kind of
> problems.
> 
> 
> 
> Now something almost unrelated.
> 
> If you guys ever need to get the public IP-Address here are some
> suggestions:
> 
> Mac & Windows (result will be returned into $StdOut)
> 
> $cmd:="curl ifconfig.me”
>   OR
> $cmd:="curl icanhazip.com”
> 
> 
> Wndows ONLY
> 
> $cmd:="curl icanhazip.com | clip” // writes the result to the clipboard 
> 
> Cheers
> Jörg
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:

> 4D_Tech-Unsubscribe@.4D

> **

Hi Jörg,

you have to sign and notarize your mac app with the Magic Miyako tool build
application to enable the needed security settings and get the camera
access.

Same with calendar or address book access.

Signing with the 4D integrated option does not add the needed keys to the
Info.plist 

Armin



--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-05 Thread Jörg Knebel via 4D_Tech
Everyone,

Many thanks for the answers and the tips, it was very helpful.

I followed up on all the tips and tricks

• “./“ Yes and no
• $MyShellScript.sh 
- hard coded in BBedit
- created in 4D 
- chmod 755 $MyShellScript.sh 
• Prepare POSIX-Pathname with Escape-Routines from Chip (Thanks) and 
Keisuke

• shorten the depth of the path
$FoDoPath:=System folder(Desktop)
$FoDoPath:=Convert path system to POSIX($FoDoPath)
$cmd:=$FoDoPath+"imagesnap -w 2.0”

What ever I tried it would not work when called via LEP but always works direct 
in the terminal.

Since I use other terminal (UNIX) executable stored in the resource folder, I 
guess there is something wrong with “imagesnap”.

Since Keisukes Cupturev2-Plugin does not work either on Catalina and 4Dv18, so 
I have to cancel that security feature for the Mac-Version of the application. 
This is the first time in 30 years that I have to do this for the Mac-side, 
otherwise it always was the Windows-side with this kind of problems.



Now something almost unrelated.

If you guys ever need to get the public IP-Address here are some suggestions:

Mac & Windows (result will be returned into $StdOut)

$cmd:="curl ifconfig.me”
OR
$cmd:="curl icanhazip.com”


Wndows ONLY

$cmd:="curl icanhazip.com | clip” // writes the result to the clipboard 

Cheers
Jörg
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-04 Thread Randy Kaempen via 4D_Tech
Peter,

> On Mar 4, 2021, at 10:03 AM, Peter Bozek via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> On Thu, Mar 4, 2021 at 1:59 PM Jörg Knebel via 4D_Tech
> <4d_tech@lists.4d.com> wrote:
>> 
>> $FoDoPath:=Get 4D folder(Current resources folder)
>> $FoDoPath:=Convert path system to POSIX($FoDoPath)
>> 
>> $cmd:=$FoDoPath+"./imagesnap -w 2.0 "
> 
> Jörg,
> 
> what seems suspicious to me is the "./" in above.
> 
> "./" is used as a "current folder" path, so IMHO it should not be used
> when you construct a full path. You should execute
> "/DATA/4Dƒ/TTTCorev18/TTTCorev18.4dbase/Resources/imagesnap -w 2.0"
> 
> BTW, you should enclose path in parenthesis, in case your path contains 
> spaces.
> 
> Second thing, what I found sometimes useful, especially when I need
> several command to execute, is write commands in separate .sh file and
> then execute the commands with LEP command "sh pathToFle.sh”.

I agree.  LEP operates in its own environment.  Every command gets a fresh 
environment.  You can’t count on changes made by previous commands or a 
reference like ‘./‘.  When I need to run multiple commands, I create a batch 
file and then execute that.


Randy Kaempen
Intellex Corporation

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-04 Thread Peter Bozek via 4D_Tech
On Thu, Mar 4, 2021 at 1:59 PM Jörg Knebel via 4D_Tech
<4d_tech@lists.4d.com> wrote:
>
> $FoDoPath:=Get 4D folder(Current resources folder)
> $FoDoPath:=Convert path system to POSIX($FoDoPath)
>
> $cmd:=$FoDoPath+"./imagesnap -w 2.0 "

Jörg,

what seems suspicious to me is the "./" in above.

"./" is used as a "current folder" path, so IMHO it should not be used
when you construct a full path. You should execute
"/DATA/4Dƒ/TTTCorev18/TTTCorev18.4dbase/Resources/imagesnap -w 2.0"

BTW, you should enclose path in parenthesis, in case your path contains spaces.

Second thing, what I found sometimes useful, especially when I need
several command to execute, is write commands in separate .sh file and
then execute the commands with LEP command "sh pathToFle.sh".

Regards,

-- 

Peter Bozek
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-04 Thread Koen Van Hooreweghe via 4D_Tech
Hi Jörg,

I had a very old version in Imagesnap in one of my projects but it doesn't work 
any more. Using this old version 4D always hangs.

Unfortunately updating to the latest version did not help. No more hang, but no 
image data returned. Thus far I suppose it's an issue of privacy setting. 4D 
doesn't get access to the camera (I'm on 10.14.6 and using 4D v17R6).

When trying the command from terminal, the first thing Terminal asked was 
permissoin to access the camera.

Now I have to find a way to give accesss to 4D too. But simply dragging and 
dropping the app in the system preferences does not work.

Investigating further, but maybe you know a way to do this? I found a 
tccutil.py python script for managing apps permissions, but did not test it 
yet. Seems to be quite a hassle to get this working on customers machines.

HTH
Koen

> Op 4 mrt. 2021, om 13:59 heeft Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com> 
> het volgende geschreven:
> 
> $cmd:=$FoDoPath+"./imagesnap -w 2.0 "
> 
> LAUNCH EXTERNAL PROCESS($cmd;$StdIn;$StdOut;$StdOut;$PID)
> 




Compass bv
Koen Van Hooreweghe
Kloosterstraat 65
9910 Aalter
Belgium
tel +32 495 511.653

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [4D v18.3; Mac {10.13.6} + {10.15.7}] LEP-voodoo

2021-03-04 Thread nug via 4D_Tech
Jorg,
not directly related... but...
when I was F-ing around with LEP trying to get a file manipulator working, on 
Windows the command xcopy gave me the same sort of result

the command line when supplied to the command prompt worked. when supplied 
through LEP failed.
Now again, not Mac, and not v18, it was v15, but I think there are some command 
line actions which - for whatever reason just do not work through LEP

all of that said...
you might want to try to use the following code for your POSIX conversion, note 
there are a lot of references to Konstants in this code, also you can ignore or 
replace the "errutl_" references as this returns an error code to the call 
stack indicating what and where an error occurred.  Again, not v18, but the 
POSIX command does not correctly convert everything.
I have some code (See below) which should do the conversion correctly

Also... I have code picked up from Kiesuke which escapes the command line 
command - also follows
I hope either of these help.

Chip


  //(m) fileutl_LEP_Escape
  //$1 - Text - path or command to escape

  //Code from Kiesuke Myako - Sublaunch demo

  //RETURNS - Text - escaped path or command
  // • Created 04-13-18 by Chip - 
C_TEXT($1;$0;$Source;$Metacharacter;$Metacharacters)
C_LONGINT($i;$len)
C_BOOLEAN($Needs_Quote)

If (Count parameters#0)
$Source:=$1

If (Folder separator=BackSlash_Char)  //Windows
  //argument escape for cmd.exe
$Needs_Quote:=False
$Metacharacters:="&|<>()%^\" "
$len:=Length($Metacharacters)

For ($i;1;$len)
$Metacharacter:=Substring($Metacharacters;$i;1)
$Needs_Quote:=$Needs_Quote | (Position($Metacharacter;$Source;*)#0)

If ($Needs_Quote)
$i:=$len
End if 
End for 

If ($Needs_Quote)

If (Substring($Source;Length($Source))="\\")
$Source:="\""+$Source+"\\\""
Else 
$Source:="\""+$Source+"\""
End if 
End if 
Else 
$Metacharacters:="\\!\"#$%&'()=~|<>?;*`[] "

For ($i;1;Length($Metacharacters))
$Metacharacter:=Substring($Metacharacters;$i;1)
$Source:=Replace string($Source;$Metacharacter;"\\"+$Metacharacter;*)
End for 
End if 
End if 
$0:=$Source
  //End fileutl_LEP_Escape 




  //fileutl_Path_Convert_to_Posix
  // $1 - Text - Path to convert
  //$2 - Pointer (Optional) - to Error Return Text

  //Original from JorgeChB via iNug

  //Converts a Mac file path to a Posix form

  //RETURNS - Text - converted path, or empty string if path is empty
  // • Created 3/24/15 by Chip - 
  //• Updated 05-17-18 by Chip - added test for empty path
C_TEXT($Path;$Path;$0;$msg)
C_POINTER($2;$Error_ptr)

errutl_Start 

If (Count parameters>=1)
$Path:=$1

If (Count parameters>=2)
$Error_ptr:=$2
End if 

Case of 
: ($Path="")
$msg:="Source Path is empty"
errutl_Add ($msg)

: (Position(Colon_Char;$Path)>0)

If ($Path#"")
$Path:=Replace string($Path;Slash_Char;"__-sLaSh-__")  //'a/b' -> 
'a__-sLaSh-__b'
$Path:=Replace string($Path;Colon_Char;Slash_Char)  //'a:b' -> 'a/b'
$Path:=Replace string($Path;"__-sLaSh-__";Colon_Char)  //'a__-sLaSh-__b' -> 
'a:b'
$Path:=Replace string($Path;BackSlash_Char;BackSlash_Char+BackSlash_Char)  
//'a\\b' -> 'a\\b'"
$Path:=Replace string($Path;Space_Char;BackSlash_Char+Space_Char)  //'a b' -> 
'a\ b'
$Path:=Replace string($Path;"*";BackSlash_Char+"*")  //'a*b' -> 'a\*b'
$Path:=Replace string($Path;"'";BackSlash_Char+"'")  //'a'b' -> 'a\'b'
$Path:=Replace string($Path;"&";BackSlash_Char+"&")  //'a' -> 'a\'
$Path:=Replace string($Path;Quote_Char;BackSlash_Char+Quote_Char)  //'a"b' -> 
'a\"b'
$Path:=Replace string($Path;"(";BackSlash_Char+"(")  //'a(b' -> 'a\(b'
$Path:=Replace string($Path;")";BackSlash_Char+")")  //'a)b' -> 'a\)b'
$Path:=Replace string($Path;"|";BackSlash_Char+"|")  //'a|b' -> 'a\|b'

  //make sure we do not prepend 'Volumes' if it already there
If (Position("/Volumes/";$Path)=0)
$0:="/Volumes/"+$Path
Else 
$0:=$Path
End if 
Else 
errutl_Add ("Source is empty.")
End if 
Else 
$msg:="Posix conversion is only applicable "
$msg:=$msg+"to paths formatted for use on a Macintosh."
errutl_Add ($msg)
End case 
Else 
$msg:="Required parameters (1) not passed."+Cr_Char
$msg:=$msg+"Parameters passed "+String(Count parameters)
errutl_Add ($msg)
End if 

errutl_End (Current method name;$Error_ptr;Nil($Error_ptr))
  //End fileutl_Path_Convert_to_Posix
> On Mar 4, 2021, at 7:59 AM, Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 
> G’day All,
> 
> We are talking Mac ONLY - High Sierra and Catalina!
> 
> I found a command line application that can take a snapshot with the current 
> camera.
> 
> This nifty tool is called “imagesnap” and it is totally free in all regards.
> 
> Check out: http://iharder.sourceforge.net/current/macosx/imagesnap/ 
> 
> 
> So, I placed that tool in the resource folder of the application I’m working 
> on and tried to call it from within 4D via LEP:
> 
> <4D code>
> 
> C_TEXT($cmd)
> C_TEXT($FoDoPath;$OutPictPath;$imageSnapPath)
> C_BLOB($StdIn;$StdOut;$Error)
> C_LONGINT($PID)
> 
> $FoDoPath:=Get 4D