Build Instructions for Windows are Wrong
The build instructions for windows are incorrect, or perhaps there is something else wrong. In step 2, you say to use:
cmake --build . --config MinSizeRel --target webpgPlugin
But, for me, at least, devenv errored out, saying the solution was invalid. Changing the line to:
cmake --build . --config MinSizeRel --target webpg
... made it work. Also notable is the fact the output file is named "npwebpg-ext-v0.6.5-WINNT_x86-msvc.dll". However, when I dropped that file in my Extensions folder, I was able to install the extension and things appear to be working.
Of course, I probably wouldn't have built from source if the Windows binaries on the download page were working... :P
I will update the build instructions (and the Makefile, as it likely suffers the same issue).
I don't understand your remark "Also notable is the fact the output file is named "npwebpg-ext-v0.6.5-WINNT_x86-msvc.dll". However, when I dropped that file in my Extensions folder, I was able to install the extension and things appear to be working." -- What do you mean? What extension folder and what things appear to be working?
Regarding the downloads, I'll look into that as well.
Have met the same issue (solution is invalid). Tried both mentioned strings. No success. Building under win7 x64 with VS 2010.
Have met the same issue (solution is invalid).
Can you elaborate?
What are the steps you took prior to attempting to issue the cmake build command?
Tried both mentioned strings.
Which CLI are you using? Where are you attempting to execute the command? If you have the build-tools installed, does simply executing "make" in the root project directory invoke the build? You should'nt need to execute the build commands on their own.
sorry, it was my fail. I have x64 windows. And I have run firebreath\prep2010.cmd . build in order to build Prep
Environment. After I realized that I had to use x64 build script I run
firebreath\prep2010x64.cmd . build
cd ./build
cmake --build . --config MinSizeRel --target webpg
and it started building
Currently it has finished building and failed with linker error - can't resolve gnupg types. I had installed Gpg4win before running cmake, so it seems it didn't find header files.
I tried to build with make, but it crashes:
C:\sneg\webpg\webpg-npapi>make
process_begin: CreateProcess(NULL, gcc -dumpmachine, ...) failed.
make: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4227d3)
C:\sneg\webpg\webpg-npapi>make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-pc-mingw32
On my ubuntu make at root folder worked properly
Currently it has finished building and failed with linker error - can't resolve gnupg types
If you are using CMAKE to build the library, that should never happen - the LIBGPGME library is included along with the relevant header (gpgme.h) within the build tree, and is referenced in the CMAKE build files. If you are building outside of CMAKE (via the VS proj files, for example) you may need to add the libgpgme.lib file to your linker, and the gpgme.h header file to your project resources.
I tried to build with make, but it crashes
I don't think it is referenced anywhere in the build instructions, but I don't think that will work in the windows CLI. I typically use bash, provided by MINGW with the gcc compiler installed.
I try not to get into build environment setup too much, as everyone has their preferred environment, and I only ever compile on architectures other than linux when I am releasing a new version of my extension which utilizes this library.
That isn't to say I won't, I just haven't, as I am not well versed in the intricacies of building on the various platforms.
Side question, are you compiling this library for usage in one of your own projects?
I am curious about the status of this; were you able to build with the notes I provided? I would like to alter the build setup to prevent this issue in the future, so I would like to understand what the resolution was for you.
Thanks for the info.
I am curious about the status of this; were you able to build with the notes I provided?
I managed to compile webpg under MinGW instead of cmd.exe. Just run "make" at the root folder of the project.
Side question, are you compiling this library for usage in one of your own projects?
Yes, I needed pgp plugin in order to work with encrypted e-mail.
Great news. I am glad you got it working.
Depending on how you intend to use this library, this may or may not affect you; but NPAPI is being phased out by Chrome and Firefox in the near future.
I am currently trying to implement a replacement solution, however, the result will not be the same for both Firefox and Chrome. If you are targeting Firefox specifically, the solution will be rather simple, and consequently, the library will be faster. I expect to have a working library with reference material available in the next week or so. (All methods should remain the same as they exist now, in terms of parameters and return value. The primary difference is how Firefox interfaces with the library, and that should be fairly abstracted with a JS 'helper' script).
Also, I don't know if you are developing something from scratch, but the browser extension WebPG[1](which uses webpg-npapi) already implements PGP functionality in some email clients (gmail, mostly) -- perhaps what you intend to accomplish would be better suited as an addition to WebPG, which is already in circulation and supports Chrome and Firefox.. ??
[1] https://webpg.org/