Procházet zdrojové kódy

Enhance scaffolding task to show real path after new project creation.

Yao Wei Tjong 姚伟忠 před 12 roky
rodič
revize
9cf8e75597
1 změnil soubory, kde provedl 6 přidání a 4 odebrání
  1. 6 4
      Rakefile

+ 6 - 4
Rakefile

@@ -1,14 +1,16 @@
-require "rubygems"
+require 'pathname'
 
 
 # Usage: rake scaffolding dir=/path/to/new/project/root
 # Usage: rake scaffolding dir=/path/to/new/project/root
 desc 'Create a new project using Urho3D as external library'
 desc 'Create a new project using Urho3D as external library'
 task :scaffolding do
 task :scaffolding do
   abort 'Usage: rake scaffolding dir=/path/to/new/project/root' unless ENV['dir']
   abort 'Usage: rake scaffolding dir=/path/to/new/project/root' unless ENV['dir']
-  scaffolding ENV['dir']
-  puts "\nNew project created in #{ENV['dir']}\n\n"
+  abs_path = ENV['dir'][0, 1] == '/' ? ENV['dir'] : "#{Dir.pwd}/#{ENV['dir']}"
+  scaffolding abs_path
+  abs_path = Pathname.new(abs_path).realpath
+  puts "\nNew project created in #{abs_path}\n\n"
   puts "To build the new project, you may need to first define and export either 'URHO3D_HOME' or 'URHO3D_INSTALL_PREFIX' environment variable"
   puts "To build the new project, you may need to first define and export either 'URHO3D_HOME' or 'URHO3D_INSTALL_PREFIX' environment variable"
   puts "Please see http://urho3d.github.io/documentation/a00004.html for more detail. For example:\n\n"
   puts "Please see http://urho3d.github.io/documentation/a00004.html for more detail. For example:\n\n"
-  puts "$ URHO3D_HOME=#{Dir.pwd}; export URHO3D_HOME\n$ cd #{ENV['dir']}\n$ ./cmake_gcc.sh -DENABLE_64BIT=1\n$ cd Build\n$ make\n\n"
+  puts "$ URHO3D_HOME=#{Dir.pwd}; export URHO3D_HOME\n$ cd #{abs_path}\n$ ./cmake_gcc.sh -DENABLE_64BIT=1 -DENABLE_LUA=1\n$ cd Build\n$ make\n\n"
 end
 end
 
 
 # Usage: NOT intended to be used manually (if you insist then try: rake travis_ci)
 # Usage: NOT intended to be used manually (if you insist then try: rake travis_ci)