Jump to content

Recommended Posts

18 hours ago, RodgerWW said:

 

OK, so it would seem that something in the Alfred workflow folder is not getting cleared in this case.

 

In the workflow folder you will have a text file called "mymac.txt".  This text file is more-than-likely showing the system as being the early 2014 model.

You also should have a png file called "mymac.png" and it is probably clear/transparent as the identifier for your new system "MacBookPro13,2" is not in the "HardwareIcons.xml" file also in the workflow's folder.

 

First, I would suggest removing not only the workflow, but also any trace of it on the new system.

 

Then download the workflow and install it fresh. (Go to first post/page to download as I have just updated the workflow)

 

Then run the workflow so it can create the above mentioned text file and image ... The text file should be correct now that everything has been removed everywhere and the workflow installed fresh.

 

How can I remove this identifier from my system? 

 

I did see the mymac.txt file you've mentioned showing

 

"MacBook Air 13-inch, Early 2014
G5RQ"

 

HardwareIcons.xml is also not showing MacbookPro13,2. However, I did not see a "mymac.png" file in the workflow directory.

Link to comment
1 hour ago, iNinja said:

I did see the mymac.txt file you've mentioned showing

 

"MacBook Air 13-inch, Early 2014
G5RQ"

 

Try manually deleting the txt files from the workflow directory ... then running the workflow again to see if the workflow recreates the files properly. Also, did you download the 2018 workflow for Alfred 3 I just updated with all hardware?

Link to comment
14 hours ago, RodgerWW said:

Try manually deleting the txt files from the workflow directory ... then running the workflow again to see if the workflow recreates the files properly. Also, did you download the 2018 workflow for Alfred 3 I just updated with all hardware?

 

Hurray that worked! Thanks for your assistance.

 

I deleted the txt files as you've stated and downloaded 2018 update. I did download the Alfred 3 workflow a few days ago, but it was still showing 2017 then.

Link to comment
24 minutes ago, RodgerWW said:

 

Also did you run "xabout" to reset the workflow after downloading the 2018 version?

 

Ok, just tried that now. Unfortunately, still nothing. Here's what the debug log is showing. It may help.

 

image.png.8983ae2f361e3a3f4615056bd702d27b.png

 

Starting debug for 'About This Mac'

 

[2018-01-12 11:07:38][STDERR: input.scriptfilter] /bin/bash: line 15: [: too many arguments

cat: SPDisplaysDataType: No such file or directory

cat: SPDisplaysDataType: No such file or directory

[2018-01-12 11:07:58][input.scriptfilter] Queuing argument ''

[2018-01-12 11:07:59][input.scriptfilter] Queuing argument ''

[2018-01-12 11:08:00][input.scriptfilter] Script with argument '(null)' finished

[2018-01-12 11:08:00][STDERR: input.scriptfilter] /bin/bash: line 15: [: too many arguments

cat: SPDisplaysDataType: No such file or directory

cat: SPDisplaysDataType: No such file or directory

[2018-01-12 11:08:00][input.scriptfilter] <?xml version="1.0"?>

<items>

  <item arg="MacBook Pro 15-inch, 2017" valid="yes">

    <title>MacBook Pro 15-inch, 2017 (MacBookPro14,3)</title>

<subtitle>System (Model Identifier)</subtitle>

<icon>mymac.png</icon>

  </item>

  <item arg="2.9 GHz Intel Core i7">

    <title>2.9 GHz Intel Core i7</title>

<subtitle>Processor</subtitle>

<icon>cpu.png</icon>

  </item>

  <item arg="16 GB 2133 MHz LPDDR3">

    <title>16 GB 2133 MHz LPDDR3</title>

<subtitle>Memory</subtitle>

<icon>ram.png</icon>

  </item>

  <item arg="Intel HD Graphics 630 4 GB">

    <title>Intel HD Graphics 630 4 GB</title>

<subtitle>Onboard Graphics</subtitle>

<icon>graphicsintelhd.png</icon>

  </item>

  <item arg="Radeon Pro 560">

    <title>Radeon Pro 560</title>

<subtitle>Resolution: 2880 x 1800</subtitle>

<icon></icon>

  </item>

  <item arg="C02TV2NRHTD6">

    <title>C02TV2NRHTD6</title>

<subtitle>Serial Number</subtitle>

<icon>AppleCare.png</icon>

  </item>

  <item arg="macOS 10.13.2 (17C205)">

    <title>macOS 10.13.2 (17C205)</title>

<subtitle>System Version (Build)</subtitle>

<icon>HighSierra.png</icon>

  </item>

  <item arg="50 minutes">

    <title>50 minutes</title>

<subtitle>Time Since Boot</subtitle>

<icon>uptime.png</icon>

  </item>

</items>

Link to comment
11 minutes ago, flome said:

Ok, just tried that now. Unfortunately, still nothing. Here's what the debug log is showing. It may help.

Hmm, Can you open terminal and type the following:

system_profiler SPHardwareDataType | grep "Model Identifier"

and tell me what it says for you identifier?

Link to comment

Hmm, I have to admit I am stumped with this one. The identifier is definitely in the xml, albeit 3 times for space grey silver and non touch. Perhaps open the xml in textedit, do a search for "MacBookPro14,3" and delete the 2 lines that are NOT yours and see if that works?

Link to comment

A rather minor thing, but would you consider storing the generated txt files in the workflow's data or cache directory, not in the workflow directory?

 

The issue is that files in the workflow directory get synced between machines, so when I use the workflow to quickly check which video card my Mac has or what the numerical version of the OS is (I can never ever seem to remember which is 10.10, 10.11, 10.12 etc.), the cache files often contain the data from the wrong Mac, so it takes a lot longer than need be to load.

 

Link to comment
39 minutes ago, RodgerWW said:

This is new to me, but I will look into it for sure.

 

The data and cache dirs? Since about Alfred 2.4, the paths are available to your workflow via the alfred_workflow_data and alfred_workflow_cache environment variables.


You still have to create the directories yourself, mind you.

Link to comment
3 hours ago, RodgerWW said:

Hmm, I have to admit I am stumped with this one. The identifier is definitely in the xml, albeit 3 times for space grey silver and non touch. Perhaps open the xml in textedit, do a search for "MacBookPro14,3" and delete the 2 lines that are NOT yours and see if that works?

 

No dice. I verified the icon files existed also. 

Link to comment
  • 3 weeks later...
  • 1 year later...
On 1/12/2018 at 5:33 PM, deanishe said:

A rather minor thing, but would you consider storing the generated txt files in the workflow's data or cache directory, not in the workflow directory?

 

The issue is that files in the workflow directory get synced between machines, so when I use the workflow to quickly check which video card my Mac has or what the numerical version of the OS is (I can never ever seem to remember which is 10.10, 10.11, 10.12 etc.), the cache files often contain the data from the wrong Mac, so it takes a lot longer than need be to load.

 

 

Your issue is fixed in the new workflow. See my last post.

 

Btw, would you help me to find a way to generate mymac.png programatically without the need of using the HardwareIcons.xml file? All Mac icons are located in

/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ but I didn't find a way to correlate one of them to the user machine.


There are 3 icons for the MacBook Air in this folder as an example:

 

com.apple.macbookair.icns

com.apple.macbookair-11-unibody.icns
com.apple.macbookair-13-unibody.icns.

 

Is there any .plist file determining which one should be displayed in About This Mac.app?

 

I don't know if @RodgerWW is still active on the Forum. Maybe he can contribute for this discussion.

Edited by xilopaint
Link to comment
26 minutes ago, xilopaint said:

Is there any .plist file determining which one should be displayed in About This Mac.app?

 

Not that I know of.

 

The model names are contained in /System/Library/PrivateFrameworks/ServerInformation.framework/Versions/A/Resources/English.lproj/SIMachineAttributes.plist, and I found some code that the author says can convert a model name into its icon, so perhaps you could read the model names from the plist and feed them to that code to get the right icons?

Link to comment
9 minutes ago, deanishe said:

 

Not that I know of.

 

The model names are contained in /System/Library/PrivateFrameworks/ServerInformation.framework/Versions/A/Resources/English.lproj/SIMachineAttributes.plist, and I found some code that the author says can convert a model name into its icon, so perhaps you could read the model names from the plist and feed them to that code to get the right icons?

 

Oh, that looks good! I just don't know anything of Swift or Objective-C (I'm not even sure which of the two languages that code snippet refers to). If anyone can submit a PR I will be grateful. Otherwise I will have to learn how to implement this.

Link to comment
5 hours ago, deanishe said:

 

Not that I know of.

 

The model names are contained in /System/Library/PrivateFrameworks/ServerInformation.framework/Versions/A/Resources/English.lproj/SIMachineAttributes.plist, and I found some code that the author says can convert a model name into its icon, so perhaps you could read the model names from the plist and feed them to that code to get the right icons?

 

Hey, don't you think the one-line code mentioned in the SO question you linked is more suitable to my needs?

 

EDIT: btw, is this line Swift or Objective-C?

Edited by xilopaint
Link to comment
3 minutes ago, xilopaint said:

 

The one in the question, not in the answers.

 

Don't know. That returns an NSImage, but you need a filepath. I don’t know if you can get the filepath from an NSImage.

 

I’ll have a look what I get home

from work.

Link to comment
1 minute ago, deanishe said:

 

Don't know. That returns an NSImage, but you need a filepath. I don’t know if you can get the filepath from an NSImage.

 

I’ll have a look what I get home

from work.


Well, I don't necessarily need a filepath. If it gives me a copy of the .icns or even better a .png the problem is solved.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...