-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
153 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,11 @@ jobs: | |
with: | ||
dotnet-version: 7.x.x | ||
|
||
- run: dotnet publish -r win-x64 --self-contained -c Debug src/FetchBannerlordVersion.Native | ||
- run: dotnet publish -r win-x64 --self-contained -c Release src/FetchBannerlordVersion.Native | ||
|
||
- run: dotnet test test/FetchBannerlordVersion.Native.Tests | ||
- run: dotnet test test/FetchBannerlordVersion.Native.Tests -c Debug | ||
- run: dotnet test test/FetchBannerlordVersion.Native.Tests -c Release | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/FetchBannerlordVersion.Native.TypeScript/src/Bannerlord.Common.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef BFE_COMMON_GUARD_HPP_ | ||
#define BFE_COMMON_GUARD_HPP_ | ||
|
||
#include <napi.h> | ||
#include "FetchBannerlordVersion.Native.h" | ||
|
||
using namespace Napi; | ||
using namespace FetchBannerlordVersion::Native; | ||
|
||
namespace Bannerlord::Common | ||
{ | ||
|
||
Value AllocAliveCount(const CallbackInfo &info) | ||
{ | ||
const auto env = info.Env(); | ||
|
||
const auto result = common_alloc_alive_count(); | ||
return Number::New(env, result); | ||
} | ||
|
||
Object Init(const Env env, const Object exports) | ||
{ | ||
exports.Set("allocAliveCount", Function::New(env, AllocAliveCount)); | ||
|
||
return exports; | ||
} | ||
|
||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
src/FetchBannerlordVersion.Native.TypeScript/src/lib/FetchBannerlordVersion.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
#include "Bannerlord.Common.hpp" | ||
#include "Bannerlord.FetchVersion.hpp" | ||
#include <napi.h> | ||
|
||
using namespace Napi; | ||
using namespace Bannerlord::FetchVersion; | ||
|
||
Object InitAll(const Env env, const Object exports) | ||
{ | ||
return Init(env, exports); | ||
Bannerlord::Common::Init(env, exports); | ||
Bannerlord::FetchVersion::Init(env, exports); | ||
return exports; | ||
} | ||
|
||
NODE_API_MODULE(NODE_GYP_MODULE_NAME, InitAll) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.