Skip to content
Browse files

added compile command with gtk2

  • Loading branch information...
1 parent 06c314b commit 191a904ff6137768b7e24a1ec26f98051561c02e @bsingr bsingr committed Jul 1, 2011
Showing with 39 additions and 0 deletions.
  1. +39 −0 Commands/Run.tmCommand
View
39 Commands/Run.tmCommand
@@ -0,0 +1,39 @@
+<?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>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>#!/usr/bin/env ruby
+
+require "#{ENV["TM_SUPPORT_PATH"]}/lib/tm/executor"
+require "#{ENV["TM_SUPPORT_PATH"]}/lib/tm/save_current_document"
+
+TextMate.save_current_document
+TextMate::Executor.make_project_master_current_document
+
+src_file = ENV["TM_FILEPATH"]
+bin_file = src_file.gsub(".vala", "")
+
+f = TextMate::Executor.run("valac", :script_args =&gt; [
+ "--pkg", "gtk+-2.0", src_file
+])
+
+if File.exists?(bin_file)
+ TextMate::Executor.run("#{bin_file}")
+end</string>
+ <key>input</key>
+ <string>selection</string>
+ <key>keyEquivalent</key>
+ <string>@r</string>
+ <key>name</key>
+ <string>Run</string>
+ <key>output</key>
+ <string>showAsHTML</string>
+ <key>scope</key>
+ <string>source.v, source.vala</string>
+ <key>uuid</key>
+ <string>C2F6A13C-1BB3-4547-AFFA-8FEB7952F055</string>
+</dict>
+</plist>

0 comments on commit 191a904

Please sign in to comment.
Something went wrong with that request. Please try again.