Re: Making a package of a built Mac volume desktop

2019-10-16 Thread Jim Crate via 4D_Tech
On Oct 15, 2019, at 5:25 PM, Paul Ringsmuth via 4D_Tech <4d_tech@lists.4d.com> 
wrote:

> I created a folder “Data” and put the various 4D data files in it. Then I put 
> the “Data” folder into the My4D.app. The first time it is launched it asks me 
> to open a data file. I navigate to and select the data file inside of 
> My4D.app. The second time it is launched it remembers where the data file 
> was. So this is a good solution to have everything in one .app package. 
> 
> But sometimes there will be updates and the old data should be used. The 
> everything in one package becomes problematic because it is too hard for the 
> user to deal with the data files. It may be better to have the Data folder 
> outside of the .app to make it easier for my users to swap in new code. It 
> might be tougher for them to locate the old data file.

You will want to use the new architecture for datafile path management system. 
I just converted an app to use this mechanism. This will allow the user to 
never have to select a datafile if you do it right. Also, app updates will not 
destroy the user’s data as it would if the data file is in the app package.

You will need to provide a default data file in the app package. In On Startup, 
you’ll check to see if you are using the default data file. If so, and you are 
running 4D Volume Desktop, then you will look for the user’s data file in the 
path where it should be, something like ~/Documents/MyApp/MyData.4dd, or 
somewhere in ~/Library/ if you don’t want the user to find the data file so 
easily. If the user’s data file does not exist, you can copy the default data 
file if you like, or create a new datafile. Once you have a user-specific data 
file to use, call OPEN DATA FILE($path). 

sample code for v17:

  // 
$datafileObj:=Path to object(Data file)
Case of 
: ($datafileObj.name="Default")
  // can't run with default datafile
Case of 
: (Application type=4D Remote mode)
ALERT("Can't run with data file "+Data file+".")
QUIT 4D

: (Application type=4D Volume desktop)
$path:=Find_My_Datafile 
If ($path#"")
OPEN DATA FILE($path)
Else 
ALERT(“Cannot run with default data. 
Quitting now, try again.")
QUIT 4D
End if 
: (Application type=4D Local mode)
  // developer should select datafile
$structurePathObj:=Path to object(Structure 
file)
$path:=Select 
document($structurePathObj.parentFolder;"4DD";"Select the data file:";0)
If (ok=1)
OPEN DATA FILE(document)
Else 
ALERT("Default data is being used. 
Startup code will not run.")
TRACE
End if 
End case 

// more case conditions for startup
End case
  // 

The Find_My_Datafile method looks for the user’s data file in the appropriate 
location, copies default data if necessary, etc.

See the 4D docs for more details.

https://doc.4d.com/4Dv17/4D/17.3/Data-file-management-in-final-applications.300-4639814.en.html


Jim Crate
**
4D Internet Users Group (4D iNUG)
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: Making a package of a built Mac volume desktop

2019-10-16 Thread John J Foster via 4D_Tech
Hi David,

That sucks!

It’s hard enough to spend the time trying to figure it out and then to discover 
a bug.

I’m Still running the app from OS 10.12.6 so I’m guessing the bug is not there 
since it worked.

I wish I could give you something more tangible than empathy.

John…

> Apparently, there is some bug, in some OS’s, that importing the Apple 
> Developer Cert with KeyChain, it is not recognized. Even with a fresh OS 
> certificate import. DropDMG also fails to recognize it.
> 
> I don’t know the solution yet….
> 
> I wish it was always easy!

**
4D Internet Users Group (4D iNUG)
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: Making a package of a built Mac volume desktop

2019-10-16 Thread Pat Bensky via 4D_Tech
Jeremy,
Absolutely! If you make ANY changes to the package after the code signing
has been done, that will invalidate the signing - the whole point of code
signing is to make sure the app hasn't been interfered with after it was
built by the registered developer.
Pat

On Wed, 16 Oct 2019 at 08:28, Jeremy Roussak via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> On 15 Oct 2019, at 22:25, Paul Ringsmuth via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> >
> > One other thing. I notice that there is a _CodeSignature file in the
> app. I think the app gets signed in the build interface. Does adding a data
> folder to the app affect the code signing?
>
> I think so, yes. My understanding (which is superficial, I confess) is
> that codesigning must be the last thing done to a package before
> distribution. It does make sense.
>
> Jeremy
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
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: Making a package of a built Mac volume desktop

2019-10-16 Thread Jeremy Roussak via 4D_Tech
On 15 Oct 2019, at 22:25, Paul Ringsmuth via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
> One other thing. I notice that there is a _CodeSignature file in the app. I 
> think the app gets signed in the build interface. Does adding a data folder 
> to the app affect the code signing? 

I think so, yes. My understanding (which is superficial, I confess) is that 
codesigning must be the last thing done to a package before distribution. It 
does make sense.

Jeremy
**
4D Internet Users Group (4D iNUG)
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: Making a package of a built Mac volume desktop

2019-10-15 Thread David Ringsmuth via 4D_Tech
John,

Apparently, there is some bug, in some OS’s, that importing the Apple Developer 
Cert with KeyChain, it is not recognized. Even with a fresh OS certificate 
import. DropDMG also fails to recognize it.

I don’t know the solution yet….

I wish it was always easy!

☹

David Ringsmuth

From: John J Foster via 4D_Tech
Sent: Tuesday, October 15, 2019 7:42 PM
To: 4d_tech@lists.4d.com
Cc: John J Foster
Subject: RE: Making a package of a built Mac volume desktop

Hi David,

I went this route and it worked for me.

I also purchased DropDMG and it’s really simple. BUT…

I have not tired to send anything to Apple for it’s approval. So I don’t know 
how that part works or how long it takes.

Otherwise I wish Windows were as easy.

John...

> Paul,
> 
> You’ll need an Apple Developer Certificate, that must be imported into your 
> OSX machine using KeyChain.
> 
> https://kb.4d.com/assetid=78153 <https://kb.4d.com/assetid=78153>
> 
> If the Apple Developer Certificate has been imported correctly. It did not 
> work for a client of mine, who also purchased DropDMG, and it failed to work 
> too.
> 
> David Ringsmuth

**
4D Internet Users Group (4D iNUG)
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)
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: Making a package of a built Mac volume desktop

2019-10-15 Thread John J Foster via 4D_Tech
Hi David,

I went this route and it worked for me.

I also purchased DropDMG and it’s really simple. BUT…

I have not tired to send anything to Apple for it’s approval. So I don’t know 
how that part works or how long it takes.

Otherwise I wish Windows were as easy.

John...

> Paul,
> 
> You’ll need an Apple Developer Certificate, that must be imported into your 
> OSX machine using KeyChain.
> 
> https://kb.4d.com/assetid=78153 
> 
> If the Apple Developer Certificate has been imported correctly. It did not 
> work for a client of mine, who also purchased DropDMG, and it failed to work 
> too.
> 
> David Ringsmuth

**
4D Internet Users Group (4D iNUG)
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: Making a package of a built Mac volume desktop

2019-10-15 Thread John J Foster via 4D_Tech
Hi Paul,

I don think it makes much sense to keep the data file in the built application. 
I think it will be deleted each time a new build is completed.

On the Mac I opted to install the myApp in the Application folder. I have 
installed the data file in the Documents folder inside it’s own myDataFolder.

That way you can store your data on your Mac and keep it in a similar folder 
and then it will “remember” because your client will mirror your setup. I think 
I’m right but time will tell.

> One other thing. I notice that there is a _CodeSignature file in the app. I 
> think the app gets signed in the build interface. Does adding a data folder 
> to the app affect the code signing? 


Not to my knowledge. This is a program feature courtesy of Apple.com for pour 
protection! Feel the irritation and sarcasm…

> Also I signed up to become an Apple Developer. It took me a couple of days to 
> read/skim the 80 page agreement. Now I have to figure out what to do to get 
> code signing approval. I think they call it a ticket. 

It depends upon the level. I opted for downloading a certificate and just 
having myApp link to in the build. 4D v17 is setup for that.

Although I understand in later versions of the Mac OS then technically an App 
is supposed to be submitted by the installer to Apple so they can verify that 
it doesn’t have any virus and the like.

I don’t intend to do this until I have no choice! I use BitDefender and they 
seem to a good job of keeping my computers clean.

Anyway, none of this was really simple for me. Perhaps I just mentally made it 
more challenging then it needed to be.

Right now I”m going through as similar run for the windows version of myApp.

Cheers,
John…



>> What do you want the package to do when you double-click it?
> Good question. When I double-click the the app I would like it to launch with 
> the data file. 
> 
> I created a folder “Data” and put the various 4D data files in it. Then I put 
> the “Data” folder into the My4D.app. The first time it is launched it asks me 
> to open a data file. I navigate to and select the data file inside of 
> My4D.app. The second time it is launched it remembers where the data file 
> was. So this is a good solution to have everything in one .app package. 
> 
> But sometimes there will be updates and the old data should be used. The 
> everything in one package becomes problematic because it is too hard for the 
> user to deal with the data files. It may be better to have the Data folder 
> outside of the .app to make it easier for my users to swap in new code. It 
> might be tougher for them to locate the old data file.
> 
> One other thing. I notice that there is a _CodeSignature file in the app. I 
> think the app gets signed in the build interface. Does adding a data folder 
> to the app affect the code signing? 
> 
> Also I signed up to become an Apple Developer. It took me a couple of days to 
> read/skim the 80 page agreement. Now I have to figure out what to do to get 
> code signing approval. I think they call it a ticket. 
> 
> Paul Ringsmuth
> pringsm...@charter.net 
> 

**
4D Internet Users Group (4D iNUG)
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: Making a package of a built Mac volume desktop

2019-10-15 Thread Chip Scheide via 4D_Tech
you have 2, maybe 3 choices
- you can distribute with a folder which contains the .app and a 
separate datafile (or folder) --my preference
- you can distribute a .app package with everything inside. Then manage 
the updates yourself, distribute an update application which will reach 
inside the existing package, copy in a new structure and leave the old 
data alone.
- you might be able to do this more easily with 4D's update system, 
BUT, i have not used so I have no idea.

in either of the all inside the package distributions you (your user) 
will need to worry about backups in case of equipment failure. many 
people (my self included) do not, in general, backup the application 
folder. If your .app package is in the application folder (c:/program 
folder) it is likely to NOT be part of a backup plan. You will/should 
need to be very proactive about getting your users to create backups.

Chip
 
On Tue, 15 Oct 2019 16:25:33 -0500, Paul Ringsmuth via 4D_Tech wrote:
> 
> But sometimes there will be updates and the old data should be used. 
> The everything in one package becomes problematic because it is too 
> hard for the user to deal with the data files.
We have done so much, with so little, for so long;
We are now qualified to anything with nothing 
  - unknown
**
4D Internet Users Group (4D iNUG)
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: Making a package of a built Mac volume desktop

2019-10-15 Thread David Ringsmuth via 4D_Tech
Paul,

You’ll need an Apple Developer Certificate, that must be imported into your OSX 
machine using KeyChain.

https://kb.4d.com/assetid=78153

If the Apple Developer Certificate has been imported correctly. It did not work 
for a client of mine, who also purchased DropDMG, and it failed to work too.

David Ringsmuth

From: Paul Ringsmuth via 4D_Tech
Sent: Tuesday, October 15, 2019 4:25 PM
To: 4D iNug Technical
Cc: Paul Ringsmuth; Keith Culotta
Subject: Re: Making a package of a built Mac volume desktop

> What do you want the package to do when you double-click it?
Good question. When I double-click the the app I would like it to launch with 
the data file. 

I created a folder “Data” and put the various 4D data files in it. Then I put 
the “Data” folder into the My4D.app. The first time it is launched it asks me 
to open a data file. I navigate to and select the data file inside of My4D.app. 
The second time it is launched it remembers where the data file was. So this is 
a good solution to have everything in one .app package. 

But sometimes there will be updates and the old data should be used. The 
everything in one package becomes problematic because it is too hard for the 
user to deal with the data files. It may be better to have the Data folder 
outside of the .app to make it easier for my users to swap in new code. It 
might be tougher for them to locate the old data file.

One other thing. I notice that there is a _CodeSignature file in the app. I 
think the app gets signed in the build interface. Does adding a data folder to 
the app affect the code signing? 

Also I signed up to become an Apple Developer. It took me a couple of days to 
read/skim the 80 page agreement. Now I have to figure out what to do to get 
code signing approval. I think they call it a ticket. 

Paul Ringsmuth
pringsm...@charter.net



> On Oct 15, 2019, at 3:46 PM, Keith Culotta  wrote:
> 
> What do you want the package to do when you double-click it?
> 
> You can right-click the built app and show its contents, which will open it 
> as a folder.  There are places in there where you can put data and other 
> files, and it will still open when you double-click it.  
> 
> I think the package you created would need a plist file in a specific place 
> to operate correctly.
> 
> Keith - CDI
> 
>> On Oct 15, 2019, at 2:24 PM, Paul Ringsmuth via 4D_Tech 
>> <4d_tech@lists.4d.com <mailto:4d_tech@lists.4d.com>> wrote:
>> 
>> 4Dv17R5 
>> 
>> I have created a built volume desktop app for Mac. 
>> I put the built volume desktop into a folder along with the data files. 
>> The name on the folder is the app’s name. 
>> Then I added the .4dbase extension to the folder and created a package. 
>> 
>> The problem is that when this package is double clicked, it attempts to 
>> launch and it throws a system error which can be sent to Apple. 
>> 
>> Is it not possible to make a package with a volume desktop app?
>> 
>> Paul Ringsmuth
>> pringsm...@charter.net <mailto:pringsm...@charter.net>
>> 
>> 
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> 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)
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)
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: Making a package of a built Mac volume desktop

2019-10-15 Thread Paul Ringsmuth via 4D_Tech
> What do you want the package to do when you double-click it?
Good question. When I double-click the the app I would like it to launch with 
the data file. 

I created a folder “Data” and put the various 4D data files in it. Then I put 
the “Data” folder into the My4D.app. The first time it is launched it asks me 
to open a data file. I navigate to and select the data file inside of My4D.app. 
The second time it is launched it remembers where the data file was. So this is 
a good solution to have everything in one .app package. 

But sometimes there will be updates and the old data should be used. The 
everything in one package becomes problematic because it is too hard for the 
user to deal with the data files. It may be better to have the Data folder 
outside of the .app to make it easier for my users to swap in new code. It 
might be tougher for them to locate the old data file.

One other thing. I notice that there is a _CodeSignature file in the app. I 
think the app gets signed in the build interface. Does adding a data folder to 
the app affect the code signing? 

Also I signed up to become an Apple Developer. It took me a couple of days to 
read/skim the 80 page agreement. Now I have to figure out what to do to get 
code signing approval. I think they call it a ticket. 

Paul Ringsmuth
pringsm...@charter.net



> On Oct 15, 2019, at 3:46 PM, Keith Culotta  wrote:
> 
> What do you want the package to do when you double-click it?
> 
> You can right-click the built app and show its contents, which will open it 
> as a folder.  There are places in there where you can put data and other 
> files, and it will still open when you double-click it.  
> 
> I think the package you created would need a plist file in a specific place 
> to operate correctly.
> 
> Keith - CDI
> 
>> On Oct 15, 2019, at 2:24 PM, Paul Ringsmuth via 4D_Tech 
>> <4d_tech@lists.4d.com > wrote:
>> 
>> 4Dv17R5 
>> 
>> I have created a built volume desktop app for Mac. 
>> I put the built volume desktop into a folder along with the data files. 
>> The name on the folder is the app’s name. 
>> Then I added the .4dbase extension to the folder and created a package. 
>> 
>> The problem is that when this package is double clicked, it attempts to 
>> launch and it throws a system error which can be sent to Apple. 
>> 
>> Is it not possible to make a package with a volume desktop app?
>> 
>> Paul Ringsmuth
>> pringsm...@charter.net 
>> 
>> 
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> 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)
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: Making a package of a built Mac volume desktop

2019-10-15 Thread John J Foster via 4D_Tech
Hi Paul,

I am using the same Mac 4D v17r5 (standalone) and the volume desktop build 
creates an application compete with everything required inside of it.

For example after the build my applications is named:

myApp.app

If I double-click it will indeed open as expected.

If we go deeper into the folders:

The next level looks like this:

Contents

And within “Contents” are these folders:

_CodeSignature
4D Extensions
Components
Database
Frameworks
Info.plist
Licenses
MacOS
Native Components
PkgInfo
Plugins
Resources
SASL Plugins

And so on and …

Are we discussing a stand loan or a built Client Server app - to which I am 
quite ignorant?

John…




> 4Dv17R5
> 
> I have created a built volume desktop app for Mac.
> I put the built volume desktop into a folder along with the data files.
> The name on the folder is the app’s name.
> Then I added the .4dbase extension to the folder and created a package.
> 
> The problem is that when this package is double clicked, it attempts to 
> launch and it throws a system error which can be sent to Apple.
> 
> Is it not possible to make a package with a volume desktop app?
> 
> Paul Ringsmuth

**
4D Internet Users Group (4D iNUG)
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: Making a package of a built Mac volume desktop

2019-10-15 Thread Chip Scheide via 4D_Tech
isn't this a package already?
If so, I'm not sure that you can have a package inside a package.

Chip
On Tue, 15 Oct 2019 14:24:52 -0500, Paul Ringsmuth via 4D_Tech wrote:
> 
> I have created a built volume desktop app for Mac. 
We have done so much, with so little, for so long;
We are now qualified to anything with nothing 
  - unknown
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Making a package of a built Mac volume desktop

2019-10-15 Thread Paul Ringsmuth via 4D_Tech
4Dv17R5 

I have created a built volume desktop app for Mac. 
I put the built volume desktop into a folder along with the data files. 
The name on the folder is the app’s name. 
Then I added the .4dbase extension to the folder and created a package. 

The problem is that when this package is double clicked, it attempts to launch 
and it throws a system error which can be sent to Apple. 

Is it not possible to make a package with a volume desktop app?

Paul Ringsmuth
pringsm...@charter.net



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