Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Add-Lua.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cat >AdditionalLanguages.plist <<EOF
<array>
<dict>
<key>identifier</key>
<string>com.apple.xcode.lua-source</string>
<string>public.lua-script</string>
</dict>
</array>
<key>id</key>
Expand Down Expand Up @@ -80,3 +80,6 @@ cp "$SCRIPT_PATH/Lua.xclangspec" "$DVTFOUNDATION_PATH"
# Remove any cached Xcode plugins
#
rm -f /private/var/folders/*/*/*/com.apple.DeveloperTools/*/Xcode/PlugInCache.xcplugincache

# Register Lua script Uniform Type Identifier
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister "$SCRIPT_PATH/LuaUTIProvider.app"
102 changes: 102 additions & 0 deletions LuaUTIProvider.app/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AMIsApplet</key>
<true/>
<key>AMStayOpen</key>
<false/>
<key>BuildMachineOSBuild</key>
<string>14A359</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>*</string>
</array>
<key>CFBundleTypeName</key>
<string>Automator workflow file</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>****</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>Application Stub</string>
<key>CFBundleIconFile</key>
<string>AutomatorApplet</string>
<key>CFBundleIdentifier</key>
<string>com.apple.automator.LuaUTIProvider</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>LuaUTIProvider</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array/>
<key>CFBundleVersion</key>
<string>409</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>6A280m</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>14A359</string>
<key>DTSDKName</key>
<string>macosx10.10internal</string>
<key>DTXcode</key>
<string>0600</string>
<key>DTXcodeBuild</key>
<string>6A280m</string>
<key>LSMinimumSystemVersion</key>
<string>10.5</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
<string>10.6</string>
</dict>
<key>LSUIElement</key>
<true/>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSMainNibFile</key>
<string>ApplicationStub</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSServices</key>
<array/>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.shell-script</string>
</array>
<key>UTTypeIdentifier</key>
<string>public.lua-script</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>lua</string>
</array>
</dict>
</dict>
</array>
<key>UTImportedTypeDeclarations</key>
<array/>
</dict>
</plist>
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Lua Support for Xcode 4+ #
1. download the two files (Add-Lua.sh, Lua.xclangspec)
1. Clone this repository
2. Open Add-Lua.sh and change the DVTFOUNDATION_PATH if necessary. You probably do not need to change this if you are on Xcode 4.3+
3. Make sure Xcode is closed
4. Run Add-Lua.sh from the terminal with sudo (I.E. 'sudo Add-Lua.sh')
5. Enter your admin password and hit enter
6. Open Xcode and notice the 'Lua' entry under "Editor->Syntax Coloring"
6. Lua should now be correctly highlighted in Xcode


Special thanks to [araxara](https://github.com/araxara) for the Objective-J version of this code.
Special thanks to [araxara](https://github.com/araxara) for the Objective-J version of this code.