Skip to content

Conversation

Depal1
Copy link
Member

@Depal1 Depal1 commented Jan 22, 2023

A reimplementation of #599 with writeBookmarkData instead of AppleScript.

@Depal1 Depal1 added the enhancement New feature or request label Jan 22, 2023
@Depal1 Depal1 added the squash Indicates whether a PR must be squashed before being merged label Jan 23, 2023
@IsaacMarovitz
Copy link
Member

Is it just me or is this not working at least not from the Xcode build

@Depal1
Copy link
Member Author

Depal1 commented Jan 23, 2023

Is it just me or is this not working at least not from the Xcode build

I have built it again, and the aliases are created even if the directory does not exist. They will be in ~/Applications/PlayCover, not /Applications.

@IsaacMarovitz
Copy link
Member

I have built it again, and the aliases are created even if the directory does not exist. They will be in ~/Applications/PlayCover, not /Applications.

This isn't the right directory either:
Screenshot 2023-01-23 at 09 31 43
Where PlayCover is putting them

Screenshot 2023-01-23 at 09 31 53

Where my actual folder is

@IsaacMarovitz
Copy link
Member

@Depal1
Copy link
Member Author

Depal1 commented Jan 23, 2023

I have built it again, and the aliases are created even if the directory does not exist. They will be in ~/Applications/PlayCover, not /Applications.

This isn't the right directory either: Screenshot 2023-01-23 at 09 31 43 Where PlayCover is putting them

Screenshot 2023-01-23 at 09 31 53

Where my actual folder is

That is intended since that is not your user folder. All other apps I know that use aliases put them in ~/Applications (Steam, Crossover, RPCS3 for instance). The system directory is not meant to have aliases, specially since PlayCover apps reside in the user Library and not the system’s.

If the contrary where to happen, other users would see ‘apps’ (aliases) they won’t be able to access.

@IsaacMarovitz
Copy link
Member

That is intended since that is not your user folder. All other apps I know that use aliases put them in ~/Applications (Steam, Crossover, RPCS3 for instance). The system directory is not meant to have aliases, specially since PlayCover apps reside in the user Library and not the system’s.

If the contrary where to happen, other users would see ‘apps’ (aliases) they won’t be able to access.

I think that defeats the point of this feature, then. For the majority of users who only have one account on their system, this feature won't be particularly helpful like this.

@IsaacMarovitz
Copy link
Member

The reason I suggested using FileManger API is that it should do the best of both worlds, ie. use System Application folder where appropriate, and User Application folder when appropriate

@Depal1
Copy link
Member Author

Depal1 commented Jan 23, 2023

You should use FileManager for this:
https://developer.apple.com/documentation/foundation/filemanager/searchpathdirectory/applicationdirectory

I missed this when I was writing my previous message. How does FileManager do this automatically? It would depend if either .localDomainMask or .userDomainMask is used.

@Depal1
Copy link
Member Author

Depal1 commented Jan 23, 2023

That is intended since that is not your user folder. All other apps I know that use aliases put them in ~/Applications (Steam, Crossover, RPCS3 for instance). The system directory is not meant to have aliases, specially since PlayCover apps reside in the user Library and not the system’s.
If the contrary where to happen, other users would see ‘apps’ (aliases) they won’t be able to access.

I think that defeats the point of this feature, then. For the majority of users who only have one account on their system, this feature won't be particularly helpful like this.

The purpose of this feature has always been Launchpad access.

@IsaacMarovitz
Copy link
Member

IsaacMarovitz commented Jan 23, 2023

The purpose of this feature has always been Launchpad access.

That should be specified in the button locale imo

@IsaacMarovitz IsaacMarovitz merged commit 489c122 into PlayCover:develop Jan 28, 2023
IsaacMarovitz pushed a commit to IsaacMarovitz/PlayCover that referenced this pull request Mar 11, 2023
* feat: add invisible app alias

* add `PlayApp.aliasDirectory` to prune

* Remove unlocalized log error messages

* improve do/catch syntax

* fuse do/catch in `func createAlias()`

* use `error.localizedDescription`

* Update Localizable strings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request squash Indicates whether a PR must be squashed before being merged
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants