Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: hubt Linux CI/CD

on:
push:
pull_request:
workflow_dispatch:


jobs:
Expand Down
10 changes: 10 additions & 0 deletions Util/BuildTools/Package.bat
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,16 @@ if %DO_COPY_FILES%==true (
:: 拷贝DirectX Runtime中所有的dll文件到运行exe所需的dll目录下
echo d | xcopy /y /s "!XCOPY_FROM!Build\dependencies\prerequisites\DirectX_Runtime\*.dll" "!XCOPY_TO!CarlaUE4\Binaries\Win64"
)

:: copy launch CarlaUE4.exe script including VC143_CRT Runtime installer
set LAUNCH_GAME_FILE="!XCOPY_FROM!Util\package\CarlaUE4.bat"
if exist "!LAUNCH_GAME_FILE!" (
echo d | xcopy /y /s "!XCOPY_FROM!Util\package\CarlaUE4.bat" "!XCOPY_TO!"
)
set VC143_CRT_FILE="!XCOPY_FROM!Build\dependencies\prerequisites\vc_redist.x64.exe"
if exist "!VC143_CRT_FILE!" (
echo d | xcopy /y /s "!XCOPY_FROM!Build\dependencies\prerequisites\vc_redist.x64.exe" "!XCOPY_TO!CarlaUE4"
)
)
call :get_current_time_in_seconds T_END_DO_COPY_FILES
set /A ELAPSED_TIME=!T_END_DO_COPY_FILES! - !T_START_DO_COPY_FILES!
Expand Down
23 changes: 21 additions & 2 deletions Util/download_from_git.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 用法
# 1. 下载模拟器:
# hutb_downloader.exe
# 2. 下载发行版:
# hutb_downloader.exe -r lfs_demo
# 3. 添加不删除.git记录的选项(--skipp, -s)
#
# 打包方法:
# Pyinstaller download_from_git.py --onefile --name hutb_downloader -i hutb_log.ico
#
#
# 从git下载发行版
# 参考:https://cloud.tencent.com/developer/article/1600803
#
Expand Down Expand Up @@ -34,8 +45,7 @@
# Pyinstaller download_from_git.py --onefile --add-data "git\bin\bash.exe;git\bin\" --add-data "git\bin\git.exe;git\bin\" -i hutb_log.ico --name hutb_downloader
#
#
#
# 上传到远程服务器:
# 0. 上传到远程服务器:
# python.exe download_from_git.py -u release


Expand All @@ -44,12 +54,20 @@
import inspect
import os
import shutil
import ssl
import stat
import sys
import subprocess
import urllib.request
import zipfile


# 解决:urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1017)>
# https://www.cnblogs.com/lxmtx/p/12929905.html
# 全局取消证书验证
ssl._create_default_https_context = ssl._create_unverified_context


# 获取当前代码路径的上级目录
home_dir = os.path.abspath(os.path.join(os.getcwd(), ".."))
# 获取当前脚本所在的路径
Expand Down Expand Up @@ -100,6 +118,7 @@




def show_progress_bar(current, total, bar_length=40):
"""显示进度条"""
percentage = 100.0 if total == 0 else (current / total) * 100
Expand Down
31 changes: 31 additions & 0 deletions Util/package/CarlaUE4.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@echo off
setlocal enabledelayedexpansion

echo.
echo Checking Microsoft Visual C++ 2022 Installation Status...


:: check VC_redist 64 is installed or not
:: wmic product where "name like 'Microsoft Visual C++ 2022 x64 Additional Runtime%%'"

:: wmic product where "name like 'Microsoft Visual C++ 2022 x64 Additional Runtime%%'" | findstr /i /c:"No Instance(s) Available." >nul

for /f "delims=" %%a in ('wmic product where "name like 'Microsoft Visual C++ 2022 x64 Additional Runtime%%'" 2^>^&1') do (
echo %%a | findstr /i /c:"No Instance(s)" >nul && set found=1
)

if !found!==1 (
echo No VC_redist 64 installed.
echo Installing...
start /wait %cd%\CarlaUE4\vc_redist.x64.exe /install /quiet /norestart
echo VC_redist 64 install success.
) else (
echo VC_redist 64 installed
)


echo Microsoft Visual C++ 2022 check finished.

CarlaUE4.exe

endlocal
13 changes: 0 additions & 13 deletions launch.bat

This file was deleted.

13 changes: 0 additions & 13 deletions package.bat

This file was deleted.

Loading