@@ -16,73 +16,6 @@ BEGIN {
1616 Write-Output $result
1717 }
1818
19- Function Build-Layout {
20- param (
21- [string ] $name
22- )
23-
24- BEGIN {
25-
26- Function Compile-Layout {
27- param (
28- [string ] $name ,
29- [string ] $option ,
30- [string ] $target ,
31- [switch ] $quiet = $false
32- )
33-
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
44- }
45-
46- Function Make-Readonly {
47- param (
48- [string ] $name ,
49- [switch ] $readwrite = $false
50- )
51- if ($readwrite.IsPresent ) {
52- attrib - R " $name .C"
53- attrib - R " $name .H"
54- attrib - R " $name .RC"
55- attrib - R " $name .DEF"
56- }
57- else {
58- attrib + R " $name .C"
59- attrib + R " $name .H"
60- attrib + R " $name .RC"
61- attrib + R " $name .DEF"
62- }
63- }
64-
65- $x86 = " ..\Package_x86\bin\"
66- $x64 = " ..\Package_x64\bin\"
67- }
68-
69- PROCESS {
70-
71- # # Protect the files to prevent kbdutool from overwriting them
72-
73- Make- ReadOnly - Name $name
74-
75- # # Compile layout
76-
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
83- }
84- }
85-
8619 Function Fix-Encoding {
8720 param (
8821 [string ] $name
@@ -184,18 +117,18 @@ PROCESS {
184117 Patch- Version - Name KBFRZ71 - Version $version
185118 Patch- Version - Name KBFRZ71N - Version $version
186119
187- Build-Layout - Name KBFRZ71
188- # # Build-Layout -Name KBFRZ71N
120+ # # Move C source code to Visual Studio project folder
189121
190- # #Remove-Item -Path KBFRZ71.C
191- # #Remove -Item -Path KBFRZ71.H
192- # #Remove -Item -Path KBFRZ71.RC
193- # #Remove-Item -Path KBFRZ71.DEF
122+ " .C " , " .DEF " , " .H " , " .RC " | % {
123+ Move -Item - Force - Path " KBFRZ71$ ( $_ ) " - Destination " KBFRZ71/KBFR71 $ ( $_ ) "
124+ Move -Item - Force - Path " KBFRZ71N $ ( $_ ) " - Destination " KBFRZ71N/KBFR71N $ ( $_ ) "
125+ }
194126
195127 # # Copy MSKLC KbdMsi.dll used as Windows Installer custom actions
196128 # # in the resulting .MSI packages
197129
198- Copy-Item - Path C:\MSKLC\bin\i386\KbdMsi.dll - Destination Package_x86\bin | Out-Null
130+ New-Item - ItemType Directory - Path Package_x86\bin - EA SilentlyContinue | Out-Null
131+ Copy-Item - Path C:\MSKLC\bin\i386\KbdMsi.dll - Destination Package_x86\bin\ | Out-Null
199132
200133 Pop-Location
201134}
0 commit comments