File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
def get-ue-install-dirs [] {
2
+ if (sys host | get name ) != " Windows" {
3
+ print " Automatic unreal detection only supported on Windows"
4
+ print " Please specify the --ue-install-dir option"
5
+ exit 1
6
+ }
7
+
2
8
let eng_reg_version_keys = ^ reg.exe query ' HKLM\SOFTWARE\EpicGames\Unreal Engine' | str trim | lines ;
3
9
$eng_reg_version_keys | each {|key |
4
10
^ reg.exe query $key /v ' InstalledDirectory' | str trim | lines | get 1 | str trim | split column ' ' key type value | get value
@@ -15,8 +21,8 @@ def get-ue-os [] {
15
21
}
16
22
}
17
23
18
- def main [] {
19
- let install_dirs = get-ue-install-dirs ;
24
+ def main [-- ue-install-dir : string ] {
25
+ let install_dirs = if $ue_install_dir != null { [ $ue_install_dir ] } else { get-ue-install-dirs } ;
20
26
let plugin_dir = $env .FILE_PWD | path join ' ..' | path expand ;
21
27
let dist_dir = [$plugin_dir , ' Dist' ] | path join ;
22
28
mkdir $dist_dir ;
You can’t perform that action at this time.
0 commit comments