diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..0c7a570 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/mingw-build.yml b/.github/workflows/mingw-build.yml new file mode 100644 index 0000000..cd4864d --- /dev/null +++ b/.github/workflows/mingw-build.yml @@ -0,0 +1,47 @@ +name: Mingw Build + +on: [ push, pull_request ] + +jobs: + + build_linux: + runs-on: ubuntu-latest + strategy: + max-parallel: 2 + matrix: + build_platform: ["64", "32"] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install packages via apt + run: | + sudo apt-get -qq update + sudo apt-get -qq install -y mingw-w64 cppcheck + (for alt in i686-w64-mingw32-g++ i686-w64-mingw32-gcc x86_64-w64-mingw32-g++ x86_64-w64-mingw32-gcc; do sudo update-alternatives --set $alt /usr/bin/$alt-posix; done); + + - name: build x86 + if: matrix.build_platform == '32' + run: make ARCH=i686-w64-mingw32 + + - name: build x64 + if: matrix.build_platform == '64' + run: make ARCH=x86_64-w64-mingw32 + + - name: Archive artifacts for x86 + if: matrix.build_platform == '32' + uses: actions/upload-artifact@v2 + with: + name: nppsnippets_dll_linux_x32 + path: NppSnippets.dll + + - name: Archive artifacts for x64 + if: matrix.build_platform == '64' + uses: actions/upload-artifact@v2 + with: + name: nppsnippets_dll_linux_x64 + path: NppSnippets.dll + diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 825a9d1..a18d166 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -4,13 +4,13 @@ on: [ push, pull_request ] jobs: - build: + build_windows: runs-on: windows-latest strategy: - max-parallel: 4 + max-parallel: 3 matrix: build_configuration: [ Release ] - build_platform: [ x64, Win32 ] + build_platform: [ x64, Win32, ARM64 ] steps: - name: Checkout repository uses: actions/checkout@v2 @@ -39,3 +39,10 @@ jobs: with: name: nppsnippets_dll_x32 path: ${{ matrix.build_platform }}/${{ matrix.build_configuration }}/NppSnippets.dll + + - name: Archive artifacts for ARM64 + if: matrix.build_platform == 'ARM64' + uses: actions/upload-artifact@v2 + with: + name: nppsnippets_dll_arm64 + path: ${{ matrix.build_platform }}/${{ matrix.build_configuration }}/NppSnippets.dll diff --git a/Makefile b/Makefile index 61c444b..5f21604 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ all: clean now CFLAGS = -DUNICODE CXXFLAGS = $(CFLAGS) -Wno-write-strings --std=c++11 LIBS = -static -lshlwapi -lgdi32 -lcomdlg32 -lcomctl32 -LDFLAGS = -Wl,--out-implib,$(TARGET) -shared +LDFLAGS = -shared -Wl,--dll # Default target is RELEASE, otherwise DEBUG=1 DEBUG ?= 0 diff --git a/NppSnippets.sln b/NppSnippets.sln index 4a15531..08abbf0 100644 --- a/NppSnippets.sln +++ b/NppSnippets.sln @@ -14,16 +14,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 + Release|ARM64 = Release|ARM64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1590D7CD-7D3A-4AB7-A355-EE02F7FB987D}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {1590D7CD-7D3A-4AB7-A355-EE02F7FB987D}.Debug|ARM64.Build.0 = Debug|ARM64 {1590D7CD-7D3A-4AB7-A355-EE02F7FB987D}.Debug|Win32.ActiveCfg = Debug|Win32 {1590D7CD-7D3A-4AB7-A355-EE02F7FB987D}.Debug|Win32.Build.0 = Debug|Win32 {1590D7CD-7D3A-4AB7-A355-EE02F7FB987D}.Debug|x64.ActiveCfg = Debug|x64 {1590D7CD-7D3A-4AB7-A355-EE02F7FB987D}.Debug|x64.Build.0 = Debug|x64 + {1590D7CD-7D3A-4AB7-A355-EE02F7FB987D}.Release|ARM64.ActiveCfg = Release|ARM64 + {1590D7CD-7D3A-4AB7-A355-EE02F7FB987D}.Release|ARM64.Build.0 = Release|ARM64 {1590D7CD-7D3A-4AB7-A355-EE02F7FB987D}.Release|Win32.ActiveCfg = Release|Win32 {1590D7CD-7D3A-4AB7-A355-EE02F7FB987D}.Release|Win32.Build.0 = Release|Win32 {1590D7CD-7D3A-4AB7-A355-EE02F7FB987D}.Release|x64.ActiveCfg = Release|x64 diff --git a/NppSnippets.vcxproj b/NppSnippets.vcxproj index 86416c9..a58478c 100644 --- a/NppSnippets.vcxproj +++ b/NppSnippets.vcxproj @@ -1,6 +1,10 @@  + + Debug + ARM64 + Debug Win32 @@ -9,6 +13,10 @@ Debug x64 + + Release + ARM64 + Release Win32 @@ -36,6 +44,11 @@ Unicode v142 + + DynamicLibrary + Unicode + v142 + DynamicLibrary Unicode @@ -46,6 +59,11 @@ Unicode v142 + + DynamicLibrary + Unicode + v142 + @@ -57,6 +75,10 @@ + + + + @@ -65,6 +87,10 @@ + + + + <_ProjectFileVersion>10.0.30319.1 @@ -72,22 +98,30 @@ $(Platform)\$(Configuration)\ false false + false $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ true true + true AllRules.ruleset AllRules.ruleset + AllRules.ruleset + + AllRules.ruleset AllRules.ruleset + AllRules.ruleset + + @@ -138,6 +172,30 @@ call $(SolutionDir)version_git.bat + + + WIN32;NDEBUG;_WINDOWS;_USRDLL;NPPSNIPPETS_EXPORTS;%(PreprocessorDefinitions) + MultiThreaded + + + + + Level4 + ProgramDatabase + + + shlwapi.lib;%(AdditionalDependencies) + $(OutDir)NppSnippets.dll + true + Windows + true + true + $(OutDir)NppSnippets.lib + + + call $(SolutionDir)version_git.bat + + Disabled @@ -183,6 +241,28 @@ call $(SolutionDir)version_git.bat + + + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;NPPSNIPPETS_EXPORTS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level4 + + + shlwapi.lib;%(AdditionalDependencies) + $(OutDir)NppSnippets.dll + true + $(OutDir)NppSnippets.pdb + Windows + $(OutDir)NppSnippets.lib + + + call $(SolutionDir)version_git.bat + +