u3d 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github_changelog_generator +1 -1
- data/CHANGELOG.md +16 -0
- data/Gemfile.lock +1 -1
- data/Rakefile +3 -2
- data/lib/u3d/commands.rb +8 -0
- data/lib/u3d/installer.rb +26 -12
- data/lib/u3d/log_analyzer.rb +2 -2
- data/lib/u3d/unity_version_definition.rb +4 -0
- data/lib/u3d/unity_versions.rb +1 -1
- data/lib/u3d/version.rb +1 -1
- data/lib/u3d.rb +17 -4
- data/lib/u3d_core.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74659cdf831f537229e6bda64ca7cb74a38d2be3
|
4
|
+
data.tar.gz: fb365f32df6f0f2f3d6440c9639f351ed40311a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a5792a58962e9beac0eb337342e2fd5ece94907de70d51dc919265bd7f682e5f1767bc80cb6d505a53793aa09d99df9bf6f388350f39e8af358896d19cb6f47
|
7
|
+
data.tar.gz: 2c7588a8d3629ab28a132d8eab653cecea060b9d8d6fb59266b8fd86242cb2f4c542900c9622e60db36d7dcfd7289dbc9da1b6a7075838f4c79443db99f9d294
|
data/.github_changelog_generator
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v1.0.4](https://github.com/DragonBox/u3d/tree/v1.0.4) (2017-09-16)
|
4
|
+
[Full Changelog](https://github.com/DragonBox/u3d/compare/v1.0.3...v1.0.4)
|
5
|
+
|
6
|
+
**Fixed bugs:**
|
7
|
+
|
8
|
+
- u3d/installer might not see a newly installed version on Mac [\#139](https://github.com/DragonBox/u3d/issues/139)
|
9
|
+
- Issue with using installer \(error: undefined method `\[\]' for nil:NilClass.\) [\#138](https://github.com/DragonBox/u3d/issues/138)
|
10
|
+
|
11
|
+
**Merged pull requests:**
|
12
|
+
|
13
|
+
- u3d/available: restore Linux version. [\#144](https://github.com/DragonBox/u3d/pull/144) ([lacostej](https://github.com/lacostej))
|
14
|
+
- u3d/installer: allow to find the installation we just installed, and fallback on spotlight on mac [\#143](https://github.com/DragonBox/u3d/pull/143) ([lacostej](https://github.com/lacostej))
|
15
|
+
- u3d/analyzer: remove extra end of lines in context information [\#141](https://github.com/DragonBox/u3d/pull/141) ([lacostej](https://github.com/lacostej))
|
16
|
+
- u3d/installer: hard fail if we ask for a non existant package \(Related to \#138\) [\#140](https://github.com/DragonBox/u3d/pull/140) ([lacostej](https://github.com/lacostej))
|
17
|
+
- u3d/internal: load all internal modules in top 'u3d' file [\#137](https://github.com/DragonBox/u3d/pull/137) ([lacostej](https://github.com/lacostej))
|
18
|
+
|
3
19
|
## [v1.0.3](https://github.com/DragonBox/u3d/tree/v1.0.3) (2017-09-11)
|
4
20
|
[Full Changelog](https://github.com/DragonBox/u3d/compare/v1.0.2...v1.0.3)
|
5
21
|
|
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -119,14 +119,15 @@ task pre_release: 'ensure_git_clean' do
|
|
119
119
|
Rake::Task["changelog"].invoke
|
120
120
|
|
121
121
|
sh('git diff')
|
122
|
+
# FIXME: cleanup branch, etc
|
122
123
|
UI.user_error! "Pre release stopped by user." unless UI.confirm("CHANGELOG PR for version #{nextversion}. Confirm?")
|
123
124
|
|
124
125
|
msg = "Preparing release for #{nextversion}"
|
125
126
|
sh 'git add CHANGELOG.md'
|
126
127
|
sh "git commit -m '#{msg}'"
|
127
128
|
sh "git push lacostej" # FIXME: hardcoded
|
128
|
-
# FIXME check hub present
|
129
|
-
sh "hub pull-request -m '#{msg}' -l nochangelog"
|
129
|
+
# FIXME: check hub present
|
130
|
+
sh "hub pull-request -m '#{msg}'" # requires hub pre-release " -l nochangelog"
|
130
131
|
sh 'git checkout master'
|
131
132
|
sh "git branch -D #{pr_branch}"
|
132
133
|
end
|
data/lib/u3d/commands.rb
CHANGED
@@ -123,6 +123,8 @@ module U3d
|
|
123
123
|
unity = check_unity_presence(version: version)
|
124
124
|
return unless enforce_setup_coherence(packages, options, unity, definition)
|
125
125
|
|
126
|
+
verify_package_names(definition, packages)
|
127
|
+
|
126
128
|
if options[:install]
|
127
129
|
U3d::Globals.use_keychain = true if options[:keychain] && Helper.mac?
|
128
130
|
UI.important 'Root privileges are required'
|
@@ -217,6 +219,12 @@ module U3d
|
|
217
219
|
|
218
220
|
private
|
219
221
|
|
222
|
+
def verify_package_names(definition, packages)
|
223
|
+
packages.each do |package|
|
224
|
+
UI.user_error! "package '#{package}' doesn't exist" unless definition.available_package? package
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
220
228
|
def specified_or_current_project_version(version)
|
221
229
|
unless version # no version specified, use the one from the current unity project if any
|
222
230
|
UI.message "No unity version specified. If the current directory is a Unity project, we try to install the one it requires"
|
data/lib/u3d/installer.rb
CHANGED
@@ -101,18 +101,8 @@ module U3d
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def installed
|
104
|
-
|
105
|
-
|
106
|
-
exit(1)
|
107
|
-
end
|
108
|
-
|
109
|
-
bundle_identifiers = ['com.unity3d.UnityEditor4.x', 'com.unity3d.UnityEditor5.x']
|
110
|
-
|
111
|
-
mdfind_args = bundle_identifiers.map { |bi| "kMDItemCFBundleIdentifier == '#{bi}'" }.join(' || ')
|
112
|
-
|
113
|
-
cmd = "mdfind \"#{mdfind_args}\" 2>/dev/null"
|
114
|
-
UI.verbose cmd
|
115
|
-
versions = `#{cmd}`.split("\n").map { |path| MacInstallation.new(path: path) }
|
104
|
+
paths = (list_installed_paths + spotlight_installed_paths).uniq
|
105
|
+
versions = paths.map { |path| MacInstallation.new(path: path) }
|
116
106
|
|
117
107
|
# sorting should take into account stable/patch etc
|
118
108
|
versions.sort! { |x, y| x.version <=> y.version }
|
@@ -159,6 +149,30 @@ module U3d
|
|
159
149
|
else
|
160
150
|
UI.success "Successfully installed package from #{file_path}"
|
161
151
|
end
|
152
|
+
|
153
|
+
private
|
154
|
+
|
155
|
+
def list_installed_paths
|
156
|
+
find = File.join(DEFAULT_MAC_INSTALL, 'Unity*', 'Unity.app')
|
157
|
+
paths = Dir[find].map { |path| File.expand_path('..', path) }
|
158
|
+
paths
|
159
|
+
end
|
160
|
+
|
161
|
+
def spotlight_installed_paths
|
162
|
+
unless (`mdutil -s /` =~ /disabled/).nil?
|
163
|
+
UI.warning 'Please enable Spotlight indexing for /Applications.'
|
164
|
+
return []
|
165
|
+
end
|
166
|
+
|
167
|
+
bundle_identifiers = ['com.unity3d.UnityEditor4.x', 'com.unity3d.UnityEditor5.x']
|
168
|
+
|
169
|
+
mdfind_args = bundle_identifiers.map { |bi| "kMDItemCFBundleIdentifier == '#{bi}'" }.join(' || ')
|
170
|
+
|
171
|
+
cmd = "mdfind \"#{mdfind_args}\" 2>/dev/null"
|
172
|
+
UI.verbose cmd
|
173
|
+
paths = `#{cmd}`.split("\n")
|
174
|
+
paths
|
175
|
+
end
|
162
176
|
end
|
163
177
|
|
164
178
|
class LinuxInstaller
|
data/lib/u3d/log_analyzer.rb
CHANGED
@@ -197,8 +197,8 @@ module U3d
|
|
197
197
|
if @active_rule
|
198
198
|
# Active rule should be finished
|
199
199
|
# If it is still active during phase change, it means that something went wrong
|
200
|
-
context = @lines_memory.map { |l| "
|
201
|
-
UI.error("[#{@active_phase}] Could not finish active rule '#{@active_rule}'. Aborting it. Context
|
200
|
+
context = @lines_memory.map { |l| "> #{l}" }.join('')
|
201
|
+
UI.error("[#{@active_phase}] Could not finish active rule '#{@active_rule}'. Aborting it. Context:\n#{context}")
|
202
202
|
@active_rule = nil
|
203
203
|
end
|
204
204
|
UI.verbose("--- Ending #{@active_phase} phase ---")
|
data/lib/u3d/unity_versions.rb
CHANGED
@@ -31,7 +31,7 @@ module U3d
|
|
31
31
|
# @!group URLS: Locations to fetch information from
|
32
32
|
#####################################################
|
33
33
|
# URL for the forum thread listing all the Linux releases
|
34
|
-
UNITY_LINUX_DOWNLOADS = 'https://forum.
|
34
|
+
UNITY_LINUX_DOWNLOADS = 'https://forum.unity.com/threads/unity-on-linux-release-notes-and-known-issues.350256/'.freeze
|
35
35
|
# URL for the main releases for Windows and Macintosh
|
36
36
|
UNITY_DOWNLOADS = 'https://unity3d.com/get-unity/download/archive'.freeze
|
37
37
|
# URL for the patch releases for Windows and Macintosh
|
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.
|
24
|
+
VERSION = '1.0.4'.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/lib/u3d.rb
CHANGED
@@ -20,12 +20,25 @@
|
|
20
20
|
# SOFTWARE.
|
21
21
|
## --- END LICENSE BLOCK ---
|
22
22
|
|
23
|
+
require 'u3d_core'
|
24
|
+
|
25
|
+
require 'u3d/utils'
|
23
26
|
require 'u3d/version'
|
24
|
-
require 'u3d/unity_version_number'
|
25
27
|
|
26
|
-
require '
|
27
|
-
|
28
|
-
require '
|
28
|
+
require 'u3d/cache'
|
29
|
+
require 'u3d/commands'
|
30
|
+
require 'u3d/commands_generator'
|
31
|
+
require 'u3d/download_validator'
|
32
|
+
require 'u3d/downloader'
|
33
|
+
require 'u3d/iniparser'
|
34
|
+
require 'u3d/installation'
|
35
|
+
require 'u3d/installer'
|
36
|
+
require 'u3d/log_analyzer'
|
37
|
+
require 'u3d/unity_project'
|
38
|
+
require 'u3d/unity_runner'
|
39
|
+
require 'u3d/unity_version_definition'
|
40
|
+
require 'u3d/unity_version_number'
|
41
|
+
require 'u3d/unity_versions'
|
29
42
|
|
30
43
|
module U3d
|
31
44
|
Helper = U3dCore::Helper
|
data/lib/u3d_core.rb
CHANGED
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.
|
4
|
+
version: 1.0.4
|
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-09-
|
12
|
+
date: 2017-09-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: commander
|