Class: U3d::BaseInstaller
- Inherits:
-
Object
- Object
- U3d::BaseInstaller
show all
- Defined in:
- lib/u3d/installer.rb
Instance Method Summary
collapse
Instance Method Details
#installed_sorted_by_versions ⇒ Object
90
91
92
93
94
95
|
# File 'lib/u3d/installer.rb', line 90
def installed_sorted_by_versions
list = installed
return [] if list.empty?
list.sort { |a, b| UnityVersionComparator.new(a.version) <=> UnityVersionComparator.new(b.version) }
end
|
#sanitize_installs ⇒ Object
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'lib/u3d/installer.rb', line 74
def sanitize_installs
return unless UI.interactive? || Helper.test?
unclean = []
installed.each { |unity| unclean << unity unless unity.clean_install? }
return if unclean.empty?
UI.important("u3d can optionally standardize the existing Unity installation names and locations.")
UI.important("Check the documentation for more information:")
UI.important("** https://github.com/DragonBox/u3d/blob/master/README.md#default-installation-paths **")
unclean.each { |unity| sanitize_install(unity, dry_run: true) }
return unless UI.confirm("#{unclean.count} Unity installation(s) will be moved. Proceed??")
unclean.each { |unity| sanitize_install(unity) }
end
|