Commit Graph

99 Commits

Author SHA1 Message Date
Watson
4304aaadc9 fix a regression of 5a39c5f381 2013-05-03 05:31:31 +09:00
Watson
0c10064426 refactor 2013-04-30 01:24:30 +09:00
Watson
0410711198 more fix in detecting file dependencies
if add the constant name into @defined and @referred in #on_const_path_ref,
it might not detect dependencies.
2013-04-29 22:05:28 +09:00
Watson
8591584570 make sure to create a Resources directory for mac
Fix the following error:

$ motion create hello --template=osx
$ cd hello
$ rm -rf resources
$ rake
     Build ./build/MacOSX-10.8-Development
   Compile ./app/app_delegate.rb
   Compile ./app/menu.rb
    Create ./build/MacOSX-10.8-Development/hello.app/Contents
    Create ./build/MacOSX-10.8-Development/hello.app/Contents/MacOS
      Link ./build/MacOSX-10.8-Development/hello.app/Contents/MacOS/hello
    Create ./build/MacOSX-10.8-Development/hello.app/Contents/Info.plist
    Create ./build/MacOSX-10.8-Development/hello.app/Contents/PkgInfo
rake aborted!
No such file or directory - ./build/MacOSX-10.8-Development/hello.app/Contents/Resources
2013-04-29 12:28:09 +09:00
Watson
027df612ab Revert "make sure to create a Resources directory for mac"
This reverts commit 71ed8ce9b3.

This changing causes the following error:
% mkdir -p resources/en.lproj
% touch resources/en.lproj/InfoPlist.strings
% rake
     Build ./build/iPhoneSimulator-6.1-Development
   Compile ./app/app_delegate.rb
    Create ./build/iPhoneSimulator-6.1-Development/tt.app
      Link ./build/iPhoneSimulator-6.1-Development/tt.app/tt
    Create ./build/iPhoneSimulator-6.1-Development/tt.app/Info.plist
    Create ./build/iPhoneSimulator-6.1-Development/tt.app/PkgInfo
      Copy ./resources/Default-568h@2x.png
      Copy ./resources/en.lproj/InfoPlist.strings
rake aborted!
2013-04-29 12:25:56 +09:00
Watson
2bbc2752cd forget to add a passing argument into another build_file.call 2013-04-28 20:23:28 +09:00
Watson
71ed8ce9b3 make sure to create a Resources directory for mac
Fix the following error:

$ motion create hello --template=osx
$ cd hello
$ rm -rf resources
$ rake
     Build ./build/MacOSX-10.8-Development
   Compile ./app/app_delegate.rb
   Compile ./app/menu.rb
    Create ./build/MacOSX-10.8-Development/hello.app/Contents
    Create ./build/MacOSX-10.8-Development/hello.app/Contents/MacOS
      Link ./build/MacOSX-10.8-Development/hello.app/Contents/MacOS/hello
    Create ./build/MacOSX-10.8-Development/hello.app/Contents/Info.plist
    Create ./build/MacOSX-10.8-Development/hello.app/Contents/PkgInfo
rake aborted!
No such file or directory - ./build/MacOSX-10.8-Development/hello.app/Contents/Resources
2013-04-27 11:02:12 +09:00
Watson
872683e177 pass the build directory as block parameter
Proc does not introduce a variable as Proc's scope.
When build process is worked in parallel, the value of the variable is updated in the another build process.
2013-04-27 10:05:23 +09:00
Watson
fcd144d3a9 fix a bug in detecting file dependencies which cannot detect dependency when declare class/module with like "class XXX::YYY"
use @defined :
	module XXX::YYY
	    ...
	end

use @referred :
	class ZZZ
	  include XXX::YYY
	    ...
	end

add the value to @defined and @referred both,
because build system will cut the cyclic references.
2013-04-26 23:03:51 +09:00
Watson
6f48fd5d0b change the build directory for outside files of project
This changing will introduce:

1. When run 'rake clean', the object files of gem is not removed. To reduce the time when rebuild the project.
2. Across multiple projects that use the same gem, this changing will share the object files.
3. When update RubyMotion with 'motion update', it will remove the object files to clean up disk space.
2013-04-25 22:23:19 +09:00
Watson
c3574eb3c2 use i386 binary Ruby when build app for ARM 2013-04-25 17:35:37 +09:00
Laurent Sansonetti
105a915f3d mac port 2013-04-25 02:26:56 +02:00
Watson
cd5f87bfac fix a bug in build system where it would cause "stack level too deep" error
http://hipbyte.myjetbrains.com/youtrack/issue/RM-112

1) specify file dependencies in Rakefile with `app.files_dependencies' by user.
2) detect file dependencies by build system

When merge 1) and 2), it might cause a cyclic references.
So, we will use 1) to detect cyclic references.
2013-04-22 23:48:09 +09:00
Watson
34e50e9036 display error message if does not exist spec files in spec directory
http://hipbyte.myjetbrains.com/youtrack/issue/RM-90
2013-04-13 14:24:29 +09:00
Watson
61b94316f3 pass "-ObjC" flags to linker to load Objective-C class when "-force_load" is not used 2013-03-16 14:44:09 +09:00
Watson
4d5215a07c add :force_load option into configuration of `app.vendor_project'
There are 3rd-party library which would trigger "duplicate symbol" error at compile time.
It will be useful in such libraries when specify false in :force_load option.

When specify true in this option (by default), it behaves in the same manner as before.

Usage:
    app.vendor_project('vendor/OAuth2Client',
      :static,
      :force_load => false,
      :headers_dir => 'Sources/OAuth2Client'
      ....
2013-03-15 11:05:17 +09:00
Watson
95b6055b67 rename method 2013-02-28 09:02:30 +09:00
Watson
a24596e830 fix a bug in build system which updated resource files are not copied 2013-02-27 23:34:38 +09:00
Watson
1466028bac slightly delay the start of spec execution
Because #tap method does not work when use a high performance machine
2013-02-26 13:51:09 +09:00
Watson
b17e5bb7e4 `app.resources_dir' will be deprecated 2013-02-26 01:00:51 +09:00
Watson
505926d12e fix variable name 2013-02-25 15:56:22 +09:00
Watson
a160a13cc1 add a feature to support multiple resource directories
change `app.resources_dir' to accept an Array too, like:

    app.resources_dir = ["resources", "vendor/GoogleMaps.framework/Resources"]
2013-02-25 15:45:02 +09:00
Watson
771b42c674 convert a string encoding which retrieved from filesystem
The OSX filesystem uses UTF8-MAC as file name encoding.
Its encoding has a character that does not match UTF-8 encoding.
(ex, "が" in Japanese)
2013-02-10 02:19:15 +09:00
Watson
a55a36b177 slightly delay the start of spec execution
Because #tap method does not work when use a high performance machine
2013-02-07 16:26:09 +09:00
Watson
1132ae6ff7 fix a bug which cannot detecting file dependencies when include a nesting class
This patch will fix https://gist.github.com/4160705
2012-11-28 23:57:50 +09:00
Watson
96f39d66ea fix a build error when app files is not passed as flat array. 2012-11-17 18:18:51 +09:00
Watson
3992f8e92c remove cyclic dependencies to fix a `stack level too deep' 2012-11-17 14:28:23 +09:00
Watson
5a39c5f381 fix a bug in detection dependency which ignore definition of constants
The files that contains only constants (like a configuration file) have been ignored in detection dependency.

	$ cat app/config.rb
	USER_NAME = "Watson"
	MAIL = "watson1978@gmail.com"
2012-11-17 12:34:15 +09:00
Watson
7abb10940c fix the load path to load ripper for Ruby 1.8 2012-11-14 11:50:07 +09:00
Watson
ec7f3be3f8 add detect_dependencies variable to resolve file dependencies 2012-11-11 10:02:35 +09:00
Watson
06c1b597ea use ripper gem if use Ruby18 2012-11-10 21:52:34 +09:00
Watson
b39797250f add the feature to resolve file dependencies 2012-11-10 21:22:35 +09:00
Watson
a40ca882c8 please not remove my patch for framework_search_paths which added in 6c43a2807c 2012-10-11 17:23:10 +09:00
Laurent Sansonetti
696683b104 define RUBYMOTION_VERSION 2012-10-09 14:12:31 +02:00
Laurent Sansonetti
25cd38f010 load UIAutomation dynamically, add 'spec:device' task which runs the specs on the device 2012-10-06 16:20:02 +02:00
Laurent Sansonetti
d07c72ef49 Merge branch 'master' of github.com:lrz/RubyMotion 2012-10-06 15:49:22 +02:00
Laurent Sansonetti
a0f8ec2698 fix 'rake static' on ios 6 2012-10-06 15:46:58 +02:00
Watson
6c43a2807c add framework_search_paths property 2012-10-06 19:54:13 +09:00
Laurent Sansonetti
b68775875e fix the 'nm' invocation to quote the object path 2012-09-25 18:26:27 +02:00
Laurent Sansonetti
b95dda68d1 only strip symbols in distribution mode (because it breaks the repl module otherwise) 2012-09-19 16:39:40 +02:00
Laurent Sansonetti
c41ffd4bd8 the build mode can now be specified using the 'mode 2012-09-19 15:09:12 +02:00
Laurent Sansonetti
15673529c2 always expand paths of object files 2012-09-18 02:29:03 +02:00
Laurent Sansonetti
ce0b980148 no longer rebuild .rb files in case the project Rakefile changed 2012-09-03 13:41:04 +02:00
Laurent Sansonetti
20cb82e731 fix nested xib/storyboard files 2012-09-01 20:33:30 +02:00
Laurent Sansonetti
86db0b48b1 create the static library with an object file index 2012-08-14 22:12:27 +02:00
Laurent Sansonetti
d6db98c4a5 Grab files within symlinks inside of the resources directory when copying over resources 2012-07-05 16:33:27 +02:00
Laurent Sansonetti
bcf40d8266 added weak frameworks support 2012-07-05 16:23:16 +02:00
Laurent Sansonetti
4076c4bf72 fix compilation of spec launcher 2012-07-05 15:53:40 +02:00
Laurent Sansonetti
2edd313f81 static library support 2012-07-01 23:47:55 +02:00
Laurent Sansonetti
b912e39f66 introduce RUBYMOTION_ENV variable 2012-06-29 16:23:47 +02:00