diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 87e0ef2..dfa5d59 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: - name: Build with MSBuild run: | - msbuild jN.vcxproj /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} + msbuild jN.vcxproj /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:VersionDefinitions="VERSION_MA=${{steps.nbgv.outputs.VersionMajor}};VERSION_MI=${{steps.nbgv.outputs.VersionMinor}};REVISION=${{steps.nbgv.outputs.BuildNumber}};VERSION_REVISION=${{steps.nbgv.outputs.VersionRevision}}" - name: Create zip file run: | diff --git a/VersionInfo.h b/VersionInfo.h index fefd822..32eddf2 100644 --- a/VersionInfo.h +++ b/VersionInfo.h @@ -16,12 +16,24 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#ifndef VERSION_MA #define VERSION_MA 2 -#define VERSION_MI 2 +#endif +#ifndef VERSION_MI +#define VERSION_MI 2 +#endif + +#ifndef REVISION // increment revision in case of modification -#define REVISION 185 - #define xstr(s) str(s) - #define str(s) #s -#define _VERSION_STR VERSION_MA ## . ## REVISION +#define REVISION 185 +#endif + +#ifndef VERSION_REVISION +#define VERSION_REVISION 0 +#endif + +#define xstr(s) str(s) +#define str(s) #s +#define _VERSION_STR VERSION_MA ## . ## VERSION_MI ## . ## REVISION diff --git a/VersionInfo_tmpl.h b/VersionInfo_tmpl.h deleted file mode 100644 index 5a9d6b6..0000000 --- a/VersionInfo_tmpl.h +++ /dev/null @@ -1,27 +0,0 @@ -/* -This file is part of jN, a plugin for Notepad++ -Copyright (C)2013 Eugen Kremer - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#define VERSION_MA 2 -#define VERSION_MI 0 - -// increment revision in case of modification -#define REVISION $WCREV$ - #define xstr(s) str(s) - #define str(s) #s -#define _VERSION_STR VERSION_MA ## . ## REVISION - diff --git a/jN.vcxproj b/jN.vcxproj index b1a34f3..81d29ee 100644 --- a/jN.vcxproj +++ b/jN.vcxproj @@ -22,6 +22,7 @@ {1590D7CD-7D3A-4AB7-A355-EE02F7FB987D} NppPluginTemplate Win32Proj + VER=default @@ -67,7 +68,7 @@ MaxSpeed true .\;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_USRDLL;NPPPLUGINTEMPLATE_EXPORTS;UNICODE;%(PreprocessorDefinitions) + WIN32;_WINDOWS;_USRDLL;NPPPLUGINTEMPLATE_EXPORTS;UNICODE;%(PreprocessorDefinitions);%(VersionDefinitions) MultiThreaded false @@ -105,7 +106,7 @@ MaxSpeed true .\;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_USRDLL;NPPPLUGINTEMPLATE_EXPORTS;UNICODE;%(PreprocessorDefinitions) + WIN32;_WINDOWS;_USRDLL;NPPPLUGINTEMPLATE_EXPORTS;UNICODE;%(PreprocessorDefinitions);%(VersionDefinitions) MultiThreaded false @@ -142,7 +143,7 @@ Disabled .\;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;NPPPLUGINTEMPLATE_EXPORTS;UNICODE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;NPPPLUGINTEMPLATE_EXPORTS;UNICODE;%(PreprocessorDefinitions);%(VersionDefinitions) false Default MultiThreadedDebug @@ -178,7 +179,7 @@ Disabled .\;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;NPPPLUGINTEMPLATE_EXPORTS;UNICODE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;NPPPLUGINTEMPLATE_EXPORTS;UNICODE;%(PreprocessorDefinitions);%(VersionDefinitions) false Default MultiThreadedDebug @@ -238,7 +239,9 @@ - + + %(PreprocessorDefinitions);%(VersionDefinitions) + diff --git a/res.rc b/res.rc index 5415afa..50544ff 100644 --- a/res.rc +++ b/res.rc @@ -7,12 +7,12 @@ STRINGTABLE BEGIN -1 "jN Plugin for Notepad++\n© Eugen Kremer, 2023\ngithub.com/sieukrem/jn-npp-plugin" +1 "jN Plugin for Notepad++\n© Eugen Kremer, 2024\ngithub.com/sieukrem/jn-npp-plugin" END 1 VERSIONINFO -FILEVERSION VERSION_MA,VERSION_MI,REVISION,10 -PRODUCTVERSION VERSION_MA,VERSION_MI,REVISION,10 +FILEVERSION VERSION_MA,VERSION_MI,REVISION,VERSION_REVISION +PRODUCTVERSION VERSION_MA,VERSION_MI,REVISION,VERSION_REVISION FILEOS 0x40004 FILETYPE 0x1 { @@ -21,10 +21,10 @@ BLOCK "StringFileInfo" BLOCK "040904b0" { VALUE "CompanyName", "Eugen Kremer" - VALUE "FileDescription", "jN Plugin for Notepad++ that allows you to automate certain Tasks with JavaScript" + VALUE "FileDescription", "jN Plugin for Notepad++ that allows you to automate tasks with JavaScript" VALUE "FileVersion", xstr(_VERSION_STR) VALUE "InternalName", "jN.dll" - VALUE "LegalCopyright", "Copyleft 2023 by Eugen Kremer" + VALUE "LegalCopyright", "Copyleft 2024 by Eugen Kremer" VALUE "OriginalFilename", "jN.dll" VALUE "ProductName", "jN" VALUE "ProductVersion", xstr(_VERSION_STR)