u3d 1.0.18 → 1.0.19

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: b9238d65caf5c8cd801183c0026863160a1a1441
4
- data.tar.gz: fafc5dfb82ddc9ffea6f2a41d062514dd625b861
3
+ metadata.gz: 8f69304001a1ba0ebd4324ddfdac8013dbd36dfe
4
+ data.tar.gz: bc9b22bb8dbce826877de47fcf5a96138415d9c1
5
5
  SHA512:
6
- metadata.gz: 0420a044e314bb6aeaeed0dd58cef0549d6b51f87daa65849315d5d12a6dda96bff473cb1c3db6a93af813925de69d91a17b14fece0130131fa06c5cf86730a9
7
- data.tar.gz: 773144d01f6966c29a9b42342b3106c36e3c8c3d858aabce7fe503ecbad2ef195bcb6c5711962d02f4990541678dfadead0025e2d385956fabb54a35cc4cd39a
6
+ metadata.gz: 5592d48d01dde17b76155b4d75243e5e3f5c5cfc06bda7240b205437c2aaa1fb5a7764182369f4cbd297934d962b35cafc8bb0175d47f9c1b9627d90f02ab2ce
7
+ data.tar.gz: 8dfbcc646715e7891f420005e8acd8bb7f7486fd97b8a7f559c653173e103a27165ff33a5070385a2e6a9e7e8462db99479093970eb740e17ff68e5afeb00748
@@ -1,4 +1,4 @@
1
- future-release=v1.0.18
1
+ future-release=v1.0.19
2
2
  since-tag=v0.9
3
3
  exclude_tags_regex=v0\.[0-8]\..*
4
4
  exclude-labels=nochangelog,question
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Change Log
2
2
 
3
+ ## [v1.0.19](https://github.com/DragonBox/u3d/tree/v1.0.19) (2018-03-09)
4
+ [Full Changelog](https://github.com/DragonBox/u3d/compare/v1.0.18...v1.0.19)
5
+
6
+ **Implemented enhancements:**
7
+
8
+ - u3d: standardize log and descriptions [\#263](https://github.com/DragonBox/u3d/pull/263) ([niezbop](https://github.com/niezbop))
9
+
10
+ **Merged pull requests:**
11
+
12
+ - u3d/licenses: add feature to display licenses [\#262](https://github.com/DragonBox/u3d/pull/262) ([lacostej](https://github.com/lacostej))
13
+
3
14
  ## [v1.0.18](https://github.com/DragonBox/u3d/tree/v1.0.18) (2018-03-08)
4
15
  [Full Changelog](https://github.com/DragonBox/u3d/compare/v1.0.17...v1.0.18)
5
16
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- u3d (1.0.18)
4
+ u3d (1.0.19)
5
5
  colored (>= 1.2, < 2.0.0)
6
6
  commander (>= 4.4.0, < 5.0.0)
7
7
  file-tail (>= 1.2.0)
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Build Status](https://img.shields.io/circleci/project/DragonBox/u3d/master.svg?style=flat)](https://circleci.com/gh/DragonBox/u3d)
6
6
  [![Coverage Status](https://coveralls.io/repos/github/DragonBox/u3d/badge.svg?branch=master)](https://coveralls.io/github/DragonBox/u3d?branch=master)
7
7
 
8
- U3d is a set of tools to interact with Unity3D from command line. It is available on Linux, Macintosh and Windows.
8
+ U3d is a set of tools to interact with Unity from command line. It is available on Linux, Macintosh and Windows.
9
9
 
10
10
  ---
11
11
 
@@ -17,38 +17,43 @@ U3d knows about your Unity project and behaves differently if invoked from withi
17
17
 
18
18
  Available commands are:
19
19
 
20
- * `u3d available`: List download-ready versions of Unity3d
20
+ * `u3d available`: List download-ready versions of Unity
21
21
 
22
22
  ![u3d available](https://github.com/DragonBox/u3d/raw/master/docs/assets/u3d_available.png)
23
23
 
24
- * `u3d install`: Download and/or install Unity3D packages
24
+ * `u3d install`: Download (and/or) install Unity editor packages
25
25
 
26
26
  ![u3d install](https://github.com/DragonBox/u3d/raw/master/docs/assets/u3d_install.png)
27
27
 
28
- * `u3d uninstall`: Uninstall Unity3D versions
28
+ * `u3d uninstall`: Uninstall Unity versions
29
29
 
30
30
  ![u3d uninstall](https://github.com/DragonBox/u3d/raw/master/docs/assets/u3d_uninstall.png)
31
31
 
32
- * `u3d list`: List installed versions of Unity3d
32
+ * `u3d list`: List installed versions of Unity
33
33
 
34
34
  ![u3d list](https://github.com/DragonBox/u3d/raw/master/docs/assets/u3d_list.png)
35
35
 
36
- * `u3d run`: Run Unity, and parses its output through u3d's log prettifier.
36
+ * `u3d run`: Run Unity, and parses its output through u3d's log prettifier
37
37
 
38
38
  Here we start with the proper version of Unity:
39
39
 
40
40
  ![u3d run without arguments](https://github.com/DragonBox/u3d/raw/master/docs/assets/u3d_run_current.png)
41
41
 
42
42
  Here we pass some arguments:
43
+
43
44
  ![u3d run with arguments](https://github.com/DragonBox/u3d/raw/master/docs/assets/u3d_run.png)
44
45
 
45
- The prettifyer is on by default but can be turned off to get Unity3d's raw output.
46
+ The prettifyer is on by default but can be turned off to get Unity's raw output.
46
47
 
47
48
  * `u3d prettify`: Prettify a saved editor logfile
48
49
 
49
50
  [Information on how `prettify` works](https://github.com/DragonBox/u3d/blob/master/LOG_RULES.md)
50
51
 
51
- * `u3d dependencies`: [Linux] Install dependencies that Unity don't install by default on Linux.
52
+ * `u3d dependencies`: [Linux] Install dependencies that Unity don't install by default on Linux
53
+
54
+ * `u3d licenses`: display information about your Unity licenses
55
+
56
+ ![u3d list](https://github.com/DragonBox/u3d/raw/master/docs/assets/u3d_licenses.png)
52
57
 
53
58
  ## Installation
54
59
 
@@ -58,8 +63,8 @@ gem install u3d
58
63
 
59
64
  ## Unity versions numbering
60
65
 
61
- Unity3d uses the following version formatting: 0.0.0x0. The \'x\' can takes different values:
62
- * 'f' are the main release candidates for Unity3d
66
+ Unity uses the following version formatting: 0.0.0x0. The \'x\' can takes different values:
67
+ * 'f' are the main release candidates for Unity
63
68
  * 'p' are patches fixing those releases
64
69
  * 'b' are the beta releases
65
70
  * 'a' are the alpha releases (not currently discovered online)
@@ -86,7 +91,7 @@ When referencing to a version on the CLI, u3d sanitizes these weird versions. Fo
86
91
 
87
92
  u3d should be able to find the different unity installed under those locations. If the Unity installations are not in those locations, u3d might not find them automatically.
88
93
 
89
- ## Sanitize / standardize Unity3d installation paths
94
+ ## Sanitize / standardize Unity installation paths
90
95
 
91
96
  If you have installed Unity in different locations, u3d might discover them and propose you to move them to its standard location. The procedure should be self described and easily revertible (manually). This sanitization operation is only proposed in interactive mode (i.e. if you are not using u3d unattended, e.g. in a build script on a CI server).
92
97
 
@@ -136,7 +141,7 @@ u3d install 5.6.0f3 --no-download
136
141
  u3d run -- -batchmode -quit -logFile `pwd`/editor.log -executeMethod "WWTK.SimpleBuild.PerformAndroidBuild"
137
142
  ```
138
143
 
139
- * Open the proper Unity3d for the current project, displaying the raw editor logs in the command line:
144
+ * Open the proper Unity for the current project, displaying the raw editor logs in the command line:
140
145
 
141
146
  ```shell
142
147
  u3d run -r
Binary file
@@ -12,7 +12,7 @@ fastlane add_plugin u3d
12
12
 
13
13
  ## About u3d
14
14
 
15
- Fastgame's u3d (a Unity3d CLI) integration
15
+ Fastgame's u3d (a Unity CLI) integration
16
16
 
17
17
  **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
18
18
 
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.author = %q{Jerome Lacoste}
10
10
  spec.email = %q{jerome.lacoste@gmail.com}
11
11
 
12
- spec.summary = %q{Fastgame's u3d (a Unity3d CLI) integration}
12
+ spec.summary = %q{Fastgame's u3d (a Unity CLI) integration}
13
13
  spec.homepage = "https://github.com/DragonBox/u3d/tree/master/fastlane-plugin-u3d"
14
14
  spec.license = "MIT"
15
15
 
@@ -36,7 +36,7 @@ module Fastlane
36
36
  end
37
37
 
38
38
  def self.description
39
- "Fastgame's u3d (a Unity3d CLI) integration"
39
+ "Fastgame's u3d (a Unity CLI) integration"
40
40
  end
41
41
 
42
42
  def self.authors
data/lib/u3d.rb CHANGED
@@ -34,6 +34,7 @@ require 'u3d/iniparser'
34
34
  require 'u3d/installation'
35
35
  require 'u3d/installer'
36
36
  require 'u3d/log_analyzer'
37
+ require 'u3d/unity_license'
37
38
  require 'u3d/unity_project'
38
39
  require 'u3d/unity_runner'
39
40
  require 'u3d/unity_version_definition'
data/lib/u3d/commands.rb CHANGED
@@ -195,6 +195,12 @@ module U3d
195
195
  end
196
196
  end
197
197
 
198
+ def licenses
199
+ U3d::License.licenses.sort_by { |l| l['LicenseVersion'] }.each do |license|
200
+ UI.message "#{license.path}: #{license['LicenseVersion']} #{license.number} #{license['UpdateDate']}"
201
+ end
202
+ end
203
+
198
204
  def local_analyze(args: [])
199
205
  raise ArgumentError, 'No files given' if args.empty?
200
206
  raise ArgumentError, "File #{args[0]} does not exist" unless File.exist? args[0]
@@ -71,7 +71,7 @@ module U3d
71
71
  run_args = extract_run_args
72
72
 
73
73
  c.syntax = 'u3d run [-u | --unity_version <version>] [-r | --raw_logs] [ -- <run_args>]'
74
- c.summary = 'Run unity, and parses its output through u3d\'s log prettifier'
74
+ c.summary = 'Run Unity, and parse its output through u3d\'s log prettifier'
75
75
  c.description = %(
76
76
  #{c.summary}
77
77
  The default prettifier rules file is packaged with u3d (#{U3d::LogAnalyzer::RULES_PATH}).
@@ -93,8 +93,8 @@ Fore more information about how the rules work, see https://github.com/DragonBox
93
93
  command :list do |c|
94
94
  c.syntax = 'u3d list [-p | --packages]'
95
95
  c.option '-p', '--packages', 'Lists installed packages as well'
96
- c.example 'List currently installed Unity3d versions, as well as installed packages', 'u3d list -p'
97
- c.description = 'List installed versions of Unity3d'
96
+ c.example 'List currently installed Unity versions, as well as installed packages', 'u3d list -p'
97
+ c.summary = 'List installed versions of Unity'
98
98
  c.action do |_args, options|
99
99
  Commands.list_installed(options: convert_options(options))
100
100
  end
@@ -114,7 +114,7 @@ Fore more information about how the rules work, see https://github.com/DragonBox
114
114
  c.example 'List all versions available for Linux platform', 'u3d available -o linux'
115
115
  c.example 'List packages available for Unity version 5.6.0f3', 'u3d available -u 5.6.0f3 -p'
116
116
  c.example 'List packages available for Unity version containing the 5.6 string', 'u3d available -u \'5.6\' -p'
117
- c.description = 'List download-ready versions of Unity3d'
117
+ c.summary = 'List download-ready versions of Unity'
118
118
  c.action do |_args, options|
119
119
  options.default packages: false
120
120
  Commands.list_available(options: convert_options(options))
@@ -124,7 +124,7 @@ Fore more information about how the rules work, see https://github.com/DragonBox
124
124
  command :install do |c|
125
125
  oses = U3dCore::Helper.operating_systems
126
126
  c.syntax = 'u3d install [<version>] [ [-p | --packages <package1>,<package2> ...] | [-o | --operating_system <OS>] [-a | --all] ] [--[no-]download] [ [--[no-]install] [-i | --installation_path <path>] ]'
127
- c.summary = "Download (and/or) install Unity3D editor packages."
127
+ c.summary = 'Download (and/or) install Unity editor packages'
128
128
  c.description = %(
129
129
  #{c.summary}
130
130
  This command allows you to either:
@@ -159,7 +159,7 @@ E.g. U3D_DOWNLOAD_PATH=/some/path/you/want u3d install ...
159
159
 
160
160
  command :uninstall do |c|
161
161
  c.syntax = 'u3d uninstall [<version>]'
162
- c.description = "Uninstall the specified Unity3d version."
162
+ c.summary = 'Uninstall the specified Unity version'
163
163
  c.option '-k', '--keychain', 'Gain privileges right through the keychain. [OSX only]'
164
164
  c.example 'Uninstall Unity version 5.2.1f1', 'u3d uninstall 5.1.2f1'
165
165
  c.action do |args, options|
@@ -169,7 +169,7 @@ E.g. U3D_DOWNLOAD_PATH=/some/path/you/want u3d install ...
169
169
 
170
170
  command :dependencies do |c|
171
171
  c.syntax = 'u3d dependencies'
172
- c.summary = 'Installs Unity dependencies. [Linux only]'
172
+ c.summary = 'Install Unity dependencies [Linux only]'
173
173
  c.description = %(
174
174
  #{c.summary}
175
175
  Regarding the package manager: if dpkg is installed, u3d uses apt-get else if rpm is installed yum is used. If none of them is insalled, fails.
@@ -183,15 +183,23 @@ More on that: https://forum.unity3d.com/threads/unity-on-linux-release-notes-and
183
183
 
184
184
  command :credentials do |c|
185
185
  c.syntax = "u3d credentials <#{Commands.credentials_actions.join(' | ')}>"
186
- c.description = 'Manages keychain credentials so u3d remembers them. [OSX only]'
186
+ c.summary = 'Manage keychain credentials so u3d remembers them [OSX only]'
187
187
  c.action do |args, _options|
188
188
  Commands.credentials(args: args)
189
189
  end
190
190
  end
191
191
 
192
+ command :licenses do |c|
193
+ c.syntax = "u3d licenses"
194
+ c.description = 'Prints Unity license information.'
195
+ c.action do |_args, _options|
196
+ Commands.licenses
197
+ end
198
+ end
199
+
192
200
  command :prettify do |c|
193
201
  c.syntax = 'u3d prettify <logfile>'
194
- c.summary = 'Prettify a saved logfile'
202
+ c.summary = 'Prettify a saved Unity logfile'
195
203
  c.description = %(
196
204
  #{c.summary}
197
205
  The default prettifier rules file is packaged with u3d (#{U3d::LogAnalyzer::RULES_PATH}).
data/lib/u3d/installer.rb CHANGED
@@ -52,7 +52,7 @@ module U3d
52
52
  unclean = []
53
53
  installer.installed.each { |unity| unclean << unity unless unity.clean_install? }
54
54
  return if unclean.empty?
55
- UI.important("u3d can optionally standardize the existing Unity3d installation names and locations.")
55
+ UI.important("u3d can optionally standardize the existing Unity installation names and locations.")
56
56
  UI.important("Check the documentation for more information:")
57
57
  UI.important("** https://github.com/DragonBox/u3d/blob/master/README.md#default-installation-paths **")
58
58
  unclean.each { |unity| installer.sanitize_install(unity, dry_run: true) }
@@ -0,0 +1,76 @@
1
+ ## --- BEGIN LICENSE BLOCK ---
2
+ # Copyright (c) 2016-present WeWantToKnow AS
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ # of this software and associated documentation files (the "Software"), to deal
6
+ # in the Software without restriction, including without limitation the rights
7
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ # copies of the Software, and to permit persons to whom the Software is
9
+ # furnished to do so, subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in all
12
+ # copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ # SOFTWARE.
21
+ ## --- END LICENSE BLOCK ---
22
+
23
+ require 'rexml/document'
24
+
25
+ module U3d
26
+ class License
27
+ attr_reader :path
28
+
29
+ def initialize(path: nil, fields: nil)
30
+ @path = path
31
+ @fields = fields || {}
32
+ end
33
+
34
+ def [](index)
35
+ @fields[index]
36
+ end
37
+
38
+ # petit cachotier va!
39
+ def number
40
+ require 'base64'
41
+ Base64.decode64(self['DeveloperData'])[4..-1]
42
+ end
43
+
44
+ class << self
45
+ LICENSES_DIR_MAC = File.join("/", "Library", "Application Support", "Unity").freeze
46
+ LICENSES_DIR_WINDOWS = File.join("C:/ProgramData", "Unity").freeze
47
+ LICENSES_DIR_LINUX = File.join(ENV['HOME'], ".local", "share", "unity3d", "Unity").freeze
48
+
49
+ def from_path(path)
50
+ doc = REXML::Document.new(File.read(path))
51
+ fields = {}
52
+ license = REXML::XPath.first(doc, "root/License")
53
+ unless license.nil?
54
+ fields = []
55
+ license.each_element_with_attribute("Value") do |e|
56
+ fields << [e.name, e.attribute('Value').to_s]
57
+ end
58
+ end
59
+ License.new(path: path, fields: fields.to_h)
60
+ end
61
+
62
+ def licenses
63
+ glob = File.join(licenses_dir, "*.ulf")
64
+ Dir.glob(glob).map do |path|
65
+ from_path(path)
66
+ end
67
+ end
68
+
69
+ def licenses_dir
70
+ return LICENSES_DIR_MAC if U3d::Helper.mac?
71
+ return LICENSES_DIR_WINDOWS if U3d::Helper.windows?
72
+ return LICENSES_DIR_LINUX if U3d::Helper.linux?
73
+ end
74
+ end
75
+ end
76
+ end
data/lib/u3d/version.rb CHANGED
@@ -21,10 +21,10 @@
21
21
  ## --- END LICENSE BLOCK ---
22
22
 
23
23
  module U3d
24
- VERSION = '1.0.18'.freeze
25
- DESCRIPTION = 'Provides numerous tools for installing, managing and running the Unity3D game engine from command line.'.freeze
26
- UNITY_VERSIONS_NOTE = "Unity3d uses the following version formatting: 0.0.0x0. The \'x\' can takes different values:\n"\
27
- "\t. 'f' are the main release candidates for Unity3d\n"\
24
+ VERSION = '1.0.19'.freeze
25
+ DESCRIPTION = 'Provides numerous tools for installing, managing and running the Unity game engine from command line.'.freeze
26
+ UNITY_VERSIONS_NOTE = "Unity uses the following version formatting: 0.0.0x0. The \'x\' can takes different values:\n"\
27
+ "\t. 'f' are the main release candidates for Unity\n"\
28
28
  "\t. 'p' are patches fixing those releases\n"\
29
29
  "\t. 'b' are the beta releases\n"\
30
30
  "\t. 'a' are the alpha releases (not currently discovered)\n".freeze
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.18
4
+ version: 1.0.19
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: 2018-03-08 00:00:00.000000000 Z
12
+ date: 2018-04-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colored
@@ -245,7 +245,7 @@ dependencies:
245
245
  - - "~>"
246
246
  - !ruby/object:Gem::Version
247
247
  version: 0.52.1
248
- description: Provides numerous tools for installing, managing and running the Unity3D
248
+ description: Provides numerous tools for installing, managing and running the Unity
249
249
  game engine from command line.
250
250
  email: jerome@wewanttoknow.com
251
251
  executables:
@@ -282,6 +282,7 @@ files:
282
282
  - docs/assets/ci_jenkins_version_param.png
283
283
  - docs/assets/u3d_available.png
284
284
  - docs/assets/u3d_install.png
285
+ - docs/assets/u3d_licenses.png
285
286
  - docs/assets/u3d_list.png
286
287
  - docs/assets/u3d_run.png
287
288
  - docs/assets/u3d_run_current.png
@@ -382,6 +383,7 @@ files:
382
383
  - lib/u3d/installation.rb
383
384
  - lib/u3d/installer.rb
384
385
  - lib/u3d/log_analyzer.rb
386
+ - lib/u3d/unity_license.rb
385
387
  - lib/u3d/unity_project.rb
386
388
  - lib/u3d/unity_runner.rb
387
389
  - lib/u3d/unity_version_definition.rb