From 375a6d08c33272feff1ebb04be5928feab502c8f Mon Sep 17 00:00:00 2001 From: "Denis Kuzmin [ GitHub/3F ]" Date: Sun, 7 Mar 2021 21:36:30 +0300 Subject: [PATCH] Build: +different paths for MultiByte & Unicode modules; Also adds RXW_UNICODE for user targets when CharacterSet is Unicode --- .vssbe | 103 +++++++++------- algo/algo.vcxproj | 16 +-- build.bat | 2 +- common.props | 27 +++++ dotnetTest/dotnetTest.csproj | 35 +----- regXwild.sln | 35 +----- regXwild/core/ESS/AlgorithmEss.h | 5 + regXwild/core/ESS/MatchResult.h | 2 +- regXwild/regXwild.rc | 110 ++++++++++++++++++ regXwild/regXwild.vcxproj | 19 +-- regXwild/regXwild.vcxproj.filters | 8 ++ regXwild/resource.h | 14 +++ regXwildTest/regXwildTest.vcxproj | 16 +-- snet/snet.csproj | 30 +---- .../regXwild.dotnet.targets | 1 + .../regXwild.native.targets | 6 + regXwild.nuspec => tools/regXwild.nuspec | 0 17 files changed, 255 insertions(+), 174 deletions(-) create mode 100644 common.props create mode 100644 regXwild/regXwild.rc create mode 100644 regXwild/resource.h rename regXwild.dotnet.targets => tools/regXwild.dotnet.targets (92%) rename regXwild.native.targets => tools/regXwild.native.targets (81%) rename regXwild.nuspec => tools/regXwild.nuspec (100%) diff --git a/.vssbe b/.vssbe index e685b55..a83c042 100644 --- a/.vssbe +++ b/.vssbe @@ -15,6 +15,9 @@ "$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent", "Type": "Script", "Command__": [ + "#[$(charset = $(CharacterSet))]", + "#[$(arch = $(Platform))]", + "", "#[($(Configuration) == \"PublicRelease\") {", " #[$(cfgname = 'Release')]", " $(isPubRel = true)", @@ -29,7 +32,7 @@ "$(revDeltaMax = 65534)", "", "$(oraw = \"bin\\raw\")", - "$(orawApp = \"$(oraw)\\$(cfgname)\\$(Platform)/\")", + "$(orawApp = \"$(oraw)\\$(cfgname)\\$(arch)\\$(charset)/\")", "$(odir = \"bin/Releases/\")", "$(onupkg = \"bin/nupkg/\")", "", @@ -74,11 +77,13 @@ " )]]", " ", " #[$(pVerBuild = \"$(pVer).$(revBuild)\")]", + " #[$(pVerBuild0 = $(pVerBuild))]", "}", "else", "{", " #[$(revBuild = 0)]", " #[$(pVerBuild = \"$(pVer)\")]", + " #[$(pVerBuild0 = \"$(pVerBuild).0\")]", "}]", "", "#[\" ", @@ -141,11 +146,30 @@ "", "", "#[IO replace.Regex(\"$(pDir)/regXwild.common.cpp\", \"(vsSBE.+?_T\\().+?;\", \"$1\\\"#[$(pVerBuild)]\\\");\")]", - "", "" ] } }, + { + "Enabled": true, + "Name": "ActRc", + "Caption": "Update .rc", + "Mode": { + "$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent", + "Type": "Script", + "Command__": [ + "", + "#[var rc =#[File get(\"regXwild/regXwild.rc\")]]", + "", + "#[var rc =$([System.Text.RegularExpressions.Regex]::Replace('$(rc)', '(VERSION\\s)[\\d,]+', '${1}$(pVerBuild0.Replace(\".\", \",\"))'))]", + "#[var rc =$([System.Text.RegularExpressions.Regex]::Replace('$(rc)', '(Version\", \")[\\d.]+', '${1}$(pVerBuild0)'))]", + "", + "#[var rc =$([System.Text.RegularExpressions.Regex]::Replace('$(rc)', '(ProductVersion\", \")([^\"]+)\"', '${1}$(rxwPrintVersion)\"'))]", + "", + "#[File write(\"regXwild/regXwild.rc\"):#[var rc]]" + ] + } + }, { "Enabled": true, "Name": "ActSubmodules", @@ -206,6 +230,32 @@ ] } }, + { + "Enabled": true, + "Name": "BuildInfo", + "IgnoreIfBuildFailed": true, + "Mode": { + "$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent", + "Type": "Script", + "Command__": [ + "#[var buildInfo = $([System.String]::Concat(\" \"))", + " regXwild #[$(rxwPrintVersion)]", + " ", + " ", + " Configuration: #[$(Configuration)]", + " ", + " Build version: #[$(revBuild)]", + " ", + " SHA-1: #[$(bSha1)]", + " ", + " ", + " :: generated by a vsSolutionBuildEvent #[$(vsSolutionBuildEvent)]", + "]", + "", + "#[IO writeLine(\"$(orawApp)/build-info.txt\"):#[$(buildInfo.Replace('\\n', '\\r\\n'))]]" + ] + } + }, { "Enabled": true, "Name": "ActPack", @@ -230,11 +280,11 @@ "#[IO copy.file(\"$(pDir)\\core\\EXT\\AlgorithmExt.h\", \"$(orawApp)\\include\\core\\EXT\\\\\", true)]", "#[IO copy.file(\"$(pDir)\\core\\ESS\\*.h\", \"$(orawApp)\\include\\core\\ESS\\\\\", true)]", " ", - "#[IO copy.file({ \"Readme.md\", \"LICENSE\", \"changelog.txt\", \".version\" }, \"$(oraw)\", true)]", + "#[IO copy.file({ \"Readme.md\", \"LICENSE\", \"changelog.txt\", \".version\", \"$(orawApp)/build-info.txt\" }, \"$(oraw)\", true)]", "#[IO copy.file({ \"tools\\*.bat\" }, \"$(oraw)\\tools\\\\\", true)]", "", "", - "#[( $(Platform) == \"Win32\") { #[$(fnamePlatform = 'x86')] }else{ #[$(fnamePlatform = $(Platform))] }]", + "#[( $(arch) == \"Win32\") { #[$(fnameArch = 'x86')] }else{ #[$(fnameArch = $(arch))] }]", "", "#[7z pack.files(", " {", @@ -242,6 +292,7 @@ " \"$(oraw)\\LICENSE\",", " \"$(oraw)\\changelog.txt\",", " \"$(oraw)\\.version\",", + " \"$(oraw)\\build-info.txt\",", " \"$(oraw)\\tools\\*.bat\",", " \"$(orawApp)\\include\\*.h\",", " \"$(orawApp)\\include\\core\\ESS\\*.h\",", @@ -254,7 +305,7 @@ " \"$(orawApp)regXwild.exp\",", " \"$(orawApp)regXwild.pdb\"", " }, ", - " \"$(odir)regXwild.$(pVer).$(fnamePlatform).$(CharacterSet:regXwild).zip\")]", + " \"$(odir)regXwild.$(pVer).$(fnameArch).$(charset).zip\")]", "" ] } @@ -272,7 +323,7 @@ " #[try{ #[IO delete.directory(\"$(onupkg)\", true)] }catch{ }]", "}]", "", - "#[$(onupkgBin = \"$(onupkg)lib\\\\native\\\\$(Platform)-$(CharacterSet:regXwild)\\\\\")]", + "#[$(onupkgBin = \"$(onupkg)lib\\\\native\\\\$(arch)-$(charset)\\\\\")]", "", "#[\" https://github.com/3F/DllExport/issues/36 \"]", "#[IO copy.directory(\"\", \"$(onupkg)/lib/net/\", true)]", @@ -300,8 +351,10 @@ " \"$(onupkgBin)\", true)]", " ", "#[IO copy.file({ ", - " \"regXwild.nuspec\", ", + " \"tools\\regXwild.nuspec\", ", " \"Readme.md\", ", + " \"$(oraw)\\.version\",", + " \"$(orawApp)/build-info.txt\",", " \"LICENSE\", ", " \"changelog.txt\" ", " }, ", @@ -309,44 +362,16 @@ "#[IO replace(\"$(onupkg)regXwild.nuspec\", \"$-version-$\", \"$(pVer)\")]", "", "#[IO copy.directory(\"\", \"$(onupkg)build\\native\", true)]", - "#[IO copy.file(\"regXwild.native.targets\", \"$(onupkg)build\\native/regXwild.targets\", true)]", + "#[IO copy.file(\"tools\\regXwild.native.targets\", \"$(onupkg)build\\native/regXwild.targets\", true)]", "", "#[IO copy.directory(\"\", \"$(onupkg)build\\net\", true)]", - "#[IO copy.file(\"regXwild.dotnet.targets\", \"$(onupkg)build\\net/regXwild.targets\", true)]", + "#[IO copy.file(\"tools\\regXwild.dotnet.targets\", \"$(onupkg)build\\net/regXwild.targets\", true)]", "", "#[IO copy.directory(\"\", \"$(onupkg)build\\netcoreapp\", true)]", - "#[IO copy.file(\"regXwild.dotnet.targets\", \"$(onupkg)build\\netcoreapp/regXwild.targets\", true)]", + "#[IO copy.file(\"tools\\regXwild.dotnet.targets\", \"$(onupkg)build\\netcoreapp/regXwild.targets\", true)]", "", "#[IO copy.directory(\"\", \"$(onupkg)build\\netstandard\", true)]", - "#[IO copy.file(\"regXwild.dotnet.targets\", \"$(onupkg)build\\netstandard/regXwild.targets\", true)]", - "" - ] - } - }, - { - "Enabled": true, - "Name": "BuildInfo", - "IgnoreIfBuildFailed": true, - "Mode": { - "$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent", - "Type": "Script", - "Command__": [ - "#[var buildInfo = $([System.String]::Concat(\" \"))", - " regXwild #[$(rxwPrintVersion)]", - " ", - " ", - " Configuration: #[$(Configuration)]", - " ", - " Build version: #[$(revBuild)]", - " ", - " Branch Sha1: #[$(bSha1)]", - " ", - " ", - " :: generated by a vsSolutionBuildEvent #[$(vsSolutionBuildEvent)]", - "]", - "", - "#[IO writeLine(\"$(onupkg)/build-info.txt\"):#[$(buildInfo.Replace('\\n', '\\r\\n'))]]", - "", + "#[IO copy.file(\"tools\\regXwild.dotnet.targets\", \"$(onupkg)build\\netstandard/regXwild.targets\", true)]", "", "#[IO replace(\"$(onupkg)regXwild.nuspec\", \"{build-info}\", \"$(buildInfo)\")]" ] diff --git a/algo/algo.vcxproj b/algo/algo.vcxproj index 6b82f6d..c0d752a 100644 --- a/algo/algo.vcxproj +++ b/algo/algo.vcxproj @@ -1,5 +1,6 @@  + Debug @@ -20,20 +21,13 @@ {7571CD36-4A3C-446F-96B1-951261274B78} - Win32Proj net::r_eg::regXwild.algo v$(VisualStudioVersion.Replace(".", "")) v141 v142 $(LatestTargetPlatformVersion) 10.0 - Unicode - - - RXW_UNICODE;%(PreprocessorDefinitions) - - Application @@ -73,26 +67,18 @@ true - $(SolutionDir)bin\raw\$(Configuration)\$(Platform)\ - $(ProjectDir)obj\$(Configuration)\ $(ProjectDir);$(IncludePath) true - $(SolutionDir)bin\raw\$(Configuration)\$(Platform)\ - $(ProjectDir)obj\$(Configuration)\ $(ProjectDir);$(IncludePath) false - $(SolutionDir)bin\raw\$(Configuration)\$(Platform)\ - $(ProjectDir)obj\$(Configuration)\ $(ProjectDir);$(IncludePath) false - $(SolutionDir)bin\raw\$(Configuration)\$(Platform)\ - $(ProjectDir)obj\$(Configuration)\ $(ProjectDir);$(IncludePath) diff --git a/build.bat b/build.bat index b7f0bac..06cb768 100644 --- a/build.bat +++ b/build.bat @@ -14,8 +14,8 @@ call %_gnt% /p:wpath="%cd%" /p:ngconfig="packages.config;snet\\packages.config" set "__InitBuild=1" & call :build Win32 Unicode endlocal - call :build x64 Unicode call :build Win32 MultiByte + call :build x64 Unicode setlocal set "__FinalBuild=1" & call :build x64 MultiByte diff --git a/common.props b/common.props new file mode 100644 index 0000000..59d4063 --- /dev/null +++ b/common.props @@ -0,0 +1,27 @@ + + + + Unicode + $(DefineConstants);RXW_UNICODE + + $(Platform) + Win32 + + bin\raw\$(Configuration)\$(PlatformArch)\$(CharacterSet)\ + ..\bin\obj\$(MSBuildProjectName)\$(Configuration)\$(PlatformArch)\$(CharacterSet)\ + + ..\$(OutRawDir)\ + $([MSBuild]::Escape($([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(SolutionDir)`, `$(OutRawDir)`))`)))) + + + + RXW_UNICODE;%(PreprocessorDefinitions) + + + + + 4480;4482;%(DisableSpecificWarnings) + + + + diff --git a/dotnetTest/dotnetTest.csproj b/dotnetTest/dotnetTest.csproj index 4a3b4fe..8f3435a 100644 --- a/dotnetTest/dotnetTest.csproj +++ b/dotnetTest/dotnetTest.csproj @@ -1,39 +1,14 @@ + + net5.0 false - AnyCPU;x64;x86 - - - - Unicode - $(DefineConstants);RXW_UNICODE + x64;x86 + Debug;Release;PublicRelease 1701;1702;CS1591;IDE1006 - - - - ..\bin\raw\Debug\x64\ - - - - ..\bin\raw\Release\x64\ - - - - ..\bin\raw\Debug\Win32\ - - - - ..\bin\raw\Release\Win32\ - - - - ..\bin\raw\Debug\Win32\ - - - - ..\bin\raw\Release\Win32\ + $(OutDir)\$(MSBuildProjectName)\ diff --git a/regXwild.sln b/regXwild.sln index 7a04218..f9e3516 100644 --- a/regXwild.sln +++ b/regXwild.sln @@ -19,9 +19,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{571DA510-7 LICENSE = LICENSE packages.config = packages.config Readme.md = Readme.md - regXwild.nuspec = regXwild.nuspec - regXwild.native.targets = regXwild.native.targets - regXwild.dotnet.targets = regXwild.dotnet.targets + tools\regXwild.dotnet.targets = tools\regXwild.dotnet.targets + tools\regXwild.native.targets = tools\regXwild.native.targets + tools\regXwild.nuspec = tools\regXwild.nuspec EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{9390762C-88DF-4FF5-BD50-CCF3694BDFD9}" @@ -32,101 +32,74 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{9390762C EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "snet", "snet\snet.csproj", "{12B25935-229F-4128-B66B-7561A77ABC54}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotnetTest", "dotnetTest\dotnetTest.csproj", "{0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetTest", "dotnetTest\dotnetTest.csproj", "{0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 - PublicRelease|Any CPU = PublicRelease|Any CPU PublicRelease|Win32 = PublicRelease|Win32 PublicRelease|x64 = PublicRelease|x64 - Release|Any CPU = Release|Any CPU Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.Debug|Any CPU.ActiveCfg = Debug|Win32 {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.Debug|Win32.ActiveCfg = Debug|Win32 {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.Debug|Win32.Build.0 = Debug|Win32 {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.Debug|x64.ActiveCfg = Debug|x64 {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.Debug|x64.Build.0 = Debug|x64 - {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.PublicRelease|Any CPU.ActiveCfg = Release|x64 - {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.PublicRelease|Any CPU.Build.0 = Release|x64 {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.PublicRelease|Win32.ActiveCfg = Release|Win32 {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.PublicRelease|Win32.Build.0 = Release|Win32 {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.PublicRelease|x64.ActiveCfg = Release|x64 {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.PublicRelease|x64.Build.0 = Release|x64 - {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.Release|Any CPU.ActiveCfg = Release|Win32 {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.Release|Win32.ActiveCfg = Release|Win32 {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.Release|Win32.Build.0 = Release|Win32 {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.Release|x64.ActiveCfg = Release|x64 {74660324-42AA-41B6-9FDB-E0ED0D0144CE}.Release|x64.Build.0 = Release|x64 - {B43C60C4-7B0D-466B-BE85-11298000062A}.Debug|Any CPU.ActiveCfg = Debug|Win32 {B43C60C4-7B0D-466B-BE85-11298000062A}.Debug|Win32.ActiveCfg = Debug|Win32 {B43C60C4-7B0D-466B-BE85-11298000062A}.Debug|Win32.Build.0 = Debug|Win32 {B43C60C4-7B0D-466B-BE85-11298000062A}.Debug|x64.ActiveCfg = Debug|x64 {B43C60C4-7B0D-466B-BE85-11298000062A}.Debug|x64.Build.0 = Debug|x64 - {B43C60C4-7B0D-466B-BE85-11298000062A}.PublicRelease|Any CPU.ActiveCfg = Release|x64 - {B43C60C4-7B0D-466B-BE85-11298000062A}.PublicRelease|Any CPU.Build.0 = Release|x64 {B43C60C4-7B0D-466B-BE85-11298000062A}.PublicRelease|Win32.ActiveCfg = Release|Win32 {B43C60C4-7B0D-466B-BE85-11298000062A}.PublicRelease|Win32.Build.0 = Release|Win32 {B43C60C4-7B0D-466B-BE85-11298000062A}.PublicRelease|x64.ActiveCfg = Release|x64 {B43C60C4-7B0D-466B-BE85-11298000062A}.PublicRelease|x64.Build.0 = Release|x64 - {B43C60C4-7B0D-466B-BE85-11298000062A}.Release|Any CPU.ActiveCfg = Release|Win32 {B43C60C4-7B0D-466B-BE85-11298000062A}.Release|Win32.ActiveCfg = Release|Win32 {B43C60C4-7B0D-466B-BE85-11298000062A}.Release|Win32.Build.0 = Release|Win32 {B43C60C4-7B0D-466B-BE85-11298000062A}.Release|x64.ActiveCfg = Release|x64 {B43C60C4-7B0D-466B-BE85-11298000062A}.Release|x64.Build.0 = Release|x64 - {7571CD36-4A3C-446F-96B1-951261274B78}.Debug|Any CPU.ActiveCfg = Debug|Win32 {7571CD36-4A3C-446F-96B1-951261274B78}.Debug|Win32.ActiveCfg = Debug|Win32 {7571CD36-4A3C-446F-96B1-951261274B78}.Debug|Win32.Build.0 = Debug|Win32 {7571CD36-4A3C-446F-96B1-951261274B78}.Debug|x64.ActiveCfg = Debug|x64 {7571CD36-4A3C-446F-96B1-951261274B78}.Debug|x64.Build.0 = Debug|x64 - {7571CD36-4A3C-446F-96B1-951261274B78}.PublicRelease|Any CPU.ActiveCfg = Release|x64 - {7571CD36-4A3C-446F-96B1-951261274B78}.PublicRelease|Any CPU.Build.0 = Release|x64 {7571CD36-4A3C-446F-96B1-951261274B78}.PublicRelease|Win32.ActiveCfg = Release|Win32 {7571CD36-4A3C-446F-96B1-951261274B78}.PublicRelease|Win32.Build.0 = Release|Win32 {7571CD36-4A3C-446F-96B1-951261274B78}.PublicRelease|x64.ActiveCfg = Release|x64 {7571CD36-4A3C-446F-96B1-951261274B78}.PublicRelease|x64.Build.0 = Release|x64 - {7571CD36-4A3C-446F-96B1-951261274B78}.Release|Any CPU.ActiveCfg = Release|Win32 {7571CD36-4A3C-446F-96B1-951261274B78}.Release|Win32.ActiveCfg = Release|Win32 {7571CD36-4A3C-446F-96B1-951261274B78}.Release|Win32.Build.0 = Release|Win32 {7571CD36-4A3C-446F-96B1-951261274B78}.Release|x64.ActiveCfg = Release|x64 {7571CD36-4A3C-446F-96B1-951261274B78}.Release|x64.Build.0 = Release|x64 - {12B25935-229F-4128-B66B-7561A77ABC54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {12B25935-229F-4128-B66B-7561A77ABC54}.Debug|Any CPU.Build.0 = Debug|Any CPU {12B25935-229F-4128-B66B-7561A77ABC54}.Debug|Win32.ActiveCfg = Debug|x86 {12B25935-229F-4128-B66B-7561A77ABC54}.Debug|Win32.Build.0 = Debug|x86 {12B25935-229F-4128-B66B-7561A77ABC54}.Debug|x64.ActiveCfg = Debug|x64 {12B25935-229F-4128-B66B-7561A77ABC54}.Debug|x64.Build.0 = Debug|x64 - {12B25935-229F-4128-B66B-7561A77ABC54}.PublicRelease|Any CPU.ActiveCfg = Release|Any CPU - {12B25935-229F-4128-B66B-7561A77ABC54}.PublicRelease|Any CPU.Build.0 = Release|Any CPU {12B25935-229F-4128-B66B-7561A77ABC54}.PublicRelease|Win32.ActiveCfg = Release|x86 {12B25935-229F-4128-B66B-7561A77ABC54}.PublicRelease|Win32.Build.0 = Release|x86 {12B25935-229F-4128-B66B-7561A77ABC54}.PublicRelease|x64.ActiveCfg = Release|x64 {12B25935-229F-4128-B66B-7561A77ABC54}.PublicRelease|x64.Build.0 = Release|x64 - {12B25935-229F-4128-B66B-7561A77ABC54}.Release|Any CPU.ActiveCfg = Release|Any CPU - {12B25935-229F-4128-B66B-7561A77ABC54}.Release|Any CPU.Build.0 = Release|Any CPU {12B25935-229F-4128-B66B-7561A77ABC54}.Release|Win32.ActiveCfg = Release|x86 {12B25935-229F-4128-B66B-7561A77ABC54}.Release|Win32.Build.0 = Release|x86 {12B25935-229F-4128-B66B-7561A77ABC54}.Release|x64.ActiveCfg = Release|x64 {12B25935-229F-4128-B66B-7561A77ABC54}.Release|x64.Build.0 = Release|x64 - {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.Debug|Win32.ActiveCfg = Debug|x86 {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.Debug|Win32.Build.0 = Debug|x86 {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.Debug|x64.ActiveCfg = Debug|x64 {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.Debug|x64.Build.0 = Debug|x64 - {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.PublicRelease|Any CPU.ActiveCfg = Release|Any CPU - {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.PublicRelease|Any CPU.Build.0 = Release|Any CPU {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.PublicRelease|Win32.ActiveCfg = Release|x86 {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.PublicRelease|Win32.Build.0 = Release|x86 {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.PublicRelease|x64.ActiveCfg = Release|x64 {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.PublicRelease|x64.Build.0 = Release|x64 - {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.Release|Any CPU.Build.0 = Release|Any CPU {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.Release|Win32.ActiveCfg = Release|x86 {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.Release|Win32.Build.0 = Release|x86 {0BAB6AFC-5D51-4645-BF8E-61F1C296B6FE}.Release|x64.ActiveCfg = Release|x64 diff --git a/regXwild/core/ESS/AlgorithmEss.h b/regXwild/core/ESS/AlgorithmEss.h index fea2f55..f6a96d4 100644 --- a/regXwild/core/ESS/AlgorithmEss.h +++ b/regXwild/core/ESS/AlgorithmEss.h @@ -90,8 +90,13 @@ namespace net { namespace r_eg { namespace regXwild { namespace core { namespace /// True if the match was successful. REGXWILD_API bool match(const tstring& input, const tstring& pattern, udiff_t offset, const EngineOptions& options = EngineOptions::F_NONE, MatchResult* result = nullptr); +#if _CPP11_OR_ABOVE using EngineOptions = core::ESS::EngineOptions; using MatchResult = core::ESS::MatchResult; +#else + typedef core::ESS::EngineOptions EngineOptions; + typedef core::ESS::MatchResult MatchResult; +#endif protected: diff --git a/regXwild/core/ESS/MatchResult.h b/regXwild/core/ESS/MatchResult.h index 8c4523c..70d8b1e 100644 --- a/regXwild/core/ESS/MatchResult.h +++ b/regXwild/core/ESS/MatchResult.h @@ -35,7 +35,7 @@ namespace net { namespace r_eg { namespace regXwild { namespace core { namespace struct MatchResult { - const static udiff_t npos = -1; + static const udiff_t npos = static_cast(-1); /// /// Position of the first occurrence or MatchResult::npos. diff --git a/regXwild/regXwild.rc b/regXwild/regXwild.rc new file mode 100644 index 0000000..16dc6f1 --- /dev/null +++ b/regXwild/regXwild.rc @@ -0,0 +1,110 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian (Russia) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +#pragma code_page(1251) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Russian (Russia) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,3,0,0 + PRODUCTVERSION 1,3,0,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40000L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "github.com/3F" + VALUE "FileDescription", "https://github.com/3F/regXwild" + VALUE "FileVersion", "1.3.0.0" + VALUE "InternalName", "regXwild.dll" + VALUE "LegalCopyright", "Copyright (c) 2013-2021 Denis Kuzmin github/3F" + VALUE "OriginalFilename", "regXwild.dll" + VALUE "ProductName", "regXwild" + VALUE "ProductVersion", "1.3.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/regXwild/regXwild.vcxproj b/regXwild/regXwild.vcxproj index 346c168..062680c 100644 --- a/regXwild/regXwild.vcxproj +++ b/regXwild/regXwild.vcxproj @@ -1,5 +1,6 @@  + Debug @@ -27,13 +28,7 @@ v142 $(LatestTargetPlatformVersion) 10.0 - Unicode - - - RXW_UNICODE;%(PreprocessorDefinitions) - - DynamicLibrary @@ -74,26 +69,18 @@ true $(ProjectDir);$(IncludePath) - $(SolutionDir)bin\raw\$(Configuration)\$(Platform)\ - $(ProjectDir)obj\$(Configuration)\ true $(ProjectDir);$(IncludePath) - $(SolutionDir)bin\raw\$(Configuration)\$(Platform)\ - $(ProjectDir)obj\$(Configuration)\ false $(ProjectDir);$(IncludePath) - $(SolutionDir)bin\raw\$(Configuration)\$(Platform)\ - $(ProjectDir)obj\$(Configuration)\ false $(ProjectDir);$(IncludePath) - $(SolutionDir)bin\raw\$(Configuration)\$(Platform)\ - $(ProjectDir)obj\$(Configuration)\ @@ -167,6 +154,7 @@ + @@ -198,6 +186,9 @@ Create + + + diff --git a/regXwild/regXwild.vcxproj.filters b/regXwild/regXwild.vcxproj.filters index 0fc6d25..1e0ebe6 100644 --- a/regXwild/regXwild.vcxproj.filters +++ b/regXwild/regXwild.vcxproj.filters @@ -78,6 +78,9 @@ Header Files\core\ESS + + Header Files + @@ -99,4 +102,9 @@ Source Files + + + Resource Files + + \ No newline at end of file diff --git a/regXwild/resource.h b/regXwild/resource.h new file mode 100644 index 0000000..cb4ea2f --- /dev/null +++ b/regXwild/resource.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by regXwild.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/regXwildTest/regXwildTest.vcxproj b/regXwildTest/regXwildTest.vcxproj index 47848ab..6aa6782 100644 --- a/regXwildTest/regXwildTest.vcxproj +++ b/regXwildTest/regXwildTest.vcxproj @@ -1,5 +1,6 @@  + Debug @@ -20,20 +21,13 @@ {B43C60C4-7B0D-466B-BE85-11298000062A} - Win32Proj net::r_eg::regXwildTest v$(VisualStudioVersion.Replace(".", "")) v141 v142 $(LatestTargetPlatformVersion) 10.0 - Unicode - - - RXW_UNICODE;%(PreprocessorDefinitions) - - DynamicLibrary @@ -78,26 +72,18 @@ true $(ProjectDir);$(IncludePath) - $(ProjectDir)obj\$(Configuration)\ - $(SolutionDir)bin\raw\$(Configuration)\$(Platform)\ true $(ProjectDir);$(IncludePath) - $(ProjectDir)obj\$(Configuration)\ - $(SolutionDir)bin\raw\$(Configuration)\$(Platform)\ false $(ProjectDir);$(IncludePath) - $(ProjectDir)obj\$(Configuration)\ - $(SolutionDir)bin\raw\$(Configuration)\$(Platform)\ false $(ProjectDir);$(IncludePath) - $(ProjectDir)obj\$(Configuration)\ - $(SolutionDir)bin\raw\$(Configuration)\$(Platform)\ diff --git a/snet/snet.csproj b/snet/snet.csproj index bea9d65..fc9b918 100644 --- a/snet/snet.csproj +++ b/snet/snet.csproj @@ -1,13 +1,10 @@  - - Unicode - $(DefineConstants);RXW_UNICODE - + Debug - AnyCPU + x86 {12B25935-229F-4128-B66B-7561A77ABC54} Exe Properties @@ -17,28 +14,8 @@ 512 IDE1006 - - AnyCPU - true - full - false - ..\bin\raw\Debug\Win32\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - ..\bin\raw\Release\Win32\ - TRACE - prompt - 4 - true - ..\bin\raw\Debug\x64\ DEBUG;TRACE full x64 @@ -46,7 +23,6 @@ MinimumRecommendedRules.ruleset - ..\bin\raw\Release\x64\ TRACE true pdbonly @@ -56,7 +32,6 @@ true - ..\bin\raw\Debug\Win32\ DEBUG;TRACE full x86 @@ -64,7 +39,6 @@ MinimumRecommendedRules.ruleset - ..\bin\raw\Release\Win32\ TRACE true pdbonly diff --git a/regXwild.dotnet.targets b/tools/regXwild.dotnet.targets similarity index 92% rename from regXwild.dotnet.targets rename to tools/regXwild.dotnet.targets index 9d04a38..a1cd19b 100644 --- a/regXwild.dotnet.targets +++ b/tools/regXwild.dotnet.targets @@ -7,6 +7,7 @@ $(MSBuildThisFileDirectory)..\..\ $(regXwildRootPkg)lib\native\ MultiByte + $(DefineConstants);RXW_UNICODE diff --git a/regXwild.native.targets b/tools/regXwild.native.targets similarity index 81% rename from regXwild.native.targets rename to tools/regXwild.native.targets index 0f8457d..16cf36e 100644 --- a/regXwild.native.targets +++ b/tools/regXwild.native.targets @@ -12,11 +12,17 @@ REGXWILD_AS_LIB;%(PreprocessorDefinitions) + 4480;4482;%(DisableSpecificWarnings) regXwild.lib;%(AdditionalDependencies) + + + RXW_UNICODE;%(PreprocessorDefinitions) + + diff --git a/regXwild.nuspec b/tools/regXwild.nuspec similarity index 100% rename from regXwild.nuspec rename to tools/regXwild.nuspec