Jump to content
meshael

App not running on Mac in applications folder

Recommended Posts

Hi,

 

I finally got everything to work with my application that has over 1,000 ancillary files. I have notarized it and it runs, from the PAServer folder. From there, it is accessing the ancillary files located in a program folder in the Applications folder.

 

When I copy the application to the Applications folder and then run it from there, it never appears. It just starts up and then disappears. I do not get any error messages. And I don't think I can debug it from there because its the PAServer copy that is being used for debugging.

 

Has anyone else had this problem?

 

Thanks,

 

Robert

Share this post


Link to post
Guest

dear Robert,

 

I have no contact with macOS because my world is MSWindows, more because of the prices of the products (Hardware x Software)


However, I think that your problem will be exclusively with respect to permissions / privileges, since on Linux and OSX systems this is much more taken seriously than on MSWindows.


If you haven't tried it yet, try running your software: PAServer, your App, etc ... using the "root" user (super-user) to clear this doubt.


If this is confirmed, then you already know that your average user on the system is having trouble accessing the directories needed and used by your application. In this case, the Administrator can apply the necessary changes in the system so that its common user can have access to the necessary folders through its application.

 

If this has already been tried, then it would be interesting to check which folders, in fact, you are determining to be used by your application. In Delphi, you can make use of the "record" TPath (uses System.IOUtils.pas) which has many class functions to check some of these folders. For more details, please check the Help System for other options.

 

NOTE: RAD Stuido PAServer in MSWindows and Mac = save edition ok?

Edited by Guest

Share this post


Link to post

Thanks,

 

It runs fine clicking on it in the PAServer folder. Its just when I move it to the /Applications/MyApp folder that it fails to open. No errors displayed, the main form just never comes up.

 

But thanks, I will check the permissions in the /Applications folder and see if something is not correct there!

 

Robert

Share this post


Link to post

Do you know if any of your code is being run?  Put a ShowMessage as early in the program as you can. AFAIK, that would be in the initialization section of the first unit in the .dpr's uses list.



 

Share this post


Link to post

Yes, thanks, I did just that. I put show messages in a few of the forms' create procedure. It did two of them and then disappeared. I need to do more investigation. 

Share this post


Link to post

Thanks for this. However, I am having no problem with debugging. The app runs fine in the debugging and release modes as long as it is in the PAServer/Scratch-dir

 

When I copy the Destiny6.app file to the Applications folder, it does not run there. It never opens even though it does start running. And I can't debug that one.

 

Still searching for an answer...

 

Share this post


Link to post

Do you access an embedded DB ? If yes, do you place it in folders where you have the access right?
Just tried with a MovieDB I have, embedding an SQLite database and moved the app into /Applications and it works without trouble.
The DB is in the App own Contents\Resources\ directory

Just like on iOS when my apps Start and then close immediately, it's related to ressources it doesn't find, like the DB.

When I fix the DB path and have them in folder where the app has access rights and then it works without problems.

Edited by sjordi

Share this post


Link to post

I think you are on to something here. If the app is located in the /Applications/MyApp/ folder shouldn't it have access rights to all folders and subfolders under it?

 

It is using the same /Applications/MyApp/ folders for access to ancillary files when it is running from the PAServer/scratch-dir folder. So, for some reason it has rights there. But again, when I move the application to this same MyApp folder is when it fails.

 

How do I check the access rights? I am noob with Macs. 

Share this post


Link to post

Your comments cause me to take a closer look at my code. And I found some discrepancies with the file paths. That appears to have been the problem. It now runs in the /Applications folder. Thanks everyone!

 

Now I can get on with creating the installer.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×