u3d 1.0.7 → 1.0.8

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: 813e4d8ddef2c11fe1a549b6d0aa09d5b9aab78f
4
- data.tar.gz: ce1a8c173179537130883253e5e9b852e5540ac0
3
+ metadata.gz: 71adab2b2a03a3bc2b9d6af6dd6dd42cc02114d9
4
+ data.tar.gz: cb3f2acc27496edbf00ac8a2c5e942576ddb01f6
5
5
  SHA512:
6
- metadata.gz: 4d5a77dba51fa0e6a859431c7fdbb66b66f5426548bd5797860f40bed1dda157a5b6e828b4e1a274c9ace30861a5dff5df12d77c5c4cc0b63cfa9197e92db899
7
- data.tar.gz: a321d0da32d1151f831f31234d96c546b7ba2b92c1cac5364934197d4e2a76c384c7c647374ff772a9c7d245681c2d8957d54095d16e89d310bfeb766ddce639
6
+ metadata.gz: 482ad130cd557980293b600ff3b19818b28441705f99e5b17244bb6638c44a1ace808fdfd83798656b96644a3a8c86faca70ebb9acd27eaa797a72bface947aa
7
+ data.tar.gz: f19eae468d593e8ab1e64c4ce1224773e963c9020f09fd0857e59b9e5029ad83f63eb393372e59ff6a5195ceb5e3932c4310958d4e5e66b8060f4f32f3999777
@@ -1,4 +1,4 @@
1
- future-release=v1.0.7
1
+ future-release=v1.0.8
2
2
  since-tag=v0.9
3
3
  exclude_tags_regex=v0\.[0-8]\..*
4
4
  exclude-labels=nochangelog
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Change Log
2
2
 
3
+ ## [v1.0.8](https://github.com/DragonBox/u3d/tree/v1.0.8) (2017-10-18)
4
+ [Full Changelog](https://github.com/DragonBox/u3d/compare/v1.0.7...v1.0.8)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - `install': uninitialized constant U3d::Globals \(NameError\) [\#166](https://github.com/DragonBox/u3d/issues/166)
9
+ - u3d doesn't detect Unity version anterior to 5.0 on Windows [\#165](https://github.com/DragonBox/u3d/issues/165)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Fix Windows version detection for Unity4 \(fixes \#165\) [\#168](https://github.com/DragonBox/u3d/pull/168) ([niezbop](https://github.com/niezbop))
14
+ - Fix module name issue for Globals call [\#167](https://github.com/DragonBox/u3d/pull/167) ([niezbop](https://github.com/niezbop))
15
+
3
16
  ## [v1.0.7](https://github.com/DragonBox/u3d/tree/v1.0.7) (2017-10-03)
4
17
  [Full Changelog](https://github.com/DragonBox/u3d/compare/v1.0.6...v1.0.7)
5
18
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- u3d (1.0.7)
4
+ u3d (1.0.8)
5
5
  colored (>= 1.2, < 2.0.0)
6
6
  commander (>= 4.4.0, < 5.0.0)
7
7
  file-tail (>= 1.2.0)
File without changes
data/exe/u3d CHANGED
File without changes
data/lib/u3d/commands.rb CHANGED
@@ -127,7 +127,7 @@ module U3d
127
127
  verify_package_names(definition, packages)
128
128
 
129
129
  if options[:install]
130
- U3d::Globals.use_keychain = true if options[:keychain] && Helper.mac?
130
+ U3dCore::Globals.use_keychain = true if options[:keychain] && Helper.mac?
131
131
  UI.important 'Root privileges are required'
132
132
  raise 'Could not get administrative privileges' unless U3dCore::CommandExecutor.has_admin_privileges?
133
133
  end
@@ -1,167 +1,170 @@
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 'u3d/utils'
24
-
25
- module U3d
26
- UNITY_DIR_CHECK = /Unity_\d+\.\d+\.\d+[a-z]\d+/
27
- UNITY_DIR_CHECK_LINUX = /unity-editor-\d+\.\d+\.\d+[a-z]\d+\z/
28
-
29
- class Installation
30
- def self.create(path: nil)
31
- if Helper.mac?
32
- MacInstallation.new path
33
- elsif Helper.linux?
34
- LinuxInstallation.new path
35
- else
36
- WindowsInstallation.new path
37
- end
38
- end
39
- end
40
-
41
- class MacInstallation < Installation
42
- attr_reader :path
43
-
44
- require 'plist'
45
-
46
- def initialize(path: nil)
47
- @path = path
48
- end
49
-
50
- def version
51
- plist['CFBundleVersion']
52
- end
53
-
54
- def default_log_file
55
- "#{ENV['HOME']}/Library/Logs/Unity/Editor.log"
56
- end
57
-
58
- def exe_path
59
- "#{path}/Contents/MacOS/Unity"
60
- end
61
-
62
- def packages
63
- if Utils.parse_unity_version(version)[0].to_i <= 4
64
- # Unity < 5 doesn't have packages
65
- return []
66
- end
67
- fpath = File.expand_path('../PlaybackEngines', path)
68
- return [] unless Dir.exist? fpath # install without package
69
- Dir.entries(fpath).select { |e| File.directory?(File.join(fpath, e)) && !(e == '.' || e == '..') }
70
- end
71
-
72
- def clean_install?
73
- path =~ UNITY_DIR_CHECK
74
- end
75
-
76
- private
77
-
78
- def plist
79
- @plist ||= Plist.parse_xml("#{@path}/Contents/Info.plist")
80
- end
81
- end
82
-
83
- class LinuxInstallation < Installation
84
- attr_reader :path
85
-
86
- def initialize(path: nil)
87
- @path = path
88
- end
89
-
90
- def version
91
- # I don't find an easy way to extract the version on Linux
92
- require 'rexml/document'
93
- fpath = "#{path}/Editor/Data/PlaybackEngines/LinuxStandaloneSupport/ivy.xml"
94
- raise "Couldn't find file #{fpath}" unless File.exist? fpath
95
- doc = REXML::Document.new(File.read(fpath))
96
- version = REXML::XPath.first(doc, 'ivy-module/info/@e:unityVersion').value
97
- if (m = version.match(/^(.*)x(.*)Linux$/))
98
- version = "#{m[1]}#{m[2]}"
99
- end
100
- version
101
- end
102
-
103
- def default_log_file
104
- "#{ENV['HOME']}/.config/unity3d/Editor.log"
105
- end
106
-
107
- def exe_path
108
- "#{path}/Editor/Unity"
109
- end
110
-
111
- def packages
112
- false
113
- end
114
-
115
- def clean_install?
116
- path =~ UNITY_DIR_CHECK_LINUX
117
- end
118
- end
119
-
120
- class WindowsInstallation < Installation
121
- attr_reader :path
122
-
123
- def initialize(path: nil)
124
- @path = path
125
- end
126
-
127
- def version
128
- require 'rexml/document'
129
- fpath = "#{path}/Editor/Data/PlaybackEngines/windowsstandalonesupport/ivy.xml"
130
- raise "Couldn't find file #{fpath}" unless File.exist? fpath
131
- doc = REXML::Document.new(File.read(fpath))
132
- version = REXML::XPath.first(doc, 'ivy-module/info/@e:unityVersion').value
133
-
134
- version
135
- end
136
-
137
- def default_log_file
138
- if @logfile.nil?
139
- begin
140
- loc_appdata = Utils.windows_local_appdata
141
- log_dir = File.expand_path('Unity/Editor/', loc_appdata)
142
- UI.important "Log directory (#{log_dir}) does not exist" unless Dir.exist? log_dir
143
- @logfile = File.expand_path('Editor.log', log_dir)
144
- rescue RuntimeError => ex
145
- UI.error "Unable to retrieve the editor logfile: #{ex}"
146
- end
147
- end
148
- @logfile
149
- end
150
-
151
- def exe_path
152
- File.join(@path, 'Editor', 'Unity.exe')
153
- end
154
-
155
- def packages
156
- # Unity prior to Unity5 did not have package
157
- return [] if Utils.parse_unity_version(version)[0].to_i <= 4
158
- fpath = "#{path}/Editor/Data/PlaybackEngines/"
159
- return [] unless Dir.exist? fpath # install without package
160
- Dir.entries(fpath).select { |e| File.directory?(File.join(fpath, e)) && !(e == '.' || e == '..') }
161
- end
162
-
163
- def clean_install?
164
- path =~ UNITY_DIR_CHECK
165
- end
166
- end
167
- end
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 'u3d/utils'
24
+
25
+ module U3d
26
+ UNITY_DIR_CHECK = /Unity_\d+\.\d+\.\d+[a-z]\d+/
27
+ UNITY_DIR_CHECK_LINUX = /unity-editor-\d+\.\d+\.\d+[a-z]\d+\z/
28
+
29
+ class Installation
30
+ def self.create(path: nil)
31
+ if Helper.mac?
32
+ MacInstallation.new path
33
+ elsif Helper.linux?
34
+ LinuxInstallation.new path
35
+ else
36
+ WindowsInstallation.new path
37
+ end
38
+ end
39
+ end
40
+
41
+ class MacInstallation < Installation
42
+ attr_reader :path
43
+
44
+ require 'plist'
45
+
46
+ def initialize(path: nil)
47
+ @path = path
48
+ end
49
+
50
+ def version
51
+ plist['CFBundleVersion']
52
+ end
53
+
54
+ def default_log_file
55
+ "#{ENV['HOME']}/Library/Logs/Unity/Editor.log"
56
+ end
57
+
58
+ def exe_path
59
+ "#{path}/Contents/MacOS/Unity"
60
+ end
61
+
62
+ def packages
63
+ if Utils.parse_unity_version(version)[0].to_i <= 4
64
+ # Unity < 5 doesn't have packages
65
+ return []
66
+ end
67
+ fpath = File.expand_path('../PlaybackEngines', path)
68
+ return [] unless Dir.exist? fpath # install without package
69
+ Dir.entries(fpath).select { |e| File.directory?(File.join(fpath, e)) && !(e == '.' || e == '..') }
70
+ end
71
+
72
+ def clean_install?
73
+ path =~ UNITY_DIR_CHECK
74
+ end
75
+
76
+ private
77
+
78
+ def plist
79
+ @plist ||= Plist.parse_xml("#{@path}/Contents/Info.plist")
80
+ end
81
+ end
82
+
83
+ class LinuxInstallation < Installation
84
+ attr_reader :path
85
+
86
+ def initialize(path: nil)
87
+ @path = path
88
+ end
89
+
90
+ def version
91
+ # I don't find an easy way to extract the version on Linux
92
+ require 'rexml/document'
93
+ fpath = "#{path}/Editor/Data/PlaybackEngines/LinuxStandaloneSupport/ivy.xml"
94
+ raise "Couldn't find file #{fpath}" unless File.exist? fpath
95
+ doc = REXML::Document.new(File.read(fpath))
96
+ version = REXML::XPath.first(doc, 'ivy-module/info/@e:unityVersion').value
97
+ if (m = version.match(/^(.*)x(.*)Linux$/))
98
+ version = "#{m[1]}#{m[2]}"
99
+ end
100
+ version
101
+ end
102
+
103
+ def default_log_file
104
+ "#{ENV['HOME']}/.config/unity3d/Editor.log"
105
+ end
106
+
107
+ def exe_path
108
+ "#{path}/Editor/Unity"
109
+ end
110
+
111
+ def packages
112
+ false
113
+ end
114
+
115
+ def clean_install?
116
+ path =~ UNITY_DIR_CHECK_LINUX
117
+ end
118
+ end
119
+
120
+ class WindowsInstallation < Installation
121
+ attr_reader :path
122
+
123
+ def initialize(path: nil)
124
+ @path = path
125
+ end
126
+
127
+ def version
128
+ require 'rexml/document'
129
+ # For versions >= 5
130
+ fpath = "#{path}/Editor/Data/PlaybackEngines/windowsstandalonesupport/ivy.xml"
131
+ # For versions < 5
132
+ fpath = "#{path}/Editor/Data/PlaybackEngines/wp8support/ivy.xml" unless File.exist? fpath
133
+ raise "Couldn't find file #{fpath}" unless File.exist? fpath
134
+ doc = REXML::Document.new(File.read(fpath))
135
+ version = REXML::XPath.first(doc, 'ivy-module/info/@e:unityVersion').value
136
+
137
+ version
138
+ end
139
+
140
+ def default_log_file
141
+ if @logfile.nil?
142
+ begin
143
+ loc_appdata = Utils.windows_local_appdata
144
+ log_dir = File.expand_path('Unity/Editor/', loc_appdata)
145
+ UI.important "Log directory (#{log_dir}) does not exist" unless Dir.exist? log_dir
146
+ @logfile = File.expand_path('Editor.log', log_dir)
147
+ rescue RuntimeError => ex
148
+ UI.error "Unable to retrieve the editor logfile: #{ex}"
149
+ end
150
+ end
151
+ @logfile
152
+ end
153
+
154
+ def exe_path
155
+ File.join(@path, 'Editor', 'Unity.exe')
156
+ end
157
+
158
+ def packages
159
+ # Unity prior to Unity5 did not have package
160
+ return [] if Utils.parse_unity_version(version)[0].to_i <= 4
161
+ fpath = "#{path}/Editor/Data/PlaybackEngines/"
162
+ return [] unless Dir.exist? fpath # install without package
163
+ Dir.entries(fpath).select { |e| File.directory?(File.join(fpath, e)) && !(e == '.' || e == '..') }
164
+ end
165
+
166
+ def clean_install?
167
+ path =~ UNITY_DIR_CHECK
168
+ end
169
+ end
170
+ end
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.7'.freeze
24
+ VERSION = '1.0.8'.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"\
data/local_gem_install.sh CHANGED
File without changes
data/scripts/be CHANGED
File without changes
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.7
4
+ version: 1.0.8
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-10-03 00:00:00.000000000 Z
12
+ date: 2017-10-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: commander
@@ -414,7 +414,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
414
414
  version: '0'
415
415
  requirements: []
416
416
  rubyforge_project:
417
- rubygems_version: 2.6.12
417
+ rubygems_version: 2.5.2
418
418
  signing_key:
419
419
  specification_version: 4
420
420
  summary: U3d