File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Exit on any error
12$ErrorActionPreference = " Stop"
23
3- Write-Host " Building MonoGame Assemblies... " - ForegroundColor Green
4- dotnet build external/ MonoGame/ MonoGame.Framework.Content.Pipeline/ MonoGame.Framework.Content.Pipeline.csproj - p:DisableNativeBuild = true
4+ $FrameworkDll = " external/ MonoGame/Artifacts/MonoGame.Framework/DesktopGL/Debug/MonoGame.Framework.dll "
5+ $PipelineDll = " external/MonoGame/Artifacts/ MonoGame.Framework.Content.Pipeline/Debug/ MonoGame.Framework.Content.Pipeline.dll "
56
6- Write-Host " Running DocFX..." - ForegroundColor Green
7+ # Check if submodules are initialized
8+ $submoduleStatus = git submodule status
9+ if ($submoduleStatus -match ' ^-' ) {
10+ Write-Host " Submodules not initialized. Running git submodule update..." - ForegroundColor Yellow
11+ git submodule update -- init -- recursive
12+ }
13+
14+ # Check if dlls are already built
15+ if (-not (Test-Path $FrameworkDll ) -or -not (Test-Path $PipelineDll )) {
16+ Write-Host " Required Assemblies for documentation not found. Building assemblies..." - ForegroundColor Yellow
17+ dotnet build external/ MonoGame/ MonoGame.Framework.Content.Pipeline/ MonoGame.Framework.Content.Pipeline.csproj - p:DisableNativeBuild= true
18+ }
19+
20+ # Build documentation
21+ Write-Host " Building DocFx..." - ForegroundColor Green
722dotnet docfx docfx.json
823
924Write-Host " Build and documentation generation completed successfully!" - ForegroundColor Green
Original file line number Diff line number Diff line change 22
33set -e
44
5- echo " Building MonoGame Assemblies... "
6- dotnet build external/MonoGame/MonoGame.Framework.Content.Pipeline/MonoGame.Framework.Content.Pipeline.csproj -p:DisableNativeBuild=true
5+ FRAMEWORK_DLL= " external/ MonoGame/Artifacts/MonoGame.Framework/DesktopGL/Debug/MonoGame.Framework.dll "
6+ PIPELINE_DLL= " external/MonoGame/Artifacts/ MonoGame.Framework.Content.Pipeline/Debug/ MonoGame.Framework.Content.Pipeline.dll "
77
8- echo " Running DocFX..."
8+ # Check if submodules are initialized
9+ if git submodule status | grep -q ' ^-' ; then
10+ echo " Submodules not initialized. Running git submodule update..."
11+ git submodule update --init --recursive
12+ fi
13+
14+ # Check if dlls are already built
15+ if [ ! -f " $FRAMEWORK_DLL " ] || [ ! -f " $PIPELINE_DLL " ]; then
16+ echo " Required Assemblies for documentation not found. Building assemblies..."
17+ dotnet build external/MonoGame/MonoGame.Framework.Content.Pipeline/MonoGame.Framework.Content.Pipeline.csproj -p:DisableNativeBuild=true
18+ fi
19+
20+ # Build documentation
21+ echo " Building DocFx..."
922dotnet docfx docfx.json
1023
1124echo " Build and documentation generation completed successfully!"
You can’t perform that action at this time.
0 commit comments