@@ -21,7 +21,7 @@ BEGIN {
2121 [string ] $name
2222 )
2323
24- BEGIN {
24+ BEGIN {
2525
2626 Function Compile-Layout {
2727 param (
@@ -31,17 +31,16 @@ BEGIN {
3131 [switch ] $quiet = $false
3232 )
3333
34- $expression = " C:\MSKLC\bin\i386\kbdutool.exe -v -w -u $option `" $name .klc`" "
35- Invoke-Expression - Command $expression | ? {
36- -not $_.Contains (" can't open for write." )
37- } | % {
38- if (-not $quiet.IsPresent ) {
39- Write-Host $_
40- }
41- }
42-
43- New-Item - Path $target - ItemType Directory - EA SilentlyContinue | Out-Null
44- Move-Item - Path " $name .DLL" - Destination $target - Force
34+ Push-Location " src/$ ( $name ) /"
35+
36+ $expression = " msbuild /p:Configuration=Release $ ( $option ) "
37+ Invoke-Expression - Command $expression | % {
38+ if (-not $quiet.IsPresent ) {
39+ Write-Host $_
40+ }
41+ }
42+
43+ Pop-Location
4544 }
4645
4746 Function Make-Readonly {
@@ -63,8 +62,8 @@ BEGIN {
6362 }
6463 }
6564
66- $x86 = " .\Package_x86\bin\"
67- $x64 = " .\Package_x64\bin\"
65+ $x86 = " .. \Package_x86\bin\"
66+ $x64 = " .. \Package_x64\bin\"
6867 }
6968
7069 PROCESS {
@@ -73,13 +72,14 @@ BEGIN {
7372
7473 Make- ReadOnly - Name $name
7574
76- # # Only the last group of commands report
77- # # warnings an errors feedback in the output
75+ # # Compile layout
7876
79- Compile- Layout - Name $name - Option " -x" - Target $x86 - Quiet
80- Compile- Layout - Name $name - Option " -m" - Target $x64
81-
82- Make- Readonly - Name $name - ReadWrite
77+ " .C" , " .DEF" , " .H" , " .RC" | % {
78+ Move-Item - Force - Path " $ ( $name ) $ ( $_ ) " - Destination " src/$ ( $name ) /$ ( $name ) $ ( $_ ) "
79+ }
80+
81+ Compile- Layout - Name $name - Option " /p:Platform=x86 /p:OutDir=$ ( $x86 ) " - Target $x86
82+ Compile- Layout - Name $name - Option " /p:Platform=x64 /p:OutDir=$ ( $x64 ) " - Target $x64
8383 }
8484 }
8585
@@ -185,7 +185,7 @@ PROCESS {
185185 Patch- Version - Name KBFRZ71N - Version $version
186186
187187 Build-Layout - Name KBFRZ71
188- Build-Layout - Name KBFRZ71N
188+ # # Build-Layout -Name KBFRZ71N
189189
190190 # #Remove-Item -Path KBFRZ71.C
191191 # #Remove-Item -Path KBFRZ71.H
@@ -198,4 +198,4 @@ PROCESS {
198198 Copy-Item - Path C:\MSKLC\bin\i386\KbdMsi.dll - Destination Package_x86\bin | Out-Null
199199
200200 Pop-Location
201- }
201+ }
0 commit comments