-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathX-InsaneEm.ps1
107 lines (84 loc) · 2.49 KB
/
X-InsaneEm.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
[CmdletBinding()]
param (
[Parameter(ParameterSetName = "Build_Lib")]
[switch]
$Build,
[Parameter(ParameterSetName = "Build_Lib")]
[Parameter(ParameterSetName = "Build_Botan")]
[Parameter(ParameterSetName = "Build_All")]
[string]
$DestinationDir = [string]::Empty,
[Parameter(ParameterSetName = "Build_Lib")]
[Parameter(ParameterSetName = "Build_All")]
[string]
$DistDirSuffix = [string]::Empty,
[Parameter(ParameterSetName = "Build_Lib")]
[Parameter(ParameterSetName = "Build_All")]
[string]
$LibSuffix = [string]::Empty,
[Parameter(ParameterSetName = "Build_Lib")]
[Parameter(ParameterSetName = "Build_All")]
[string]
$LibsDir = [string]::Empty,
[Parameter(Mandatory = $true, Position = 0, ParameterSetName = "Build_Botan")]
[switch]
$BuildBotan,
[Parameter(Mandatory = $true, Position = 0, ParameterSetName = "Build_ICU")]
[switch]
$BuildICU,
[Parameter(Mandatory = $true, Position = 0, ParameterSetName = "Build_All")]
[switch]
$BuildAll,
[Parameter(ParameterSetName = "Build_All")]
[switch]
$SkipBotan,
[Parameter(ParameterSetName = "Build_All")]
[switch]
$SkipICU,
[Parameter(Mandatory = $true, ParameterSetName = "Install_EmscriptenSDK")]
[switch]
$InstallEmscriptenSDK,
[Parameter(ParameterSetName = "Install_EmscriptenSDK")]
[switch]
$Force,
[Parameter(Mandatory = $true, Position = 0, ParameterSetName = "Create_Project")]
[switch]
$CreateProject,
[Parameter(Mandatory = $true, Position = 1, ParameterSetName = "Create_Project")]
[string]
$Name,
[Parameter(Mandatory = $true, ParameterSetName = "Clean_TempDir")]
[switch]
$Clean
)
Import-Module -Name "$PSScriptRoot/Z-InsaneEm.ps1" -Force -NoClobber
if ($Clean.IsPresent) {
Remove-InsaneEm
exit
}
if ($BuildBotan.IsPresent) {
Build-BotanLibraryForInsane -DestinationDir $DestinationDir
exit
}
if ($BuildICU.IsPresent) {
Build-IcuLibrary
exit
}
if ($BuildAll.IsPresent) {
if (!$SkipBotan.IsPresent) {
Build-BotanLibraryForInsane -DestinationDir $DestinationDir
}
if (!$SkipICU.IsPresent) {
Build-IcuLibrary
}
}
if ($InstallEmscriptenSDK.IsPresent) {
Install-EmscriptenSDK -Force:$Force
exit
}
if ($CreateProject.IsPresent) {
New-Project -ProjectName $Name
exit
}
Build-InsaneLibrary -DestinationDir $DestinationDir -DistDirSuffix $DistDirSuffix -LibSuffix $LibSuffix -LibsDir $LibsDir
exit