55 - job : BuildDll64
66 displayName : ' Build 64-bit dll'
77 pool :
8- vmImage : ' windows-2022 '
8+ vmImage : ' windows-latest '
99 steps :
1010 - task : PowerShell@2
1111 displayName : ' Build dll'
@@ -46,38 +46,4 @@ stages:
4646 inputs :
4747 targetPath : ' Resources/Native/Melanchall_DryWetMidi_Native64.dylib'
4848 artifactName : ' Melanchall_DryWetMidi_Native64.dylib'
49- artifactType : pipeline
50- - job : BuildDll32
51- displayName : ' Build 32-bit dll'
52- pool :
53- vmImage : ' windows-2022'
54- steps :
55- - task : PowerShell@2
56- displayName : ' Build dll'
57- inputs :
58- targetType : ' inline'
59- script : |
60- Write-Host "Downloading winlibs..."
61- $ProgressPreference = 'SilentlyContinue'
62- Invoke-WebRequest -Uri "https://github.com/brechtsanders/winlibs_mingw/releases/download/11.1.0-12.0.0-9.0.0-r1/winlibs-i686-posix-dwarf-gcc-11.1.0-mingw-w64-9.0.0-r1.zip" -OutFile "winlibs.zip"
63- Write-Host "Downloaded."
64-
65- Write-Host "Extracting winlibs..."
66- Expand-Archive -LiteralPath 'winlibs.zip' -DestinationPath "winlibs"
67- Write-Host "Extracted."
68-
69- Write-Host "Building DLL..."
70- $gccPath = Get-ChildItem -Path "winlibs" -File -Filter "i686-w64-mingw32-gcc.exe" -Recurse
71-
72- cd Resources\Native
73- Write-Host "Step 1"
74- & $gccPath.FullName -c NativeApi-Windows.cpp -m32 -lwinmm -lstdc++
75- Write-Host "Step 2"
76- & $gccPath.FullName -shared -o Melanchall_DryWetMidi_Native32.dll NativeApi-Windows.o -m32 -lwinmm -lstdc++
77- Write-Host "Built."
78- - task : PublishPipelineArtifact@1
79- displayName : ' Publish dll artifact'
80- inputs :
81- targetPath : ' Resources\Native\Melanchall_DryWetMidi_Native32.dll'
82- artifactName : ' Melanchall_DryWetMidi_Native32.dll'
8349 artifactType : pipeline
0 commit comments