mirror of
https://github.com/3proxy/3proxy.git
synced 2026-04-06 21:30:12 +08:00
fix builds, add arm64 win, use Makefile.msvc for all builds
This commit is contained in:
parent
ff2757e7e8
commit
5bfafb967e
2
.github/workflows/build-watcom.yml
vendored
2
.github/workflows/build-watcom.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: C/C++ CI
|
||||
name: Build Win32 3proxy-lite with Watcom
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
11
.github/workflows/build-win32.yml
vendored
11
.github/workflows/build-win32.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: C/C++ CI
|
||||
name: Build Win32 3proxy with MSVC
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -28,7 +28,7 @@ jobs:
|
||||
echo "VERSION=VERSION=`"$RELEASE`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "BUILDDATE=BUILDDATE=`"$NOW`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- name: install packages
|
||||
run: vcpkg install pcre2:x86-windows openssl:x86-windows
|
||||
run: vcpkg install pcre2:x86-windows-static openssl:x86-windows-static
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
- name: make Windows MSVC
|
||||
@ -38,8 +38,8 @@ jobs:
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
|
||||
D:
|
||||
cd "D:/a/3proxy/3proxy"
|
||||
set "LIB=%LIB%;c:/vcpkg/installed/x86-windows/lib"
|
||||
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/x86-windows/include"
|
||||
set "LIB=%LIB%;c:/vcpkg/installed/x86-windows-static/lib"
|
||||
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/x86-windows-static/include"
|
||||
echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
|
||||
nmake /F Makefile.msvc
|
||||
- name: make dist dir
|
||||
@ -72,9 +72,6 @@ jobs:
|
||||
copy authors dist\3proxy\
|
||||
copy README dist\3proxy\
|
||||
copy rus.3ps dist\3proxy\
|
||||
copy /Y c:\vcpkg\installed\x86-windows\bin\pcre2-8.dll dist\3proxy\bin
|
||||
copy /Y c:\vcpkg\installed\x86-windows\bin\*crypto*.dll dist\3proxy\bin
|
||||
copy /Y c:\vcpkg\installed\x86-windows\bin\*ssl*.dll dist\3proxy\bin
|
||||
- name: Get artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
20
.github/workflows/build-win64.yml
vendored
20
.github/workflows/build-win64.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: C/C++ CI
|
||||
name: Build Win64 3proxy with MSVC
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -28,7 +28,7 @@ jobs:
|
||||
echo "VERSION=VERSION=`"$RELEASE`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "BUILDDATE=BUILDDATE=`"$NOW`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- name: install packages
|
||||
run: vcpkg install pcre2:x64-windows openssl:x64-windows
|
||||
run: vcpkg install pcre2:x64-windows-static openssl:x64-windows-static
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
- name: make Windows MSVC
|
||||
@ -38,11 +38,10 @@ jobs:
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
D:
|
||||
cd "D:/a/3proxy/3proxy"
|
||||
mkdir bin64
|
||||
set "LIB=%LIB%;c:/vcpkg/installed/x64-windows/lib"
|
||||
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/x64-windows/include"
|
||||
set "LIB=%LIB%;c:/vcpkg/installed/x64-windows-static/lib"
|
||||
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/x64-windows-static/include"
|
||||
echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
|
||||
nmake /F Makefile.msvc64
|
||||
nmake /F Makefile.msvc
|
||||
- name: make dist dir
|
||||
shell: cmd
|
||||
run: |
|
||||
@ -58,9 +57,9 @@ jobs:
|
||||
mkdir dist\3proxy\doc\html\man3
|
||||
mkdir dist\3proxy\doc\html\man8
|
||||
mkdir dist\3proxy\doc\devel
|
||||
copy bin64\3proxy.exe dist\3proxy\bin64\
|
||||
copy bin64\*.dll dist\3proxy\bin64\
|
||||
copy bin64\mycrypt.exe dist\3proxy\bin64\
|
||||
copy bin\3proxy.exe dist\3proxy\bin64\
|
||||
copy bin\*.dll dist\3proxy\bin64\
|
||||
copy bin\mycrypt.exe dist\3proxy\bin64\
|
||||
copy cfg\*.* dist\3proxy\cfg\
|
||||
copy cfg\sql\*.* dist\3proxy\cfg\sql\
|
||||
copy doc\ru\*.* dist\3proxy\doc\ru\
|
||||
@ -73,9 +72,6 @@ jobs:
|
||||
copy authors dist\3proxy\
|
||||
copy README dist\3proxy\
|
||||
copy rus.3ps dist\3proxy\
|
||||
copy /Y c:\vcpkg\installed\x64-windows\bin64\pcre2-8.dll dist\3proxy\bin64
|
||||
copy /Y c:\vcpkg\installed\x64-windows\bin64\*crypto*.dll dist\3proxy\bin64
|
||||
copy /Y c:\vcpkg\installed\x64-windows\bin64\*ssl*.dll dist\3proxy\bin64
|
||||
- name: Get artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
79
.github/workflows/build-winarm64.yml
vendored
Normal file
79
.github/workflows/build-winarm64.yml
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
name: Build Win-arm64 3proxy with MSVC
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "test-ci" ]
|
||||
paths: [ 'RELEASE', '.github/workflows/build-win32.yml' ]
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }}"
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- windows-2022
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# - name: configure
|
||||
# run: ./configure
|
||||
- name: set date
|
||||
run: |
|
||||
$NOW = Get-Date -Format "yyMMddHHmmss"
|
||||
echo "now: $NOW"
|
||||
$RELEASE = Get-Content -Path "RELEASE" -Raw
|
||||
echo "release: $RELEASE"
|
||||
echo "NOW=$NOW" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "VERSION=VERSION=`"$RELEASE`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "BUILDDATE=BUILDDATE=`"$NOW`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- name: install packages
|
||||
run: vcpkg install pcre2:arm64-windows-static openssl:arm64-windows-static
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
- name: make Windows MSVC
|
||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
||||
shell: cmd
|
||||
run: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsx86_arm64.bat"
|
||||
D:
|
||||
cd "D:/a/3proxy/3proxy"
|
||||
set "LIB=%LIB%;c:/vcpkg/installed/arm64-windows-static/lib"
|
||||
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/arm64-windows-static/include"
|
||||
echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
|
||||
nmake /F Makefile.msvc
|
||||
- name: make dist dir
|
||||
shell: cmd
|
||||
run: |
|
||||
mkdir dist
|
||||
mkdir dist\3proxy
|
||||
mkdir dist\3proxy\bin64
|
||||
mkdir dist\3proxy\cfg
|
||||
mkdir dist\3proxy\cfg\sql
|
||||
mkdir dist\3proxy\doc
|
||||
mkdir dist\3proxy\doc\ru
|
||||
mkdir dist\3proxy\doc\html
|
||||
mkdir dist\3proxy\doc\html\plugins
|
||||
mkdir dist\3proxy\doc\html\man3
|
||||
mkdir dist\3proxy\doc\html\man8
|
||||
mkdir dist\3proxy\doc\devel
|
||||
copy bin\3proxy.exe dist\3proxy\bin64\
|
||||
copy bin\*.dll dist\3proxy\bin64\
|
||||
copy bin\mycrypt.exe dist\3proxy\bin64\
|
||||
copy cfg\*.* dist\3proxy\cfg\
|
||||
copy cfg\sql\*.* dist\3proxy\cfg\sql\
|
||||
copy doc\ru\*.* dist\3proxy\doc\ru\
|
||||
copy doc\html\*.* dist\3proxy\doc\html\
|
||||
copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
|
||||
copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
|
||||
copy doc\html\man3\*.* dist\3proxy\doc\html\man3\
|
||||
copy doc\devel\*.rtf dist\3proxy\doc\devel\
|
||||
copy copying dist\3proxy\
|
||||
copy authors dist\3proxy\
|
||||
copy README dist\3proxy\
|
||||
copy rus.3ps dist\3proxy\
|
||||
- name: Get artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}"
|
||||
path: dist/
|
||||
@ -15,11 +15,10 @@ BUILDDATE=/D BUILDDATE=\"$(NOW)\"
|
||||
!ENDIF
|
||||
COUT = /Fo
|
||||
LN = link
|
||||
LDFLAGS = /nologo /subsystem:console /incremental:no /machine:I386
|
||||
LDFLAGS = /nologo /subsystem:console /incremental:no
|
||||
DLFLAGS = /DLL
|
||||
DLSUFFICS = .dll
|
||||
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib Crypt32.lib libcrypto.lib libssl.lib
|
||||
LIBSOLD = libeay32MT.lib ssleay32MT.lib
|
||||
LIBSPREFIX =
|
||||
LIBSSUFFIX = .lib
|
||||
LIBEXT = .lib
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
|
||||
BUILDDIR = ../bin64/
|
||||
CC = cl
|
||||
CFLAGS = /nologo /MT /W3 /Ox /EHs- /GS /GA /GF /D "MSVC" /D "WITH_WSAPOLL" /D "WITH_SSL" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c
|
||||
!IFDEF VERSION
|
||||
CFLAGS = $CFLAGS /D $VERSION
|
||||
!IFDEF RELEASE
|
||||
VERSION=/D VERSION=\"3proxy-$(RELEASE)\"
|
||||
!ENDIF
|
||||
!IFDEF BUILDDATE
|
||||
CFLAGS = $CFLAGS /D $BUILDDATE
|
||||
!IFDEF NOW
|
||||
BUILDDATE=/D BUILDDATE=\"$(NOW)\"
|
||||
!ENDIF
|
||||
CFLAGS = /nologo /MT /W3 /Ox /EHs- /GS /GA /GF /D "MSVC" /D "WITH_WSAPOLL" /D "WITH_SSL" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c $(VERSION) $(BUILDDATE)
|
||||
COUT = /Fo
|
||||
LN = link
|
||||
LDFLAGS = /nologo /subsystem:console /incremental:no /machine:arm64
|
||||
|
||||
Loading…
Reference in New Issue
Block a user