Skip to content

Commit 8c1c347

Browse files
crazyhappygameminggo
authored andcommitted
Fix win32 cpp-template, speedup appveyor, add cocos new CI configuration (cocos2d#18663)
* Fix win32 cpp-template, speedup appveyor, add cocos new CI configuration * fix cocos new for win32
1 parent b3285ed commit 8c1c347

File tree

5 files changed

+35
-15
lines changed

5 files changed

+35
-15
lines changed

.appveyor.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ environment:
88
PYTHON_VERSION: "2.7.13"
99
PYTHON_ARCH: "32"
1010
matrix:
11-
# - build_type: android_cpp_empty_test
11+
- build_type: windows32_cocos_new_test
12+
- build_type: windows32
1213
- build_type: android_cpp_tests
13-
# - build_type: android_cocos_new_test
14+
- build_type: android_cocos_new_test
15+
# - build_type: android_cpp_empty_test
1416
# - build_type: android_gen_libs
15-
- build_type: windows32
17+
1618

1719
platform:
1820
- x86
@@ -35,4 +37,6 @@ branches:
3537
- v3.11_backup
3638
- v35-for-tizen
3739

38-
clone_depth: 50
40+
clone_depth: 1
41+
42+
test: off

templates/cocos2dx_files.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,9 @@
528528
"cocos/base/utlist.h",
529529
"cocos/cc_dummy.c",
530530
"cocos/cocos2d.cpp",
531-
"cocos/cocos2d.h",
531+
"cocos/cocos2d.h",
532+
"cocos/precheader.cpp",
533+
"cocos/precheader.h",
532534
"cocos/deprecated/CCArray.cpp",
533535
"cocos/deprecated/CCArray.h",
534536
"cocos/deprecated/CCBool.h",

templates/cpp-template-default/proj.win32/HelloCpp.sln

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp", "HelloCpp.vcxpro
1010
EndProject
1111
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
1212
EndProject
13-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\cocos2d\external\Box2D\proj.win32\libbox2d.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
14-
EndProject
1513
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos2d\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}"
1614
EndProject
1715
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast", "..\cocos2d\external\recast\proj.win32\librecast.vcxproj", "{41E34993-647E-4282-8384-4AB1AE31A452}"
@@ -30,10 +28,6 @@ Global
3028
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32
3129
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32
3230
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32
33-
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32
34-
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32
35-
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32
36-
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32
3731
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32
3832
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32
3933
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32

tools/appveyor-scripts/before-build.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Set-PSDebug -Trace 1
12
$python = "C:\\Python27\\python.exe"
23

34
function Download-Deps
@@ -47,7 +48,7 @@ function Update-SubModule
4748
{
4849
Push-Location $env:APPVEYOR_BUILD_FOLDER
4950
& git submodule init
50-
& git submodule update --recursive
51+
& git submodule update --recursive --depth=1
5152
Pop-Location
5253
}
5354

@@ -59,8 +60,9 @@ If ($env:build_type -eq "windows32") {
5960
Download-Deps
6061
Download-NDK
6162
Generate-Binding-Codes
62-
}
63-
Else {
63+
} elseif ($env:build_type -like "android*") {
6464
& $python -u .\tools\appveyor-scripts\setup_android.py
6565
if ($lastexitcode -ne 0) {throw}
66+
} else {
67+
Download-Deps
6668
}

tools/appveyor-scripts/build.ps1

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Set-PSDebug -Trace 1
12
$python = "C:\\Python27\\python.exe"
23

34
Write-Host "Set environment"
@@ -48,8 +49,25 @@ If ($env:build_type -eq "android_cpp_tests") {
4849
# & $python -u tools\cocos2d-console\bin\cocos.py gen-libs -p android -m release --ap android-15 --app-abi armeabi-v7a --agreement n
4950
# if ($lastexitcode -ne 0) {throw}
5051

52+
} elseif ($env:build_type -eq "windows32_cocos_new_test") {
53+
Write-Host "Create new project windows32_cocos_new_test"
54+
& $python -u tools\cocos2d-console\bin\cocos.py --agreement n new -l cpp -p my.pack.qqqq cocos_new_test
55+
if ($lastexitcode -ne 0) {throw}
56+
57+
& msbuild $env:APPVEYOR_BUILD_FOLDER\cocos_new_test\proj.win32\cocos_new_test.sln /t:Build /p:Platform="Win32" /p:Configuration="Release" /m /consoleloggerparameters:"PerformanceSummary;NoSummary"
58+
if ($lastexitcode -ne 0) {throw}
59+
60+
& 7z a release_win32.7z $env:APPVEYOR_BUILD_FOLDER\cocos_new_test\proj.win32\Release.win32\
61+
if ($lastexitcode -ne 0) {throw}
62+
63+
Push-AppveyorArtifact release_win32.7z
5164
}
5265
Else {
53-
& msbuild $env:APPVEYOR_BUILD_FOLDER\build\cocos2d-win32.sln /t:Build /p:Platform="Win32" /p:Configuration="Release" /m
66+
& msbuild $env:APPVEYOR_BUILD_FOLDER\build\cocos2d-win32.sln /t:Build /p:Platform="Win32" /p:Configuration="Release" /m /consoleloggerparameters:"PerformanceSummary;NoSummary"
67+
5468
if ($lastexitcode -ne 0) {throw}
69+
& 7z a release_win32.7z $env:APPVEYOR_BUILD_FOLDER\build\Release.win32\
70+
if ($lastexitcode -ne 0) {throw}
71+
72+
Push-AppveyorArtifact release_win32.7z
5573
}

0 commit comments

Comments
 (0)