mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 10:25:46 -04:00
Initial community commit
This commit is contained in:
63
Src/Wasabi2/Wasabi1.cpp
Normal file
63
Src/Wasabi2/Wasabi1.cpp
Normal file
@ -0,0 +1,63 @@
|
||||
#include "api__wasabi2.h"
|
||||
#include "../Winamp/wa_ipc.h"
|
||||
|
||||
namespace Wasabi {
|
||||
#include <api/service/waservicefactory.h>
|
||||
#include "../nu/ServiceWatcher.h"
|
||||
}
|
||||
|
||||
Wasabi::ServiceWatcher serviceWatcher;
|
||||
|
||||
template <class api_T>
|
||||
static void ServiceBuild(api_T *&api_t, GUID factoryGUID_t)
|
||||
{
|
||||
if (WASABI_API_SVC)
|
||||
{
|
||||
Wasabi::waServiceFactory *factory = WASABI_API_SVC->service_getServiceByGuid(factoryGUID_t);
|
||||
if (factory)
|
||||
api_t = reinterpret_cast<api_T *>( factory->getInterface() );
|
||||
}
|
||||
}
|
||||
|
||||
template <class api_T>
|
||||
static void ServiceRelease(api_T *api_t, GUID factoryGUID_t)
|
||||
{
|
||||
if (WASABI_API_SVC && api_t)
|
||||
{
|
||||
Wasabi::waServiceFactory *factory = WASABI_API_SVC->service_getServiceByGuid(factoryGUID_t);
|
||||
if (factory)
|
||||
factory->releaseInterface(api_t);
|
||||
}
|
||||
api_t = NULL;
|
||||
}
|
||||
|
||||
Wasabi::api_service *WASABI_API_SVC=0;
|
||||
Wasabi::api_application *WASABI_API_APP=0;
|
||||
Wasabi::api_memmgr *WASABI_API_MEMMGR=0;
|
||||
Wasabi::api_albumart *AGAVE_API_ALBUMART=0;
|
||||
|
||||
|
||||
void Wasabi1_Initialize(Wasabi::api_service *svc_api)
|
||||
{
|
||||
WASABI_API_SVC = svc_api;
|
||||
ServiceBuild(WASABI_API_APP, Wasabi::applicationApiServiceGuid);
|
||||
ServiceBuild(AGAVE_API_ALBUMART, Wasabi::albumArtGUID);
|
||||
ServiceBuild(WASABI_API_MEMMGR, Wasabi::memMgrApiServiceGuid);
|
||||
|
||||
serviceWatcher.WatchWith(WASABI_API_SVC);
|
||||
serviceWatcher.WatchFor(&AGAVE_API_ALBUMART, Wasabi::albumArtGUID);
|
||||
}
|
||||
|
||||
void Wasabi1_Quit()
|
||||
{
|
||||
serviceWatcher.StopWatching();
|
||||
serviceWatcher.Clear();
|
||||
|
||||
ServiceRelease(WASABI_API_APP, Wasabi::applicationApiServiceGuid);
|
||||
ServiceRelease(AGAVE_API_ALBUMART, Wasabi::albumArtGUID);
|
||||
ServiceRelease(WASABI_API_MEMMGR, Wasabi::memMgrApiServiceGuid);
|
||||
}
|
||||
|
||||
namespace Wasabi {
|
||||
#include "../nu/ServiceWatcher.cpp"
|
||||
}
|
76
Src/Wasabi2/Wasabi2.rc
Normal file
76
Src/Wasabi2/Wasabi2.rc
Normal file
@ -0,0 +1,76 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.K.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""version.rc2""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.K.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#include "version.rc2"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
105
Src/Wasabi2/Wasabi2.sln
Normal file
105
Src/Wasabi2/Wasabi2.sln
Normal file
@ -0,0 +1,105 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29509.3
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Wasabi2", "Wasabi2.vcxproj", "{4A907402-5983-4D6B-8D85-0F61C348319A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{57C90706-B25D-4ACA-9B33-95CDB2427C27} = {57C90706-B25D-4ACA-9B33-95CDB2427C27}
|
||||
{4F34CA12-9F74-4A96-A917-8DEEA4961B31} = {4F34CA12-9F74-4A96-A917-8DEEA4961B31}
|
||||
{F1F5CD60-0D5B-4CEA-9EEB-2F87FF9AA915} = {F1F5CD60-0D5B-4CEA-9EEB-2F87FF9AA915}
|
||||
{E105A0A2-7391-47C5-86AC-718003524C3D} = {E105A0A2-7391-47C5-86AC-718003524C3D}
|
||||
{E2FD86D4-1A1C-49EB-BAB8-B63D594CC956} = {E2FD86D4-1A1C-49EB-BAB8-B63D594CC956}
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A} = {0F9730E4-45DA-4BD2-A50A-403A4BC9751A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "metadata", "..\replicant\replicant\metadata\metadata.vcxproj", "{E2FD86D4-1A1C-49EB-BAB8-B63D594CC956}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Wasabi-replicant", "..\replicant\Wasabi\Wasabi-replicant.vcxproj", "{4F34CA12-9F74-4A96-A917-8DEEA4961B31}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nu", "..\replicant\nu\nu.vcxproj", "{F1F5CD60-0D5B-4CEA-9EEB-2F87FF9AA915}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nx", "..\replicant\nx\nx.vcxproj", "{57C90706-B25D-4ACA-9B33-95CDB2427C27}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A} = {0F9730E4-45DA-4BD2-A50A-403A4BC9751A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jnetlib", "..\replicant\jnetlib\jnetlib.vcxproj", "{E105A0A2-7391-47C5-86AC-718003524C3D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A} = {0F9730E4-45DA-4BD2-A50A-403A4BC9751A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\replicant\zlib\zlib.vcxproj", "{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4A907402-5983-4D6B-8D85-0F61C348319A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4A907402-5983-4D6B-8D85-0F61C348319A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4A907402-5983-4D6B-8D85-0F61C348319A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4A907402-5983-4D6B-8D85-0F61C348319A}.Debug|x64.Build.0 = Debug|x64
|
||||
{4A907402-5983-4D6B-8D85-0F61C348319A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4A907402-5983-4D6B-8D85-0F61C348319A}.Release|Win32.Build.0 = Release|Win32
|
||||
{4A907402-5983-4D6B-8D85-0F61C348319A}.Release|x64.ActiveCfg = Release|x64
|
||||
{4A907402-5983-4D6B-8D85-0F61C348319A}.Release|x64.Build.0 = Release|x64
|
||||
{E2FD86D4-1A1C-49EB-BAB8-B63D594CC956}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E2FD86D4-1A1C-49EB-BAB8-B63D594CC956}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E2FD86D4-1A1C-49EB-BAB8-B63D594CC956}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E2FD86D4-1A1C-49EB-BAB8-B63D594CC956}.Debug|x64.Build.0 = Debug|x64
|
||||
{E2FD86D4-1A1C-49EB-BAB8-B63D594CC956}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E2FD86D4-1A1C-49EB-BAB8-B63D594CC956}.Release|Win32.Build.0 = Release|Win32
|
||||
{E2FD86D4-1A1C-49EB-BAB8-B63D594CC956}.Release|x64.ActiveCfg = Release|x64
|
||||
{E2FD86D4-1A1C-49EB-BAB8-B63D594CC956}.Release|x64.Build.0 = Release|x64
|
||||
{4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Debug|x64.Build.0 = Debug|x64
|
||||
{4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Release|Win32.Build.0 = Release|Win32
|
||||
{4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Release|x64.ActiveCfg = Release|x64
|
||||
{4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Release|x64.Build.0 = Release|x64
|
||||
{F1F5CD60-0D5B-4CEA-9EEB-2F87FF9AA915}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F1F5CD60-0D5B-4CEA-9EEB-2F87FF9AA915}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F1F5CD60-0D5B-4CEA-9EEB-2F87FF9AA915}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F1F5CD60-0D5B-4CEA-9EEB-2F87FF9AA915}.Debug|x64.Build.0 = Debug|x64
|
||||
{F1F5CD60-0D5B-4CEA-9EEB-2F87FF9AA915}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F1F5CD60-0D5B-4CEA-9EEB-2F87FF9AA915}.Release|Win32.Build.0 = Release|Win32
|
||||
{F1F5CD60-0D5B-4CEA-9EEB-2F87FF9AA915}.Release|x64.ActiveCfg = Release|x64
|
||||
{F1F5CD60-0D5B-4CEA-9EEB-2F87FF9AA915}.Release|x64.Build.0 = Release|x64
|
||||
{57C90706-B25D-4ACA-9B33-95CDB2427C27}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{57C90706-B25D-4ACA-9B33-95CDB2427C27}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{57C90706-B25D-4ACA-9B33-95CDB2427C27}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{57C90706-B25D-4ACA-9B33-95CDB2427C27}.Debug|x64.Build.0 = Debug|x64
|
||||
{57C90706-B25D-4ACA-9B33-95CDB2427C27}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{57C90706-B25D-4ACA-9B33-95CDB2427C27}.Release|Win32.Build.0 = Release|Win32
|
||||
{57C90706-B25D-4ACA-9B33-95CDB2427C27}.Release|x64.ActiveCfg = Release|x64
|
||||
{57C90706-B25D-4ACA-9B33-95CDB2427C27}.Release|x64.Build.0 = Release|x64
|
||||
{E105A0A2-7391-47C5-86AC-718003524C3D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E105A0A2-7391-47C5-86AC-718003524C3D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E105A0A2-7391-47C5-86AC-718003524C3D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E105A0A2-7391-47C5-86AC-718003524C3D}.Debug|x64.Build.0 = Debug|x64
|
||||
{E105A0A2-7391-47C5-86AC-718003524C3D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E105A0A2-7391-47C5-86AC-718003524C3D}.Release|Win32.Build.0 = Release|Win32
|
||||
{E105A0A2-7391-47C5-86AC-718003524C3D}.Release|x64.ActiveCfg = Release|x64
|
||||
{E105A0A2-7391-47C5-86AC-718003524C3D}.Release|x64.Build.0 = Release|x64
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Debug|x64.Build.0 = Debug|x64
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Release|Win32.Build.0 = Release|Win32
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Release|x64.ActiveCfg = Release|x64
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C4E799C1-027B-487B-8E1A-31F2D26A1AFE}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
290
Src/Wasabi2/Wasabi2.vcxproj
Normal file
290
Src/Wasabi2/Wasabi2.vcxproj
Normal file
@ -0,0 +1,290 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{4A907402-5983-4D6B-8D85-0F61C348319A}</ProjectGuid>
|
||||
<RootNamespace>replicantbridge</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetName>wasabi2</TargetName>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetName>wasabi2</TargetName>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetName>wasabi2</TargetName>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetName>wasabi2</TargetName>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg">
|
||||
<VcpkgEnableManifest>false</VcpkgEnableManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../Wasabi;../replicant;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;_DEBUG;_WINDOWS;_USRDLL;REPLICANTBRIDGE_EXPORTS;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x601;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;nx.lib;nu.lib;metadata.lib;Wasabi-replicant.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\replicant\replicant\metadata\$(PlatformShortName)_$(Configuration);..\replicant\Wasabi\$(PlatformShortName)_$(Configuration);..\replicant\nu\$(PlatformShortName)_$(Configuration);..\replicant\nx\$(PlatformShortName)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<ImportLibrary>$(ProjectDir)x86_Debug\$(ProjectName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../Wasabi;../replicant;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN64;_DEBUG;_WINDOWS;_USRDLL;REPLICANTBRIDGE_EXPORTS;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x601;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;nx.lib;nu.lib;metadata.lib;Wasabi-replicant.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\replicant\replicant\metadata\$(PlatformShortName)_$(Configuration);..\replicant\Wasabi\$(PlatformShortName)_$(Configuration);..\replicant\nu\$(PlatformShortName)_$(Configuration);..\replicant\nx\$(PlatformShortName)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<ImportLibrary>$(ProjectDir)x64_Debug\$(ProjectName).lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>../Wasabi;../replicant;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;_WINDOWS;_USRDLL;REPLICANTBRIDGE_EXPORTS;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x601;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;nx.lib;nu.lib;metadata.lib;Wasabi-replicant.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\replicant\replicant\metadata\$(PlatformShortName)_$(Configuration);..\replicant\Wasabi\$(PlatformShortName)_$(Configuration);..\replicant\nu\$(PlatformShortName)_$(Configuration);..\replicant\nx\$(PlatformShortName)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>$(ProjectDir)x86_Release\$(ProjectName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>../Wasabi;../replicant;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN64;NDEBUG;_WINDOWS;_USRDLL;REPLICANTBRIDGE_EXPORTS;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x601;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;nx.lib;nu.lib;metadata.lib;Wasabi-replicant.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\replicant\replicant\metadata\$(PlatformShortName)_$(Configuration);..\replicant\Wasabi\$(PlatformShortName)_$(Configuration);..\replicant\nu\$(PlatformShortName)_$(Configuration);..\replicant\nx\$(PlatformShortName)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>$(ProjectDir)x64_Release\$(ProjectName).lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\replicant\component\ComponentManagerBase.cpp" />
|
||||
<ClCompile Include="..\replicant\component\win\ComponentManager.cpp" />
|
||||
<ClCompile Include="..\replicant\nswasabi\ApplicationBase.cpp" />
|
||||
<ClCompile Include="api__wasabi2.cpp" />
|
||||
<ClCompile Include="application.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="utilities.cpp" />
|
||||
<ClCompile Include="Wasabi1.cpp" />
|
||||
<ClCompile Include="wasabi1_factory.cpp" />
|
||||
<ClCompile Include="Winamp5ArtworkManager.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\replicant\component\ComponentManagerBase.h" />
|
||||
<ClInclude Include="..\replicant\component\win\ComponentManager.h" />
|
||||
<ClInclude Include="..\replicant\nswasabi\ApplicationBase.h" />
|
||||
<ClInclude Include="api__wasabi2.h" />
|
||||
<ClInclude Include="application.h" />
|
||||
<ClInclude Include="main.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="wasabi1_factory.h" />
|
||||
<ClInclude Include="Winamp5ArtworkManager.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Wasabi2.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\replicant\nu\nu.vcxproj">
|
||||
<Project>{f1f5cd60-0d5b-4cea-9eeb-2f87ff9aa915}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\replicant\nx\nx.vcxproj">
|
||||
<Project>{57c90706-b25d-4aca-9b33-95cdb2427c27}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wasabi\Wasabi.vcxproj">
|
||||
<Project>{3e0bfa8a-b86a-42e9-a33f-ec294f823f7f}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
80
Src/Wasabi2/Wasabi2.vcxproj.filters
Normal file
80
Src/Wasabi2/Wasabi2.vcxproj.filters
Normal file
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="api__wasabi2.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="application.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\replicant\nswasabi\ApplicationBase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\replicant\component\win\ComponentManager.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\replicant\component\ComponentManagerBase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="utilities.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Wasabi1.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wasabi1_factory.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Winamp5ArtworkManager.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Winamp5ArtworkManager.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="wasabi1_factory.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="main.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\replicant\component\ComponentManagerBase.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\replicant\component\win\ComponentManager.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\replicant\nswasabi\ApplicationBase.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="application.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api__wasabi2.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{af591226-498a-4166-81a2-08747d2202aa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Ressource Files">
|
||||
<UniqueIdentifier>{ed5c9f6a-50a2-4b6c-a6fc-450730ae8f29}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{1cd937f7-d0f2-448c-b53f-70843c5b8fda}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Wasabi2.rc">
|
||||
<Filter>Ressource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
48
Src/Wasabi2/Winamp5ArtworkManager.cpp
Normal file
48
Src/Wasabi2/Winamp5ArtworkManager.cpp
Normal file
@ -0,0 +1,48 @@
|
||||
#include "Winamp5ArtworkManager.h"
|
||||
#include "api__wasabi2.h"
|
||||
#include "metadata/MetadataKeys.h"
|
||||
#include "nswasabi/ReferenceCounted.h"
|
||||
|
||||
int Winamp5ArtworkManager::Artwork_GetArtwork(nx_uri_t filename, unsigned int field, artwork_t *artwork, data_flags_t flags, nx_time_unix_64_t *filename_modified)
|
||||
{
|
||||
if (!AGAVE_API_ALBUMART)
|
||||
return NErr_FailedCreate;
|
||||
|
||||
if (field != MetadataKeys::ALBUM)
|
||||
return NErr_Unknown;
|
||||
|
||||
|
||||
if (filename_modified)
|
||||
{
|
||||
struct __stat64 buffer;
|
||||
if (_wstat64(filename->string, &buffer) == 0)
|
||||
{
|
||||
*filename_modified = buffer.st_atime;
|
||||
}
|
||||
else
|
||||
{
|
||||
*filename_modified = 0;
|
||||
}
|
||||
}
|
||||
|
||||
wchar_t *mime_type;
|
||||
void *bits;
|
||||
size_t len;
|
||||
int ret = AGAVE_API_ALBUMART->GetAlbumArtData(filename->string, L"cover", &bits, &len, &mime_type);
|
||||
if (ret != 0)
|
||||
return NErr_Empty;
|
||||
|
||||
NXDataCreate(&artwork->data, bits, len);
|
||||
WASABI_API_MEMMGR->sysFree(bits);
|
||||
|
||||
if (mime_type)
|
||||
{
|
||||
ReferenceCountedNXString mime_type_nx;
|
||||
NXStringCreateWithUTF16(&mime_type_nx, mime_type);
|
||||
NXDataSetMIME(artwork->data, mime_type_nx);
|
||||
WASABI_API_MEMMGR->sysFree(mime_type);
|
||||
}
|
||||
artwork->height = 0;
|
||||
artwork->width = 0;
|
||||
return NErr_Success;
|
||||
}
|
17
Src/Wasabi2/Winamp5ArtworkManager.h
Normal file
17
Src/Wasabi2/Winamp5ArtworkManager.h
Normal file
@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include "metadata/api_artwork.h"
|
||||
|
||||
#include "nswasabi/ServiceName.h"
|
||||
#include "nx/nx.h"
|
||||
|
||||
class Winamp5ArtworkManager : public api_artwork
|
||||
{
|
||||
public:
|
||||
WASABI_SERVICE_NAME("Winamp5 Artwork Manager API");
|
||||
|
||||
private:
|
||||
/* returns the data for the first piece of artwork found
|
||||
pass NULL for any of the values that you don't care about */
|
||||
int WASABICALL Artwork_GetArtwork(nx_uri_t filename, unsigned int field, artwork_t *artwork, data_flags_t flags, nx_time_unix_64_t *filename_modified);
|
||||
|
||||
};
|
45
Src/Wasabi2/api__wasabi2.cpp
Normal file
45
Src/Wasabi2/api__wasabi2.cpp
Normal file
@ -0,0 +1,45 @@
|
||||
#include "Winamp5ArtworkManager.h"
|
||||
#include "main.h"
|
||||
#include "api__wasabi2.h"
|
||||
#include "application.h"
|
||||
#include <Wasabi/Wasabi.h>
|
||||
#include <nswasabi/singleton.h>
|
||||
#include <component/win/ComponentManager.h>
|
||||
#include <Replicant/metadata/metadata.h>
|
||||
#include <Shlwapi.h>
|
||||
|
||||
|
||||
Application application;
|
||||
static ComponentManager component_manager;
|
||||
|
||||
static SingletonServiceFactory<Application, api_application> application_factory;
|
||||
static SingletonService<Winamp5ArtworkManager, api_artwork> artwork_factory;
|
||||
|
||||
static void AddComponents(const wchar_t *directory)
|
||||
{
|
||||
nx_uri_t uri_directory;
|
||||
if (NXURICreateWithUTF16(&uri_directory, directory) == NErr_Success)
|
||||
{
|
||||
component_manager.AddDirectory(uri_directory);
|
||||
NXURIRelease(uri_directory);
|
||||
}
|
||||
}
|
||||
|
||||
void Replicant_Initialize()
|
||||
{
|
||||
application.Init();
|
||||
if (Wasabi_Init() == NErr_Success)
|
||||
{
|
||||
application_factory.Register(WASABI2_API_SVC, WASABI2_API_APP);
|
||||
artwork_factory.Register(WASABI2_API_SVC);
|
||||
component_manager.SetServiceAPI(WASABI2_API_SVC);
|
||||
Replicant_Metadata_Initialize(WASABI2_API_SVC);
|
||||
|
||||
wchar_t PROG_DIR[MAX_PATH] = {0};
|
||||
GetModuleFileName(0, PROG_DIR, MAX_PATH);
|
||||
PathRemoveFileSpec(PROG_DIR);
|
||||
PathAppend(PROG_DIR, L"Components");
|
||||
AddComponents(PROG_DIR);
|
||||
component_manager.Load();
|
||||
}
|
||||
}
|
29
Src/Wasabi2/api__wasabi2.h
Normal file
29
Src/Wasabi2/api__wasabi2.h
Normal file
@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include <Wasabi/api__wasabi-replicant.h>
|
||||
|
||||
#include "application.h"
|
||||
extern Application application;
|
||||
#define WASABI2_API_APP (&application)
|
||||
|
||||
/* Wasabi 1 */
|
||||
namespace Wasabi {
|
||||
#include <api/service/api_service.h>
|
||||
}
|
||||
extern Wasabi::api_service *wasabi1_service_api;
|
||||
#define WASABI_API_SVC wasabi1_service_api
|
||||
|
||||
#include <new>
|
||||
namespace Wasabi {
|
||||
#include <api/application/api_application.h>
|
||||
#include "../Agave/AlbumArt/api_albumart.h"
|
||||
|
||||
#include <api/memmgr/api_memmgr.h>
|
||||
}
|
||||
extern Wasabi::api_application *wasabi1_application_api;
|
||||
#define WASABI_API_APP wasabi1_application_api
|
||||
|
||||
extern Wasabi::api_albumart *wasabi1_albumart_api;
|
||||
#define AGAVE_API_ALBUMART wasabi1_albumart_api
|
||||
|
||||
extern Wasabi::api_memmgr *wasabi1_memmgr_api;
|
||||
#define WASABI_API_MEMMGR wasabi1_memmgr_api
|
94
Src/Wasabi2/application.cpp
Normal file
94
Src/Wasabi2/application.cpp
Normal file
@ -0,0 +1,94 @@
|
||||
#include <stdio.h>
|
||||
#include "main.h"
|
||||
#include "api__wasabi2.h"
|
||||
#include "application.h"
|
||||
#include <nx/nxstring.h>
|
||||
|
||||
#include <foundation/error.h>
|
||||
#include <shlobj.h>
|
||||
#include <nswasabi/ReferenceCounted.h>
|
||||
#include <strsafe.h>
|
||||
#include <Replicant/version.h>
|
||||
|
||||
|
||||
Application::Application()
|
||||
{
|
||||
// string_heap = 0;
|
||||
user_agent[0]=0;
|
||||
version_string=0;
|
||||
build_number=0;
|
||||
}
|
||||
|
||||
Application::~Application()
|
||||
{
|
||||
NXStringRelease(version_string);
|
||||
}
|
||||
|
||||
int Application::Init()
|
||||
{
|
||||
int ret = ApplicationBase::Initialize();
|
||||
if (ret != NErr_Success)
|
||||
return ret;
|
||||
#if 0
|
||||
string_heap = HeapCreate(0, 0, 0);
|
||||
if (!string_heap)
|
||||
return INIT_ERROR_STRING_HEAP;
|
||||
|
||||
ULONG argh = 2;
|
||||
HeapSetInformation(string_heap, HeapCompatibilityInformation, &argh, sizeof(ULONG));
|
||||
|
||||
NXStringSetHeap(string_heap);
|
||||
|
||||
|
||||
#endif
|
||||
/* set the device id */
|
||||
GUID winamp_id;
|
||||
WASABI_API_APP->GetUserID(&winamp_id);
|
||||
ReferenceCountedNXString device_id;
|
||||
NXStringCreateWithFormatting(&device_id, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
(int)winamp_id.Data1, (int)winamp_id.Data2, (int)winamp_id.Data3, (int)winamp_id.Data4[0],
|
||||
(int)winamp_id.Data4[1], (int)winamp_id.Data4[2], (int)winamp_id.Data4[3],
|
||||
(int)winamp_id.Data4[4], (int)winamp_id.Data4[5], (int)winamp_id.Data4[6], (int)winamp_id.Data4[7]);
|
||||
|
||||
ApplicationBase::SetDeviceID(device_id);
|
||||
|
||||
/* set the data path */
|
||||
const wchar_t *settings = WASABI_API_APP->path_getUserSettingsPath();
|
||||
ReferenceCountedNXURI settings_uri;
|
||||
NXURICreateWithUTF16(&settings_uri, settings);
|
||||
ApplicationBase::SetDataPath(settings_uri);
|
||||
|
||||
build_number = WASABI_API_APP->main_getBuildNumber();
|
||||
const wchar_t *version_number_string = WASABI_API_APP->main_getVersionNumString();
|
||||
NXStringCreateWithUTF16(&version_string, version_number_string);
|
||||
|
||||
OSVERSIONINFO info;
|
||||
info.dwOSVersionInfoSize=sizeof(info);
|
||||
GetVersionExW(&info);
|
||||
StringCbPrintfA(user_agent, sizeof(user_agent), "Winamp/%S (Windows NT %u.%u) Replicant/%s", WASABI_API_APP->main_getVersionNumString(), info.dwMajorVersion, info.dwMinorVersion, replicant_version);
|
||||
ApplicationBase::EnableAllPermissions();
|
||||
return NErr_Success;
|
||||
}
|
||||
|
||||
|
||||
|
||||
const char *Application::Application_GetUserAgent()
|
||||
{
|
||||
return user_agent;
|
||||
}
|
||||
|
||||
unsigned int Application::Application_GetBuildNumber()
|
||||
{
|
||||
return build_number;
|
||||
}
|
||||
|
||||
int Application::Application_GetVersionString(nx_string_t *version)
|
||||
{
|
||||
*version = NXStringRetain(version_string);
|
||||
return NErr_Success;
|
||||
}
|
||||
|
||||
int Application::Application_GetProductShortName(nx_string_t *name)
|
||||
{
|
||||
return NXStringCreateWithUTF8(name, "Winamp");
|
||||
}
|
33
Src/Wasabi2/application.h
Normal file
33
Src/Wasabi2/application.h
Normal file
@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
#include <application/api_application.h>
|
||||
#include <nx/nxstring.h>
|
||||
#include <nswasabi/ApplicationBase.h>
|
||||
#include <nswasabi/ServiceName.h>
|
||||
class Application : public ApplicationBase
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
INIT_ERROR_STRING_HEAP=1,
|
||||
};
|
||||
WASABI_SERVICE_NAME("Replicant/Winamp5 Application API");
|
||||
|
||||
Application();
|
||||
~Application();
|
||||
int Init();
|
||||
|
||||
/* api_application implementation */
|
||||
//HANDLE WASABICALL Application_GetStringHeap();
|
||||
const char * Application_GetUserAgent();
|
||||
unsigned int Application_GetBuildNumber();
|
||||
int Application_GetVersionString(nx_string_t *version);
|
||||
int Application_GetProductShortName(nx_string_t *name);
|
||||
|
||||
private:
|
||||
//HANDLE string_heap;
|
||||
char user_agent[256];
|
||||
nx_string_t version_string;
|
||||
unsigned int build_number;
|
||||
};
|
||||
|
||||
extern Application application;
|
77
Src/Wasabi2/main.cpp
Normal file
77
Src/Wasabi2/main.cpp
Normal file
@ -0,0 +1,77 @@
|
||||
#include "api__wasabi2.h"
|
||||
#include "wasabi1_factory.h"
|
||||
namespace Wasabi {
|
||||
#include "../Agave/Component/ifc_wa5component.h"
|
||||
}
|
||||
|
||||
static Wasabi2ServiceFactory wasabi2_service_factory; // we're going to sneak the Wasabi 2 Service Manager into the Wasabi 1 Service Manager
|
||||
|
||||
void Replicant_Initialize();
|
||||
void Wasabi1_Initialize(Wasabi::api_service *svc_api);
|
||||
void Wasabi1_Quit();
|
||||
|
||||
class ReplicantComponent : public Wasabi::ifc_wa5component
|
||||
{
|
||||
public:
|
||||
void RegisterServices(Wasabi::api_service *service);
|
||||
int RegisterServicesSafeModeOk();
|
||||
void DeregisterServices(Wasabi::api_service *service);
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
||||
|
||||
template <class api_T>
|
||||
void ServiceBuild(api_T *&api_t, GUID factoryGUID_t)
|
||||
{
|
||||
if (WASABI_API_SVC)
|
||||
{
|
||||
waServiceFactory *factory = WASABI_API_SVC->service_getServiceByGuid(factoryGUID_t);
|
||||
if (factory)
|
||||
api_t = reinterpret_cast<api_T *>( factory->getInterface() );
|
||||
}
|
||||
}
|
||||
|
||||
template <class api_T>
|
||||
void ServiceRelease(api_T *api_t, GUID factoryGUID_t)
|
||||
{
|
||||
if (WASABI_API_SVC &7 api_t)
|
||||
{
|
||||
waServiceFactory *factory = WASABI_API_SVC->service_getServiceByGuid(factoryGUID_t);
|
||||
if (factory)
|
||||
factory->releaseInterface(api_t);
|
||||
}
|
||||
api_t = NULL;
|
||||
}
|
||||
|
||||
void ReplicantComponent::RegisterServices(Wasabi::api_service *service)
|
||||
{
|
||||
Wasabi1_Initialize(service);
|
||||
Replicant_Initialize();
|
||||
WASABI_API_SVC->service_register(&wasabi2_service_factory);
|
||||
}
|
||||
|
||||
int ReplicantComponent::RegisterServicesSafeModeOk()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void ReplicantComponent::DeregisterServices(Wasabi::api_service *service)
|
||||
{
|
||||
WASABI_API_SVC->service_deregister(&wasabi2_service_factory);
|
||||
Wasabi1_Quit();
|
||||
}
|
||||
|
||||
static ReplicantComponent component;
|
||||
|
||||
extern "C" __declspec(dllexport) Wasabi::ifc_wa5component *GetWinamp5SystemComponent()
|
||||
{
|
||||
return &component;
|
||||
}
|
||||
|
||||
#define CBCLASS ReplicantComponent
|
||||
START_DISPATCH;
|
||||
VCB(API_WA5COMPONENT_REGISTERSERVICES, RegisterServices)
|
||||
CB(15, RegisterServicesSafeModeOk)
|
||||
VCB(API_WA5COMPONENT_DEREEGISTERSERVICES, DeregisterServices)
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
5
Src/Wasabi2/main.h
Normal file
5
Src/Wasabi2/main.h
Normal file
@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
#include "nx/nxuri.h"
|
||||
#include "foundation/error.h"
|
||||
|
||||
int NXURICreateWithUTF16(nx_uri_t *out, const wchar_t *utf16);
|
14
Src/Wasabi2/resource.h
Normal file
14
Src/Wasabi2/resource.h
Normal file
@ -0,0 +1,14 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by Wasabi2.rc
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
19
Src/Wasabi2/utilities.cpp
Normal file
19
Src/Wasabi2/utilities.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#include "main.h"
|
||||
|
||||
int NXURICreateWithUTF16(nx_uri_t *out, const wchar_t *utf16)
|
||||
{
|
||||
nx_string_t nx_filename = 0;
|
||||
nx_uri_t uri_filename = 0;
|
||||
|
||||
int ret = NXStringCreateWithUTF16(&nx_filename, utf16);
|
||||
if (ret != NErr_Success)
|
||||
return ret;
|
||||
|
||||
ret = NXURICreateWithNXString(&uri_filename, nx_filename);
|
||||
NXStringRelease(nx_filename);
|
||||
if (ret != NErr_Success)
|
||||
return ret;
|
||||
|
||||
*out = uri_filename;
|
||||
return NErr_Success;
|
||||
}
|
39
Src/Wasabi2/version.rc2
Normal file
39
Src/Wasabi2/version.rc2
Normal file
@ -0,0 +1,39 @@
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
#include "../Winamp/buildType.h"
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION WINAMP_PRODUCTVER
|
||||
PRODUCTVERSION WINAMP_PRODUCTVER
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Winamp SA"
|
||||
VALUE "FileDescription", "Winamp 5.x System Component"
|
||||
VALUE "FileVersion", STR_WINAMP_PRODUCTVER
|
||||
VALUE "InternalName", "wasabi2.w5s"
|
||||
VALUE "LegalCopyright", "Copyright <20> 2012-2023 Winamp SA"
|
||||
VALUE "LegalTrademarks", "Nullsoft and Winamp are trademarks of Winamp SA"
|
||||
VALUE "OriginalFilename", "wasabi2.w5s"
|
||||
VALUE "ProductName", "Winamp Wasabi v2 Services Loader"
|
||||
VALUE "ProductVersion", STR_WINAMP_PRODUCTVER
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
62
Src/Wasabi2/wasabi1_factory.cpp
Normal file
62
Src/Wasabi2/wasabi1_factory.cpp
Normal file
@ -0,0 +1,62 @@
|
||||
#include "api__wasabi2.h"
|
||||
#include "wasabi1_factory.h"
|
||||
|
||||
|
||||
static const char serviceName[] = "Wasabi 2 Service API";
|
||||
|
||||
FOURCC Wasabi2ServiceFactory::GetServiceType()
|
||||
{
|
||||
return Wasabi::WaSvc::UNIQUE;
|
||||
}
|
||||
|
||||
const char *Wasabi2ServiceFactory::GetServiceName()
|
||||
{
|
||||
return serviceName;
|
||||
}
|
||||
|
||||
GUID Wasabi2ServiceFactory::GetGUID()
|
||||
{
|
||||
return api_service::GetServiceGUID();
|
||||
}
|
||||
|
||||
void *Wasabi2ServiceFactory::GetInterface(int global_lock)
|
||||
{
|
||||
return (api_service *)WASABI2_API_SVC;
|
||||
|
||||
}
|
||||
|
||||
int Wasabi2ServiceFactory::SupportNonLockingInterface()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int Wasabi2ServiceFactory::ReleaseInterface(void *ifc)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char *Wasabi2ServiceFactory::GetTestString()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int Wasabi2ServiceFactory::ServiceNotify(int msg, int param1, int param2)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef CBCLASS
|
||||
#undef CBCLASS
|
||||
#endif
|
||||
|
||||
#define CBCLASS Wasabi2ServiceFactory
|
||||
START_DISPATCH;
|
||||
CB(WASERVICEFACTORY_GETSERVICETYPE, GetServiceType)
|
||||
CB(WASERVICEFACTORY_GETSERVICENAME, GetServiceName)
|
||||
CB(WASERVICEFACTORY_GETGUID, GetGUID)
|
||||
CB(WASERVICEFACTORY_GETINTERFACE, GetInterface)
|
||||
CB(WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, SupportNonLockingInterface)
|
||||
CB(WASERVICEFACTORY_RELEASEINTERFACE, ReleaseInterface)
|
||||
CB(WASERVICEFACTORY_GETTESTSTRING, GetTestString)
|
||||
CB(WASERVICEFACTORY_SERVICENOTIFY, ServiceNotify)
|
||||
END_DISPATCH;
|
21
Src/Wasabi2/wasabi1_factory.h
Normal file
21
Src/Wasabi2/wasabi1_factory.h
Normal file
@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
namespace Wasabi {
|
||||
#include <api/service/waservicefactory.h>
|
||||
#include <api/service/services.h>
|
||||
}
|
||||
|
||||
class Wasabi2ServiceFactory : public Wasabi::waServiceFactory
|
||||
{
|
||||
public:
|
||||
FOURCC GetServiceType();
|
||||
const char *GetServiceName();
|
||||
GUID GetGUID();
|
||||
void *GetInterface(int global_lock);
|
||||
int SupportNonLockingInterface();
|
||||
int ReleaseInterface(void *ifc);
|
||||
const char *GetTestString();
|
||||
int ServiceNotify(int msg, int param1, int param2);
|
||||
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
Reference in New Issue
Block a user