File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 113
113
if (! $result )
114
114
{
115
115
Write-Warning " VSSetup not installed; extracting..." ;
116
- Expand-Archive " $projectDir \OleWoo\VSSetup.zip" " $ ( [Environment ]::GetFolderPath(" MyDocuments" )) \WindowsPowerShell\Modules\VSSetup" - Force
116
+ $moduleDirPath = " $ ( [Environment ]::GetFolderPath(" MyDocuments" )) \WindowsPowerShell" ;
117
+ if (! (Test-Path - Path $moduleDirPath - PathType Container))
118
+ {
119
+ Write-Warning " WindowsPowerShell directory not found in user's documents. Creating." ;
120
+ New-Item - Path $moduleDirPath - ItemType Directory;
121
+ }
122
+ $moduleDirPath += " \Modules" ;
123
+ if (! (Test-Path - Path $moduleDirPath - PathType Container))
124
+ {
125
+ Write-Warning " WindowsPowerShell\Modules directory not found in user's documents. Creating." ;
126
+ New-Item - Path $moduleDirPath - ItemType Directory;
127
+ }
128
+ $moduleDirPath += " \VSSetup" ;
129
+ if (! (Test-Path - Path $moduleDirPath - PathType Container))
130
+ {
131
+ Write-Warning " WindowsPowerShell\Modules\VSSetup directory not found in user's documents. Creating." ;
132
+ New-Item - Path $moduleDirPath - ItemType Directory;
133
+ }
134
+ # Sanity check
135
+ if (! (Test-Path - Path $moduleDirPath - PathType Container))
136
+ {
137
+ Write-Error " WindowsPowerShell\Modules\VSSetup directory still not found in user's documents after attempt to create it. Cannot continue" ;
138
+ throw [System.IO.DirectoryNotFoundException ] " Cannot create or locate the directory at path '$moduleDirPath '" ;
139
+ }
140
+ Expand-Archive " $projectDir \OleWoo\VSSetup.zip" $moduleDirPath - Force;
117
141
}
118
142
119
143
try {
Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ public string GenerateIdl(Assembly assembly)
39
39
var owLib = new OWTypeLib ( lib ) ;
40
40
owLib . Listeners . Add ( new IdlListener ( ) ) ;
41
41
42
+ formatter . AddString ( "midl_pragma warning( disable: 2400 2401 ) " ) ;
43
+ formatter . NewLine ( ) ;
44
+
42
45
owLib . BuildIDLInto ( formatter ) ;
43
46
return formatter . ToString ( ) ;
44
47
}
You can’t perform that action at this time.
0 commit comments