Re: Installer-dev Digest, Vol 163, Issue 5
Re: Installer-dev Digest, Vol 163, Issue 5
- Subject: Re: Installer-dev Digest, Vol 163, Issue 5
- From: Lora Lozano via Installer-dev <email@hidden>
- Date: Mon, 19 Aug 2019 11:52:13 -0700
Thank you for your input, Vachik. This code does work for us!
Thanks again!
-Lora
> On Aug 7, 2019, at 12:00 PM, email@hidden wrote:
>
> Send Installer-dev mailing list submissions to
> email@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.apple.com/mailman/listinfo/installer-dev
> or, via email, send a message with subject or body 'help' to
> email@hidden
>
> You can reach the person managing the list at
> email@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Installer-dev digest..."
>
>
> Today's Topics:
>
> 1. Re: Getting path to pkg (Vachik Hovhannisyan)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 6 Aug 2019 20:53:54 +0000 (UTC)
> From: Vachik Hovhannisyan <email@hidden>
> To: Lora Lozano <email@hidden>, Stephane Sudre
> <email@hidden>
> Cc: Installer-Dev mailing-list <email@hidden>
> Subject: Re: Getting path to pkg
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> Indeed, installer plugins run in a separate (from the Installer) process on
> Catalina, thus all the application structure has been?changed.
> Here is the undocumented way of getting the package path from the plug-in
> that works on Catalina as well,
> https://github.com/vachooho/package-path?
> but understand the limitations of the approach
>
> On Monday, August 5, 2019, 03:10:34 PM PDT, Stephane Sudre
> <email@hidden> wrote:
>
> It doesn't work on 10.10.5 either.
>
> The PACKAGE_PATH environment variable is set when running the pre and
> post-installation scripts.
>
> The environment variables that are set and visible from a plugin are
> the ones that are listed in install.log (or in the Log window of
> Installer.app).
>
> On Mon, Aug 5, 2019 at 11:05 PM Lora Lozano via Installer-dev
> <email@hidden> wrote:
>>
>> Thanks for your input, Vachik. Unfortunately, this didn?t work for me, even
>> on Mojave. It returned null for the PACKAGE_PATH, and the installer hung.
>>
>> Thanks,
>> Lora
>>
>> On Aug 3, 2019, at 5:18 PM, Vachik Hovhannisyan <email@hidden> wrote:
>>
>> no need to go through all of that in order to get the package path
>>
>> just get PACKAGE_PATH environment variable value using
>> getenv("PACKAGE_PATH") or similar function call
>>
>> On Thursday, August 1, 2019, 11:41:47 AM PDT, Lora Lozano via Installer-dev
>> <email@hidden> wrote:
>>
>>
>> Hi,
>>
>> In my plugin code, I?m leveraging the code in
>> https://lists.apple.com/archives/Installer-dev/2008/Nov/msg00017.html to get
>> the path to my installer pkg. This has been working for me for the past few
>> years on all the Mac OSes that have been released, but it?s not working for
>> me on Catalina. I tried this on the latest Catalina beta release (currently
>> beta 5), but the NSWindow window, and thus its delegate, turns out to be
>> null, which then causes my installer to crash with [NSURL
>> initFileURLWithPath:]: nil string parameter when my code calls
>> initFileURLWithPath.
>>
>> As a test, I copied Apple's Installer application
>> (/System/Library/CoreServices/Installer.app) from my Mojave machine to my
>> Catalina machine and launched my installer on Catalina using that, and the
>> crash doesn't happen. The NSWindow and its delegate are not null.
>>
>> Was there a change to the Catalina Installer.app that requires me to update
>> my code?
>>
>> Here?s the code from
>> https://lists.apple.com/archives/Installer-dev/2008/Nov/msg00017.html that
>> my code is based off of:
>>
>> #import <Cocoa/Cocoa.h>
>> #import <InstallerPlugins/InstallerPlugins.h>
>>
>>
>> @interface HowToMakeAnAppleEngineerScream : InstallerPane
>> {
>> }
>>
>>
>> @end
>>
>>
>> #import "HowToMakeAnAppleEngineerScream.h"
>>
>>
>> @interface PageController : NSObject
>> {
>> }
>>
>>
>> - (id)distribution;
>>
>>
>> @end
>>
>>
>> @interface IFDocument : NSObject
>> {
>> }
>>
>>
>> - (id)path;
>>
>>
>> @end
>>
>>
>>
>> @implementation HowToMakeAnAppleEngineerScream
>>
>>
>> - (NSString *)title
>> {
>> return [[NSBundle bundleForClass:[self class]]
>> localizedStringForKey:@"PaneTitle" value:nil table:nil];
>> }
>>
>> - (void) didEnterPane:(InstallerSectionDirection) inDirection
>> {
>> NSWindow * tWindow;
>> PageController * tPageController;
>>
>> tWindow=[NSApp keyWindow]; // This should be improved IMHO
>>
>> tPageController=(PageController *) [tWindow delegate];
>>
>> if (tPageController!=nil)
>> {
>> NSLog(@"This is the package path: %@",[[tPageController distribution] path]);
>> }
>> }
>>
>> Any help would be greatly appreciated. Thanks in advance.
>>
>> -Lora
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Installer-dev mailing list? ? ? (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>>
>>
>> ? _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Installer-dev mailing list? ? ? (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>
>
> --
> Packaging Resources - http://s.sudre.free.fr/Packaging.html
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <https://lists.apple.com/archives/installer-dev/attachments/20190806/b09c6b2d/attachment.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Installer-dev mailing list
> email@hidden
> https://lists.apple.com/mailman/listinfo/installer-dev
>
>
> ------------------------------
>
> End of Installer-dev Digest, Vol 163, Issue 5
> *********************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden