From 1c2c7ae1447c2ee31c4914c0c7aa764b1837c060 Mon Sep 17 00:00:00 2001 From: andri lim Date: Sat, 4 Jan 2020 15:00:09 +0700 Subject: [PATCH 1/2] compiles with nim v1.x.x --- leximpl.nim | 11 ++++++----- nppnim.nim | 19 ++++++++++--------- stylecontext.nim | 2 +- support.nim | 20 +++++++++++--------- winapi.nim | 24 ++++++++++++------------ 5 files changed, 40 insertions(+), 36 deletions(-) diff --git a/leximpl.nim b/leximpl.nim index bb8dd59..167921e 100644 --- a/leximpl.nim +++ b/leximpl.nim @@ -105,10 +105,11 @@ proc GetWordType(L: ptr LexAccessor, start, stop: int): WordType = kw.setLen(0) for i in start.. Date: Sat, 4 Jan 2020 15:40:17 +0700 Subject: [PATCH 2/2] add build script --- build.bat | 36 ++++++++++++++++++++++++++++++++++++ resource/resource.rc | 4 ++-- resource/resource32.o | Bin 924 -> 924 bytes resource/resource64.o | Bin 924 -> 924 bytes 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 build.bat diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..efd6b8f --- /dev/null +++ b/build.bat @@ -0,0 +1,36 @@ +@echo off + +if [%1]==[] goto usage + +if "%1"=="all" goto nppnim32 +if "%1"=="x86" goto nppnim32 +if "%1"=="x64" goto nppnim64 + +:nppnim32 +@echo building 32 bit version +SET BASE=release\nppnim32 +SET TMPPATH=%PATH% +SET PATH=e:\mingw32\mingw32\bin;f:\projects\new_nim\bin;%PATH% +windres -i resource\resource.rc -F pe-i386 -o resource\resource32.o +nim c -d:release --cpu:i386 -o:%BASE%\nppnim.dll nppnim +strip %BASE%\nppnim.dll +7z a -tzip %BASE%\nppnim32.zip %BASE%\nppnim.dll %BASE%\nppnim.xml +SET PATH=%TMPPATH% +if "%1"=="all" goto nppnim64 +goto :eof + +:nppnim64 +@echo building 64 bit version +SET BASE=release\nppnim64 +windres -i resource\resource.rc -o resource\resource64.o +nim c -d:release -o:%BASE%\nppnim.dll nppnim +strip %BASE%\nppnim.dll +7z a -tzip %BASE%\nppnim64.zip %BASE%\nppnim.dll %BASE%\nppnim.xml +goto :eof + +:usage +@echo Usage: %0 options +@echo x86: buils 32 bit version +@echo x64: build 64 bit version +@echo all: build both 32 bit and 64 bit version +exit /B 1 \ No newline at end of file diff --git a/resource/resource.rc b/resource/resource.rc index 303f818..6bff79f 100644 --- a/resource/resource.rc +++ b/resource/resource.rc @@ -8,8 +8,8 @@ #include -#define VERSION_STRING "1.0.1" -#define VERSION_WORDS 1, 0, 1, 0 +#define VERSION_STRING "1.2.4" +#define VERSION_WORDS 1, 2, 4, 0 VS_VERSION_INFO VERSIONINFO FILEVERSION VERSION_WORDS diff --git a/resource/resource32.o b/resource/resource32.o index cccb19214636184aa71c3c358bc1d0e188b9d703..dd27d21eda15a0e72e57943c3c0d6caf73c2e662 100644 GIT binary patch delta 47 scmbQkK8Jn65q>5HMg|5376vH2@p366s}X}9gUM!JCUq!tawW4e0Lpa;KmY&$ delta 47 ocmbQkK8Jn65q<^+Mg}Cj@p366s{w-^gW+ahCUq!tawW4e0LZuqEC2ui diff --git a/resource/resource64.o b/resource/resource64.o index 2917b5e299b802bbd614d0214b4f3e8b4598f5ec..c7d97ba26582cbd5d6c8894e7c0c924efc1a0995 100644 GIT binary patch delta 47 scmbQkK8Jn65q>5HMg|5376vH2@p366s}X}9gUM!JCUq!tawW4e0Lpa;KmY&$ delta 47 ocmbQkK8Jn65q<^+Mg}Cj@p366s{w-^gW+ahCUq!tawW4e0LZuqEC2ui