Closed Bug 307262 Opened 19 years ago Closed 15 years ago

osx sample plugin using xcode and hiview

Categories

(Core Graveyard :: Plug-ins, enhancement)

PowerPC
macOS
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: shanec, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

I originally wrote this plugin as a demonstration of the problem in bug 277067.
 It is useful because...

1. no plugin in moz source base that uses a "newer" xcode
2. no instructions on how to create a plugin from scratch in xcode

In the sample itself, you have to edit the header locations (see getinfo in the
context menu for the project) to point to the correct location for mozilla headers.

The following notes I wrote while working on this may be a bit stale, but should
help in getting someone moving in the right direction:

In xcode 1.5, 

create new project and select "Carbon Bundle" for the project type
edit Info.plist
change CFBundlePackageType to NSPL (or BRPL)
change CFBundleSignature to MOSS
change CFBundleIdentifier to something unique
save Info.plist
create a new file, call it pluginname.r
add the following text to it:

#define SystemSevenOrLater 1

#include <Types.r>
#include <SysTypes.r>
resource 'STR#' (127)
{{
    "testplug File Type Description"
}};

resource 'STR#' (128)
{{
    "application/x-testplug-mimetype",
    "testplugfileextension"
}};

resource 'STR#' (126)
{{
    "testplug for Mozilla Firefox 1.0"
}}; 

save it

Add the library libplugingate_s.a (from modules/plugin/tools/sdk/samples/common)
Select the project icon in xcode (very top icon in left pane), then in the file
menu select "Get Info"
Select the "styles" tab

"Rez Search Paths" should include /Developer/Headers/FlatCarbon
set "Project Name" to the plugin name
set "Wrapper Extension" to "plugin"
"Other C Flags" and "Other C++ Flags" should include "-DXP_MACOSX=1 -DNO_X11=1
-DUSE_SYSTEM_CONSOLE=1"
"Other Warning Flags" should include "-Wmost -Wno-four-char-constants
-Wno-unknown-pragmas"
"Header Search Paths" needs to include:

/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/sdk/xpcom/include
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/include/caps
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/include/java
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/include/js
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/include/nspr
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/include/nspr/obsolete
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/include/oji
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/include/plugin
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/include/xpcom
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/include/xpconnect
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/include/string
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/include/dom
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/dist/include
/Users/shanec/main/Apps/Mozilla-devel/build/moz-1.7.5-ko39-release/mozilla/modules/plugin/tools/sdk/samples/include
/Developer/Headers/FlatCarbon



Reproducible: Always

Steps to Reproduce:
sample plugin using xcode 1.5 and hiview
another note, lots of cruft in the code as I was trying to deal with the draw
issues from bug 277067.  I later got the patches there working which resolve
most of my issues.
So is this bug about adding this sample to the source tree?
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a4) Gecko/20100407 MozillaDeveloperPreview/3.7a4                   
Please update if you are able to still reproduce with the latest nightly build  ftp://ftp.mozilla.org/pub/firefox/nightly/latest-trunk/
Whiteboard: [closeme 2010-05-05]
Aravind, this is not a user-facing bug, so it can't be checked in a nightly build (and shouldn't be CLOSEMEd).

Josh/Shane, does the current Mac sample/test plugin cover this, or is this bug still needed?
Whiteboard: [closeme 2010-05-05]
We don't need another sample plugin for Mac OS X.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: