Dear P.O.,

firstly, *any* official installer for MacOSX is fine with me! :)

In principle there are two different approaches on the Mac, using a) the Unix 
structures (having
"bin", "lib", etc.) or using b) Apple's Developer bundle structures which 
define how Applications
and Frameworks bundles should be structured (an brief overview of bundles can 
be seen here:
<https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1>).

Ad a) using the Unix conventions

    here the next question is, where to put "ooRexx". Currently the directories 
are 1)
    "~/Applications" and 2) "/Applications".  1) would be probably o.k., 
because a user can do
    anything on his home directory, 2) would be problematic as currently your 
installation is not an
    "Application bundle". If I am not mistaken, you need to link to 
"/usr/local/bin" and
    "/usr/local/lib" in case 2)?

    The Unix convention seems to be to install such structured applications 
from third parties to
    "/opt" which is also the case for Apple. So my suggestion would be, if one 
installs ooRexx
    systemwide for the Mac, then install it to "/opt/ooRexx" and creating the 
necessary links to
    "/usr/local" as usual.

Ad b) using the Apple conventions (which the BSF4ooRexx installer does), which 
probably is not
needed and complicates everything for the goal to become a "native Apple 
citizen" :)

    The Apple world revolves around "Frameworks" for code that is to serve 
multiple applications and
    used to build applications and tools. The Apple XCode uses frameworks to 
simplify supplying the
    libraries an application/tool needs to link to. ooRexx would fall under 
this category, hence a
    need to create a "Frameworks" bundle (cf. e.g.
    
<https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/IncludingFrameworks.html>)

    The "Applications" bundles are meant for - Applications and must contain an 
application by the
    same name as the Applications bundle without the ".app" extension! It is 
possible to use
    Info.plist to define that application (in BSF4ooRexx cf. the keys 
"CFBundelExecutable" and
    "CFBundleIdentifier" and environment).

    As a result your ooRexx installer for MacOSX is *not* an Apple Application 
bundle and therefore
    should not be placed into any folder that is named "Applications" as this 
would be misleading on
    Apple. Rather I would suggest either "/opt/ooRexx" (for a systemwide 
installation with
    appropriate links to "/usr/local") or "~/opt/ooRexx" (plus updating the 
user's PATH environment
    variable).

---rony

P.S.: The plain-vanilla BSF4ooRexx installer (the zip-file) for Windows and 
Linux is also able to
install on the Mac. It will install itself to "/opt/BSF4ooRexx" there as well. 
(As in the past there
were no installers for ooRexx 5.0 beta I created with the help of students the 
Apple bundle
structure conforming installer.)


On 18.08.2020 23:27, P.O. Jonsson wrote:
>> Am 18.08.2020 um 14:11 schrieb Rony G. Flatscher <rony.flatsc...@wu.ac.at
>> <mailto:rony.flatsc...@wu.ac.at>>:
>>
>> Dear P.O.,
>>
>> On 17.08.2020 22:51, P.O. Jonsson wrote:
>>>>
>>>> Question ad Apple/Mac (Darwin)
>>>>
>>>>     CMakeLists.txt overrules the CMake default and explicitly installs to 
>>>> "set
>>>>     (CMAKE_INSTALL_PREFIX $ENV{HOME}/Applications/ooRexx${ORX_MAJOR}" (cf. 
>>>> CMakeLists.txt, line
>>>>     # 247. This means that no system wide installation of ooRexx is done.
>>>>
>>>>     Question 2 (Apple question): should the default installation be to 
>>>> /usr/local, such that by
>>>>     default a system wide installation takes place like on Linux?
>>>>
>>> Personally I think */usr/local* would be illogical for macOS (DARWIN). On 
>>> macOS there is no need
>>> to „install“ ooRexx 5. Thanks to Enrico it can run from anywhere without 
>>> any installation step.
>>> For this reason I think it would make sense to treat it as any other „App“ 
>>> on macOS.
>>>
>>> The current agreement is to put the ooRexx 5 package in the users 
>>> Applications directory
>>> *~/Applications* (in my case in /Users/po/Applications), this comes with 
>>> some disadvantages:
>>> (i) the user may need to create ~/Applications (it is not there on a 
>>> pristine system)
>>> (ii) the user need to amend the path
>>> (iii) the installation is for that one user only.
>>> (iv) to uninstall ooRexx the path needs to be restored again
>>>
>>> My proposal would be to put the installation in */Applications*, where 
>>> virtually all
>>> applications reside that are installed by the user. This would mean that 
>>> all disadvantages
>>> (i)-(iv) would go away automatically.
>>>
>>> It would further provide a well recognized method of 
>>> installing/uninstalling, a simple drag&drop
>>> to the garbage bin would be sufficient to remove every trace of ooRexx. 
>>> Since /Applications is
>>> already in the path also the man pages work as expected.
>>>
>>> I have already made a post-build script (driven by Cmake) that produces a 
>>> dmg installer that
>>> looks exactly like the installers provided by any regular „app“, with the 
>>> familiar drag&drop
>>> functionality, also including the documentation, license etc. If there is 
>>> an interest I can show
>>> a mockup (I do not have access to the real thing from where I am now). 
>>
>> Yes, this would be much better IMHO!
>>
>> Do you distinguish between "/Library/Frameworks" and "/Applications" 
>> locations as the Apple
>> developer guide suggests?
>>
> Nope. The installation ends up in subfolder ~/Applications/ooRexx5
>
>> The "/Library/Frameworks/ooRexx.framework" locations should be used for the 
>> binaries and include
>> files (e.g. "ooRexx.framework/Versions/A/Libraries/librexxapi.3.dylib" ...
>> "ooRexx.framework/Versions/A/Headers/oorexxapi.h"
>> ..."ooRexx.framework/Versions/A/Commands/rexx"...). Then link "Libraries" to
>> "Versions/Current/Libraries" and the like for "Commands", "Headers", 
>> "Shared“.
>>
> There is no need to complicate things :-) While this is true for a 
> „Framework“ it is not necessary
> for ooRexx to work as it is set up now.
> The current setup is more similar to a „Bundle“ in that there is no need to 
> link it to other
> resources. ooRexx5 is self contained. This is how the folder structure looks 
> like on a standard
> installation:
>
> /Users/noob/Applications
>                └── ooRexx5
>                    ├── bin
>                    ├── include
>                    ├── lib
>                    └── share
>                        ├── man
>                        │   └── man1
>                        └── ooRexx
>                            ├── native.api
>
> This is very similar to Linux in that the bin, lib, include and share are all 
> at the same
> hierarchical level.
>>
>> The binaries should then be linked to "/usr/local/bin" and the libraries to 
>> "/usr/local/lib"
>> which makes them systemwide available, hence ooRexx can be deployed from 
>> everywhere.
>>
>>
>
> Again, there would be no need. Changing
>
> set (CMAKE_INSTALL_PREFIX $ENV{HOME}/Applications/ooRexx${ORX_MAJOR}“ 
>
> To
>
> set (CMAKE_INSTALL_PREFIX $ENV/Applications/ooRexx${ORX_MAJOR}" 
>
> Would automatically make ooRexx available system-wide, since /Applications is 
> in the path by
> default on macOS.
>
>>
>> The "/Applications" directory would contain some "ooRexx.app" folder, but 
>> would need some program
>> that offers a GUI via which one e.g. could get access to the sample and pdf 
>> help files.
>>
>>
> Nope. It is very simple to cloak the ooRexx5 folder (programmatically!) as an 
> app folder and add
> for instance the documentation and license. I am already doing this in the 
> ooRexx 5 dmg installer
> I was talking about earlier.
>>
>> ---
>>
>> If the official ooRexx gets installed into /Library/Frameworks" I could 
>> adapt the BSF4ooRexx
>> installer for Mac to then only install the "/Applications/ooRexx.app" folder 
>> which I then might
>> rename to "/Applications/BSF4ooRexx.app". Currently BSF4ooRexx includes 
>> ooRexx as in the past
>> there was no working ooRexx installation package anymore, it includes a 
>> small Java application
>> which creates the Mac menu bar with all sorts of folders and programs 
>> (comparable to Windows),
>> such that the sample and pdf help files become easily accessible by the 
>> users.
>>
>>
>
> I strongly object to installing standalone ooRexx as a „Framework“ This is 
> not only complicated
> but also need a fully fledged sudo pkg installer, with pre-and post install 
> scripts, I have done
> it in the past and it was a true PITA.
>
> Please also realize that the internal structure of a „Framework“ is entirely 
> different to the
> default installation (see above) and Linux, making references to for instance 
> the samples
> different compared to Linux or the current structure of macOS. If
> *filespec('Location',.rexxinfo~executable)* provides
>
>  /Users/noob/Applications/ooRexx5/bin
>
> all I need to do to locate the samples would be this:
>
> /Users/noob/Applications/ooRexx5/bin/../share/ooRexx
>
> And it would be the same for Linux and macOS.
>
> Now, for a „Framework“ installation the names of the subfolders are different 
> and will need
> further testing.
>
> Moving the Whole Shebang from ~/Applications to /Applications (without ANY 
> other modifications)
> would be the best option in my opinion.
>
> Here a mockup of how the installation would look like to the user.

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to