diff --git a/meson_options.txt b/meson_options.txt index 85fd73ee..00373925 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -59,9 +59,6 @@ option('with-sysinfo', type: 'boolean', option('with-upd', type: 'boolean', description: 'Update plugin, Windows only' ) -option('with-winamp', type: 'boolean', - description: 'Winamp plugin, Windows only' -) option('with-perl-legacy-api', type: 'boolean', value: false, description: 'Enables the legacy IRC perl module for compatibility with old scripts' ) diff --git a/plugins/meson.build b/plugins/meson.build index e45e4c6c..d7e89d69 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -9,9 +9,6 @@ if host_machine.system() == 'windows' subdir('upd') endif - if get_option('with-winamp') - subdir('winamp') - endif endif if get_option('with-checksum') diff --git a/plugins/winamp/meson.build b/plugins/winamp/meson.build deleted file mode 100644 index 5a607b3b..00000000 --- a/plugins/winamp/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -shared_module('winamp', 'winamp.c', - dependencies: [libgio_dep, zoitechat_plugin_dep], - install: true, - install_dir: plugindir, - name_prefix: '', - vs_module_defs: 'winamp.def', -) diff --git a/plugins/winamp/winamp.c b/plugins/winamp/winamp.c deleted file mode 100644 index 4a064702..00000000 --- a/plugins/winamp/winamp.c +++ /dev/null @@ -1,153 +0,0 @@ -/********************* Winamp Plugin 0.3****************************** - * - * Distribution: GPL - * - * Originally written by: Leo - leo.nard@free.fr - * Modified by: SilvereX - SilvereX@karklas.mif.vu.lt - * Modified again by: Derek Buitenhuis - daemon404@gmail.com - * Modified yet again by: Berke Viktor - berkeviktor@aol.com - *********************************************************************/ - -#include "windows.h" - -#include -#include -#include -#include - -#include "zoitechat-plugin.h" - -#define PLAYING 1 -#define PAUSED 3 - -static zoitechat_plugin *ph; - -static int -winamp(char *word[], char *word_eol[], void *userdata) -{ - HWND hwndWinamp = FindWindowW(L"Winamp v1.x",NULL); - - if (hwndWinamp) - { - if (!stricmp("PAUSE", word[2])) - { - if (SendMessage(hwndWinamp,WM_USER, 0, 104)) - { - SendMessage(hwndWinamp, WM_COMMAND, 40046, 0); - - if (SendMessage(hwndWinamp, WM_USER, 0, 104) == PLAYING) - zoitechat_printf(ph, "Winamp: playing"); - else - zoitechat_printf(ph, "Winamp: paused"); - } - } - else if (!stricmp("STOP", word[2])) - { - SendMessage(hwndWinamp, WM_COMMAND, 40047, 0); - zoitechat_printf(ph, "Winamp: stopped"); - } - else if (!stricmp("PLAY", word[2])) - { - SendMessage(hwndWinamp, WM_COMMAND, 40045, 0); - zoitechat_printf(ph, "Winamp: playing"); - } - else if (!stricmp("NEXT", word[2])) - { - SendMessage(hwndWinamp, WM_COMMAND, 40048, 0); - zoitechat_printf(ph, "Winamp: next playlist entry"); - } - else if (!stricmp("PREV", word[2])) - { - SendMessage(hwndWinamp, WM_COMMAND, 40044, 0); - zoitechat_printf(ph, "Winamp: previous playlist entry"); - } - else if (!stricmp("START", word[2])) - { - SendMessage(hwndWinamp, WM_COMMAND, 40154, 0); - zoitechat_printf(ph, "Winamp: playlist start"); - } - else if (!word_eol[2][0]) - { - wchar_t wcurrent_play[2048]; - char *current_play, *p; - int len = GetWindowTextW(hwndWinamp, wcurrent_play, G_N_ELEMENTS(wcurrent_play)); - - current_play = g_utf16_to_utf8 (wcurrent_play, len, NULL, NULL, NULL); - if (!current_play) - { - zoitechat_print (ph, "Winamp: Error getting song information."); - return ZOITECHAT_EAT_ALL; - } - - if (strchr(current_play, '-')) - { - /* Remove any trailing text and whitespace */ - p = current_play + strlen(current_play) - 8; - while (p >= current_play) - { - if (!strnicmp(p, "- Winamp", 8)) - break; - p--; - } - - if (p >= current_play) - p--; - - while (p >= current_play && *p == ' ') - p--; - *++p = '\0'; - - /* Ignore any leading track number */ - p = strstr (current_play, ". "); - if (p) - p += 2; - else - p = current_play; - - if (*p != '\0') - zoitechat_commandf (ph, "me is now playing: %s", p); - else - zoitechat_print (ph, "Winamp: No song information found."); - g_free (current_play); - } - else - zoitechat_print(ph, "Winamp: Nothing being played."); - } - else - zoitechat_printf(ph, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START]\n"); - } - else - { - zoitechat_print(ph, "Winamp not found.\n"); - } - return ZOITECHAT_EAT_ALL; -} - -int -zoitechat_plugin_init(zoitechat_plugin *plugin_handle, - char **plugin_name, - char **plugin_desc, - char **plugin_version, - char *arg) -{ - ph = plugin_handle; - - *plugin_name = "Winamp"; - *plugin_desc = "Winamp plugin for ZoiteChat"; - *plugin_version = "0.6"; - - zoitechat_hook_command (ph, "WINAMP", ZOITECHAT_PRI_NORM, winamp, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START] - control Winamp or show what's currently playing", 0); - zoitechat_command (ph, "MENU -ishare\\music.png ADD \"Window/Display Current Song (Winamp)\" \"WINAMP\""); - - zoitechat_print (ph, "Winamp plugin loaded\n"); - - return 1; -} - -int -zoitechat_plugin_deinit(void) -{ - zoitechat_command (ph, "MENU DEL \"Window/Display Current Song (Winamp)\""); - zoitechat_print (ph, "Winamp plugin unloaded\n"); - return 1; -} diff --git a/plugins/winamp/winamp.def b/plugins/winamp/winamp.def deleted file mode 100644 index 432b71b6..00000000 --- a/plugins/winamp/winamp.def +++ /dev/null @@ -1,3 +0,0 @@ -EXPORTS -zoitechat_plugin_init -zoitechat_plugin_deinit diff --git a/plugins/winamp/winamp.vcxproj b/plugins/winamp/winamp.vcxproj deleted file mode 100644 index 0645477a..00000000 --- a/plugins/winamp/winamp.vcxproj +++ /dev/null @@ -1,48 +0,0 @@ - - - - v142 - DynamicLibrary - - - - Release - x64 - - - - {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE} - Win32Proj - winamp - - - - - - - hcwinamp - $(ZoiteChatRel)plugins\ - - - - WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;WINAMP_EXPORTS;%(PreprocessorDefinitions) - - - - - $(DepsRoot)\include;$(OpenSslInclude);$(Glib);..\..\src\common;%(AdditionalIncludeDirectories) - - - winamp.def - $(DepLibs);%(AdditionalDependencies) - $(DepsRoot)\lib;%(AdditionalLibraryDirectories) - - - - - - - - - - diff --git a/plugins/winamp/winamp.vcxproj.filters b/plugins/winamp/winamp.vcxproj.filters deleted file mode 100644 index 1a800a33..00000000 --- a/plugins/winamp/winamp.vcxproj.filters +++ /dev/null @@ -1,23 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {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 - - - - - Resource Files - - - - - Source Files - - - \ No newline at end of file diff --git a/src/common/plugin.c b/src/common/plugin.c index 43c872b7..ec765442 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -493,7 +493,6 @@ plugin_auto_load (session *sess) for_files (lib_dir, "hcperl.dll", plugin_auto_load_cb); for_files (lib_dir, "hcpython3.dll", plugin_auto_load_cb); for_files (lib_dir, "hcupd.dll", plugin_auto_load_cb); - for_files (lib_dir, "hcwinamp.dll", plugin_auto_load_cb); for_files (lib_dir, "hcsysinfo.dll", plugin_auto_load_cb); #else for_files (lib_dir, "*."PLUGIN_SUFFIX, plugin_auto_load_cb); diff --git a/win32/installer/zoitechat.iss.tt b/win32/installer/zoitechat.iss.tt index 44610291..3cdebbbb 100644 --- a/win32/installer/zoitechat.iss.tt +++ b/win32/installer/zoitechat.iss.tt @@ -56,7 +56,6 @@ Name: "plugins\exec"; Description: "Exec"; Types: custom; Flags: disablenouninst Name: "plugins\fishlim"; Description: "FiSHLiM"; Types: custom; Flags: disablenouninstallwarning Name: "plugins\sysinfo"; Description: "SysInfo"; Types: custom; Flags: disablenouninstallwarning Name: "plugins\upd"; Description: "Update Checker"; Types: normal custom; Flags: disablenouninstallwarning -Name: "plugins\winamp"; Description: "Winamp"; Types: custom; Flags: disablenouninstallwarning Name: "langs"; Description: "Language Interfaces"; Types: custom; Flags: disablenouninstallwarning Name: "langs\lua"; Description: "Lua (LuaJIT 2.1)"; Types: normal custom; Flags: disablenouninstallwarning Name: "langs\perl"; Description: "Perl (Strawberry Perl 5.42.0.1)"; Types: custom; Flags: disablenouninstallwarning @@ -173,11 +172,9 @@ Source: "plugins\hcexec.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Co Source: "plugins\hcfishlim.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\fishlim Source: "share\gtkpref.png"; DestDir: "{app}\share"; Flags: ignoreversion; Components: libs Source: "share\adwaita-icons-attribution.txt"; DestDir: "{app}\share"; Flags: ignoreversion; Components: libs -Source: "share\music.png"; DestDir: "{app}\share"; Flags: ignoreversion; Components: plugins\winamp Source: "share\download.png"; DestDir: "{app}\share"; Flags: ignoreversion; Components: plugins\upd Source: "plugins\hcupd.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\upd Source: "WinSparkle.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: plugins\upd -Source: "plugins\hcwinamp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winamp Source: "share\system.png"; DestDir: "{app}\share"; Flags: ignoreversion; Components: plugins\sysinfo Source: "plugins\hcsysinfo.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\sysinfo Source: "plugins\hcperl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\perl diff --git a/win32/zoitechat.sln b/win32/zoitechat.sln index f74deb46..d9f5c6f2 100644 --- a/win32/zoitechat.sln +++ b/win32/zoitechat.sln @@ -40,11 +40,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upd", "..\plugins\upd\upd.v {87554B59-006C-4D94-9714-897B27067BA3} = {87554B59-006C-4D94-9714-897B27067BA3} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winamp", "..\plugins\winamp\winamp.vcxproj", "{E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE}" - ProjectSection(ProjectDependencies) = postProject - {87554B59-006C-4D94-9714-897B27067BA3} = {87554B59-006C-4D94-9714-897B27067BA3} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sysinfo", "..\plugins\sysinfo\sysinfo.vcxproj", "{6C0CA980-97C5-427A-BE61-5BCECAFABBDA}" ProjectSection(ProjectDependencies) = postProject {87554B59-006C-4D94-9714-897B27067BA3} = {87554B59-006C-4D94-9714-897B27067BA3}