[Mono-osx] Pre-release: C# Xcode Plugin
Jaume Llardén Prieto
jllarden at aim.com
Wed Mar 14 19:50:25 EDT 2007
Hi,
Great you took the time to package the plugin!
I've tested the installer file and I found the following issues:
* File owner for all files should be root:admin, not 504:504.
* Target Templates/C Sharp/Cocoa# Executable.trgttmpl's filename
contains a typo.
* Files COPYING.txt and CSharpXcodePlugin.pkg shouldn't be copied to
the Developer Tools directory.
* (for the sake of completion) There's a missing period in
project.xcodeproj:
--- csharpplugin/Project Templates/C Sharp/Library/
project.xcodeproj.orig/TemplateInfo.plist 2007-03-14
09:27:46.000000000 +0100
+++ csharpplugin/Project Templates/C Sharp/Library/project.xcodeproj/
TemplateInfo.plist 2007-03-12 16:01:16.000000000 +0100
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>Description</key>
- <string>This project builds a mono library assembly in C#</
string>
+ <string>This project builds a mono library assembly in C#.</
string>
<key>FilesToMacroExpand</key>
<array>
<string>«PROJECTNAMEASIDENTIFIER».cs</string>
Some thoughts:
1) All files under directory csharpplugin/Resources should be
capitalized after the pattern: CSharp.<extension>. Some of us use
case-sensitive HFS+.
2) I'd propose to use more explanatory names for the project
templates, and substitute the word 'executable' with
'application' (it's the word used in all other Xcode template files)
Cocoa# Executable > Cocoa# Application
Executable > Mono-C# Application
Library > Mono-C# Library
(The word 'Mono-C#' would be built after the pattern framework-
language, as 'Cocoa-Java').
3) Although it is in the Source tab, it would be nice to have the
subversion command for downloading the code also in the wiki, for the
readers' convenience.
4) I've created in the CSharpPlugin project a last script build phase
to automatically build an installation package (a pkg file). The
script uses packagemaker, which is a symlink to /Developer/
Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker.
I don't use your pm-file, so everything's "centralized" in the
script. I've tested it on my Powerbook with Xcode 2.4.1 and it works
beautifully (all issues above solved). Here's the script:
PACKAGEMAKER=/Developer/Tools/packagemaker
CSHARPPLUGIN_PKG_DIR="$SRCROOT/pkg"
CSHARPPLUGIN_PKG_CONTENTS_DIR="$CSHARPPLUGIN_PKG_DIR/contents"
CSHARPPLUGIN_PKG_CONTENTS_PLUGINS_DIR="$CSHARPPLUGIN_PKG_CONTENTS_DIR/
Plug-ins"
CSHARPPLUGIN_PKG_REZ_DIR="$CSHARPPLUGIN_PKG_DIR/rez"
CSHARPPLUGIN_PKG_ENGLISH_LPROJ_DIR="$CSHARPPLUGIN_PKG_REZ_DIR/
English.lproj"
CSHARPPLUGIN_PKG_NAME="CSharpXcodePlugin.pkg" # could also be
$PROJECT_NAME.pkg
# Create the package directory from scratch
mkdir -p "$CSHARPPLUGIN_PKG_DIR"
mkdir -p "$CSHARPPLUGIN_PKG_CONTENTS_DIR"
mkdir -p "$CSHARPPLUGIN_PKG_CONTENTS_PLUGINS_DIR"
mkdir -p "$CSHARPPLUGIN_PKG_REZ_DIR"
mkdir -p "$CSHARPPLUGIN_PKG_ENGLISH_LPROJ_DIR"
cp -R "$OBJROOT/Debug/$PROJECT_NAME.pbplugin"
"$CSHARPPLUGIN_PKG_CONTENTS_DIR/Plug-ins"
cp -R "$SRCROOT/File Templates" "$CSHARPPLUGIN_PKG_CONTENTS_DIR"
cp -R "$SRCROOT/Project Templates" "$CSHARPPLUGIN_PKG_CONTENTS_DIR"
cp -R "$SRCROOT/Target Templates" "$CSHARPPLUGIN_PKG_CONTENTS_DIR"
chmod -R 755 "$CSHARPPLUGIN_PKG_CONTENTS_DIR"
sudo chown -R root:admin "$CSHARPPLUGIN_PKG_CONTENTS_DIR"
cp "$SRCROOT/COPYING" "$CSHARPPLUGIN_PKG_ENGLISH_LPROJ_DIR/License.txt"
cat <<EOF > "$CSHARPPLUGIN_PKG_ENGLISH_LPROJ_DIR/ReadMe.txt"
The C# Xcode plug-in allows the use of the Mono C# development
environment inside of Xcode. Using this plug-in, the Xcode editor
understands the basic C# syntax and can highlight comments, keywords,
etc. For more information visit http://code.google.com/p/cocoa-sharp-
dev/wiki/CSharpPlugin.
Mono, an open source, UNIX version of the Microsoft .NET development
platform, is needed for this plug-in to work properly. Get Mono from:
http://www.mono-project.com.
The plug-in installs in:
/Library/Application Support/Apple/Developer Tools.
EOF
cat <<EOF > "$CSHARPPLUGIN_PKG_DIR/Info.plist"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://
www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleGetInfoString</key>
<string>C# Xcode Plugin 0.2, Susan Mackay</string>
<key>CFBundleIdentifier</key>
<string>com.mono.xcodeplugin</string>
<key>CFBundleShortVersionString</key>
<string>0.2</string>
<key>IFMajorVersion</key>
<integer>0</integer>
<key>IFMinorVersion</key>
<integer>2</integer>
<key>IFPkgFlagAllowBackRev</key>
<false/>
<key>IFPkgFlagAuthorizationAction</key>
<string>AdminAuthorization</string>
<key>IFPkgFlagBackgroundAlignment</key>
<string>topleft</string>
<key>IFPkgFlagBackgroundScaling</key>
<string>none</string>
<key>IFPkgFlagDefaultLocation</key>
<string>/Library/Application Support/Apple/Developer Tools</string>
<key>IFPkgFlagFollowLinks</key>
<true/>
<key>IFPkgFlagInstallFat</key>
<false/>
<key>IFPkgFlagIsRequired</key>
<false/>
<key>IFPkgFlagOverwritePermissions</key>
<false/>
<key>IFPkgFlagRelocatable</key>
<false/>
<key>IFPkgFlagRestartAction</key>
<string>NoRestart</string>
<key>IFPkgFlagRootVolumeOnly</key>
<false/>
<key>IFPkgFlagUpdateInstalledLanguages</key>
<false/>
<key>IFPkgFormatVersion</key>
<real>0.10000000149011612</real>
</dict>
</plist>
EOF
cat <<EOF > "$CSHARPPLUGIN_PKG_DIR/Description.plist"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://
www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IFPkgDescriptionDescription</key>
<string>Installs C# Xcode Plugin</string>
<key>IFPkgDescriptionTitle</key>
<string>C# Xcode Plugin</string>
</dict>
</plist>
EOF
# Create installation package
"$PACKAGEMAKER" -build -v -ds -p "$CSHARPPLUGIN_PKG_DIR/
$CSHARPPLUGIN_PKG_NAME" -f "$CSHARPPLUGIN_PKG_CONTENTS_DIR" -r
"$CSHARPPLUGIN_PKG_REZ_DIR" -i "$CSHARPPLUGIN_PKG_DIR/Info.plist" -d
"$CSHARPPLUGIN_PKG_DIR/Description.plist"
GOTCHAS: As you might have noticed, I change directory rights using
sudo. You must have the NOPASSWD flag set to avoid entering a password:
jaume ALL=(ALL) NOPASSWD: ALL
Cheers
jaume
On 13 Mar 2007, at 15:48, David_Hudson at capgroup.com wrote:
> Hi all,
>
> I have created a simple installer for Susan's C# Xcode plugin.
> Please try
> it out and let me know what you think. If there aren't any major
> issues,
> where should I post up announcements? I have only previously done
> Windows
> and Linux open-source releases so I am not sure where I should
> announce OSX
> stuff.
>
> You can download the release from here.
> http://cocoa-sharp-dev.googlecode.com/files/CSharpXcodePlugin.zip
>
> Documentation can be found here:
> http://code.google.com/p/cocoa-sharp-dev/wiki/CSharpPlugin
>
> Thanks
> Dave
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
More information about the Mono-osx
mailing list