Closed Bug 186036 Opened 23 years ago Closed 23 years ago

Allow PPEmbed to build under Mach-O [ProjectBuilder]

Categories

(Core Graveyard :: Embedding: Mac, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.3beta

People

(Reporter: ccarlen, Assigned: ccarlen)

Details

Attachments

(3 files, 4 obsolete files)

Since CFM is going away and embeddors will be using this with Mach-O.
Attached patch PPEmbed patch 1.0 (obsolete) — Splinter Review
A few things about the patch: * This PPEmbed project depends on PowerPlant being built as a framework with Project Builder. I'll be adding that patch here soon. * The build copies files from dist/Embed, rather then directly from the tree. That means that building in embedding/config is required first. * All resource files are now text. They will be used by the CFM build as well and the binary .rsrc files will be cvs removed. * The gutting of UMacUnicode wasn't exactly part of Mach-O adaptation. With the old code, I would have had to add access paths (depend on) non-frozen parts of mozilla for Unicode conversion. I took this opportunity to get rid of that code, using code I wrote for nsLocalFileMac a while back.
Attached patch patch v2 (obsolete) — Splinter Review
Copies PowerPlant framework into itself as an internal framework, some other cleanup like removing absolute paths, got rid of a lot of compiler warnings, etc.
Attachment #109657 - Attachment is obsolete: true
Attached patch CW project diffsSplinter Review
Changes the CW project to build with the same .r resource files as the Project Builder project, instead of binary .rsrc and .ppob files.
Attached patch PowerPlant framework project (obsolete) — Splinter Review
This is the Powerplant project which builds the framework used by PPEmbed. The path /Developer/PowerPlant is a symlink to the actual PP folder with the Metrowerks installation. That this symlink has to be made and that slight mods need to be made to the PowerPlant src is why this is not turned on in the build.
Can I get a r/sr of this? It will be NOT PART OF THE BUILD for now, but worth having somebody take a look.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.3beta
why are the resource files derez'd to .r? Makes them more or less useless. I sure can't read binary and they'd have to be rez'd to be editable by any of the tools we use, right?
> why are the resource files derez'd to .r? (1) To keep them as text, data fork only files. Cmd-line cvs doesn't handle binary .rsrc files. If they were binary, you'd still be stuck with running asdecode in order to edit with any of the tools we use. (2) Also, for many types of resources, it's easy to edit the DeRez'd text. Binary is bad, text is good.
- return NS_FAILED(res) ? eventNotHandledErr : noErr; + if (NS_FAILED(res)) + return eventNotHandledErr; + return noErr; seems like an unnecessary change in all the places you make it. *shrug* + if (!mIconRef) + return false; + Rect iconRect; CalcLocalFrameRect(iconRect); should these files just be detabbed while you're at it? + F5A63FA003A5643301202892 = { + isa = PBXFileReference; + name = PowerPlant.r; + path = "/Developer/PowerPlant/PowerPlant Resources/PowerPlant.r"; + refType = 0; is that where powerplant always lives with pro8? other than that looks pretty good. r=pink
> seems like an unnecessary change in all the places you make it. *shrug* Without the change, each of those statements gives this warning: warning: enumeral mismatch in conditional expression: `<anonymous enum>' vs `<anonymous enum>' Many of the changes to this code were to quiet warnings which were new with gcc. > should these files just be detabbed while you're at it? Yes, this would be a good time to do that - Will do. > is that where powerplant always lives with pro8? No, see comment 4. I'll make a README which has a patch for PowerPlant and explains making the symlink. > r=pink Thanks.
Comment on attachment 111067 [details] [diff] [review] patch v2 Bryner, so you don't get 3 sr requests, can you sr all patches?
Attachment #111067 - Flags: superreview?(bryner)
One concern I have is that this won't work with objdir builds. However, I think there may be a solution to this. You can manually specify where the built object files should go in PB, and you can use environment variables in the path. So, if we use make to invoke PB, it can set the appropriate variables from our build system (topsrcdir, DIST, etc) as environment variables before invoking pbxbuild. Of course, that would make building from the PB GUI hard. Maybe there's a way we can provide default values for these variables in PB that can be overridden by the environment. Other than that, it looks fine.
Specifying where the object code goes would be possible - see /Developer/Documentation/ReleaseNotes/PBBuildSettings.html. But, that won't solve the problem. Files from dist/Embed have to be in the file list of the project and those, I've found, can't be indirected through a build variable. In an objdir build, would it be possible to have the makefile create a symlink to "dist" in the same location relative to the project as a normal build?
No. You can have multiple objdirs off of the same srcdir; making a symlink in the srcdir to just one of them is kind of evil. Another possibility, if it would help, is that we could copy the project file into the objdir as part of the build. Then the relative path to dist/ would be the same.
> You can have multiple objdirs off of the same srcdir; making a symlink in the srcdir to just one of them is kind of evil. But, the build would update that symlink each time, so as long as you built it from the Makefile each time... The problem with copying the project is then what about the relative paths to PPEmbed's own src? If supporting objdir builds is important, could make a makefile for building PPEmbed which would work in objdir builds? Then we'd have the mess of building an app bundle without PB :-/
Comment on attachment 111067 [details] [diff] [review] patch v2 (just clearing the review flag; conrad is investigating objdir support)
Attachment #111067 - Flags: superreview?(bryner)
Attached patch v3, part1Splinter Review
Attachment #111067 - Attachment is obsolete: true
Attachment #111110 - Attachment is obsolete: true
Attachment #112869 - Attachment is obsolete: true
Attached patch v3, part2Splinter Review
I had to divide the v3 full patch into parts because of size.
v3 patch works in objdir build. Bryner, can you sr= both?
Attachment #113705 - Flags: superreview+
Attachment #113707 - Flags: superreview+
Comment on attachment 113705 [details] [diff] [review] v3, part1 I would like to get this in so that it's available to Mach-O embeddors ASAP. It poses no risk because it's not turned on in the build.
Attachment #113705 - Flags: approval1.3b?
Comment on attachment 113707 [details] [diff] [review] v3, part2 I would like to get this in so that it's available to Mach-O embeddors ASAP. It poses no risk because it's not turned on in the build.
Attachment #113707 - Flags: approval1.3b?
Comment on attachment 113705 [details] [diff] [review] v3, part1 a=asa for not part of the build changes.
Attachment #113705 - Flags: approval1.3b? → approval1.3b+
Comment on attachment 113707 [details] [diff] [review] v3, part2 a=asa for not part of the build changes.
Attachment #113707 - Flags: approval1.3b? → approval1.3b+
Checked in - except for the change to allmakefiles.sh because I couldn't then say "not part of the build." That can happen when I make it so that this can be optionally turned on in the build.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: