diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 185a677..9f196d0 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -5,7 +5,7 @@ on:
branches: [ master ]
jobs:
- build-win:
+ build-win-x86:
runs-on: windows-latest
steps:
@@ -28,9 +28,9 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: windows-x86
- path: ${{github.workspace}}/build/Release/
+ path: ${{github.workspace}}/build/Release/*AddIn.dll
- build-win-64:
+ build-win-x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
@@ -52,10 +52,9 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: windows-x64
- path: ${{github.workspace}}/build/Release/
+ path: ${{github.workspace}}/build/Release/*AddIn.dll
-
- build-lin:
+ build-lin-x64:
runs-on: ubuntu-latest
steps:
@@ -73,13 +72,45 @@ jobs:
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -GNinja
- -DCMAKE_CXX_COMPILER=g++-11
- -DCMAKE_C_COMPILER=gcc-11
+ -DCMAKE_CXX_COMPILER=g++-10
+ -DCMAKE_C_COMPILER=gcc-10
-DCMAKE_BUILD_TYPE=Release
- #-DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}}
- name: Build
run: cmake --build ${{github.workspace}}/build --parallel
- uses: actions/upload-artifact@v3
with:
name: linux-x64
path: ${{github.workspace}}/build/*AddIn.so
+
+ build-package:
+ needs: [build-win-x86, build-win-x64, build-lin-x64]
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: recursive
+ - name: Download linux-x64
+ uses: actions/download-artifact@v3
+ with:
+ name: linux-x64
+ path: linux-x64
+ - name: Download windows-x86
+ uses: actions/download-artifact@v3
+ with:
+ name: windows-x86
+ path: windows-x86
+ - name: Download windows-x64
+ uses: actions/download-artifact@v3
+ with:
+ name: windows-x64
+ path: windows-x64
+ - name: Build bundle
+ run: |
+ mv ./linux-x64/YaxUnitAddIn.so ./bundle/YaxUnitAddIn-x64.so
+ mv ./windows-x86/YaxUnitAddIn.dll ./bundle/YaxUnitAddIn-x86.dll
+ mv ./windows-x64/YaxUnitAddIn.dll ./bundle/YaxUnitAddIn-x64.dll
+ - uses: actions/upload-artifact@v3
+ with:
+ name: bundle
+ path: ${{github.workspace}}/bundle/*
diff --git a/.gitignore b/.gitignore
index 567609b..26e10a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
build/
+Builds/
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 876597b..1e04e51 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.10)
-project(SampleAddIn)
+project(YaxUnitAddIn)
set(CMAKE_CXX_STANDARD 17)
-set(TARGET SampleAddIn)
+set(TARGET YaxUnitAddIn)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
option(CASE_INSENSITIVE "Case insensitive method names" OFF)
@@ -16,8 +16,8 @@ list(APPEND SOURCES
src/exports.cpp
src/Component.cpp
src/Component.h
- src/SampleAddIn.cpp
- src/SampleAddIn.h)
+ src/YaxUnitAddIn.cpp
+ src/YaxUnitAddIn.h)
if (ANDROID)
list(APPEND SOURCES
diff --git a/README.md b/README.md
index fbfeee4..95b8489 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[![Build status](https://ci.appveyor.com/api/projects/status/uf3bq0j5xgdn3t2a/branch/master?svg=true)](https://ci.appveyor.com/project/alkoleft/yaxunit-addin/branch/master)
+[![Build status](https://github.com/alkoleft/yaxunit-addin/actions/workflows/build.yml/badge.svg)](https://github.com/alkoleft/yaxunit-addin/actions/workflows/build.yml)
# YaxUnit-Addin
diff --git a/appveyor.yml b/appveyor.yml
index 211618c..bc37d36 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -35,10 +35,6 @@ install:
build:
verbosity: minimal
-after_build:
- - ps: Push-AppveyorArtifact Builds/Release/SampleAddIn.dll -DeploymentName binaries -FileName SampleAddIn.dll
- - sh: appveyor PushArtifact SampleAddIn.so -DeploymentName binaries -FileName SampleAddIn.so
-
for:
- matrix:
only:
@@ -47,7 +43,7 @@ for:
- mkdir Builds/Release -p && cd ./Builds/Release
- cmake -DCMAKE_BUILD_TYPE=Release ../../; cmake --build .
after_build:
- - sh: appveyor PushArtifact SampleAddIn.so -DeploymentName binaries -FileName SampleAddIn.so
+ - sh: appveyor PushArtifact YaxUnitAddIn.so -DeploymentName binaries -FileName YaxUnitAddIn.so
- matrix:
only:
@@ -55,7 +51,7 @@ for:
before_build:
- ps: cmake -B Builds -G "Visual Studio 17 2022" -A Win32
after_build:
- - ps: Push-AppveyorArtifact Builds/Release/SampleAddIn.dll -DeploymentName binaries -FileName SampleAddIn-x86.dll
+ - ps: Push-AppveyorArtifact Builds/Release/YaxUnitAddIn.dll -DeploymentName binaries -FileName YaxUnitAddIn-x86.dll
- matrix:
only:
@@ -63,7 +59,7 @@ for:
before_build:
- ps: cmake -B Builds -G "Visual Studio 17 2022" -A x64
after_build:
- - ps: Push-AppveyorArtifact Builds/Release/SampleAddIn.dll -DeploymentName binaries -FileName SampleAddIn-x64.dll
+ - ps: Push-AppveyorArtifact Builds/Release/YaxUnitAddIn.dll -DeploymentName binaries -FileName YaxUnitAddIn-x64.dll
- matrix:
only:
diff --git a/bundle/MANIFEST.XML b/bundle/MANIFEST.XML
new file mode 100644
index 0000000..0f6b8d9
--- /dev/null
+++ b/bundle/MANIFEST.XML
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/SampleAddIn.cpp b/src/YaxUnitAddIn.cpp
similarity index 84%
rename from src/SampleAddIn.cpp
rename to src/YaxUnitAddIn.cpp
index 6b59640..3a8653d 100644
--- a/src/SampleAddIn.cpp
+++ b/src/YaxUnitAddIn.cpp
@@ -24,13 +24,13 @@
#include
#include
-#include "SampleAddIn.h"
+#include "YaxUnitAddIn.h"
-std::string SampleAddIn::extensionName() {
+std::string YaxUnitAddIn::extensionName() {
return "Sleep";
}
-SampleAddIn::SampleAddIn() {
+YaxUnitAddIn::YaxUnitAddIn() {
// Full featured property registration example
AddProperty(L"Version", L"ВерсияКомпоненты", [&]() {
@@ -38,11 +38,11 @@ SampleAddIn::SampleAddIn() {
return std::make_shared(std::move(s));
});
- AddMethod(L"Sleep", L"Ожидать", this, &SampleAddIn::sleep, {{0, 5}});
+ AddMethod(L"Sleep", L"Ожидать", this, &YaxUnitAddIn::sleep, {{0, 5}});
}
-void SampleAddIn::sleep(const variant_t &delay) {
+void YaxUnitAddIn::sleep(const variant_t &delay) {
using namespace std;
// It safe to get any type from variant.
// Exceptions are handled by component API.
diff --git a/src/SampleAddIn.h b/src/YaxUnitAddIn.h
similarity index 87%
rename from src/SampleAddIn.h
rename to src/YaxUnitAddIn.h
index ab5a758..edc39ce 100644
--- a/src/SampleAddIn.h
+++ b/src/YaxUnitAddIn.h
@@ -17,16 +17,16 @@
*
*/
-#ifndef SAMPLEADDIN_H
-#define SAMPLEADDIN_H
+#ifndef YAXUNITADDIN_H
+#define YAXUNITADDIN_H
#include "Component.h"
-class SampleAddIn final : public Component {
+class YaxUnitAddIn final : public Component {
public:
const char *Version = u8"1.0.0";
- SampleAddIn();
+ YaxUnitAddIn();
private:
std::string extensionName() override;
@@ -34,4 +34,4 @@ private:
void sleep(const variant_t &delay);
};
-#endif //SAMPLEADDIN_H
+#endif //YAXUNITADDIN_H
diff --git a/src/addin.def b/src/addin.def
index cd880df..5a2bd2e 100644
--- a/src/addin.def
+++ b/src/addin.def
@@ -1,4 +1,4 @@
-LIBRARY "SampleAddIn"
+LIBRARY "YaxUnitAddIn"
EXPORTS
GetClassObject
diff --git a/src/exports.cpp b/src/exports.cpp
index 7782b91..ce9c6a4 100644
--- a/src/exports.cpp
+++ b/src/exports.cpp
@@ -20,7 +20,7 @@
#include
#include
-#include "SampleAddIn.h"
+#include "YaxUnitAddIn.h"
#ifdef _WINDOWS
#pragma warning (disable : 4311 4302)
@@ -36,7 +36,7 @@ long GetClassObject(const WCHAR_T *clsName, IComponentBase **pInterface) {
if (!*pInterface) {
auto cls_name = std::u16string(reinterpret_cast(clsName));
if (cls_name == u"Sleep") {
- *pInterface = new SampleAddIn;
+ *pInterface = new YaxUnitAddIn;
}
return (long) *pInterface;
}