u3d 1.0.10 → 1.0.11
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 +12 -0
- data/Gemfile.lock +2 -2
- data/README.md +3 -0
- data/docs/assets/ci_jenkins_ansi.png +0 -0
- data/docs/assets/ci_jenkins_credentials.png +0 -0
- data/docs/assets/ci_jenkins_rvm.png +0 -0
- data/docs/assets/ci_jenkins_secret_passwords.png +0 -0
- data/docs/assets/ci_jenkins_version_node.png +0 -0
- data/docs/assets/ci_jenkins_version_param.png +0 -0
- data/docs/ci_setup.md +75 -0
- data/lib/u3d/commands.rb +1 -1
- data/lib/u3d/installer.rb +22 -13
- data/lib/u3d/unity_project.rb +3 -1
- data/lib/u3d/version.rb +1 -1
- metadata +9 -3
- data/TODO.md +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0c7e57e6b80d3937d00e39ce113ef2ba676983f
|
4
|
+
data.tar.gz: 8000266d69992a3f6e33a51b869174b9f08d6cba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c71fa8f7124dcb6bd941feb32727c01e24b9b967c6c1a1065c05df1f779bbb058a94b196f0402f0dcf7df7341913302575026fc6403ff9573c8f6d9eea807147
|
7
|
+
data.tar.gz: 135902654a913d2a7bdbce289a330d2bb9409ee07fd7df3d07c2b0f6c6de1bce8d89d161df2372d7fd5281acde8adb538b8af9378a9678f9e84f9b5910458e53
|
data/.github_changelog_generator
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v1.0.11](https://github.com/DragonBox/u3d/tree/v1.0.11) (2017-12-07)
|
4
|
+
[Full Changelog](https://github.com/DragonBox/u3d/compare/v1.0.10...v1.0.11)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- u3d/list: also detect previously installed deb packages on Linux \(fixes \#189\) [\#190](https://github.com/DragonBox/u3d/pull/190) ([lacostej](https://github.com/lacostej))
|
9
|
+
|
10
|
+
**Merged pull requests:**
|
11
|
+
|
12
|
+
- doc: explain CI setup with jenkins [\#191](https://github.com/DragonBox/u3d/pull/191) ([lacostej](https://github.com/lacostej))
|
13
|
+
- 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
|
+
|
3
15
|
## [v1.0.10](https://github.com/DragonBox/u3d/tree/v1.0.10) (2017-11-03)
|
4
16
|
[Full Changelog](https://github.com/DragonBox/u3d/compare/v1.0.9...v1.0.10)
|
5
17
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -154,6 +154,9 @@ Here you have multiple options
|
|
154
154
|
|
155
155
|
* if on Mac, use the keychain option (you set it before hand on the machine, e.g. from the command line using `u3d credentials` add (use `u3d credentials check` to verify) and then use `u3d install -k` to activate the keychain while installing.
|
156
156
|
|
157
|
+
|
158
|
+
For more information see also [how to use u3d to install Unity on a CI server](docs/ci_setup.md).
|
159
|
+
|
157
160
|
### Install ruby
|
158
161
|
|
159
162
|
* __On MacOS and Linux:__
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/docs/ci_setup.md
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
# CI Setup
|
2
|
+
|
3
|
+
## Jenkins setup
|
4
|
+
|
5
|
+
Example of how to setup Jenkins to install unity automatically on multiple slaves
|
6
|
+
|
7
|
+
You might want to do things differently. Here are the decisions we took:
|
8
|
+
|
9
|
+
* we install all Unity versions in the same way (i.e. same Unity platform modules for all installs)
|
10
|
+
* we store the slave root passwords in the Jenkins credentials binding.
|
11
|
+
* we depend on RVM to be present on the slaves
|
12
|
+
|
13
|
+
Prerequisites:
|
14
|
+
* Install the same version of RVM on all slaves where you will install u3d
|
15
|
+
* add one root password credential per slave in the jenkins setup. Follow the "U3D_PASSWORD_$SLAVENAME" format
|
16
|
+
|
17
|
+
![jenkins credentials](https://github.com/DragonBox/u3d/raw/master/docs/assets/ci_jenkins_credentials.png)
|
18
|
+
|
19
|
+
Required plugins:
|
20
|
+
* [Credentials Binding Plugin](https://wiki.jenkins.io/display/JENKINS/Credentials+Binding+Plugin)
|
21
|
+
* [Parametrized Builds](https://wiki.jenkins.io/display/JENKINS/Parameterized+Build)
|
22
|
+
* [RVM Plugin](https://wiki.jenkins.io/display/JENKINS/RVM+Plugin)
|
23
|
+
* [ANSI Color plugin](https://wiki.jenkins.io/display/JENKINS/AnsiColor+Plugin)
|
24
|
+
|
25
|
+
Set up an install job:
|
26
|
+
|
27
|
+
* create a freestyle job
|
28
|
+
|
29
|
+
* Add a U3D_VERSION string parameter
|
30
|
+
|
31
|
+
![jenkins version parameter](https://github.com/DragonBox/u3d/raw/master/docs/assets/ci_jenkins_version_param.png)
|
32
|
+
|
33
|
+
* Configure the nodes you might want to install on as parameters
|
34
|
+
|
35
|
+
![node parameter](https://github.com/DragonBox/u3d/raw/master/docs/assets/ci_jenkins_version_node.png)
|
36
|
+
|
37
|
+
* Enable console coloring
|
38
|
+
|
39
|
+
![console coloring](https://github.com/DragonBox/u3d/raw/master/docs/assets/ci_jenkins_ansi.png)
|
40
|
+
|
41
|
+
* Enable RVM
|
42
|
+
|
43
|
+
![console coloring](https://github.com/DragonBox/u3d/raw/master/docs/assets/ci_jenkins_rvm.png)
|
44
|
+
|
45
|
+
* Configure the slave passwords
|
46
|
+
|
47
|
+
![configure the slave passwords](https://github.com/DragonBox/u3d/raw/master/docs/assets/ci_jenkins_secret_passwords.png)
|
48
|
+
|
49
|
+
|
50
|
+
* add an "execute Shell" step
|
51
|
+
```bash
|
52
|
+
# config. We could make this an option to the job. Or be project specific.
|
53
|
+
U3D_INSTALL_ARGS=-p Unity,Android,iOS,Linux,Windows,WebGL
|
54
|
+
|
55
|
+
# install or update u3d if it isn't already present
|
56
|
+
if [[ ! `which u3d` ]]; then
|
57
|
+
gem install u3d
|
58
|
+
else
|
59
|
+
gem update u3d
|
60
|
+
fi
|
61
|
+
|
62
|
+
echo "${U3D_INSTALL_ARGS}"
|
63
|
+
|
64
|
+
# display whether or not the slave has credentials stored
|
65
|
+
u3d credentials check
|
66
|
+
|
67
|
+
# fetch the password for the slave from the credentials
|
68
|
+
PASS_KEY=U3D_PASSWORD_${NODE_NAME}
|
69
|
+
echo "PASS KEY: ${PASS_KEY}"
|
70
|
+
export U3D_PASSWORD=${!PASS_KEY}
|
71
|
+
|
72
|
+
# install the specified version with the specified arguments
|
73
|
+
u3d install --trace --verbose $U3D_VERSION $U3D_INSTALL_ARGS
|
74
|
+
u3d list
|
75
|
+
````
|
data/lib/u3d/commands.rb
CHANGED
@@ -169,7 +169,7 @@ module U3d
|
|
169
169
|
unless version # fall back in project default if we are on a Unity project
|
170
170
|
version = up.editor_version if up.exist?
|
171
171
|
unless version
|
172
|
-
UI.user_error!('Not sure which version of Unity to run. Are you in a project?')
|
172
|
+
UI.user_error!('Not sure which version of Unity to run. Are you in a Unity5 or later project?')
|
173
173
|
end
|
174
174
|
end
|
175
175
|
|
data/lib/u3d/installer.rb
CHANGED
@@ -106,10 +106,7 @@ module U3d
|
|
106
106
|
|
107
107
|
def installed
|
108
108
|
paths = (list_installed_paths + spotlight_installed_paths).uniq
|
109
|
-
|
110
|
-
|
111
|
-
# sorting should take into account stable/patch etc
|
112
|
-
versions.sort! { |x, y| x.version <=> y.version }
|
109
|
+
paths.map { |path| MacInstallation.new(root_path: path) }
|
113
110
|
end
|
114
111
|
|
115
112
|
# rubocop:disable UnusedMethodArgument
|
@@ -206,11 +203,8 @@ module U3d
|
|
206
203
|
end
|
207
204
|
|
208
205
|
def installed
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
# sorting should take into account stable/patch etc
|
213
|
-
versions.sort! { |x, y| x.version <=> y.version }
|
206
|
+
paths = (list_installed_paths + debian_installed_paths).uniq
|
207
|
+
paths.map { |path| LinuxInstallation.new(root_path: path) }
|
214
208
|
end
|
215
209
|
|
216
210
|
# rubocop:disable UnusedMethodArgument
|
@@ -261,6 +255,24 @@ module U3d
|
|
261
255
|
else
|
262
256
|
UI.success "Successfully uninstalled '#{unity.root_path}'"
|
263
257
|
end
|
258
|
+
|
259
|
+
private
|
260
|
+
|
261
|
+
def list_installed_paths
|
262
|
+
find = File.join(DEFAULT_LINUX_INSTALL, 'unity-editor-*', 'Editor')
|
263
|
+
paths = Dir[find]
|
264
|
+
paths = paths.map { |u| Pathname.new(u).parent.to_s }
|
265
|
+
UI.verbose "Found list_installed_paths: #{paths}"
|
266
|
+
paths
|
267
|
+
end
|
268
|
+
|
269
|
+
def debian_installed_paths
|
270
|
+
find = File.join(DEFAULT_LINUX_INSTALL, 'Unity', 'Editor')
|
271
|
+
paths = Dir[find]
|
272
|
+
paths = paths.map { |u| Pathname.new(u).parent.to_s }
|
273
|
+
UI.verbose "Found debian_installed_paths: #{paths}"
|
274
|
+
paths
|
275
|
+
end
|
264
276
|
end
|
265
277
|
|
266
278
|
class WindowsInstaller
|
@@ -279,10 +291,7 @@ module U3d
|
|
279
291
|
|
280
292
|
def installed
|
281
293
|
find = File.join(DEFAULT_WINDOWS_INSTALL, 'Unity*', 'Editor', 'Uninstall.exe')
|
282
|
-
|
283
|
-
|
284
|
-
# sorting should take into account stable/patch etc
|
285
|
-
versions.sort! { |x, y| x.version <=> y.version }
|
294
|
+
Dir[find].map { |path| WindowsInstallation.new(root_path: File.expand_path('../..', path)) }
|
286
295
|
end
|
287
296
|
|
288
297
|
def install(file_path, version, installation_path: nil, info: {})
|
data/lib/u3d/unity_project.rb
CHANGED
@@ -36,7 +36,9 @@ module U3d
|
|
36
36
|
|
37
37
|
def editor_version
|
38
38
|
require 'yaml'
|
39
|
-
|
39
|
+
project_version = "#{@path}/ProjectSettings/ProjectVersion.txt"
|
40
|
+
return nil unless File.exist? project_version
|
41
|
+
yaml = YAML.safe_load(File.read(project_version))
|
40
42
|
version = yaml['m_EditorVersion']
|
41
43
|
version.gsub!(/(\d+\.\d+\.\d+)(?:x)?(\w\d+)(?:Linux)?/, '\1\2') if Helper.linux?
|
42
44
|
version
|
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.11'.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.
|
4
|
+
version: 1.0.11
|
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
|
+
date: 2017-12-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: commander
|
@@ -269,9 +269,14 @@ files:
|
|
269
269
|
- LOG_RULES.md
|
270
270
|
- README.md
|
271
271
|
- Rakefile
|
272
|
-
- TODO.md
|
273
272
|
- build.sh
|
274
273
|
- config/log_rules.json
|
274
|
+
- docs/assets/ci_jenkins_ansi.png
|
275
|
+
- docs/assets/ci_jenkins_credentials.png
|
276
|
+
- docs/assets/ci_jenkins_rvm.png
|
277
|
+
- docs/assets/ci_jenkins_secret_passwords.png
|
278
|
+
- docs/assets/ci_jenkins_version_node.png
|
279
|
+
- docs/assets/ci_jenkins_version_param.png
|
275
280
|
- docs/assets/u3d_available.png
|
276
281
|
- docs/assets/u3d_install.png
|
277
282
|
- docs/assets/u3d_list.png
|
@@ -279,6 +284,7 @@ files:
|
|
279
284
|
- docs/assets/u3d_run_current.png
|
280
285
|
- docs/assets/u3d_sanitize.png
|
281
286
|
- docs/assets/u3d_uninstall.png
|
287
|
+
- docs/ci_setup.md
|
282
288
|
- examples/Example1/.gitignore
|
283
289
|
- examples/Example1/Assets/Editor.meta
|
284
290
|
- examples/Example1/Assets/Editor/EditorRun.cs
|
data/TODO.md
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
= before release
|
2
|
-
* core: moar tests if needed
|
3
|
-
* [JL] prepare documentation / README / site
|
4
|
-
|
5
|
-
= post
|
6
|
-
* patch commander to support argument descriptions
|
7
|
-
|
8
|
-
* u3d specific keychain (u3d_credentials_store)
|
9
|
-
|
10
|
-
* if failure to download a package, display available ones
|
11
|
-
#No package "Mac" was found for version 5.6.0f3
|