From ab9762aa4e52af06bff46965b2cbace0aa81d7ac Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sat, 30 Oct 2010 01:04:08 +0300 Subject: modified: gpg_wrapper.cpp modified: log.cpp modified: log.h new file: new_gpg.vcxproj --- gpg_wrapper.cpp | 40 ++--- log.cpp | 18 +- log.h | 8 +- new_gpg.vcxproj | 530 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 563 insertions(+), 33 deletions(-) create mode 100644 new_gpg.vcxproj diff --git a/gpg_wrapper.cpp b/gpg_wrapper.cpp index 14f0c74..04f3512 100644 --- a/gpg_wrapper.cpp +++ b/gpg_wrapper.cpp @@ -1,15 +1,15 @@ // Copyright © 2010 sss -// +// // 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 2 // 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, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -36,20 +36,20 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD int size; wstring commandline; - + sattrs.nLength=sizeof(SECURITY_ATTRIBUTES); sattrs.bInheritHandle=TRUE; InitializeSecurityDescriptor(&sdesc,SECURITY_DESCRIPTOR_REVISION); SetSecurityDescriptorDacl(&sdesc,TRUE,NULL,FALSE); sattrs.lpSecurityDescriptor=&sdesc; - + success=CreatePipe(&newstdin,&writestdin,&sattrs,0); if (!success) { *result = pxCreatePipeFailed; return pxCreatePipeFailed; } - + success=CreatePipe(&readstdout,&newstdout,&sattrs,0); if (!success) { @@ -58,7 +58,7 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD *result = pxCreatePipeFailed; return pxCreatePipeFailed; } - + GetStartupInfo(&sinfo); sinfo.dwFlags=STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW; sinfo.wShowWindow=SW_HIDE; @@ -79,7 +79,7 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD { mir_free(bin_path); *result = pxNotFound; - return pxNotFound; + return pxNotFound; } } } @@ -96,12 +96,12 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD delete [] bin_path; //hmm delete [] home_dir; } - + debuglog<<"gpg in: "<c_str()<<"\n"; WaitForSingleObject(pri.hProcess,INFINITE); - + CloseHandle(pri.hThread); CloseHandle(pri.hProcess); CloseHandle(newstdin); @@ -145,7 +145,7 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD CloseHandle(readstdout); CloseHandle(writestdin); - *result = pxSuccess; + *result = pxSuccess; return pxSuccess; } @@ -157,4 +157,4 @@ void pxEexcute_thread(void *param) { MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK); } -} \ No newline at end of file +} diff --git a/log.cpp b/log.cpp index a7395e6..d34b869 100644 --- a/log.cpp +++ b/log.cpp @@ -1,15 +1,15 @@ // Copyright © 2010 sss -// +// // 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 2 // 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, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -22,11 +22,11 @@ logtofile& logtofile::operator<<(TCHAR *buf) if(bDebugLog) { log_mutex.lock(); - log.open(path, std::ios::app |std::ios::ate); + log.open(toUTF8(path).c_str(), std::ios::app |std::ios::ate); log< + + + + Debug(service) + Win32 + + + Debug + Win32 + + + Release Unicode (service only)(static) + Win32 + + + Release Unicode (service only) + Win32 + + + Release Unicode (static) + Win32 + + + Release Unicode + Win32 + + + + {F29D0C8D-141A-43CF-86B2-34A04653F8D4} + new_gpg + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + .\Debug\ + .\Debug\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + $(Configuration)\ + $(Configuration)\ + true + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release Unicode/testplug.tlb + + + + + Full + OnlyExplicitInline + Size + true + true + X:\install\git\miranda\mim_plugs;X:\install\git\miranda\miranda-im\miranda\include;../../include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_UNICODE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + StreamingSIMDExtensions + Precise + .\Release Unicode/testplug.pch + .\Release Unicode/ + .\Release Unicode/ + .\Release Unicode/ + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0809 + + + libgpgme-11.lib;libgcrypt-11.lib;libksba-8.lib;%(AdditionalDependencies) + true + X:\install\git\miranda\mim_plugs\lib;%(AdditionalLibraryDirectories) + true + true + true + UseLinkTimeCodeGeneration + false + + + .\Release Unicode/testplug.lib + MachineX86 + + + true + .\Release Unicode/testplug.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testplug.tlb + + + + + Disabled + x:\temp\windows\libs\utf8cpp\include;x:\temp\windows\libs\boost;x:\install\git\miranda\miranda-im\miranda\include;x:\install\git\miranda\mim_plugs;../../include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;TESTPLUG_EXPORTS;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + Use + commonheaders.h + c:\temp\new_gpg.pch + + + .\Debug/ + .\Debug/ + .\Debug/ + true + Level3 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0809 + + + shlwapi.lib;%(AdditionalDependencies) + true + x:\temp\windows\libs\boost\lib;%(AdditionalLibraryDirectories) + true + true + false + false + false + + + .\Debug/testplug.lib + MachineX86 + + + true + .\Debug/testplug.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release Unicode (static)/testplug.tlb + + + + + MinSpace + OnlyExplicitInline + Size + true + true + x:\temp\windows\libs\utf8cpp\include;x:\temp\windows\libs\boost;x:\install\git\miranda\miranda-im\miranda\include;x:\install\git\miranda\mim_plugs;../../include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_UNICODE;%(PreprocessorDefinitions) + true + MultiThreaded + true + StreamingSIMDExtensions + Precise + Use + commonheaders.h + c:\temp\new_gpg.pch + .\Release Unicode (static)/ + .\Release Unicode (static)/ + .\Release Unicode (static)/ + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0809 + + + shlwapi.lib;%(AdditionalDependencies) + true + x:\temp\windows\libs\boost\lib;%(AdditionalLibraryDirectories) + false + NotSet + true + true + UseLinkTimeCodeGeneration + false + + + .\Release Unicode (static)/testplug.lib + MachineX86 + + + true + .\Release Unicode (static)/testplug.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release Unicode (static)/testplug.tlb + + + + + Full + OnlyExplicitInline + Size + true + true + ../../include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + MultiThreaded + true + StreamingSIMDExtensions + Precise + .\Release Unicode (static)/testplug.pch + .\Release Unicode (static)/ + .\Release Unicode (static)/ + .\Release Unicode (static)/ + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0809 + + + true + true + true + true + UseLinkTimeCodeGeneration + false + + + .\Release Unicode (static)/testplug.lib + MachineX86 + + + true + .\Release Unicode (static)/testplug.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release Unicode (static)/testplug.tlb + + + + + Full + OnlyExplicitInline + Size + true + true + ../../include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + StreamingSIMDExtensions + Precise + .\Release Unicode (static)/testplug.pch + .\Release Unicode (static)/ + .\Release Unicode (static)/ + .\Release Unicode (static)/ + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0809 + + + true + true + true + true + UseLinkTimeCodeGeneration + false + + + .\Release Unicode (static)/testplug.lib + MachineX86 + + + true + .\Release Unicode (static)/testplug.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testplug.tlb + + + + + Disabled + ../../include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;TESTPLUG_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/testplug.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0809 + + + true + true + false + + + .\Debug/testplug.lib + MachineX86 + + + true + .\Debug/testplug.bsc + + + + + Use + Use + commonheaders.h + c:\temp\new_gpg.pch + + + Use + Use + commonheaders.h + c:\temp\new_gpg.pch + + + Use + Use + commonheaders.h + c:\temp\new_gpg.pch + + + Create + commonheaders.h + Create + commonheaders.h + c:\temp\new_gpg.pch + + + Use + Use + commonheaders.h + c:\temp\new_gpg.pch + + + + Use + Use + commonheaders.h + c:\temp\new_gpg.pch + + + Use + Use + commonheaders.h + c:\temp\new_gpg.pch + + + Use + Use + commonheaders.h + c:\temp\new_gpg.pch + + + Use + Use + commonheaders.h + c:\temp\new_gpg.pch + + + Use + Use + commonheaders.h + c:\temp\new_gpg.pch + + + Use + Use + commonheaders.h + c:\temp\new_gpg.pch + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3