Omnis Mac – Packages – Create Alias
The best way to test the script is to run the installer without it, then run the script directly.
To do that, you’ll need to give it executable permissions. I also recommend using a .sh extension and a command-line friendly name, like “clientrax_post_install.sh”. If you put this on your Desktop the commands to mark it executable and run it would be:
chmod +x ~/Desktop/clientrax_post_install.sh
~/Desktop/clientrax_post_install.sh
You’ll may need to enter your macOS user’s password for the sudo commands.
Alex
> On Sep 29, 2017, at 17:16, Michael Mantkowski <michaelj@clientrax.com> wrote:
>
> I thought that might be the case (Root Var) but did not want to jinx myself by trying to be too smart. Lol
>
> So, I named the file “ClienTrax Post Install.txt”. I placed it in my install folder and added it to the Payload. Then I set it as my Post Install Script.
>
> All files install correctly but I get a message from the Installer saying the install failed contact your software provider.
>
> I know it is the script that is causing the error because if I take it out all works well. However, I can’t find a log or anything to tell me what is wrong.
>
> I do not get an Alias on the Desktop nor does Omnis Start. So the script is not executing or not doing it correctly.
>
> Have I forgotten something?
>
> *********************************************************************
> Michael Mantkowski
> ClienTrax Software
> 1-614-875-2245
> *********************************************************************
>
>
> —–Original Message—–
> From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] On Behalf Of Alex Clay
> Sent: Friday, September 29, 2017 5:08 PM
> To: OmnisDev List – English <omnisdev-en@lists.omnis-dev.com>
> Subject: Re: Omnis Mac – Packages – Create Alias
>
> Looks good. The PDFDevice needs to write temporary fields in MacOS so the script makes it readable and writeable by all.
>
> FWIW you could change the last line to use the APPLICATION_ROOT variable:
>
>> “${APPLICATION_ROOT}/Contents/MacOS/Omnis” “/Applications/ClienTrax/ClienTrax.lbs”
>
> It’s not necessary, but it’s a DRY-er, as in Don’t Repeat Yourself. 🙂
>
> Alex
>
>> On Sep 29, 2017, at 17:04, Michael Mantkowski <michaelj@clientrax.com> wrote:
>>
>> So I am basing this on your example.
>>
>> I have… I am not sure what the Brainy PDFDevice section is doing… However, I do use PDFDevice.
>>
>>
>> #!/usr/bin/env bash
>> # This script is run after your app is installed.
>>
>> # Set the path to your application
>> APPLICATION_ROOT=”/Applications/ClienTrax/OmnisRT.app”
>>
>> # Setup permissions
>> sudo chmod -R a+rw “${APPLICATION_ROOT}/Contents/MacOS/startup”
>> sudo chmod -R a+rw “${APPLICATION_ROOT}/Contents/MacOS/icons”
>> sudo chmod -R a+rw “${APPLICATION_ROOT}/Contents/MacOS/local”
>> sudo chmod -R a+rw “${APPLICATION_ROOT}/Contents/MacOS/studio”
>>
>> # For Brainy Data’s PDFDevice
>> sudo chmod a+rw ../MacOS
>>
>> # Create Alias for ClienTrax.lbs
>> ln -s /Applications/ClienTrax/ClienTrax.lbs ~/Desktop/Open ClienTrax
>>
>> # Start Studio for Serialization
>> “/Applications/ClienTrax/OmnisRT.app/Contents/MacOS/Omnis” “/Applications/ClienTrax/ClienTrax.lbs”
>>
>>
>>
>>
>> *********************************************************************
>> Michael Mantkowski
>> ClienTrax Software
>> 1-614-875-2245
>> *********************************************************************
>>
>>
>> —–Original Message—–
>> From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] On
>> Behalf Of Alex Clay
>> Sent: Friday, September 29, 2017 4:51 PM
>> To: OmnisDev List – English <omnisdev-en@lists.omnis-dev.com>
>> Subject: Re: Omnis Mac – Packages – Create Alias
>>
>> Hi Michael,
>>
>> Are you trying to open your library with Omnis? I normally would do it this way:
>>
>> “/Applications/ClienTrax/OmnisRT.app/Contents/MacOS/Omnis” “/Applications/ClienTrax/ClienTrax.lbs”
>>
>> This open the Omnis executable inside your bundle. But open -a might work as well. I use the open command to mimic double-clicking a file in the Finder. It’s super-handy when you can’t recall the flag to decompress an archive file or if you want to crack open a Finder GUI to deal with a folder.
>>
>> Alex
>>
>>> On Sep 29, 2017, at 16:47, Michael Mantkowski <michaelj@clientrax.com> wrote:
>>>
>>> Hi Alex,
>>>
>>> Seems to be 40 ways to open a file with BASH.
>>>
>>> Does this seem right?
>>>
>>> open -a “/Applications/ClienTrax/OmnisRT.app” “/Applications/ClienTrax/ClienTrax.lbs”
>>>
>>> *********************************************************************
>>> Michael Mantkowski
>>> ClienTrax Software
>>> 1-614-875-2245
>>> *********************************************************************
>>>
>>>
>>> —–Original Message—–
>>> From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] On
>>> Behalf Of Alex Clay
>>> Sent: Friday, September 29, 2017 3:56 PM
>>> To: OmnisDev List – English <omnisdev-en@lists.omnis-dev.com>
>>> Subject: Re: Omnis Mac – Packages – Create Alias
>>>
>>> Hi Michael,
>>>
>>> You create the script in any text editor, then drag it into packages. You might need to set the execute permission on the script, but I think Packages cand o that for you.
>>>
>>> You can see an example on my sample Packages project for Omnis apps:
>>>
>>> github.com/barkingfoodog/omnis-pkg
>>> <github.com/barkingfoodog/omnis-pkg>
>>>
>>> And my apologies—it’s postinstall, not postflight. Must be Friday!
>>>
>>> Alex
>>>
>>>> On Sep 29, 2017, at 15:52, Michael Mantkowski <michaelj@clientrax.com> wrote:
>>>>
>>>> Hmmm,
>>>>
>>>> Is there an application for creating those?
>>>>
>>>> Sorry, I don’t know what a “post-flight bash” is.
>>>>
>>>> ********************************************************************
>>>> *
>>>> Michael Mantkowski
>>>> ClienTrax Software
>>>> 1-614-875-2245
>>>> ********************************************************************
>>>> *
>>>>
>>>>
>>>> —–Original Message—–
>>>> From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com]
>>>> On Behalf Of Alex Clay
>>>> Sent: Friday, September 29, 2017 3:45 PM
>>>> To: OmnisDev List – English <omnisdev-en@lists.omnis-dev.com>
>>>> Subject: Re: Omnis Mac – Packages – Create Alias
>>>>
>>>> Hi Michael,
>>>>
>>>> You could add a post-flight bash script and create a symbolic link:
>>>>
>>>>> #!/usr/bin/env bash
>>>>> ln -s /Applications/ClienTrax/lib.lbs ~/Desktop/Open ClienTrax
>>>>
>>>> Alex
>>>>
>>>>> On Sep 29, 2017, at 15:41, Michael Mantkowski
>>>>> <michaelj@clientrax.com>
>>>> wrote:
>>>>>
>>>>> I am making fine progress with an installer for my application with
>>>> Packages on the Mac.
>>>>>
>>>>> When the install is done I would like to create an Alias for my
>>>>> library,
>>>> put it on the desktop and start Omnis with my main library for the
>>>> first time so that it can ask for Serialization.
>>>>>
>>>>> I was able to create a script with script editor to do this. But
>>>>> it does
>>>> not work correctly in the installer. Then I read in Packages Help
>>>> that using Script Editor scripts is not recommended because of
>>>> unpredictable results. (Well I guess they know what they are
>>>> talking
>>>> about…)
>>>>>
>>>>> Does anyone have a method of doing what I am looking for?
>>>>>
>>>>> *******************************************************************
>>>>> *
>>>>> *
>>>>> Michael Mantkowski
>>>>> ClienTrax Software
>>>>> 1-614-875-2245
>>>>> *******************************************************************
>>>>> *
>>>>> *
>>>>>
>>>>>
>>>>> _____________________________________________________________
>>>>> Manage your list subscriptions at lists.omnis-dev.com
>>>>
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at lists.omnis-dev.com
>>>>
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at lists.omnis-dev.com
>>>
>>> _____________________________________________________________
>>> Manage your list subscriptions at lists.omnis-dev.com
>>>
>>> _____________________________________________________________
>>> Manage your list subscriptions at lists.omnis-dev.com
>>
>> _____________________________________________________________
>> Manage your list subscriptions at lists.omnis-dev.com
>>
>> _____________________________________________________________
>> Manage your list subscriptions at lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com