macOS install creating Parent folder for FileBot

All your suggestions, requests and ideas for future development
Post Reply
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

macOS install creating Parent folder for FileBot

Post by cheaters »

Small issue fixed by removing the parent folder but wanted to mention it...

I think I have seen this in the past, but not recently.

Today I installed FileBot from the package [*]FileBot_4.9.6_x64.pkg and it created a parent folder named FileBot. Because of this the filebot alias at /usr/local/bin/filebot was not working.


Image
Last edited by cheaters on 02 Aug 2022, 16:32, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: macOS install creating Parent folder for FileBot

Post by rednoah »

macOS sometimes does that, not sure if it's a bug or a feature. Unfortunately, our *.pkg doesn't get to decide what macOS does. But if someone can reliably reproduce this behaviour, and find a workaround, then I'm all ears.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: macOS install creating Parent folder for FileBot

Post by rednoah »

I'll look into it. The link above seems to be fairly unrelated to the problem at hand at first glance though.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: macOS install creating Parent folder for FileBot

Post by cheaters »

Thanks. I know it's low priority.

The accepted answer says something about
Enforce the Location with BundleIsRelocatable
https://apple.stackexchange.com/a/219144/40153
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: macOS install creating Parent folder for FileBot

Post by rednoah »

Look closely at the log output from Installer.app or installer; you will see entries regarding the search and final location of the relocated application.
:?: What does the installer log say?


:?: Did you manually create the /Applications/FileBot/ folder and then move the FileBot.app file into that, and then install FileBot again? Because then BundleIsRelocatable would indeed make sure to update FileBot into the manually created folder path.


:idea: Presumably, BundleIsRelocatable is default behaviour so that users can take the FileBot.app and move it somewhere and then have updates install into the new manually created folder path. I don't know if it can serve as a work around for the issues described in the OP as well, but according to my understanding, you never moved FileBot.app and yet macOS decided to create a /Applications/FileBot/ folder, so that seems to be significantly different.


:idea: Notably, the /usr/local/bin/filebot link is created by the postinstall script and so even if macOS decides to install the app bundle elsewhere, it should still be linked correctly, unless macOS installer itself doesn't give us the correct installation path, so this is certainly a mysterious one:

Code: Select all

# $2: Full path to the installation destination.
# For example: /Applications
ln -sf "$2/FileBot.app/Contents/MacOS/filebot.sh" "/usr/local/bin/filebot"
:idea: Please read the FAQ and How to Request Help.
Post Reply