u3d 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0c7e57e6b80d3937d00e39ce113ef2ba676983f
4
- data.tar.gz: 8000266d69992a3f6e33a51b869174b9f08d6cba
3
+ metadata.gz: a0c1e2820005f0cd8619bbf7a31012dae404676a
4
+ data.tar.gz: 296a26b08f4a9e31e77bf7e2eecc8fe949f042d9
5
5
  SHA512:
6
- metadata.gz: c71fa8f7124dcb6bd941feb32727c01e24b9b967c6c1a1065c05df1f779bbb058a94b196f0402f0dcf7df7341913302575026fc6403ff9573c8f6d9eea807147
7
- data.tar.gz: 135902654a913d2a7bdbce289a330d2bb9409ee07fd7df3d07c2b0f6c6de1bce8d89d161df2372d7fd5281acde8adb538b8af9378a9678f9e84f9b5910458e53
6
+ metadata.gz: 56e9c29febfd62bf0ccb7a3e33966a7100638b5583a84e7ca10f0a2f6ea0418325338ec5b78db23d8498b8f5a1442102ef85e452fbaab0c9d3bc4b93927f6b4a
7
+ data.tar.gz: b563408cdeade18fccaae5896c5d3f330a099a3d11534e672e3d41d8322c20c556a7e3ddecab4b86c0eecd60e7431ea02b20b3f8a45b1c1c2054628c6bfded61
@@ -1,4 +1,4 @@
1
- future-release=v1.0.11
1
+ future-release=v1.0.12
2
2
  since-tag=v0.9
3
3
  exclude_tags_regex=v0\.[0-8]\..*
4
- exclude-labels=nochangelog
4
+ exclude-labels=nochangelog,question
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Change Log
2
2
 
3
+ ## [v1.0.12](https://github.com/DragonBox/u3d/tree/v1.0.12) (2018-01-03)
4
+ [Full Changelog](https://github.com/DragonBox/u3d/compare/v1.0.11...v1.0.12)
5
+
6
+ **Implemented enhancements:**
7
+
8
+ - Incorrect package check downloads and reinstalls it [\#198](https://github.com/DragonBox/u3d/issues/198)
9
+
10
+ **Fixed bugs:**
11
+
12
+ - u3d/install enforce\_setup\_coherence interferes with download only operation [\#206](https://github.com/DragonBox/u3d/issues/206)
13
+ - Fix unity\_version argument of fastlane plugin u3d type [\#193](https://github.com/DragonBox/u3d/pull/193) ([niezbop](https://github.com/niezbop))
14
+
15
+ **Merged pull requests:**
16
+
17
+ - u3d/install: download only should not filter out already installed packages \(fixes \#206\) [\#208](https://github.com/DragonBox/u3d/pull/208) ([lacostej](https://github.com/lacostej))
18
+ - u3d/install: help fixes [\#207](https://github.com/DragonBox/u3d/pull/207) ([lacostej](https://github.com/lacostej))
19
+ - u3d/install: do not reinstall already installed packages [\#202](https://github.com/DragonBox/u3d/pull/202) ([niezbop](https://github.com/niezbop))
20
+ - u3d/install: describe how password can be passed to u3d \(fixes \#200\) [\#201](https://github.com/DragonBox/u3d/pull/201) ([lacostej](https://github.com/lacostej))
21
+
3
22
  ## [v1.0.11](https://github.com/DragonBox/u3d/tree/v1.0.11) (2017-12-07)
4
23
  [Full Changelog](https://github.com/DragonBox/u3d/compare/v1.0.10...v1.0.11)
5
24
 
@@ -9,6 +28,7 @@
9
28
 
10
29
  **Merged pull requests:**
11
30
 
31
+ - Preparing release for 1.0.11 [\#192](https://github.com/DragonBox/u3d/pull/192) ([lacostej](https://github.com/lacostej))
12
32
  - doc: explain CI setup with jenkins [\#191](https://github.com/DragonBox/u3d/pull/191) ([lacostej](https://github.com/lacostej))
13
33
  - u3d/run: fail with a proper message when opening a Unity4 project [\#187](https://github.com/DragonBox/u3d/pull/187) ([lacostej](https://github.com/lacostej))
14
34
 
@@ -22,7 +42,6 @@
22
42
  **Closed issues:**
23
43
 
24
44
  - u3d/install: confusing "-p not available on linux" message [\#181](https://github.com/DragonBox/u3d/issues/181)
25
- - Linux CLI Activation in Unity \>= 5.4 [\#176](https://github.com/DragonBox/u3d/issues/176)
26
45
  - u3d/install: already installed packages are reinstalled [\#161](https://github.com/DragonBox/u3d/issues/161)
27
46
 
28
47
  **Merged pull requests:**
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- u3d (1.0.11)
4
+ u3d (1.0.12)
5
5
  colored (>= 1.2, < 2.0.0)
6
6
  commander (>= 4.4.0, < 5.0.0)
7
7
  file-tail (>= 1.2.0)
@@ -57,7 +57,7 @@ module Fastlane
57
57
  env_name: "U3D_VERSION",
58
58
  description: "Unity version",
59
59
  optional: true,
60
- type: Array),
60
+ type: String),
61
61
  FastlaneCore::ConfigItem.new(key: :raw_logs,
62
62
  # env_name: "U3D_YOUR_OPTION",
63
63
  description: "Disable u3d log parsing",
data/lib/u3d/commands.rb CHANGED
@@ -311,36 +311,39 @@ module U3d
311
311
  nil
312
312
  end
313
313
 
314
+ # rubocop:disable Metrics/BlockNesting
314
315
  def enforce_setup_coherence(packages, options, unity, definition)
315
316
  if options[:all]
316
317
  packages.clear
317
318
  packages.concat(definition.available_packages)
318
319
  end
319
- if unity
320
- UI.important "Unity #{unity.version} is already installed"
321
- # Not needed since Linux custom u3d files contain only one entry wich is Unity
322
- # return false if definition.os == :linux
323
- if packages.include?('Unity')
324
- UI.important 'Ignoring Unity module, it is already installed'
325
- packages.delete('Unity')
326
-
327
- # FIXME: Move me to the WindowsInstaller
328
- options[:installation_path] ||= unity.root_path if definition.os == :win
329
- end
330
- if unity.packages
331
- unity.packages.each do |pack|
332
- UI.important "Ignoring #{pack} module, it is already installed" if packages.delete(pack)
320
+ if options[:install]
321
+ if unity
322
+ UI.important "Unity #{unity.version} is already installed"
323
+ # Not needed since Linux custom u3d files contain only one entry wich is Unity
324
+ # return false if definition.os == :linux
325
+ if packages.include?('Unity')
326
+ UI.important 'Ignoring Unity module, it is already installed'
327
+ packages.delete('Unity')
328
+
329
+ # FIXME: Move me to the WindowsInstaller
330
+ options[:installation_path] ||= unity.root_path if definition.os == :win
331
+ end
332
+ packages.select { |pack| unity.package_installed?(pack) }.each do |pack|
333
+ packages.delete pack
334
+ UI.important "Ignoring #{pack} module, it is already installed"
335
+ end
336
+ return false if packages.empty?
337
+ else
338
+ unless packages.include?('Unity')
339
+ UI.error 'Please install Unity before any of its packages'
340
+ return false
333
341
  end
334
- end
335
- return false if packages.empty?
336
- else
337
- unless packages.include?('Unity')
338
- UI.error 'Please install Unity before any of its packages'
339
- return false
340
342
  end
341
343
  end
342
344
  true
343
345
  end
346
+ # rubocop:enable Metrics/BlockNesting
344
347
 
345
348
  def get_administrative_privileges(options)
346
349
  U3dCore::Globals.use_keychain = true if options[:keychain] && Helper.mac?
@@ -122,8 +122,8 @@ Fore more information about how the rules work, see https://github.com/DragonBox
122
122
  end
123
123
 
124
124
  command :install do |c|
125
- c.syntax = 'u3d install [<version>] [ [-p | --packages <package> ...] | [-a | --all] ] [ [-n | --no_install] [-i | --installation_path <path>] ]'
126
- c.summary = "Download (and/or) install Unity3D packages."
125
+ c.syntax = 'u3d install [<version>] [ [-p | --packages <package1>,<package2> ...] | [-a | --all] ] [--[no-]download] [ [--[no-]install] [-i | --installation_path <path>] ]'
126
+ c.summary = "Download (and/or) install Unity3D editor packages."
127
127
  c.description = %(
128
128
  #{c.summary}
129
129
 
@@ -131,15 +131,19 @@ This command allows you to either:
131
131
  * download and install packages
132
132
  * download packages but not install them
133
133
  * install already downloaded packages
134
+
135
+ Already installed packages are skipped if asked to be installed again (except for the 'Example' package).
134
136
  )
135
137
  c.option '--[no-]download', 'Perform or not downloading before installation. Downloads by default'
136
138
  c.option '--[no-]install', 'Perform or not installation after downloading. Installs by default'
137
139
  c.option '-p', '--packages PACKAGES', Array, 'Specifies which packages to download/install. Overriden by --all'
138
140
  c.option '-a', '--all', 'Download all available packages. Overrides -p'
139
- c.option '-X', '--installation_path PATH', String, 'Specifies where package(s) will be downloaded/installed. Conflicts with --no-install'
141
+ c.option '-i', '--installation_path PATH', String, 'Specifies where package(s) will be downloaded/installed. Conflicts with --no-install'
140
142
  c.option '-k', '--keychain', 'Gain privileges right through the keychain. [OSX only]'
141
143
  c.example 'Download and install Unity, its Documentation and the Android build support and install them for version 5.1.2f1', 'u3d install 5.1.2f1 -p Unity,Documentation,Android'
142
144
  c.example "The 'version' argument can be a specific version number, such as 5.6.1f1, or an alias in [#{Commands.release_letter_mapping.keys.join(', ')}]. If not specified, u3d will download the unity version for the current project", 'u3d install latest'
145
+ c.example "The admin password can be passed through the U3D_PASSWORD environment variable.", 'U3D_PASSWORD=mysecret u3d install a_version'
146
+ c.example "On Mac, the admin password can be fetched from (and stored into) the keychain.", 'u3d install -k a_version'
143
147
  c.action do |args, options|
144
148
  options.default all: false
145
149
  options.default install: true
@@ -29,6 +29,24 @@ module U3d
29
29
  class Installation
30
30
  attr_reader :root_path
31
31
 
32
+ NOT_PLAYBACKENGINE_PACKAGES = %w[Documentation StandardAssets MonoDevelop].freeze
33
+ PACKAGE_ALIASES =
34
+ {
35
+ 'Android' => [],
36
+ 'iOS' => ['iPhone'],
37
+ 'AppleTV' => ['tvOS'],
38
+ 'Linux' => ['StandaloneLinux'],
39
+ 'Mac' => %w[StandaloneOSXIntel StandaloneOSXIntel64 StandaloneOSX],
40
+ 'Windows' => ['StandaloneWindows'],
41
+ 'Metro' => [],
42
+ 'UWP-IL2CPP' => [],
43
+ 'Samsung-TV' => [],
44
+ 'Tizen' => [],
45
+ 'WebGL' => [],
46
+ 'Facebook-Games' => ['Facebook'],
47
+ 'Vuforia-AR' => ['UnityExtensions']
48
+ }.freeze
49
+
32
50
  def initialize(root_path: nil, path: nil)
33
51
  @root_path = root_path
34
52
  @path = path
@@ -44,6 +62,22 @@ module U3d
44
62
  WindowsInstallation.new(root_path: root_path, path: path)
45
63
  end
46
64
  end
65
+
66
+ def packages
67
+ false
68
+ end
69
+
70
+ def package_installed?(package)
71
+ return true if (packages || []).include?(package)
72
+
73
+ aliases = PACKAGE_ALIASES[package]
74
+
75
+ # If no aliases for the package are found, then it's a new package not yet known by Unity
76
+ # If the exact name doesn't match then we have to suppose it's not installed
77
+ return false unless aliases
78
+
79
+ return !(aliases & packages).empty?
80
+ end
47
81
  end
48
82
 
49
83
  class PlaybackEngineUtils
@@ -90,8 +124,26 @@ module U3d
90
124
  end
91
125
 
92
126
  def packages
93
- PlaybackEngineUtils.list_module_configs(root_path).map do |mpath|
94
- PlaybackEngineUtils.module_name(mpath)
127
+ pack = []
128
+ PlaybackEngineUtils.list_module_configs(root_path).each do |mpath|
129
+ pack << PlaybackEngineUtils.module_name(mpath)
130
+ end
131
+ NOT_PLAYBACKENGINE_PACKAGES.each do |module_name|
132
+ pack << module_name unless Dir[module_name_pattern(module_name)].empty?
133
+ end
134
+ pack
135
+ end
136
+
137
+ def module_name_pattern(module_name)
138
+ case module_name
139
+ when 'Documentation'
140
+ return "#{root_path}/Documentation/"
141
+ when 'StandardAssets'
142
+ return "#{root_path}/Standard Assets/"
143
+ when 'MonoDevelop'
144
+ return "#{root_path}/MonoDevelop.app/"
145
+ else
146
+ UI.crash! "No pattern is known for #{module_name} on Mac"
95
147
  end
96
148
  end
97
149
 
@@ -137,10 +189,6 @@ module U3d
137
189
  @root_path || @path
138
190
  end
139
191
 
140
- def packages
141
- false
142
- end
143
-
144
192
  def clean_install?
145
193
  !(root_path =~ UNITY_DIR_CHECK_LINUX).nil?
146
194
  end
@@ -179,8 +227,26 @@ module U3d
179
227
 
180
228
  def packages
181
229
  path = "#{root_path}/Editor/Data/"
182
- PlaybackEngineUtils.list_module_configs(path).map do |mpath|
183
- PlaybackEngineUtils.module_name(mpath)
230
+ pack = []
231
+ PlaybackEngineUtils.list_module_configs(path).each do |mpath|
232
+ pack << PlaybackEngineUtils.module_name(mpath)
233
+ end
234
+ NOT_PLAYBACKENGINE_PACKAGES.each do |module_name|
235
+ pack << module_name unless Dir[module_name_pattern(module_name)].empty?
236
+ end
237
+ pack
238
+ end
239
+
240
+ def module_name_pattern(module_name)
241
+ case module_name
242
+ when 'Documentation'
243
+ return "#{root_path}/Editor/Data/Documentation/"
244
+ when 'StandardAssets'
245
+ return "#{root_path}/Editor/Standard Assets/"
246
+ when 'MonoDevelop'
247
+ return "#{root_path}/MonoDevelop/"
248
+ else
249
+ UI.crash! "No pattern is known for #{module_name} on Windows"
184
250
  end
185
251
  end
186
252
 
data/lib/u3d/version.rb CHANGED
@@ -21,7 +21,7 @@
21
21
  ## --- END LICENSE BLOCK ---
22
22
 
23
23
  module U3d
24
- VERSION = '1.0.11'.freeze
24
+ VERSION = '1.0.12'.freeze
25
25
  DESCRIPTION = 'Provides numerous tools for installing, managing and running the Unity3D game engine from command line.'.freeze
26
26
  UNITY_VERSIONS_NOTE = "Unity3d uses the following version formatting: 0.0.0x0. The \'x\' can takes different values:\n"\
27
27
  "\t. 'f' are the main release candidates for Unity3d\n"\
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: u3d
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerome Lacoste
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-12-07 00:00:00.000000000 Z
12
+ date: 2018-01-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: commander