site_archiver(a)lists.apple.com
Delivered-To: installer-dev(a)lists.apple.com
Thank you for your suggestion, Stephane.
I just tried this, and unfortunately, [tDocument path]) also turns out to be
null on Catalina. On Mojave, it does return the path to my installer package.
-Lora
> On Aug 1, 2019, at 1:42 PM, Stephane Sudre <dev.iceberg(a)gmail.com> wrote:
>
> Maybe you can try this:
>
> ----8<--------8<--------8<--------8<--------8<--------8<--------
>
> #import <InstallerPlugins/InstallerPlugins.h>
>
> @interface FindPkgPathPane : InstallerPane
>
> @end
>
> ----8<--------8<--------8<--------8<--------8<--------8<--------
>
> #import "FindPkgPathPane.h"
>
> @interface InstallerSection (Apple_Private)
>
> - (id)distribution;
>
> @end
>
>
> @interface IFDistXMLDocument : NSObject
>
> - (NSString *)path;
>
> @end
>
>
> @implementation FindPkgPathPane
>
> - (void)willEnterPane:(InstallerSectionDirection)dir
> {
> IFDistXMLDocument * tDocument=(IFDistXMLDocument *) [[self section]
> distribution];
>
> NSLog(@"Path %@",[tDocument path]);
> }
>
> - (NSString *)title
> {
> return [[NSBundle bundleForClass:[self class]]
> localizedStringForKey:@"PaneTitle" value:nil table:nil];
> }
>
> @end
>
> On Thu, Aug 1, 2019 at 8:41 PM Lora Lozano via Installer-dev
> <installer-dev(a)lists.apple.com> 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 (Installer-dev(a)lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/installer-dev/dev.iceberg%40gmail.c…
>>
>> This email sent to dev.iceberg(a)gmail.com
>
>
>
> --
> Packaging Resources - http://s.sudre.free.fr/Packaging.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (Installer-dev(a)lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists…
This email sent to site_archiver(a)lists.apple.com
site_archiver(a)lists.apple.com
Delivered-To: installer-dev(a)lists.apple.com
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=hhgXfVvEJ+25C2C+6xUMDVagXopJ7qLvhVrPnZv+rV4=; b=oe9WBXZng4PeySEluJFcVjoPy41PjxG3mvTZVrYZJGCha7V/vAzwwANaouLnr+k8/s 2La8gokklP6M/5i9afdPvygDCj+X/pMod9eEF05ihjiPaXd92uKbsBIgzL7cNdVRN/gf 1TxVFTz2SP2qRf9GJwEdpl6kKH8vCeIWq6PYAL7i6zcdgCN9L0MpQ4h3WgPaDE8md4LA ClqjiER8Vjxzr4TxG+L+erlcd5tAQXUDzuvayb6LUezucgNCPLB7CG+daE2HtJ6yZsIY pGsLS01NeKjlf4u9GAIQ4jQvvnXWNqD9546KFptgekjgWgoBQw+4GMBpf7RRg7uMLQOx 2trg==
Maybe you can try this:
----8<--------8<--------8<--------8<--------8<--------8<--------
#import <InstallerPlugins/InstallerPlugins.h>
@interface FindPkgPathPane : InstallerPane
@end
----8<--------8<--------8<--------8<--------8<--------8<--------
#import "FindPkgPathPane.h"
@interface InstallerSection (Apple_Private)
- (id)distribution;
@end
@interface IFDistXMLDocument : NSObject
- (NSString *)path;
@end
@implementation FindPkgPathPane
- (void)willEnterPane:(InstallerSectionDirection)dir
{
IFDistXMLDocument * tDocument=(IFDistXMLDocument *) [[self section]
distribution];
NSLog(@"Path %@",[tDocument path]);
}
- (NSString *)title
{
return [[NSBundle bundleForClass:[self class]]
localizedStringForKey:@"PaneTitle" value:nil table:nil];
}
@end
On Thu, Aug 1, 2019 at 8:41 PM Lora Lozano via Installer-dev
<installer-dev(a)lists.apple.com> 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 (Installer-dev(a)lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/installer-dev/dev.iceberg%40gmail.c…
>
> This email sent to dev.iceberg(a)gmail.com
--
Packaging Resources - http://s.sudre.free.fr/Packaging.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (Installer-dev(a)lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists…
This email sent to site_archiver(a)lists.apple.com
site_archiver(a)lists.apple.com
Delivered-To: installer-dev(a)lists.apple.com
Hi,
In my plugin code, I’m leveraging the code in
https://lists.apple.com/archives/Installer-dev/2008/Nov/msg00017.html
<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
<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 (Installer-dev(a)lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists…
This email sent to site_archiver(a)lists.apple.com