public
Fork of Caged/gitnub
Description: A Gitk-like application written in RubyCocoa that looks like it belongs on a Mac. See the wiki for downloads and screenshots.
Homepage: http://alternateidea.com
Clone URL: git://github.com/kballard/gitnub.git
Search Repo:
Add install (and related) tasks to the Rakefile
kballard (author)
Wed May 14 02:16:26 -0700 2008
commit  ceed7d12eaa21647294939eb24010c5aa2b2f0e0
tree    652d6c4150cee161cf258207010202a20ca88670
parent  b667ee1fa928670b93832480f98e72f48ab55781
...
358
359
360
361
 
362
363
364
...
358
359
360
 
361
362
363
364
0
@@ -358,7 +358,7 @@
0
         GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
0
         GCC_MODEL_TUNING = G5;
0
         INFOPLIST_FILE = Info.plist;
0
-        INSTALL_PATH = "$(HOME)/Applications";
0
+        INSTALL_PATH = /Applications;
0
         PRODUCT_NAME = GitNub;
0
         WRAPPER_EXTENSION = app;
0
       };
...
44
45
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
48
49
50
...
125
126
127
128
 
129
130
131
132
133
134
 
135
136
137
...
143
144
145
146
 
147
148
149
...
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
...
146
147
148
 
149
150
151
152
153
154
 
155
156
157
158
...
164
165
166
 
167
168
169
170
0
@@ -44,6 +44,27 @@
0
   puts %x{ xcodebuild -alltargets clean OBJROOT=build/ SYMROOT=build/ }
0
 end
0
 
0
+desc 'Install GitNub.app and nub'
0
+task :install => [:testdeps, :install_app, :install_nub]
0
+
0
+desc 'Install GitNub.app in /Applications'
0
+task :install_app => [:uninstall_app, "xcode:install:#{DEFAULT_TARGET}:#{RELEASE_CONFIGURATION}"]
0
+
0
+desc 'Install nub in /usr/local/bin/'
0
+task :install_nub do
0
+ exec("sudo", "cp", "nub", "/usr/local/bin/nub")
0
+end
0
+
0
+desc 'Uninstall /Applications/GitNub.app'
0
+task :uninstall_app do
0
+ # this is necessary for install_app, because Xcode, for some braindead reason,
0
+ # chmods the installed product a-w, so I can't overwrite or rm it
0
+ if File.exists?("/Applications/GitNub.app")
0
+ system("chmod", "-R", "u+w", "/Applications/GitNub.app")
0
+ system("rm", "-rf", "/Applications/GitNub.app")
0
+ end
0
+end
0
+
0
 desc "Add files to Xcode project"
0
 task :add do |t|
0
  files = ARGV[1..-1]
0
0
@@ -125,13 +146,13 @@
0
  targets = xcode_targets
0
  configs = xcode_configurations
0
 
0
- %w{build clean}.each do |action|
0
+ %w{build clean install}.each do |action|
0
    namespace "#{action}" do
0
 
0
      targets.each do |target|
0
        desc "#{action} #{target}"
0
        task "#{target}" do |t|
0
- puts %x{ xcodebuild -target '#{target}' #{action} OBJROOT=build/ SYMROOT=build/ }
0
+ puts %x{ xcodebuild -target '#{target}' #{action} OBJROOT=build/ SYMROOT=build/ DSTROOT=/ }
0
        end
0
 
0
        # alias the task above using a massaged name
0
@@ -143,7 +164,7 @@
0
          configs.each do |config|
0
            desc "#{action} #{target} #{config}"
0
            task "#{config}" do |t|
0
- puts %x{ xcodebuild -target '#{target}' -configuration '#{config}' #{action} SYMROOT=build/ OBJROOT=build/ }
0
+ puts %x{ xcodebuild -target '#{target}' -configuration '#{config}' #{action} SYMROOT=build/ OBJROOT=build/ DSTROOT=/ }
0
            end
0
          end
0
        end

Comments

    No one has commented yet.