Skip to content

Create generate-pdf.yml #632

Create generate-pdf.yml

Create generate-pdf.yml #632

name: modharbour IIS Win64 msvc
on:
push:
jobs:
build:
runs-on: windows-latest
if: github.actor == github.event.repository.owner.login
steps:
- uses: actions/checkout@v2
- name: Checkout harbour/core repo
uses: actions/checkout@v2
with:
repository: harbour/core
path: harbour
- name: Install dependencies
run: |
choco install apache-httpd --params '"/installLocation:C:"'
choco install openssl
choco install curl
Copy-Item 'C:\Program Files\OpenSSL-Win64' 'C:\OpenSSL-Win64' -Recurse
Copy-Item 'C:\ProgramData\chocolatey\lib\curl\tools\curl-7.78.0-win64-mingw' 'C:\curl' -Recurse
(Get-Content -path harbour\contrib\hbssl\hbssl.hbp) -replace 'libeay32','libcrypto' | Set-Content -path harbour\contrib\hbssl\hbssl.hbp
(Get-Content -path harbour\contrib\hbssl\hbssl.hbp) -replace 'ssleay32','libssl' | Set-Content -path harbour\contrib\hbssl\hbssl.hbp
(Get-Content -path harbour\contrib\hbssl\hbssl.hbc) -replace 'libeay32','libcrypto-1_1-x64' | Set-Content -path harbour\contrib\hbssl\hbssl.hbc
(Get-Content -path harbour\contrib\hbssl\hbssl.hbc) -replace 'ssleay32','libssl-1_1-x64' | Set-Content -path harbour\contrib\hbssl\hbssl.hbc
(Get-Content -path harbour\contrib\hbcurl\hbcurl.hbp) -replace 'libcurl','libcurl-x64' | Set-Content -path harbour\contrib\hbcurl\hbcurl.hbp
- name: Compile Harbour
shell: cmd
run: |
cd harbour
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
set HB_BUILD_MODE=c
set HB_USER_PRGFLAGS=-l-
set HB_BUILD_CONTRIBS=
set HB_WITH_OPENSSL=C:\OpenSSL-Win64\include
set HB_WITH_CURL=C:\curl\include
set HB_OPENSSL_STATIC=yes
set HB_STATIC_OPENSSL=yes
set HB_STATIC_CURL=yes
set HB_BUILD_DYN=no
set HB_BUILD_CONTRIB_DYN=no
set HB_COMPILER=msvc64
win-make.exe
copy lib\win\msvc64\libcrypto-1_1-x64.lib lib\win\msvc64\libcrypto.lib
copy lib\win\msvc64\libssl-1_1-x64.lib lib\win\msvc64\libeay32.lib
copy lib\win\msvc64\libcurl-x64.lib lib\win\msvc64\libcurl.lib
- name: Build mod_harbour solution
shell: cmd
run: |
cd IIS
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
msbuild.exe mod_harbour.sln /p:Configuration=Release
c:\harbour\bin\win\msvc64\hbmk2 modharbour.hbp -comp=msvc64 -Lc:\Apache24\lib
copy D:\a\mod_harbour\mod_harbour\IIS\x64\Release\mod_harbour.dll D:\a\mod_harbour\mod_harbour\IIS\bin\mod_harbour.dll
copy D:\a\mod_harbour\mod_harbour\IIS\libharbour.dll D:\a\mod_harbour\mod_harbour\IIS\bin\libharbour.dll
copy D:\a\mod_harbour\mod_harbour\IIS\readme.md D:\a\mod_harbour\mod_harbour\IIS\bin
xcopy D:\a\mod_harbour\mod_harbour\samples D:\a\mod_harbour\mod_harbour\IIS\bin\samples\ /E
- name: Get current date
uses: srfrnk/current-time@master
id: current-time
with:
format: YYYY_MM_DD
- name: Building the final zip with mod_harbour, msvc redistributable and required DLLs inside
env:
TIME: "${{ steps.current-time.outputs.formattedTime }}"
uses: actions/upload-artifact@v2
with:
name: modharbour_IIS_win64_${{ env.TIME }}
path: D:\a\mod_harbour\mod_harbour\IIS\bin