AAVSO / VStar

VStar is a visualisation and analysis tool for variable star data brought to you by AAVSO
https://www.aavso.org/vstar
GNU Affero General Public License v3.0
10 stars 3 forks source link

Mac OS X "missing files" in file open dialog problem persists #331

Closed dbenn closed 1 year ago

dbenn commented 1 year ago

See https://github.com/AAVSO/VStar/issues/180 and https://www.aavso.org/my-vstar-will-not-recognize-text-files-sitting-directory-new-star-file-option#comment-165146

dbenn commented 1 year ago

When navigating to a directory such as Documents, Desktop or Downloads with 2.21.2, a dialog opens to ask the user whether or not to give access:

image

Then, if access is given, an entry appears in System Preferences -> Security & Privacy in the Privacy tab:

image

However, this does NOT happen with 2.21.3 (and current development versions)!

I will try using the same application structure as 2.21.2 as the basis for the Mac app structure, since this changed after 2.21.2 so that the same Info.plist and other structural files are used.

dbenn commented 1 year ago

The problem is fixed with the last commit but for some reason, because of the method used, the font used in the GUI is not nice (blurry). Have seen this before.

One approach is to change the launcher app just to VStar.sh, which is better anyway because of the way it handles memory set up.

dbenn commented 1 year ago

After a lot of searching, this provides the details of how to fix the known blurry font issue.

dbenn commented 1 year ago

As for memory, specifying a max memory (heap) size larger than available memory works. Better to be conservative I think though, so will use 8g.

dbenn commented 1 year ago

Oddly, after the latest change (see last commit), the "missing files" problem has resurfaced. :(

dbenn commented 1 year ago

This script (in text form: edit with AppleScript editor) and saved as a Mac OS application and signed works well!

-- This AppleScript runs VStar.sh

tell application "Finder"
    set current_path to POSIX path of ((path to me as text))
end tell

set vstar_script_path to current_path & "/Contents/MacOS/VStar.sh"

do shell script vstar_script_path

The "missing files" problem is fixed, the user is prompted for access to folders such as Downloads and Documents the first time. The application font is also OK.

A new shell script copies in VStar.jar, dist and extlib at build time.