Skip to content

Commit

Permalink
Update 1k & copyright notice in some sources
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Aug 7, 2024
1 parent eaea407 commit ceffa85
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 29 deletions.
13 changes: 11 additions & 2 deletions 1k/1kiss.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,9 @@ function devtool_url($filename) {
function version_eq($ver1, $ver2) {
return $ver1 -eq $ver2
}
function version_like($ver1, $ver2) {
return $ver1 -like $ver2
}

# $ver2: accept x.y.z-rc1
function version_ge($ver1, $ver2) {
Expand Down Expand Up @@ -569,6 +572,7 @@ function find_prog($name, $path = $null, $mode = 'ONLY', $cmd = $null, $params =
$checkVerCond = $null
$minimalVer = ''
$preferredVer = ''
$wildcardVer = ''
$requiredVer = $manifest[$name]
if ($requiredVer) {
$preferredVer = $null
Expand All @@ -591,7 +595,13 @@ function find_prog($name, $path = $null, $mode = 'ONLY', $cmd = $null, $params =
$checkVerCond = '$(version_in_range $foundVer $minimalVer $preferredVer)'
}
else {
$checkVerCond = '$(version_eq $foundVer $preferredVer)'
if (!$preferredVer.Contains('*')) {
$checkVerCond = '$(version_eq $foundVer $preferredVer)'
} else {
$wildcardVer = $preferredVer
$preferredVer = $wildcardVer.TrimLast('*')
$checkVerCond = '$(version_like $foundVer $wildcardVer)'
}
}
}
}
Expand Down Expand Up @@ -645,7 +655,6 @@ function find_prog($name, $path = $null, $mode = 'ONLY', $cmd = $null, $params =
}
else {
if ($preferredVer) {
# if (!$silent) { $1k.println("Not found $name, needs install: $preferredVer") }
$found_rets = $null, $preferredVer
}
else {
Expand Down
21 changes: 18 additions & 3 deletions 1k/fetch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ function fetch_repo($url, $name, $dest, $ext) {
if ($ext -eq '.zip') {
Expand-Archive -Path $out -DestinationPath $prefix -Force
}
elseif ($ext -match '\.tar(\..*)?$'){
tar xf "$out" -C $prefix
elseif ($ext -match '\.tar(\..*)?$') {
tar xvf "$out" -C $prefix
}
}
catch {
Expand All @@ -62,7 +62,22 @@ function fetch_repo($url, $name, $dest, $ext) {
if (!(Test-Path $dest -PathType Container)) {
$original_lib_src = Join-Path $prefix $Script:url_pkg_name
if (Test-Path $original_lib_src -PathType Container) {
Rename-Item $original_lib_src $dest -Force
$tries = 0
do {
try {
Rename-Item $original_lib_src $dest -Force
if ($?) {
break
}
}
catch {

}

println "fetch.ps1: rename $original_lib_src to $dest failed, try after 1 seconds"
$tries += 1
Start-Sleep -Seconds 1
} while ($tries -lt 10)
}
else {
throw "fetch.ps1: the package name mismatch for $out"
Expand Down
4 changes: 2 additions & 2 deletions 1k/manifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
if ($Global:is_axmol_app -or $Global:is_axmol_engine) {
$manifest['nuget'] = '5.5.1' # since 5.6.0, requires .net 4.0
$manifest['glslcc'] = '1.9.5+'
$manifest['cmake'] = '3.29.3~3.30.1+'
$manifest['cmake'] = '3.29.3~3.30.2+'
$manifest['emsdk'] = '3.1.63+'
$manifest['jdk'] = '17.0.10~17.0.11+'
$manifest['jdk'] = '17.0.10~17.0.12+'
}

# android sdk tools
Expand Down
14 changes: 9 additions & 5 deletions 1k/setup-msvc.ps1
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
param(
$ver = '14.39'
$ver = '14.39',
$arch = 'x64'
)
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vs_installs = ConvertFrom-Json "$(&$vswhere -version '17.0' -format 'json')"
$vs_installs
$vs_installer = '${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe'
$vs_installer = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
$vs_path = $vs_installs[0].installationPath
$msvc_comp_id = "Microsoft.VisualStudio.Component.VC.$ver.17.9.x86.x64" # refer to: https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022

$vs_arch = @{x64 = 'x86.x64'; x86 = 'x86.x64'; arm64 = 'ARM64'; arm = 'ARM' }[$arch]
$msvc_comp_id = "Microsoft.VisualStudio.Component.VC.$ver.17.9.$vs_arch" # refer to: https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022
echo "Installing $msvc_comp_id ..."
&$vs_installer modify --quiet --installPath $vs_path --add $msvc_comp_id | Out-Host

if($?) {
if ($?) {
echo 'setup msvc success.'
} else {
}
else {
echo 'setup msvc fail'
}

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- Move FastRNG to ax ns and more improvements by @DelinWorks in https://github.com/axmolengine/axmol/pull/2057
- Handle premultiplied alpha for grayscale PNGs by @j-jorge in https://github.com/axmolengine/axmol/pull/2047
- Optimize ProgramState::setTexture() to avoid vector (de)allocations by @smilediver in https://github.com/axmolengine/axmol/pull/2061
- Add OpenType font (.otf) to the noCompress list by @danialias in https://github.com/axmolengine/axmol/pull/2077

### 3rdparty updates

Expand Down
4 changes: 1 addition & 3 deletions core/network/Downloader-wasm.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/****************************************************************************
Copyright (c) 2015-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md).
http://www.cocos2d-x.org
https://axmol.dev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 1 addition & 3 deletions core/network/Downloader-wasm.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/****************************************************************************
Copyright (c) 2015-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md).
http://www.cocos2d-x.org
https://axmol.dev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 2 additions & 5 deletions core/network/HttpClient-wasm.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
/****************************************************************************
Copyright (c) 2012 greathqy
Copyright (c) 2012 cocos2d-x.org
Copyright (c) 2013-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md).
http://www.cocos2d-x.org
https://axmol.dev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 1 addition & 3 deletions core/network/WebSocket-wasm.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/****************************************************************************
Copyright (c) 2015-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md).
http://www.cocos2d-x.org
https://axmol.dev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 1 addition & 3 deletions core/network/WebSocket-wasm.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/****************************************************************************
Copyright (c) 2015-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md).
http://www.cocos2d-x.org
https://axmol.dev/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit ceffa85

Please sign in to comment.