Merge pull request #217 from ZoiteChat/remove-winamp-plugin

Remove Winamp Plugin.
This commit is contained in:
deepend-tildeclub
2026-04-29 16:14:59 -06:00
committed by GitHub
10 changed files with 0 additions and 253 deletions

View File

@@ -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'
)

View File

@@ -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')

View File

@@ -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',
)

View File

@@ -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 <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#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;
}

View File

@@ -1,3 +0,0 @@
EXPORTS
zoitechat_plugin_init
zoitechat_plugin_deinit

View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v142</PlatformToolset>
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>winamp</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\zoitechat.props" />
<PropertyGroup>
<TargetName>hcwinamp</TargetName>
<OutDir>$(ZoiteChatRel)plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;WINAMP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(OpenSslInclude);$(Glib);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<ModuleDefinitionFile>winamp.def</ModuleDefinitionFile>
<AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="winamp.def" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="winamp.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="winamp.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClCompile Include="winamp.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@@ -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);

View File

@@ -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

View File

@@ -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}
@@ -73,7 +68,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "installer", "installer\inst
{E93E1255-95D1-4B08-8FDF-B53CC6A21280} = {E93E1255-95D1-4B08-8FDF-B53CC6A21280}
{5EF7F47D-D09C-43C4-BF64-B28B11A0FF91} = {5EF7F47D-D09C-43C4-BF64-B28B11A0FF91}
{6C0CA980-97C5-427A-BE61-5BCECAFABBDA} = {6C0CA980-97C5-427A-BE61-5BCECAFABBDA}
{E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE} = {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE}
{E4BDB4C8-2335-415A-ACEE-BA88B19BFE82} = {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82}
{C53145CC-D021-40C9-B97C-0249AB9A43C9} = {C53145CC-D021-40C9-B97C-0249AB9A43C9}
{D90BC3E3-1341-4849-9354-5F40489D39D1} = {D90BC3E3-1341-4849-9354-5F40489D39D1}
@@ -121,8 +115,6 @@ Global
{3C4F42FC-292A-420B-B63D-C03DFBDD8E4E}.Release|x64.Build.0 = Release|x64
{461DC24A-A410-4171-8C02-CCDBF3702C2A}.Release|x64.ActiveCfg = Release|x64
{461DC24A-A410-4171-8C02-CCDBF3702C2A}.Release|x64.Build.0 = Release|x64
{E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE}.Release|x64.ActiveCfg = Release|x64
{E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE}.Release|x64.Build.0 = Release|x64
{6C0CA980-97C5-427A-BE61-5BCECAFABBDA}.Release|x64.ActiveCfg = Release|x64
{6C0CA980-97C5-427A-BE61-5BCECAFABBDA}.Release|x64.Build.0 = Release|x64
{B10A2C41-344C-43E0-A32D-B9587C198D8B}.Release|x64.ActiveCfg = Release|x64
@@ -153,7 +145,6 @@ Global
{17E4BE39-76F7-4A06-AD21-EFD0C5091F76} = {561126F4-FA18-45FC-A2BF-8F858F161D6D}
{3C4F42FC-292A-420B-B63D-C03DFBDD8E4E} = {561126F4-FA18-45FC-A2BF-8F858F161D6D}
{461DC24A-A410-4171-8C02-CCDBF3702C2A} = {561126F4-FA18-45FC-A2BF-8F858F161D6D}
{E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE} = {561126F4-FA18-45FC-A2BF-8F858F161D6D}
{6C0CA980-97C5-427A-BE61-5BCECAFABBDA} = {561126F4-FA18-45FC-A2BF-8F858F161D6D}
{B10A2C41-344C-43E0-A32D-B9587C198D8B} = {0FD996A7-464F-4981-8380-3DCA3A244A13}
{C9B735E4-75BC-45AC-A5E3-39A6D076F912} = {0FD996A7-464F-4981-8380-3DCA3A244A13}