diff --git a/HelloFar.sln b/HelloFar.sln new file mode 100644 index 0000000..16a9a57 --- /dev/null +++ b/HelloFar.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloFar", "HelloFar\HelloFar.vcxproj", "{7C8F5DAB-2516-4DE9-9F85-D10807CA47D2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7C8F5DAB-2516-4DE9-9F85-D10807CA47D2}.Debug|x64.ActiveCfg = Debug|x64 + {7C8F5DAB-2516-4DE9-9F85-D10807CA47D2}.Debug|x64.Build.0 = Debug|x64 + {7C8F5DAB-2516-4DE9-9F85-D10807CA47D2}.Debug|x86.ActiveCfg = Debug|Win32 + {7C8F5DAB-2516-4DE9-9F85-D10807CA47D2}.Debug|x86.Build.0 = Debug|Win32 + {7C8F5DAB-2516-4DE9-9F85-D10807CA47D2}.Release|x64.ActiveCfg = Release|x64 + {7C8F5DAB-2516-4DE9-9F85-D10807CA47D2}.Release|x64.Build.0 = Release|x64 + {7C8F5DAB-2516-4DE9-9F85-D10807CA47D2}.Release|x86.ActiveCfg = Release|Win32 + {7C8F5DAB-2516-4DE9-9F85-D10807CA47D2}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8694F54E-5326-4071-9291-202E6870A59E} + EndGlobalSection +EndGlobal diff --git a/HelloFar/HelloFar.cpp b/HelloFar/HelloFar.cpp new file mode 100644 index 0000000..0286d54 --- /dev/null +++ b/HelloFar/HelloFar.cpp @@ -0,0 +1,47 @@ +#include "pch.h" + +#include "version.hpp" +#include "guid.hpp" + +static struct PluginStartupInfo Info; + +void WINAPI GetGlobalInfoW(struct GlobalInfo* Info) +{ + Info->StructSize = sizeof(struct GlobalInfo); + Info->MinFarVersion = FARMANAGERVERSION; + Info->Version = PLUGIN_VERSION; + Info->Guid = MainGuid; + Info->Title = PLUGIN_NAME; + Info->Description = PLUGIN_DESC; + Info->Author = PLUGIN_AUTHOR; +} + +void WINAPI SetStartupInfoW(const struct PluginStartupInfo* startupInfo) +{ + Info = *startupInfo; +} + +void WINAPI GetPluginInfoW(struct PluginInfo* pluginInfo) +{ + pluginInfo->StructSize = sizeof(*pluginInfo); + pluginInfo->Flags = PF_EDITOR; + + static const wchar_t* PluginMenuStrings[1]; + PluginMenuStrings[0] = Info.GetMsg(&MainGuid, 0); + pluginInfo->PluginMenu.Guids = &MenuGuid; + pluginInfo->PluginMenu.Strings = PluginMenuStrings; + pluginInfo->PluginMenu.Count = ARRAYSIZE(PluginMenuStrings); +} + +HANDLE WINAPI OpenW(const struct OpenInfo* OInfo) +{ + const wchar_t* MsgItems[] = + { + Info.GetMsg(&MainGuid, 0), + Info.GetMsg(&MainGuid, 1), + Info.GetMsg(&MainGuid, 2), + }; + + Info.Message(&MainGuid, NULL, FMSG_NONE, L"Contents", MsgItems, ARRAYSIZE(MsgItems), 1); + return NULL; +} diff --git a/HelloFar/HelloFar.def b/HelloFar/HelloFar.def new file mode 100644 index 0000000..94e5b1d --- /dev/null +++ b/HelloFar/HelloFar.def @@ -0,0 +1,7 @@ +LIBRARY HelloFar +; DESCRIPTION 'Hello Plugin' +EXPORTS + GetGlobalInfoW + SetStartupInfoW + GetPluginInfoW + OpenW diff --git a/HelloFar/HelloFar.vcxproj b/HelloFar/HelloFar.vcxproj new file mode 100644 index 0000000..eedcc8e --- /dev/null +++ b/HelloFar/HelloFar.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {7c8f5dab-2516-4de9-9f85-d10807ca47d2} + HelloFar + 10.0 + + + + DynamicLibrary + true + v142 + Unicode + + + DynamicLibrary + false + v142 + true + Unicode + + + DynamicLibrary + true + v142 + Unicode + + + DynamicLibrary + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + C:\Users\Acer\Downloads\FarManager-master\far;$(VC_IncludePath);$(WindowsSDK_IncludePath); + + + false + + + + Level3 + true + WIN32;_DEBUG;HELLOFAR_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + HelloFar.def + + + + + Level3 + true + true + true + WIN32;NDEBUG;HELLOFAR_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + true + true + false + HelloFar.def + + + + + Level3 + true + _DEBUG;HELLOFAR_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + stdcpp17 + + + Windows + true + false + HelloFar.def + + + + + Level3 + true + true + true + NDEBUG;HELLOFAR_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + true + true + false + HelloFar.def + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + \ No newline at end of file diff --git a/HelloFar/HelloFar.vcxproj.filters b/HelloFar/HelloFar.vcxproj.filters new file mode 100644 index 0000000..e573309 --- /dev/null +++ b/HelloFar/HelloFar.vcxproj.filters @@ -0,0 +1,44 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Файлы заголовков + + + Файлы заголовков + + + Файлы заголовков + + + Файлы заголовков + + + + + Исходные файлы + + + Исходные файлы + + + + + Исходные файлы + + + \ No newline at end of file diff --git a/HelloFar/HelloFar.vcxproj.user b/HelloFar/HelloFar.vcxproj.user new file mode 100644 index 0000000..0f14913 --- /dev/null +++ b/HelloFar/HelloFar.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/HelloFar/HelloFar_en.hlf b/HelloFar/HelloFar_en.hlf new file mode 100644 index 0000000..1bbe3dc --- /dev/null +++ b/HelloFar/HelloFar_en.hlf @@ -0,0 +1,8 @@ +.Language=English,English (English) +.PluginContents=HelloFar + +@Contents +$ #HelloFar# + +This is my first test plugin for Far Manager. +It's just show message "Hello". diff --git a/HelloFar/HelloFar_en.lng b/HelloFar/HelloFar_en.lng new file mode 100644 index 0000000..66a586a --- /dev/null +++ b/HelloFar/HelloFar_en.lng @@ -0,0 +1,5 @@ +.Language=English,English (English) + +"HelloFar" +"Hello!" +"Close" diff --git a/HelloFar/HelloFar_ru.hlf b/HelloFar/HelloFar_ru.hlf new file mode 100644 index 0000000..7f6756c --- /dev/null +++ b/HelloFar/HelloFar_ru.hlf @@ -0,0 +1,8 @@ +.Language=Russian,Russian (Русский) +.PluginContents=HelloFar + +@Contents +$ #HelloFar# + +Это мой первый пробный плагин для Far Manager. +Он просто печатает сообщение "Привет". diff --git a/HelloFar/HelloFar_ru.lng b/HelloFar/HelloFar_ru.lng new file mode 100644 index 0000000..6b1365f --- /dev/null +++ b/HelloFar/HelloFar_ru.lng @@ -0,0 +1,5 @@ +.Language=Russian,Russian (Русский) + +"HelloFar" +"Привет!" +"Закрыть" diff --git a/HelloFar/dllmain.cpp b/HelloFar/dllmain.cpp new file mode 100644 index 0000000..02f026a --- /dev/null +++ b/HelloFar/dllmain.cpp @@ -0,0 +1,19 @@ +// dllmain.cpp : Определяет точку входа для приложения DLL. +#include "pch.h" + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff --git a/HelloFar/framework.h b/HelloFar/framework.h new file mode 100644 index 0000000..09a28c4 --- /dev/null +++ b/HelloFar/framework.h @@ -0,0 +1,5 @@ +#pragma once + +#define WIN32_LEAN_AND_MEAN // Исключите редко используемые компоненты из заголовков Windows +// Файлы заголовков Windows +#include diff --git a/HelloFar/guid.hpp b/HelloFar/guid.hpp new file mode 100644 index 0000000..24ea5f1 --- /dev/null +++ b/HelloFar/guid.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include + +// {512fffeb - 6ebc - 4307 - 99ba - aae718d5d56d} +DEFINE_GUID(MainGuid, 0x512fffeb, 0x6ebc, 0x4307, 0x99, 0xba, 0xaa, 0xe7, 0x18, 0xd5, 0xd5, 0x6d); + +// {661f3773 - eefd - 45ae - b81a - d11a86ef882e} +DEFINE_GUID(MenuGuid, 0x661f3773, 0xeefd, 0x45ae, 0xb8, 0x1a, 0xd1, 0x1a, 0x86, 0xef, 0x88, 0x2e); diff --git a/HelloFar/pch.cpp b/HelloFar/pch.cpp new file mode 100644 index 0000000..b796c03 --- /dev/null +++ b/HelloFar/pch.cpp @@ -0,0 +1,5 @@ +// pch.cpp: файл исходного кода, соответствующий предварительно скомпилированному заголовочному файлу + +#include "pch.h" + +// При использовании предварительно скомпилированных заголовочных файлов необходим следующий файл исходного кода для выполнения сборки. diff --git a/HelloFar/pch.h b/HelloFar/pch.h new file mode 100644 index 0000000..db2da2a --- /dev/null +++ b/HelloFar/pch.h @@ -0,0 +1,13 @@ +// pch.h: это предварительно скомпилированный заголовочный файл. +// Перечисленные ниже файлы компилируются только один раз, что ускоряет последующие сборки. +// Это также влияет на работу IntelliSense, включая многие функции просмотра и завершения кода. +// Однако изменение любого из приведенных здесь файлов между операциями сборки приведет к повторной компиляции всех(!) этих файлов. +// Не добавляйте сюда файлы, которые планируете часто изменять, так как в этом случае выигрыша в производительности не будет. + +#ifndef PCH_H +#define PCH_H + +// Добавьте сюда заголовочные файлы для предварительной компиляции +#include "framework.h" + +#endif //PCH_H diff --git a/HelloFar/version.hpp b/HelloFar/version.hpp new file mode 100644 index 0000000..f905b07 --- /dev/null +++ b/HelloFar/version.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include + +#define PLUGIN_BUILD 0 +#define PLUGIN_DESC L"Hello Plugin for Far Manager x64" +#define PLUGIN_NAME L"HelloFar" +#define PLUGIN_FILENAME L"HelloFar.dll" +#define PLUGIN_AUTHOR L"CodePicker13" +#define PLUGIN_VERSION MAKEFARVERSION(FARMANAGERVERSION_MAJOR,FARMANAGERVERSION_MINOR,FARMANAGERVERSION_REVISION,PLUGIN_BUILD,VS_RELEASE) diff --git a/HelloFar/x64/Debug/HelloFar.log b/HelloFar/x64/Debug/HelloFar.log new file mode 100644 index 0000000..43c8dc6 --- /dev/null +++ b/HelloFar/x64/Debug/HelloFar.log @@ -0,0 +1,2 @@ + HelloFar.cpp + HelloFar.vcxproj -> C:\Users\Acer\VisualStudio\source\repos\HelloFar\x64\Debug\HelloFar.dll diff --git a/HelloFar/x64/Debug/HelloFar.obj b/HelloFar/x64/Debug/HelloFar.obj new file mode 100644 index 0000000..80c6819 Binary files /dev/null and b/HelloFar/x64/Debug/HelloFar.obj differ diff --git a/HelloFar/x64/Debug/HelloFar.pch b/HelloFar/x64/Debug/HelloFar.pch new file mode 100644 index 0000000..69f5fa4 Binary files /dev/null and b/HelloFar/x64/Debug/HelloFar.pch differ diff --git a/HelloFar/x64/Debug/HelloFar.tlog/CL.command.1.tlog b/HelloFar/x64/Debug/HelloFar.tlog/CL.command.1.tlog new file mode 100644 index 0000000..40c47be Binary files /dev/null and b/HelloFar/x64/Debug/HelloFar.tlog/CL.command.1.tlog differ diff --git a/HelloFar/x64/Debug/HelloFar.tlog/CL.read.1.tlog b/HelloFar/x64/Debug/HelloFar.tlog/CL.read.1.tlog new file mode 100644 index 0000000..33efe32 Binary files /dev/null and b/HelloFar/x64/Debug/HelloFar.tlog/CL.read.1.tlog differ diff --git a/HelloFar/x64/Debug/HelloFar.tlog/CL.write.1.tlog b/HelloFar/x64/Debug/HelloFar.tlog/CL.write.1.tlog new file mode 100644 index 0000000..b08bcaa Binary files /dev/null and b/HelloFar/x64/Debug/HelloFar.tlog/CL.write.1.tlog differ diff --git a/HelloFar/x64/Debug/HelloFar.tlog/HelloFar.lastbuildstate b/HelloFar/x64/Debug/HelloFar.tlog/HelloFar.lastbuildstate new file mode 100644 index 0000000..6daae9b --- /dev/null +++ b/HelloFar/x64/Debug/HelloFar.tlog/HelloFar.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.26.28801:TargetPlatformVersion=10.0.18362.0: +Debug|x64|C:\Users\Acer\VisualStudio\source\repos\HelloFar\| diff --git a/HelloFar/x64/Debug/HelloFar.tlog/HelloFar.write.1u.tlog b/HelloFar/x64/Debug/HelloFar.tlog/HelloFar.write.1u.tlog new file mode 100644 index 0000000..9484b47 Binary files /dev/null and b/HelloFar/x64/Debug/HelloFar.tlog/HelloFar.write.1u.tlog differ diff --git a/HelloFar/x64/Debug/HelloFar.tlog/link.command.1.tlog b/HelloFar/x64/Debug/HelloFar.tlog/link.command.1.tlog new file mode 100644 index 0000000..ce5c411 Binary files /dev/null and b/HelloFar/x64/Debug/HelloFar.tlog/link.command.1.tlog differ diff --git a/HelloFar/x64/Debug/HelloFar.tlog/link.read.1.tlog b/HelloFar/x64/Debug/HelloFar.tlog/link.read.1.tlog new file mode 100644 index 0000000..e709c08 Binary files /dev/null and b/HelloFar/x64/Debug/HelloFar.tlog/link.read.1.tlog differ diff --git a/HelloFar/x64/Debug/HelloFar.tlog/link.write.1.tlog b/HelloFar/x64/Debug/HelloFar.tlog/link.write.1.tlog new file mode 100644 index 0000000..9afb864 Binary files /dev/null and b/HelloFar/x64/Debug/HelloFar.tlog/link.write.1.tlog differ diff --git a/HelloFar/x64/Debug/pch.obj b/HelloFar/x64/Debug/pch.obj new file mode 100644 index 0000000..0724e9b Binary files /dev/null and b/HelloFar/x64/Debug/pch.obj differ diff --git a/HelloFar/x64/Debug/vc142.idb b/HelloFar/x64/Debug/vc142.idb new file mode 100644 index 0000000..2afe473 Binary files /dev/null and b/HelloFar/x64/Debug/vc142.idb differ diff --git a/HelloFar/x64/Debug/vc142.pdb b/HelloFar/x64/Debug/vc142.pdb new file mode 100644 index 0000000..3fe75e6 Binary files /dev/null and b/HelloFar/x64/Debug/vc142.pdb differ