mirror of https://github.com/axmolengine/axmol.git
Update emsdk to 3.1.56
This commit is contained in:
parent
f6061ee1ba
commit
966527f53b
|
@ -6,7 +6,11 @@
|
|||
#
|
||||
|
||||
### 1kdist url
|
||||
find_program(PWSH_COMMAND NAMES pwsh powershell NO_PACKAGE_ROOT_PATH NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED)
|
||||
find_program(PWSH_COMMAND NAMES pwsh powershell NO_PACKAGE_ROOT_PATH NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)
|
||||
|
||||
if(NOT PWSH_COMMAND)
|
||||
message(WARNING "fetch.cmake: PowerShell is missing, the function _1kfetch not work, please install from https://github.com/PowerShell/PowerShell/releases")
|
||||
endif()
|
||||
|
||||
function(_1kfetch_init)
|
||||
execute_process(COMMAND ${PWSH_COMMAND} ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/fetchurl.ps1
|
||||
|
@ -58,11 +62,26 @@ endfunction()
|
|||
|
||||
# params: name, url
|
||||
function(_1kfetch name)
|
||||
set(oneValueArgs VERSION URI)
|
||||
cmake_parse_arguments(opt "" "${oneValueArgs}" "" ${ARGN})
|
||||
|
||||
set(_pkg_ver)
|
||||
if(opt_VERSION)
|
||||
set(_pkg_ver ${opt_VERSION})
|
||||
endif()
|
||||
|
||||
if(NOT opt_URI)
|
||||
set(_pkg_uri ${_1kfetch_manifest})
|
||||
else()
|
||||
set(_pkg_uri ${opt_URI})
|
||||
endif()
|
||||
|
||||
set(_pkg_store "${_1kfetch_cache_dir}/${name}")
|
||||
execute_process(COMMAND ${PWSH_COMMAND} ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/fetch.ps1
|
||||
-name "${name}"
|
||||
-uri ${_1kfetch_manifest}
|
||||
-uri "${_pkg_uri}"
|
||||
-prefix "${_1kfetch_cache_dir}"
|
||||
-version "${_pkg_ver}"
|
||||
RESULT_VARIABLE _errorcode
|
||||
)
|
||||
if (_errorcode)
|
||||
|
|
20
1k/fetch.ps1
20
1k/fetch.ps1
|
@ -100,18 +100,24 @@ if ($uri -match '^([a-z]+://|git@)') {
|
|||
}
|
||||
|
||||
# checkout revision for git repo
|
||||
if (!$revision) { $revision = $version }
|
||||
if ($is_git_repo) {
|
||||
$old_rev_hash = $(git -C $lib_src rev-parse HEAD)
|
||||
|
||||
$tag_info = git -C $lib_src tag | Select-String $revision
|
||||
if ($tag_info) {
|
||||
$revision = ([array]$tag_info.Line)[0]
|
||||
}
|
||||
|
||||
println "old_rev_hash=$old_rev_hash"
|
||||
$pred_rev_hash = $(git -C $lib_src rev-parse --verify --quiet "$revision^{}")
|
||||
println "(1)parsed pred_rev_hash: $revision@$pred_rev_hash"
|
||||
|
||||
if(!$pred_rev_hash) {
|
||||
if (!$pred_rev_hash) {
|
||||
git -C $lib_src fetch
|
||||
$pred_rev_hash = $(git -C $lib_src rev-parse --verify --quiet "$revision^{}")
|
||||
println "(2)parsed pred_rev_hash: $revision@$pred_rev_hash"
|
||||
if(!$pred_rev_hash) {
|
||||
if (!$pred_rev_hash) {
|
||||
throw "Could not found commit hash of $revision"
|
||||
}
|
||||
}
|
||||
|
@ -167,8 +173,14 @@ else {
|
|||
$url_base = @{'github' = 'https://github.com/'; 'gitee' = 'https://gitee.com/' }[$mirror]
|
||||
|
||||
$manifest_map = ConvertFrom-Json (Get-Content $uri -raw)
|
||||
$version_map = $manifest_map.versions
|
||||
$pkg_ver = $version_map.PSObject.Properties[$name].Value
|
||||
|
||||
if (!$version) {
|
||||
$version_map = $manifest_map.versions
|
||||
$pkg_ver = $version_map.PSObject.Properties[$name].Value
|
||||
}
|
||||
else {
|
||||
$pkg_ver = $version
|
||||
}
|
||||
if ($pkg_ver) {
|
||||
$url_path = $manifest_map.mirrors.PSObject.Properties[$mirror].Value.PSObject.Properties[$name].Value
|
||||
if (!$url_path) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
if ($Global:is_axmol_app -or $Global:is_axmol_engine) {
|
||||
$manifest['nuget'] = '5.5.1' # since 5.6.0, require .net 4.0
|
||||
$manifest['glslcc'] = '1.9.4+'
|
||||
$manifest['emsdk'] = '3.1.55'
|
||||
$manifest['emsdk'] = '3.1.56'
|
||||
|
||||
# android sdk tools
|
||||
$android_sdk_tools['build-tools'] = '34.0.0' # match with AGP, current 8.2.1 android studio 2023.1.1
|
||||
|
|
|
@ -165,11 +165,8 @@ if (!$use_gradle) {
|
|||
$options.xb += '--target', $cmake_target
|
||||
}
|
||||
|
||||
if($is_android) {
|
||||
Write-Host $options.xc
|
||||
if (!"$($options.xc)".Contains('-DANDROID_STL')) {
|
||||
$options.xc += '-DANDROID_STL=c++_shared'
|
||||
}
|
||||
if($is_android -and !"$($options.xc)".Contains('-DANDROID_STL')) {
|
||||
$options.xc += '-DANDROID_STL=c++_shared'
|
||||
}
|
||||
} else { # android gradle
|
||||
# engine ci
|
||||
|
|
Loading…
Reference in New Issue