Skip to content

Commit

Permalink
Merge pull request #638 from lindegroup/1.5.2-dev
Browse files Browse the repository at this point in the history
1.5.2 Merge to master
  • Loading branch information
shawnhonsberger authored Jan 24, 2020
2 parents 3d4f27d + 096fced commit 987685f
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 10 deletions.
23 changes: 20 additions & 3 deletions AutoPkgr/Models/AutoPkg Task/LGAutoPkgTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// AutoPkgr
//
// Created by Eldon Ahrold on 8/30/14.
// Copyright 2014-2016 The Linde Group, Inc.
// Copyright 2014-2020 The Linde Group, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -48,6 +48,23 @@
return @"/usr/local/bin/autopkg";
}

// Return the correct python path
static NSString *const python()
{
NSFileManager *fm = [NSFileManager defaultManager];
NSString *autopkgReceipt = @"/private/var/db/receipts/com.github.autopkg.autopkg.plist";
NSString *_autopkgReceiptVersion;
NSDictionary *receiptDict;
if ([fm fileExistsAtPath:autopkgReceipt]) {
receiptDict = [NSDictionary dictionaryWithContentsOfFile:autopkgReceipt];
_autopkgReceiptVersion = receiptDict[@"PackageVersion"];
if([_autopkgReceiptVersion hasPrefix:@"2."]) {
return @"/usr/local/autopkg/python";
}
}
return @"/usr/bin/python";
}

static NSDictionary *AutoPkgVerbStringToEnum()
{
static dispatch_once_t onceToken;
Expand Down Expand Up @@ -318,7 +335,7 @@ - (void)main
{
@autoreleasepool {
self.task = [[NSTask alloc] init];
self.task.launchPath = @"/usr/bin/python";
self.task.launchPath = python();

assert(_internalArgs.count);
assert(_arguments.count);
Expand Down Expand Up @@ -1352,7 +1369,7 @@ + (NSString *)version
NSTask *task = [[NSTask alloc] init];

task = task;
task.launchPath = @"/usr/bin/python";
task.launchPath = python();
task.arguments = @[ autopkg(), @"version" ];
task.standardOutput = [NSPipe pipe];
[task launch];
Expand Down
6 changes: 3 additions & 3 deletions AutoPkgr/Supporting Files/AutoPkgr-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.5.1</string>
<string>1.5.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1404</string>
<string>1415</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand All @@ -34,7 +34,7 @@
<true/>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2014-2019 The Linde Group, Inc.</string>
<string>Copyright 2014-2020 The Linde Group, Inc.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. This projec

## [Unreleased](unreleased)

## [1.5.2] - 2020-01-24

### Added
- AutoPkgr now supports the upcoming version 2.0 of the AutoPkg command line utility, which runs in Python 3 only. Big thanks to [@homebysix](https://github.com/homebysix) for the help!


## [1.5.1] - 2019-10-01

### Added
Expand Down
4 changes: 2 additions & 2 deletions Privileged Helper/helper-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<key>CFBundleName</key>
<string>com.lindegroup.AutoPkgr.helper</string>
<key>CFBundleShortVersionString</key>
<string>1.5.1</string>
<string>1.5.2</string>
<key>CFBundleVersion</key>
<string>1396</string>
<string>1415</string>
<key>SMAuthorizedClients</key>
<array>
<string>identifier "com.lindegroup.AutoPkgr" and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = JVY2ZR6SEF</string>
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

![autopkgr_logo.png](doc-images/autopkgr_logo.png)

__AutoPkgr is a free Mac app that makes it easy to install and configure [AutoPkg](https://autopkg.github.io/autopkg/).__
__AutoPkgr is a free macOS app that makes it easy to install and configure [AutoPkg](https://autopkg.github.io/autopkg/).__

AutoPkg is an awesomely powerful tool for automating macOS software packaging and distribution, but it requires its users to be comfortable with command-line tools and methods. If you're not yet comfortable with the command-line, or if you just want to get AutoPkg set up from scratch quickly and reliably, AutoPkgr is for you.

Expand Down Expand Up @@ -367,12 +367,16 @@ Now all downloaded files will be checked against VirusTotal's database.

This should reveal the process information for active AutoPkg runs. If it's appropriate to do so, you can then terminate the process(es) by using `kill` or `killall`.

- __Helper tool/daemon issues__

Some issues can be resolved by reinstalling AutoPkgr's helper tool. You can do this by holding the Option key while clicking the AutoPkgr icon in the menu bar (![Menu bar icon](doc-images/menulet.png)), then choosing __Reinstall Helper Tool__.

#### Step 2: Is it really AutoPkgr?

If you've eliminated the simple errors above, but AutoPkgr still doesn't do what you expect, the next step is to run your recipes directly using `autopkg` in Terminal. The following command has been helpful for us when troubleshooting. (Triple-click to select the entire line for copying.)

```
/usr/bin/python /usr/local/bin/autopkg run --recipe-list ~/Library/Application\ Support/AutoPkgr/recipe_list.txt --report-plist /tmp/autopkg-report.xml
/usr/local/bin/autopkg run --recipe-list ~/Library/Application\ Support/AutoPkgr/recipe_list.txt --report-plist /tmp/autopkg-report.xml
```

If the issue repeats itself there, it's likely that the problem is with an AutoPkg recipe or repository, not with AutoPkgr. See if you can see which recipe is failing based on the output of the command above. (Information on troubleshooting individual AutoPkg recipes is [available on the AutoPkg wiki](https://github.com/autopkg/autopkg/wiki/FAQ#this-recipe-used-to-work-but-now-it-doesnt-what-should-i-try).)
Expand Down

0 comments on commit 987685f

Please sign in to comment.