kopia lustrzana https://github.com/OpenDroneMap/ODM
Update poisson recon, fix automated CI on Windows
rodzic
b571281b7b
commit
0043e98b04
|
@ -22,29 +22,23 @@ jobs:
|
|||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x64
|
||||
toolset: "14.27.29110"
|
||||
- name: Extract code signing cert
|
||||
id: code_sign
|
||||
uses: timheuer/base64-to-file@v1
|
||||
with:
|
||||
fileName: 'comodo.pfx'
|
||||
encodedString: ${{ secrets.CODE_SIGNING_CERT }}
|
||||
- name: Setup code signing
|
||||
env:
|
||||
CODE_SIGN_CERT_PATH: ${{ steps.code_sign.outputs.filePath }}
|
||||
run: |
|
||||
New-Item -Path "HKCU:\SOFTWARE\Jordan Russell\Inno Setup" -Name SignTools -Force
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Jordan Russell1\Inno Setup\SignTools" -Name SignTool0 -Value ("signtool=\""" + (Get-Command signtool).Source + """ sign /f \""$env.CODE_SIGN_CERT_PATH\"" /t http://timestamp.sectigo.com " + '$f')
|
||||
- name: Install and create venv
|
||||
- name: Install venv
|
||||
run: |
|
||||
python -m pip install virtualenv
|
||||
python -m virtualenv venv
|
||||
- name: Build sources
|
||||
run: |
|
||||
python configure.py build
|
||||
- name: Create setup
|
||||
env:
|
||||
CODE_SIGN_CERT_PATH: ${{ steps.code_sign.outputs.filePath }}
|
||||
run: |
|
||||
python configure.py dist
|
||||
python configure.py dist --signtool-path $((Get-Command signtool).Source) --code-sign-cert-path $env:CODE_SIGN_CERT_PATH
|
||||
- name: Upload Setup File
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
|
|
@ -162,14 +162,14 @@ ProcessorCount(nproc)
|
|||
|
||||
if (WIN32)
|
||||
set (POISSON_BUILD_CMD ${CMAKE_MAKE_PROGRAM} ${SB_SOURCE_DIR}/PoissonRecon/PoissonRecon.vcxproj /p:configuration=${CMAKE_BUILD_TYPE} /p:PlatformToolset=${CMAKE_VS_PLATFORM_TOOLSET} /p:WindowsTargetPlatformVersion=${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION})
|
||||
set (POISSON_BIN_PATH "Win32/${CMAKE_BUILD_TYPE}/PoissonRecon.exe")
|
||||
set (POISSON_BIN_PATH "x64/${CMAKE_BUILD_TYPE}/PoissonRecon.exe")
|
||||
else()
|
||||
set (POISSON_BUILD_CMD make -j${nproc} poissonrecon)
|
||||
set (POISSON_BIN_PATH "Linux/PoissonRecon")
|
||||
endif()
|
||||
externalproject_add(poissonrecon
|
||||
GIT_REPOSITORY https://github.com/mkazhdan/PoissonRecon.git
|
||||
GIT_TAG ce5005ae3094d902d551a65a8b3131e06f45e7cf
|
||||
GIT_REPOSITORY https://github.com/OpenDroneMap/PoissonRecon.git
|
||||
GIT_TAG 250
|
||||
PREFIX ${SB_BINARY_DIR}/PoissonRecon
|
||||
SOURCE_DIR ${SB_SOURCE_DIR}/PoissonRecon
|
||||
UPDATE_COMMAND ""
|
||||
|
|
|
@ -4,6 +4,7 @@ set(_SB_BINARY_DIR "${SB_BINARY_DIR}/${_proj_name}")
|
|||
if (WIN32)
|
||||
set(WIN32_CMAKE_EXTRA_ARGS -DPYTHON3_NUMPY_INCLUDE_DIRS=${PYTHON_HOME}/lib/site-packages/numpy/core/include
|
||||
-DPYTHON3_PACKAGES_PATH=${PYTHON_HOME}/lib/site-packages
|
||||
-DPYTHON3_EXECUTABLE=${PYTHON_EXE_PATH}
|
||||
-DWITH_MSMF=OFF
|
||||
-DOPENCV_LIB_INSTALL_PATH=${SB_INSTALL_DIR}/lib
|
||||
-DOPENCV_BIN_INSTALL_PATH=${SB_INSTALL_DIR}/bin)
|
||||
|
|
|
@ -14,7 +14,7 @@ ExternalProject_Add(${_proj_name}
|
|||
STAMP_DIR ${_SB_BINARY_DIR}/stamp
|
||||
#--Download step--------------
|
||||
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
|
||||
URL https://github.com/PDAL/PDAL/archive/2.2.0.zip
|
||||
URL https://github.com/PDAL/PDAL/archive/refs/tags/2.3RC1.zip
|
||||
#--Update/Patch step----------
|
||||
UPDATE_COMMAND ""
|
||||
#--Configure step-------------
|
||||
|
|
32
configure.py
32
configure.py
|
@ -29,6 +29,17 @@ parser.add_argument('--vcpkg-archive-url',
|
|||
default='https://github.com/OpenDroneMap/windows-deps/releases/download/2.5.0/vcpkg-export-250.zip',
|
||||
required=False,
|
||||
help='Path to VCPKG export archive')
|
||||
parser.add_argument('--code-sign-cert-path',
|
||||
type=str,
|
||||
default='',
|
||||
required=False,
|
||||
help='Path to pfx code signing certificate')
|
||||
parser.add_argument('--signtool-path',
|
||||
type=str,
|
||||
default='',
|
||||
required=False,
|
||||
help='Path to signtool.exe')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
def run(cmd, cwd=os.getcwd()):
|
||||
|
@ -48,7 +59,7 @@ def rmtree(top):
|
|||
os.remove(filename)
|
||||
for name in dirs:
|
||||
os.rmdir(os.path.join(root, name))
|
||||
os.rmdir(top)
|
||||
os.rmdir(top)
|
||||
|
||||
def vcpkg_requirements():
|
||||
with open("vcpkg-requirements.txt") as f:
|
||||
|
@ -129,14 +140,22 @@ def clean():
|
|||
safe_remove(os.path.join("SuperBuild", "install"))
|
||||
|
||||
def dist():
|
||||
if not os.path.exists("SuperBuild\\download"):
|
||||
print("You need to run configure.py build before you can run dist")
|
||||
exit(1)
|
||||
|
||||
# Download VC++ runtime
|
||||
vcredist_path = os.path.join("SuperBuild", "download", "vc_redist.x64.exe")
|
||||
vcredist_path = os.path.join("SuperBuild", "download", "vc_redist.x64.zip")
|
||||
if not os.path.isfile(vcredist_path):
|
||||
vcredist_url = "https://aka.ms/vs/16/release/vc_redist.x64.exe"
|
||||
vcredist_url = "https://github.com/OpenDroneMap/windows-deps/releases/download/2.5.0/VC_redist.x64.zip"
|
||||
print("Downloading %s" % vcredist_url)
|
||||
with urllib.request.urlopen(vcredist_url) as response, open(vcredist_path, 'wb') as out_file:
|
||||
shutil.copyfileobj(response, out_file)
|
||||
|
||||
print("Extracting --> vc_redist.x64.exe")
|
||||
with zipfile.ZipFile(vcredist_path) as z:
|
||||
z.extractall(os.path.join("SuperBuild", "download"))
|
||||
|
||||
# Download portable python
|
||||
if not os.path.isdir("python38"):
|
||||
pythonzip_path = os.path.join("SuperBuild", "download", "python38.zip")
|
||||
|
@ -166,9 +185,12 @@ def dist():
|
|||
print("Extracting --> innosetup/")
|
||||
with zipfile.ZipFile(innosetupzip_path) as z:
|
||||
z.extractall("innosetup")
|
||||
|
||||
|
||||
# Run
|
||||
run("innosetup\\compil32 /cc \"innosetup.iss\"")
|
||||
cs_flags = ""
|
||||
if args.code_sign_cert_path and args.signtool_path:
|
||||
cs_flags = '"/Ssigntool=%s sign /f %s /t http://timestamp.sectigo.com $f"' % (args.signtool_path, args.code_sign_cert_path)
|
||||
run("innosetup\\iscc /Qp " + cs_flags + " \"innosetup.iss\"")
|
||||
|
||||
print("Done! Setup created in dist/")
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue