limited_build_works 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 87421a7800b22577f94eed35180bcc83352be515
4
+ data.tar.gz: 883fb953984caef0440b5f03acb9ba095d1cd54e
5
+ SHA512:
6
+ metadata.gz: 4545d8d787dcf965d27ffa28ba822203f2b391dc9dd7d2fe20fd8df2332e51bbb4571689cad0dd783e4976b6d5cf3a76189ef7617bbedb624bd0068b61da13c5
7
+ data.tar.gz: f0cad0fb75b39f206f33ee952201e27a861032645dc16a0452f29acb35f25b3fde0ca39cc1c1a5c02dd2eab435c364230163e43dd68ce76daea1b65ebe24ec79
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in limited_build_works.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # LimitedBuildWorks
2
+
3
+ Limited Build Works.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'limited_build_works'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install limited_build_works
20
+
21
+ ## Usage
22
+
23
+ TODO
24
+
25
+ ## Contributing
26
+
27
+ Bug reports and pull requests are welcome on GitHub at https://github.com/liveralmask/limited_build_works.
28
+
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "limited_build_works"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,3 @@
1
+ module LimitedBuildWorks
2
+ VERSION = "0.0.2"
3
+ end
@@ -0,0 +1,66 @@
1
+ require "ult"
2
+
3
+ module LimitedBuildWorks
4
+ module Xcode
5
+ extend self
6
+
7
+ def build( options = {}, action = "" )
8
+ option_strings = []
9
+ options.each{|key, value|
10
+ option_strings.push "#{key} #{value}"
11
+ }
12
+ Ult.execute( "xcodebuild #{option_strings.join( ' ' )} #{action}" )
13
+ end
14
+
15
+ def build_ios_arch( project, target, configuration, output_dir, arch, add_options = {} )
16
+ case arch
17
+ when /arm*/
18
+ sdk = "iphoneos"
19
+ when "i386", "x86_64"
20
+ sdk = "iphonesimulator"
21
+ else
22
+ puts "Unknown arch=#{arch}"
23
+ return ""
24
+ end
25
+
26
+ options = {
27
+ "-project" => project,
28
+ "-target" => target,
29
+ "-configuration" => configuration,
30
+ "-sdk" => sdk,
31
+ "-arch" => arch,
32
+ }
33
+ action = "clean build CONFIGURATION_BUILD_DIR=#{output_dir}/#{arch}"
34
+ status, outputs, errors, command = build( options.merge( add_options ), action )
35
+ puts "[#{arch}] #{command}"
36
+ if 0 == status
37
+ outputs.each{|line|
38
+ return $2 if /^(Libtool|Ld)\s(.+?)\s/ =~ line
39
+ }
40
+ else
41
+ puts errors
42
+ end
43
+ ""
44
+ end
45
+
46
+ def build_ios_archs( project, target, configuration, output_dir, archs, add_options = {} )
47
+ results = []
48
+ archs.each{|arch|
49
+ result = build_ios_arch( project, target, configuration, output_dir, arch, add_options )
50
+ return "" if ! Ult.file?( result )
51
+
52
+ results.push result
53
+ }
54
+ lipo_create( "#{output_dir}/#{Ult.filename( results[ 0 ] )}", results )
55
+ end
56
+
57
+ def lipo_create( dst, srcs )
58
+ status, outputs, errors, command = Ult.execute( "lipo -create #{srcs.join( ' ' )} -output #{dst}" )
59
+ return dst if 0 == status
60
+
61
+ puts command
62
+ puts errors
63
+ ""
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,2 @@
1
+ require "limited_build_works/version"
2
+ require "limited_build_works/xcode"
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'limited_build_works/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "limited_build_works"
8
+ spec.version = LimitedBuildWorks::VERSION
9
+ spec.authors = ["liveralmask"]
10
+ spec.email = ["liveralmask.lisk@gmail.com"]
11
+
12
+ spec.summary = %q{Limited Build Works.}
13
+ spec.description = %q{Limited Build Works.}
14
+ spec.homepage = "https://github.com/liveralmask/limited_build_works"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.11"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+
24
+ spec.add_runtime_dependency "ult"
25
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: limited_build_works
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - liveralmask
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-01-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.11'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.11'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: ult
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Limited Build Works.
56
+ email:
57
+ - liveralmask.lisk@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - README.md
65
+ - Rakefile
66
+ - bin/console
67
+ - bin/setup
68
+ - lib/limited_build_works.rb
69
+ - lib/limited_build_works/version.rb
70
+ - lib/limited_build_works/xcode.rb
71
+ - limited_build_works.gemspec
72
+ homepage: https://github.com/liveralmask/limited_build_works
73
+ licenses: []
74
+ metadata: {}
75
+ post_install_message:
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubyforge_project:
91
+ rubygems_version: 2.4.5.1
92
+ signing_key:
93
+ specification_version: 4
94
+ summary: Limited Build Works.
95
+ test_files: []