Skip to content

Commit de88cc9

Browse files
committed
Reinstate gecko downloads through GitHub
Remove a bunch of old scripts
1 parent 951cae7 commit de88cc9

37 files changed

Lines changed: 37 additions & 3465 deletions

‎.GitHub/agents/fieldworks.cpp-expert.agent.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Your goals:
1616

1717
## FieldWorks-specific workflow (critical)
1818
- Always use the repo scripts unless explicitly instructed otherwise:
19-
- Build: `./build.ps1` (native must build before managed; traversal handles phases)
20-
- Native tests: `./test.ps1 -Native` (dispatches to `scripts/Agent/Invoke-CppTest.ps1`)
19+
- Build: `./build.ps1` (native must build before managed; traversal handles phases)
20+
- Native tests: `./test.ps1 -Native` (dispatches to `Build/scripts/Invoke-CppTest.ps1`)
2121
- Do not rely on `dotnet build` for native projects.
2222

2323
## Default native “fix loop”

‎.github/instructions/testing.instructions.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Use `.\test.ps1` for all managed (C#) tests.
3333

3434
## Running Tests (Native C++)
3535

36-
Use `.\test.ps1 -Native` for native (C++) tests. This wraps `scripts/Agent/Invoke-CppTest.ps1`.
36+
Use `.\test.ps1 -Native` for native (C++) tests. This wraps `Build/scripts/Invoke-CppTest.ps1`.
3737

3838
```powershell
3939
# Build and run TestGeneric (default)
@@ -55,14 +55,14 @@ Tests are built automatically by `test.ps1`. To build explicitly without running
5555
.\build.ps1 -BuildTests
5656
5757
# Build native tests (via Invoke-CppTest backend)
58-
.\scripts\Agent\Invoke-CppTest.ps1 -Action Build -TestProject TestViews
58+
.\Build\scripts\Invoke-CppTest.ps1 -Action Build -TestProject TestViews
5959
```
6060

6161
## Script Architecture
6262

6363
The testing infrastructure relies on shared PowerShell modules for consistency:
6464
-**`test.ps1`**: Main entry point. Dispatches to VSTest (managed) or `Invoke-CppTest.ps1` (native).
65-
-**`scripts/Agent/Invoke-CppTest.ps1`**: Backend for native C++ tests (MSBuild/NMake).
65+
-**`Build/scripts/Invoke-CppTest.ps1`**: Backend for native C++ tests (MSBuild/NMake).
6666
-**`Build/Agent/FwBuildHelpers.psm1`**: Shared logic for VS environment, and process cleanup.
6767

6868
## Debugging & Logs

‎.vscode/tasks.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
"type": "shell",
338338
"command": "./test.ps1 -Native -Configuration ${input:testConfiguration}",
339339
"group": "test",
340-
"detail": "Run native tests via test.ps1 (dispatches to scripts/Agent/Invoke-CppTest.ps1)",
340+
"detail": "Run native tests via test.ps1 (dispatches to Build/scripts/Invoke-CppTest.ps1)",
341341
"options": {
342342
"shell": {
343343
"executable": "powershell.exe",

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ JIRA_PAT_TOKEN=<your-personal-access-token>
111111

112112
### Build & Test ordering
113113
- Native C++ (Phase 2 of `FieldWorks.proj`) must succeed before managed assemblies build. Let `.\build.ps1` enforce this.
114-
- Managed tests come from NUnit/VSTest. Native tests are driven via `scripts/Agent/Invoke-CppTest.ps1`; use `.\test.ps1 -Native` to stay consistent.
114+
- Managed tests come from NUnit/VSTest. Native tests are driven via `Build/scripts/Invoke-CppTest.ps1`; use `.\test.ps1 -Native` to stay consistent.
115115

116116
### COM and Registry
117117
- FieldWorks relies on registration-free COM. Do not register COM components globally or edit the Windows registry unless a spec explicitly directs it.

‎Build/PackageRestore.targets‎

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
<ImportProject="$(MSBuildThisFileDirectory)SilVersions.props" />
2929
<PropertyGroup>
3030
<DownloadsDir>$(fwrt)/Downloads</DownloadsDir>
31+
<!-- GeckofxHtmlToPdf: download from GitHub release (https://github.com/sillsdev/geckofxHtmlToPdf/releases) -->
32+
<GeckofxHtmlToPdfVersion>1.1.0</GeckofxHtmlToPdfVersion>
3133
<!-- PackagesDir: Use local packages folder. -->
3234
<PackagesDir>$(fwrt)/packages</PackagesDir>
3335
</PropertyGroup>
@@ -261,12 +263,25 @@
261263
Condition="'$(UseLocalLibraries)'=='Y'"
262264
/>
263265
<!-- ExCss.dll is now provided by the SIL.ExCSS NuGet package (no TeamCity download needed). -->
264-
<!-- GeckofxHtmlToPdf binaries must be pre-populated in Downloads/ (TeamCity server decommissioned).
265-
Build from https://github.com/sillsdev/geckofxHtmlToPdf and place output in Downloads directory. -->
266-
<Warning
267-
Text="GeckofxHtmlToPdf.exe not found in $(DownloadsDir) - PDF export will not work. Build from https://github.com/sillsdev/geckofxHtmlToPdf and place output in Downloads directory."
266+
<!-- GeckofxHtmlToPdf binaries downloaded from GitHub release (replaces decommissioned TeamCity server). -->
267+
<DownloadFile
268+
Address="https://github.com/sillsdev/geckofxHtmlToPdf/releases/download/$(GeckofxHtmlToPdfVersion)/GeckofxHtmlToPdf.exe"
269+
LocalFilename="GeckofxHtmlToPdf.exe"
270+
DownloadsDir="$(DownloadsDir)"
268271
Condition="'$(OS)'=='Windows_NT' AND !Exists('$(DownloadsDir)/GeckofxHtmlToPdf.exe')"
269272
/>
273+
<DownloadFile
274+
Address="https://github.com/sillsdev/geckofxHtmlToPdf/releases/download/$(GeckofxHtmlToPdfVersion)/GeckofxHtmlToPdf.exe.config"
275+
LocalFilename="GeckofxHtmlToPdf.exe.config"
276+
DownloadsDir="$(DownloadsDir)"
277+
Condition="'$(OS)'=='Windows_NT' AND !Exists('$(DownloadsDir)/GeckofxHtmlToPdf.exe.config')"
278+
/>
279+
<DownloadFile
280+
Address="https://github.com/sillsdev/geckofxHtmlToPdf/releases/download/$(GeckofxHtmlToPdfVersion)/Args.dll"
281+
LocalFilename="Args.dll"
282+
DownloadsDir="$(DownloadsDir)"
283+
Condition="'$(OS)'=='Windows_NT' AND !Exists('$(DownloadsDir)/Args.dll')"
284+
/>
270285
</Target>
271286

272287
<!-- ======================================================================================== -->
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $script:LastLocalOutDir = $null
6565
# Import Shared Module
6666
# =============================================================================
6767

68-
$helpersPath=Join-Path$PSScriptRoot"../../Build/Agent/FwBuildHelpers.psm1"
68+
$helpersPath=Join-Path$PSScriptRoot"../Agent/FwBuildHelpers.psm1"
6969
if (-not (Test-Path$helpersPath)) {
7070
Write-Host"[ERROR] FwBuildHelpers.psm1 not found at $helpersPath"-ForegroundColor Red
7171
exit1
@@ -148,7 +148,7 @@ function Build-FwBuildTasks {
148148
'/p:Platform=x64',
149149
'/nologo'
150150
)
151-
$cmd="cd /d `"$WorktreePath`" && $msbuild$($args-join'')"
151+
$cmd="cd /d `\"$WorktreePath`\" && $msbuild$($args-join'')"
152152
cmd /c $cmd
153153
if ($LASTEXITCODE-ne0) { throw"FwBuildTasks build failed with exit code $LASTEXITCODE" }
154154
}
@@ -165,7 +165,7 @@ function Build-NativeArtifacts {
165165
'/nologo',
166166
'/m'
167167
)
168-
$cmd="cd /d `"$WorktreePath`" && $msbuild$($args-join'')"
168+
$cmd="cd /d `\"$WorktreePath`\" && $msbuild$($args-join'')"
169169
cmd /c $cmd
170170
if ($LASTEXITCODE-ne0) { throw"Native build failed with exit code $LASTEXITCODE" }
171171
}
@@ -182,7 +182,7 @@ function Build-ViewsInterfacesArtifacts {
182182
'/nologo',
183183
'/v:minimal'
184184
)
185-
$cmd="cd /d `"$WorktreePath`" && $msbuild$($args-join'')"
185+
$cmd="cd /d `\"$WorktreePath`\" && $msbuild$($args-join'')"
186186
cmd /c $cmd
187187
if ($LASTEXITCODE-ne0) { throw"ViewsInterfaces build failed with exit code $LASTEXITCODE" }
188188
}
@@ -251,7 +251,7 @@ function Invoke-Build {
251251
$msbuildCmd="$msbuild$($msbuildArgs-join'')"
252252
Write-Host"(cd $WorktreePath) $msbuildCmd"-ForegroundColor Gray
253253

254-
$cmdLine="cd /d `"$WorktreePath`" && $msbuildCmd"
254+
$cmdLine="cd /d `\"$WorktreePath`\" && $msbuildCmd"
255255
cmd /c $cmdLine
256256
if ($LASTEXITCODE-ne0) { throw"MSBuild failed with exit code $LASTEXITCODE" }
257257

@@ -307,8 +307,8 @@ function Invoke-Build {
307307

308308
# VsDevCmd is already initialized by Initialize-VsDevEnvironment
309309

310-
$cmd="cd /d `"$makeDir`" && nmake /nologo BUILD_CONFIG=$Configuration BUILD_TYPE=$buildType BUILD_ROOT=$WorktreePath\ BUILD_ARCH=x64 /f $makefile"
311-
Write-Host"cmd /c `"$cmd`""-ForegroundColor Gray
310+
$cmd="cd /d `\"$makeDir`\" && nmake /nologo BUILD_CONFIG=$Configuration BUILD_TYPE=$buildType BUILD_ROOT=$WorktreePath\ BUILD_ARCH=x64 /f $makefile"
311+
Write-Host"cmd /c `\"$cmd`\""-ForegroundColor Gray
312312
cmd /c $cmd
313313
if ($LASTEXITCODE-ne0) { throw"NMake failed with exit code $LASTEXITCODE" }
314314
}

‎ReadMe.md‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,4 @@ requirements and troubleshooting tips.
9797
We maintain a human-facing `.github/AGENTS.md` plus a small curated set of
9898
`*.instructions.md` files under `.github/instructions/` for prescriptive constraints.
9999

100-
See [.github/AI_GOVERNANCE.md](.github/AI_GOVERNANCE.md) for the documentation taxonomy and “source of truth” rules.
101-
102-
## Recent Changes
103-
104-
**MSBuild Traversal SDK**: FieldWorks now uses Microsoft.Build.Traversal SDK with declarative dependency ordering across 110+ projects organized into 21 build phases. This provides automatic parallel builds, better incremental builds, and clearer dependency management.
105-
106-
**64-bit only + Registration-free COM**: FieldWorks now builds and runs as x64-only with registration-free COM activation. No administrator privileges or COM registration required. See [Docs/64bit-regfree-migration.md](Docs/64bit-regfree-migration.md) for details.
107-
108-
**Unified launcher**: FieldWorks.exe is now the single supported executable. The historical `Flex.exe` stub (LexTextExe) has been removed; shortcuts and scripts should invoke `FieldWorks.exe` directly.
100+
See [.github/AI_GOVERNANCE.md](.github/AI_GOVERNANCE.md) for the documentation taxonomy and “source of truth” rules.

‎run_installer_build.py‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎scripts/Agent/Copilot-Apply.ps1‎

Lines changed: 0 additions & 25 deletions
This file was deleted.

‎scripts/Agent/Copilot-Detect.ps1‎

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)