Flat Package Editor

0 views
Skip to first unread message

Kody Baril

unread,
Aug 5, 2024, 9:28:42 AM8/5/24
to tocizanbanc
Consideringit is such an obstacle, and I have been asked this many times, I think it would be worthwhile for this to finally be written down. This guide requires an existing installation of Mac OS X; for 10.4 and earlier, you can use any OS X release, but for 10.5 and 10.6 you need 10.5 or higher.

Now, for 10.3 and earlier, right-click OSInstall.mpkg and choose Show Package Contents. Open Info.plist with TextEdit or a .plist editor. Near the bottom, there will be something like OSModelCheck that will have a model underneath it (in TextEdit) or beside it (in most other .plist tools), such as PowerMac3,1. Delete the whole thing (the key and the model), save the .plist file, and you're good to go. You may, though, want to check the Info.plist files of some bundled software such as AppleWorks to make sure that others don't have the model check, as some packages on my 10.3 disc did.


For 10.4, right-click OSInstall.mpkg and choose Show Package Contents. Now, right click OSInstall.dist, choose Open With -> Other..., and choose TextEdit. Basically the .dist is a Javascript file, so you will have to cipher through a junkload of code until you come to a model like PowerMac6,1. Above it, you will see the following code:


Another option is to change the hwbeSupportedMachines to your Mac model (of your real Mac you will use it on or of your smbios.plist you will use), such as PowerMac2,2 instead of PowerMac4,4 and PowerMac6,4 in this example. However, I prefer the other method.


For 10.5 and 10.6, the editing process is the same as for Tiger, but with a twist: you need to open OSInstall.mpkg with PackageMaker, which is why you need the Developer Tools. When you open it, hit the tab called Requirements and double-click the top Javascript. Edit it the same way as described with Tiger and hit OK (or Save or whatever). If you are concerned about cosmetics, change the name from MacOSX_Title to Mac OS X; otherwise it will say "Select which disk to install MacOSX_Title on". Build the package (don't worry about all the other packages) and rename it to OSInstall.mpkg. Drag it to the Packages folder on the image, choose Replace, and you're done.


2. Restore the contents of the Snow Leopard DL-DVD onto a 8GB USB thumb drive with Disk Utility.



3. Modify the OSInstall.mpkg file which is located in the System/Installation/Packages folder on the USB


The USB can now be used to install Snow Leopard on any Mac or Hackintosh (after installing a bootloader) . This method is also applicable to OSInstall.mpkg in OSX 10.7-10.9 install media (thus bypassing machine install checks).


I used my ibook G4's (last model before the Intel transition) discs and made the changes like in post one. If I remember right, I got it to install on a PowerMac G4 Sawtooth. Later I tried it on my G5 late 2005 and it didn't work. So I tried adding all model names to the true-list, but that didn't help either.


I did everything in your instructions, however, the Distribution file does not seem to be saving. I edit the distribution file, then delete the original, then drag and drop and save. But when I go back and check the distribution file, it has somehow reverted back to the original. Any help with this would be appreciated. Thanks.


Begin Rant....My homeschool coop has recently started a lego robotics program, and was looking for several laptops to simply run the lego robotics program which requires OSX 10.6 or higher. I had an old Macbook 4,1 laying around that I thought I would donate; just needs a new hard drive and a software update. New hard drive arrived from Amazon and will have soon have a clean OSX install. Fumbling around on the internet, it seems that the 10.7 is the highest OSX version that is compatible with my Macbook 4,1. Already spent $50 for the hard drive, and Apple wants $20 for Lion. Well....HMMMM.....Ok, I guess I can spend $20 for Lion. $20 to apple and the authentication code arrived in my inbox. Just simply go to the App Store and download Lion, Right? Wrong! Lion won't download to any of my newer machines because they are all running High Sierra. HMMMMM....Lets install the original 10.5.8 software and download from there. Wrong! 10.5.8 doesn't have an App Store,. Call Apple for Help....We're sorry sir, but your Macbook 4,1 is considered obsolete, and no we cannot refund your $20 for 10.7 (And no it doesn't matter how many tens of thousands of dollars you have spent on Imacs, Macbooks, Ipads, and Iphones, We're not going out of our way to help you.) Well Apple, I have a hard time believing that the majority of those purchasing OSX 10.7 are running at least 10.6.8. I'm also betting that most of us trying to install something as obsolete as 10.7 are wanting a clean install (Yes I realize they are probably getting 10.7 from somewhere else, or using Linux or windows). But seriously, why do you have 10.7 for sale on your website? How many machines are out there that you can actually download it? Only those running 10.6.8? Why buy if your already running 10.7? I'm assuming it won't download on anything higher? Big disappointment Apple! End Rant!


I just happened to have Gray install CD's for 10.5.3, and 10.6.4 (didn't realize I had 10.6 until I had already bought 10.7). Downloaded Tinker Tool from the internet. I used Pacifist to retrieve the flat package editor from the 2nd 10.5.3 installation CD (flat package editor from 10.6 wouldn't work since I was running 10.5. ) Edited the Distribution file in 10.6.4 and voila, after a couple of Software updates I'm running 10.6.8 with App Store. Downloading 10.7 now...Jury is still out on whether it will run on my machine. In any event I only need 10.6 to run the robotics software, so its been a success! Thanks fusion71au for the help!


In today's article, we will look at the new flat package format. First, we learn how this format compares with earlier bundle-style formats. Then we examine the structure of a typical flat package. Finally, we look at three useful tools with which to manage the package.


The article assumes that readers know how to use PackageMaker 3.0, as well as the Terminal utility. If this is your first time using PackageMaker 3.0, refer to my introductory article Packaging For Leopard for the necessary basics.


When PackageMaker starts a new project, it displays its sheet dialog Install Project (Figure 1). Use this dialog to supply some basic information about your project. For instance, in the Organization field, enter a unique ID for the package. Convention dictates that you use your product or company's URL as the ID string. Make sure to enter the string using reverse-domain syntax. If your product URL is www.foobar.com/foo, then type the string as com.foobar.foo.


You can always change the format by choosing Install Properties from the Project menu, and then choosing a different OS target from the pop-up menu. Doing so, however, may corrupt your project file. A safer approach is to keep a separate project file for each OS target.


Assume you have chosen 10.3 as the minimum OS target. Also, assume your installer project has only one payload. If you choose Build from the Project menu, PackageMaker stores your payload inside a payload package, also known as a component package. This package is the simplest of four possible packages.


Figure 2 shows the structure of a typical payload package. As you can see from the diagram, the package is, in essence, a bundle. Its root directory, Contents, contains four items, which are listed as follows.


- An XML file containing the default settings for the entire package. To view its contents, use the Property List Editor tool. You can also view the file with a text editor, if you are familiar with XML.


Assume again that your minimum OS target is 10.3. But this time, you have more than one payload in your installer project. Or you have customized the install panels using PackageMaker's Interface Editor. Or you used external scripts to customize the install session. When you choose Build from the Project menu, PackageMaker builds the installer package as a meta-package (Figure 3).


In a meta-package, each payload is stored as a payload package in Contents/Packages/. Any files used to localize the install panel go into the correct lproj bundle in Contents/Resoures/. External scripts that customize the install session also go into Contents/Resources/.


But the meta-package does not let you customize the Conclusion panel nor the payload choices. It does not support scripts written in Installer JavaScript. And it cannot display just the Easy Install or Custom Install panels -- it has to display both panels.


Now assume you have 10.4 as your minimum target. In this case, when you choose Build from the Project menu, PackageMaker builds your installer package as a distribution package (Figure 4). At first, its structure appears similar to that of the meta-package. A distribution package, however, has several advantages over a meta-package.


First, it lets you use embedded text to customize each install panel. It also lets you customize all install panels, as well as the payload choices. Next, it supports scripts written in the new Installer JavaScript dialect. Plus, it can assume one of three install modes: Easy, Custom, or both. Finally, it keeps all its scripts, settings, and some localized text in a single XML file, distribution.dist. But it still keeps localized files inside an lproj bundle in Contents/Resources/.

3a8082e126
Reply all
Reply to author
Forward
0 new messages