diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..cd1791a7 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "PythonScript.Tests/gtest"] + path = PythonScript.Tests/gtest + url = https://github.com/google/googletest.git diff --git a/NppPlugin/project/NppPlugin.vcxproj b/NppPlugin/project/NppPlugin.vcxproj index 5b29430e..8c708372 100644 --- a/NppPlugin/project/NppPlugin.vcxproj +++ b/NppPlugin/project/NppPlugin.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -24,14 +24,17 @@ StaticLibrary Unicode true + v120_xp StaticLibrary Unicode + v120_xp StaticLibrary Unicode + v120_xp @@ -78,6 +81,7 @@ Use Level4 EditAndContinue + true @@ -91,6 +95,7 @@ Use Level4 EditAndContinue + true @@ -101,6 +106,7 @@ Use Level3 ProgramDatabase + true diff --git a/PythonScript.Tests/PythonScript.Tests.vcxproj b/PythonScript.Tests/PythonScript.Tests.vcxproj index 49a6c883..d11a4234 100644 --- a/PythonScript.Tests/PythonScript.Tests.vcxproj +++ b/PythonScript.Tests/PythonScript.Tests.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -24,17 +24,20 @@ Application true Unicode + v120_xp Application true Unicode + v120_xp Application false true Unicode + v120_xp @@ -54,17 +57,17 @@ true - $(BoostBase);$(ProjectDir)..\PythonScript\res;$(ProjectDir)..\NppPlugin\include;$(PythonBase)\Include;$(PythonBase)\PC;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include + $(BoostBase);$(ProjectDir)..\PythonScript\res;$(ProjectDir)..\NppPlugin\include;$(PythonBase)\Include;$(PythonBase)\PC;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath) $(BoostPythonLibPath);$(PythonLibPath);$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib true - $(BoostBase);$(ProjectDir)..\PythonScript\res;$(ProjectDir)..\NppPlugin\include;$(PythonBase)\Include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include + $(BoostBase);$(ProjectDir)..\PythonScript\res;$(ProjectDir)..\NppPlugin\include;$(PythonBase)\Include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath) $(BoostPythonLibPath);$(PythonLibPath);$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib false - $(BoostBase);$(ProjectDir)..\PythonScript\res;$(ProjectDir)..\NppPlugin\include;$(PythonBase)\Include;$(PythonBase)\PC;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include + $(BoostBase);$(ProjectDir)..\PythonScript\res;$(ProjectDir)..\NppPlugin\include;$(PythonBase)\Include;$(PythonBase)\PC;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath) $(BoostPythonLibPath);$(PythonLibPath);$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib @@ -73,8 +76,9 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;BOOST_PYTHON_STATIC_LIB;%(PreprocessorDefinitions) - gtest\include;..\PythonScript\src;$(BoostBase);%(AdditionalIncludeDirectories) + gtest\googletest\include;..\PythonScript\src;$(BoostBase);%(AdditionalIncludeDirectories) MultiThreadedDebug + true Console @@ -93,8 +97,9 @@ Level3 Disabled WIN32;BOOST_DEBUG_PYTHON;BOOST_LINKING_PYTHON;_DEBUG;_CONSOLE;BOOST_PYTHON_STATIC_LIB;%(PreprocessorDefinitions) - gtest\include;..\PythonScript\src;$(BoostBase);%(AdditionalIncludeDirectories) + gtest\googletest\include;..\PythonScript\src;$(BoostBase);%(AdditionalIncludeDirectories) MultiThreadedDebug + true Console @@ -116,7 +121,8 @@ true WIN32;NDEBUG;_CONSOLE;BOOST_PYTHON_STATIC_LIB;%(PreprocessorDefinitions) MultiThreaded - gtest\include;..\PythonScript\src;$(BoostBase);%(AdditionalIncludeDirectories) + gtest\googletest\include;..\PythonScript\src;$(BoostBase);%(AdditionalIncludeDirectories) + true Console diff --git a/PythonScript.Tests/gtest b/PythonScript.Tests/gtest index be1b3b66..247a3d8e 160000 --- a/PythonScript.Tests/gtest +++ b/PythonScript.Tests/gtest @@ -1 +1 @@ -Subproject commit be1b3b66822cc3929f3da700973cef88bf45849a +Subproject commit 247a3d8e5e5d403f7fcacdb8ccc71e5059f15daa diff --git a/PythonScript.Tests/gtest.proj/gtest.vcxproj b/PythonScript.Tests/gtest.proj/gtest.vcxproj index 8fda61f7..b4de77e2 100644 --- a/PythonScript.Tests/gtest.proj/gtest.vcxproj +++ b/PythonScript.Tests/gtest.proj/gtest.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -24,17 +24,20 @@ StaticLibrary true Unicode + v120_xp StaticLibrary true Unicode + v120_xp StaticLibrary false true Unicode + v120_xp @@ -65,8 +68,9 @@ Level3 Disabled WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\gtest;..\gtest\include;%(AdditionalIncludeDirectories) + ..\gtest\googletest;..\gtest\googletest\include;%(AdditionalIncludeDirectories) MultiThreadedDebug + true Windows @@ -80,8 +84,9 @@ Level3 Disabled WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\gtest;..\gtest\include;%(AdditionalIncludeDirectories) + ..\gtest\googletest;..\gtest\googletest\include;%(AdditionalIncludeDirectories) MultiThreadedDebug + true Windows @@ -97,8 +102,9 @@ true true WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\gtest;..\gtest\include;%(AdditionalIncludeDirectories) + ..\gtest\googletest;..\gtest\googletest\include;%(AdditionalIncludeDirectories) MultiThreaded + true Windows @@ -111,7 +117,7 @@ - + diff --git a/PythonScript.Tests/gtest.proj/gtest.vcxproj.filters b/PythonScript.Tests/gtest.proj/gtest.vcxproj.filters index f1dab019..5e48de58 100644 --- a/PythonScript.Tests/gtest.proj/gtest.vcxproj.filters +++ b/PythonScript.Tests/gtest.proj/gtest.vcxproj.filters @@ -18,7 +18,7 @@ - + Source Files diff --git a/PythonScript/project/PythonScript2010.vcxproj b/PythonScript/project/PythonScript2010.vcxproj index 1ee71c8d..8a5047d8 100644 --- a/PythonScript/project/PythonScript2010.vcxproj +++ b/PythonScript/project/PythonScript2010.vcxproj @@ -1,5 +1,5 @@  - + DebugStartup @@ -29,22 +29,26 @@ DynamicLibrary true Unicode + v120_xp DynamicLibrary true Unicode + v120_xp DynamicLibrary true Unicode + v120_xp DynamicLibrary false true Unicode + v120_xp @@ -68,28 +72,28 @@ true - $(BoostBase);$(PythonBase)\Include;$(ProjectDir)..\..\NppPlugin\include;$(IncludePath) + $(BoostBase);$(PythonBase)\Include;$(ProjectDir)..\..\NppPlugin\include;$(IncludePath);$(IncludePath) $(BoostPythonLibPath);$(PythonLibPath);$(ProjectDir)..\..\NppPlugin\bin\debug;$(LibraryPath) $(SolutionDir)bin\$(Configuration)\ $(Configuration)2\ true - $(BoostBase);$(PythonBase)\Include;$(PythonBase)\PC;$(ProjectDir)..\..\NppPlugin\include;$(IncludePath) + $(BoostBase);$(PythonBase)\Include;$(PythonBase)\PC;$(ProjectDir)..\..\NppPlugin\include;$(IncludePath);$(IncludePath) $(BoostPythonLibPath);$(PythonLibPath);$(ProjectDir)..\..\NppPlugin\bin\debug;$(LibraryPath) $(SolutionDir)bin\$(Configuration)\ $(Configuration)2\ true - $(BoostBase);$(PythonBase)\Include;$(ProjectDir)..\..\NppPlugin\include;$(IncludePath) + $(BoostBase);$(PythonBase)\Include;$(ProjectDir)..\..\NppPlugin\include;$(IncludePath);$(IncludePath) $(BoostPythonLibPath);$(PythonLibPath);$(ProjectDir)..\..\NppPlugin\bin\debug;$(LibraryPath) $(SolutionDir)bin\$(Configuration)\ $(Configuration)2\ false - $(BoostBase);$(PythonBase)\Include;$(ProjectDir)..\..\NppPlugin\include;$(PythonBase)\PC;$(IncludePath) + $(BoostBase);$(PythonBase)\Include;$(ProjectDir)..\..\NppPlugin\include;$(PythonBase)\PC;$(IncludePath);$(IncludePath) $(BoostPythonLibPath);$(PythonLibPath);$(ProjectDir)..\..\NppPlugin\bin\release;$(LibraryPath) $(SolutionDir)bin\$(Configuration)\ @@ -147,6 +151,7 @@ xcopy $(ProjectDir)..\python_tests\*.* "e:\notepadtest\unicode\plugins\config\py DEBUG_STARTUP;WIN32;_DEBUG;_WINDOWS;_USRDLL;PYTHONSCRIPT2010_EXPORTS;BOOST_PYTHON_STATIC_LIB;%(PreprocessorDefinitions) MultiThreadedDebug ../include;%(AdditionalIncludeDirectories) + true Windows diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..7d8fcd38 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,67 @@ +version: 1.0.7.{build} +image: Visual Studio 2015 + + +environment: + matrix: + #- PlatformToolset: v140_xp + - PlatformToolset: v120_xp + +platform: + #- x64 + - Win32 + +configuration: + - Release + - Debug + - PythonDebug + +install: + - git submodule -q update --init + - if "%platform%"=="x64" set archi=amd64 + - if "%platform%"=="Win32" set archi=x86 + - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %archi% + +build_script: + - cd "%APPVEYOR_BUILD_FOLDER%" + - msbuild PythonScript.sln /m /p:configuration="%configuration%" /p:platform="%platform%" /p:PlatformToolset="%PlatformToolset%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + +after_build: + - cd "%APPVEYOR_BUILD_FOLDER%" + - ps: >- + + if ($env:PLATFORM -eq "x64") { + Push-AppveyorArtifact "src\bin\$env:PLATFORM\$env:CONFIGURATION\PythonScript.dll" -FileName PythonScript.dll + } + + if ($env:PLATFORM -eq "Win32" ) { + Push-AppveyorArtifact "src\bin\$env:CONFIGURATION\PythonScript.dll" -FileName PythonScript.dll + } + + if ($($env:APPVEYOR_REPO_TAG) -eq "true" -and $env:CONFIGURATION -eq "Release" -and $env:PLATFORMTOOLSET -eq "v120_xp") { + if($env:PLATFORM -eq "x64"){ + $ZipFileName = "PythonScript_$($env:APPVEYOR_REPO_TAG_NAME)_x64.zip" + 7z a $ZipFileName src\bin\$env:PLATFORM\$env:CONFIGURATION\*.dll + } + if($env:PLATFORM -eq "Win32"){ + $ZipFileName = "PythonScript_$($env:APPVEYOR_REPO_TAG_NAME)_x86.zip" + 7z a $ZipFileName src\bin\$env:CONFIGURATION\*.dll + } + } + +artifacts: + - path: PythonScript_*.zip + name: releases + +deploy: + provider: GitHub + auth_token: + secure: !!TODO, see https://www.appveyor.com/docs/deployment/github/#provider-settings!! + artifact: releases + draft: false + prerelease: false + force_update: true + on: + appveyor_repo_tag: true + PlatformToolset: v120_xp + configuration: Release