From b69062f20a6ace1b67ccabd2d7fae3f63f03dbe1 Mon Sep 17 00:00:00 2001 From: Nomango <569629550@qq.com> Date: Thu, 8 Aug 2019 15:20:02 +0800 Subject: [PATCH] [build] update README.md and fix appveyor.yml --- README.md | 25 ++++++++++++++++++++++++ appveyor.yml | 8 +++++--- scripts/appveyor/coapp_make.ps1 | 22 +++++++++++++++++++++ scripts/appveyor/wait_for_other_jobs.ps1 | 18 ----------------- scripts/coapp/kiwano.autopkg.template | 2 +- 5 files changed, 53 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index f7a81bb9..9326a970 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,33 @@ Kiwano-Core is a game irrelevant lib that provide a lot useful tools can be used It's still under heavy developing. I write it and use it to developy my own tiny games. +You can move to [Kiwano Demos](https://github.com/Nomango/KiwanoDemos) repository to see how to use Kiwano implement simple games. + More docs and examples will be added later. +## Install + +### Dev Environment + +- Win8 or Greater (Win10 recommended) +- Visual Studio 2015 or Greater + +### Install with NuGet + +1. Open your Visual Studio solution +2. In Solution Explorer, right-click `References` and choose `Manage NuGet Packages` +3. Select the `Browse` tab, search for `kiwano`, select that package in the list, and select Install +4. Have a good trip with Kiwano ! + +### Install with source code + +1. Clone or download source code from Github repository +2. Open your Visual Studio solution, right-click your solution in Solution Explorer, select `Add` and then `Existing item` +3. Select `.vcxproj` files in /projects folder which you downloaded in 1st step +4. Right-click your project and choose `Properties`, select C\C++ => General, add the root directory of kiwano project to the `Additional include directory` field +5. Right-click `References` and choose `Add Reference`, select `kiwano` project +6. Now you can build your own applications based on Kiwano source code ! + ## Features * Scene management * Transitions between scenes diff --git a/appveyor.yml b/appveyor.yml index 95614aec..319dabba 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,9 +26,9 @@ skip_commits: only_commits: files: - - '**/*.(h|hpp|cpp)' - - '**/*.(sln|vcxproj|rc)' - - 'scripts/**/*.ps1' + - /**\/*\.(h|hpp|cpp)/ + - /**\/*\.(sln|vcxproj|rc)/ + - /scripts\/**\/*\.ps1/ - 'appveyor.yml' for: @@ -65,6 +65,8 @@ after_build: artifacts: - path: projects/output/**/*.lib name: $(appveyor_project_name)-v$(appveyor_build_version)-$(VS_PLATFORM_TOOLSET).$(platform).$(configuration) +- path: projects/output/**/*.pdb + name: $(appveyor_project_name)-v$(appveyor_build_version)-$(VS_PLATFORM_TOOLSET).$(platform).$(configuration) before_deploy: - ps: .\scripts\appveyor\coapp_make.ps1 diff --git a/scripts/appveyor/coapp_make.ps1 b/scripts/appveyor/coapp_make.ps1 index ad95ad37..c557453a 100644 --- a/scripts/appveyor/coapp_make.ps1 +++ b/scripts/appveyor/coapp_make.ps1 @@ -1,3 +1,25 @@ +. .\scripts\appveyor\appveyor_get_build.ps1 +. .\scripts\appveyor\appveyor_get_artifacts.ps1 + +# get job artifacts +Write-Host "Start to download artifacts from other jobs" + +(Get-AppVeyorBuild).build.jobs | foreach-object { + $jobId = $_.jobId + if ($jobId -ne $env:APPVEYOR_JOB_ID) { + # Get job artifacts information + (Get-AppVeyorArtifacts -Job $jobId) | foreach-object { + # Create directory if not exists + $filePath = $_.fileName.Substring(0, $_.fileName.LastIndexOf('/')) + if (!(Test-Path -Path $filePath)) { + New-Item -ItemType "directory" -Path $filePath + } + # Download artifact from other job + Start-FileDownload "https://ci.appveyor.com/api/buildjobs/$jobId/artifacts/$($_.fileName)" -FileName $_.fileName + } + }; +} + Write-Host "Start to build nupkg files" # This is the CoApp .autopkg file to create. diff --git a/scripts/appveyor/wait_for_other_jobs.ps1 b/scripts/appveyor/wait_for_other_jobs.ps1 index e9e7e486..4a2aa2df 100644 --- a/scripts/appveyor/wait_for_other_jobs.ps1 +++ b/scripts/appveyor/wait_for_other_jobs.ps1 @@ -1,5 +1,4 @@ . .\scripts\appveyor\appveyor_get_build.ps1 -. .\scripts\appveyor\appveyor_get_artifacts.ps1 # Only deploy when commit message contains "[deploy]" if (!(Get-AppVeyorBuild).build.message.Contains('[deploy]')) { return } @@ -28,22 +27,5 @@ if (!$success) { throw "Test jobs were not finished in $env:time_out_mins minutes" } -# get job artifacts -(Get-AppVeyorBuild).build.jobs | foreach-object { - $jobId = $_.jobId - if ($jobId -ne $env:APPVEYOR_JOB_ID) { - # Get job artifacts information - (Get-AppVeyorArtifacts -Job $jobId) | foreach-object { - # Create directory if not exists - $filePath = $_.fileName.Substring(0, $_.fileName.LastIndexOf('/')) - if (!(Test-Path -Path $filePath)) { - New-Item -ItemType "directory" -Path $filePath - } - # Download artifact from other job - Start-FileDownload "https://ci.appveyor.com/api/buildjobs/$jobId/artifacts/$($_.fileName)" -FileName $_.fileName - } - }; -} - # Set flag to deploy $env:flag_to_deploy = $success \ No newline at end of file diff --git a/scripts/coapp/kiwano.autopkg.template b/scripts/coapp/kiwano.autopkg.template index 1268ad59..bf625a43 100644 --- a/scripts/coapp/kiwano.autopkg.template +++ b/scripts/coapp/kiwano.autopkg.template @@ -124,7 +124,7 @@ nuget { lib += ${OUTPUT_DIR}v142\Win32\Release\*.lib; } - # kiwano-network 3-rd patry + // kiwano-network 3-rd patry bin += ${KIWANO_NETWORK_ROOT}dlls\*.dll; };