unienv 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1bf2d5066cc98ab7550b4f0213b38586220e356
4
- data.tar.gz: 3a477c56384902fe0b8019f9bfe7244637ac1f4d
3
+ metadata.gz: 711640c714756365de4e5fef2368bd9948b13ee3
4
+ data.tar.gz: ffb2fb627cc72e65fda973ef8803cce85d9ec72d
5
5
  SHA512:
6
- metadata.gz: adc3527184afd602f97a3a65a55a4d44df8a768da36da66a09159f6e30eb3a3cf8061c9bbe8d1219d3b5d17e9bd3171b26492a0526b1719f994627a08a750bc4
7
- data.tar.gz: 755a6a2e53d6bc03f6e09d0813b34fbe03b5baeb1cd702949e71fa3c855e00cb872e69b9a0ba0b3ef73de61970fdb2e788e976ffd5a1389a86c02c63a3c593b1
6
+ metadata.gz: 3a94bc02e7a87717ecdc9ff55e9869f559f883b31b356734440e8178b05e805293d17de8030b1af0cfc8897236946194020075671dde95e385b4890c30028b01
7
+ data.tar.gz: 317a88ebe02dd2c3746e05b5dacc8026d76c337339a094e0b199b196ec8775f9a09a5746e2b57398434d255474dda8f76dfd2d3ba59791817990bdc78b45771a
data/bin/unienv CHANGED
@@ -15,8 +15,10 @@ program :version, UniEnv::VERSION
15
15
  program :description, 'Unity Environment Helper'
16
16
  program :help_formatter, :compact
17
17
 
18
+ UniEnv.clean_tmpdir
19
+
18
20
  global_option('--verbose', 'VERBOSE') { $verbose = true }
19
- global_option('--clean', 'CLEAN CACHE') { UniEnv.clean_tmpdir }
21
+ #global_option('--clean', 'CLEAN CACHE') { UniEnv.clean_tmpdir }
20
22
  #global_option('-p', '--project PATH', 'specify Unity project path') { |path| $project_path = path }
21
23
  #global_option('-u', '--unity PATH', 'specify Unity application path') { |path| $unity_app_path = path }
22
24
 
@@ -1,4 +1,22 @@
1
1
  version:
2
+ 5.3.0f2:
3
+ editor: http://beta.unity3d.com/download/ceb02979c32c/MacEditorInstaller/Unity-5.3.0f2.pkg
4
+ standard_assets: http://beta.unity3d.com/download/ceb02979c32c/MacStandardAssetsInstaller/StandardAssets-5.3.0f2.pkg
5
+ mac: http://beta.unity3d.com/download/ceb02979c32c/MacEditorTargetInstaller/UnitySetup-Mac-Support-for-Editor-5.3.0f2.pkg
6
+ webgl: http://beta.unity3d.com/download/ceb02979c32c/MacEditorTargetInstaller/UnitySetup-WebGL-Support-for-Editor-5.3.0f2.pkg
7
+ ios: http://beta.unity3d.com/download/ceb02979c32c/MacEditorTargetInstaller/UnitySetup-iOS-Support-for-Editor-5.3.0f2.pkg
8
+ android: http://beta.unity3d.com/download/ceb02979c32c/MacEditorTargetInstaller/UnitySetup-Android-Support-for-Editor-5.3.0f2.pkg
9
+ 5.3.0f1:
10
+ editor: http://beta.unity3d.com/download/b948b362cb65/MacEditorInstaller/Unity-5.3.0f1.pkg
11
+ standard_assets: http://beta.unity3d.com/download/b948b362cb65/MacStandardAssetsInstaller/StandardAssets-5.3.0f1.pkg
12
+ ios: http://beta.unity3d.com/download/b948b362cb65/MacEditorTargetInstaller/UnitySetup-iOS-Support-for-Editor-5.3.0f1.pkg
13
+ android: http://beta.unity3d.com/download/b948b362cb65/MacEditorTargetInstaller/UnitySetup-Android-Support-for-Editor-5.3.0f1.pkg
14
+ 5.3.0b6:
15
+ editor: http://beta.unity3d.com/download/46b1550107d8/MacEditorInstaller/Unity-5.3.0b6.pkg
16
+ standard_assets: http://beta.unity3d.com/download/46b1550107d8/MacStandardAssetsInstaller/StandardAssets-5.3.0b6.pkg
17
+ 5.2.2p4:
18
+ editor: http://beta.unity3d.com/download/93d0b2db7c56/MacEditorInstaller/Unity-5.2.2p4.pkg
19
+ standard_assets: http://beta.unity3d.com/download/93d0b2db7c56/MacStandardAssetsInstaller/StandardAssets-5.2.2p4.pkg
2
20
  5.2.2p3:
3
21
  editor: http://beta.unity3d.com/download/75b999ee8bfd/MacEditorInstaller/Unity-5.2.2p3.pkg
4
22
  standard_assets: http://beta.unity3d.com/download/75b999ee8bfd/MacStandardAssetsInstaller/StandardAssets-5.2.2p3.pkg
@@ -1,3 +1,3 @@
1
1
  module UniEnv
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
data/lib/unienv.rb CHANGED
@@ -72,11 +72,14 @@ module UniEnv
72
72
  end
73
73
  vers
74
74
  end
75
+ def self.uri(config, type, version)
76
+ config['version'][version][type]
77
+ end
75
78
  def self.editor_uri(config, version)
76
- config['version'][version]['editor']
79
+ url(config, 'editor', version)
77
80
  end
78
81
  def self.standard_assets_uri(config, version)
79
- config['version'][version]['standard_assets']
82
+ url(config, 'standard_assets', version)
80
83
  end
81
84
 
82
85
  def self.tmpdir
@@ -202,6 +205,8 @@ end
202
205
  command :install do |c|
203
206
  c.syntax = 'unienv install [version]'
204
207
  c.summary = 'install specified version'
208
+ c.option '--ios', 'install target support for iOS'
209
+ c.option '--android', 'install target support for Android'
205
210
  c.action do |args, options|
206
211
  if ENV['USER'] != 'root'
207
212
  raise "please execute by su"
@@ -213,25 +218,19 @@ command :install do |c|
213
218
  version = candidates[0]
214
219
 
215
220
  UniEnv.make_tmpdir
216
- editor_cache = UniEnv.find_editor_cache(version)
217
- standard_assets_cache = UniEnv.find_standard_assets_cache(version)
218
- if editor_cache.empty?
219
- UniEnv.download(UniEnv.editor_uri(config, version), UniEnv.make_editor_cache_path(version))
220
- editor_cache = UniEnv.find_editor_cache(version)
221
+ list = []
222
+ list << ['editor', UniEnv.make_editor_cache_path(version)]
223
+ list << ['standard_assets', UniEnv.make_standard_assets_cache_path(version)]
224
+ list << ['mac', UniEnv.make_cache_path('mac', version)]
225
+ list << ['webgl', UniEnv.make_cache_path('webgl', version)]
226
+ list << ['ios', UniEnv.make_cache_path('ios', version)] if options.ios
227
+ list << ['android', UniEnv.make_cache_path('android', version)] if options.android
228
+ list.each do |l|
229
+ UniEnv.download(UniEnv.uri(config, l[0], version), l[1])
221
230
  end
222
- if standard_assets_cache.empty?
223
- UniEnv.download(UniEnv.standard_assets_uri(config, version), UniEnv.make_standard_assets_cache_path(version))
224
- standard_assets_cache = UniEnv.find_standard_assets_cache(version)
231
+ list.each do |l|
232
+ UniEnv.sh "installer -package #{l[1]} -target /"
225
233
  end
226
-
227
- #p editor_cache
228
- #p standard_assets_cache
229
- #p candidates
230
- #UniEnv.clean_tmpdir(tmppath)
231
-
232
- UniEnv.sh "installer -package #{editor_cache[0]} -target /"
233
- UniEnv.sh "installer -package #{standard_assets_cache[0]} -target /"
234
-
235
234
  FileUtils.mv("/Applications/Unity", "/Applications/Unity#{version}")
236
235
  end
237
236
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unienv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - fum1h1ro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-06 00:00:00.000000000 Z
11
+ date: 2015-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler