summary refs log tree commit diff stats
path: root/win32/ext/zlib-wdk/install.props
blob: d3517733d35aead37cdafa9cdc436a6cbcfa3f15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="utf-8"?> 
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ImportGroup Label="PropertySheets" />
  <PropertyGroup Label="UserMacros">
    <ZlibDoInstall32>
      mkdir $(SolutionDir)x86\dist
      mkdir $(SolutionDir)x86\dist\bin
      copy $(SolutionDir)x86\MiniUnzipRelease\miniunz.exe $(SolutionDir)x86\dist\bin
      copy $(SolutionDir)x86\MiniZipRelease\minizip.exe $(SolutionDir)x86\dist\bin
      copy $(SolutionDir)x86\TestZlibDllRelease\testzlibdll.exe $(SolutionDir)x86\dist\bin
      copy $(SolutionDir)x86\TestZlibRelease\testzlib.exe $(SolutionDir)x86\dist\bin
      copy $(SolutionDir)x86\ZlibDllRelease\zlibwapi.dll $(SolutionDir)x86\dist\bin
      mkdir $(SolutionDir)x86\dist\include
      copy ..\..\..\zconf.h $(SolutionDir)x86\dist\include
      copy ..\..\..\zlib.h $(SolutionDir)x86\dist\include
      mkdir $(SolutionDir)x86\dist\lib
      copy $(SolutionDir)x86\ZlibDllRelease\zlibwapi.exp $(SolutionDir)x86\dist\lib
      copy $(SolutionDir)x86\ZlibDllRelease\zlibwapi.lib $(SolutionDir)x86\dist\lib
      copy $(SolutionDir)x86\ZlibStatRelease\zlibstat.lib $(SolutionDir)x86\dist\lib
      copy $(SolutionDir)zlibvc.def $(SolutionDir)x86\dist\lib
      copy $(SolutionDir)LICENSE.ZLIB $(SolutionDir)x86\dist
    </ZlibDoInstall32>
    <ZlibDoInstall64>
      mkdir $(SolutionDir)x64\dist
      mkdir $(SolutionDir)x64\dist\bin
      copy $(SolutionDir)x64\MiniUnzipRelease\miniunz.exe $(SolutionDir)x64\dist\bin
      copy $(SolutionDir)x64\MiniZipRelease\minizip.exe $(SolutionDir)x64\dist\bin
      copy $(SolutionDir)x64\TestZlibDllRelease\testzlibdll.exe $(SolutionDir)x64\dist\bin
      copy $(SolutionDir)x64\TestZlibRelease\testzlib.exe $(SolutionDir)x64\dist\bin
      copy $(SolutionDir)x64\ZlibDllRelease\zlibwapi.dll $(SolutionDir)x64\dist\bin
      mkdir $(SolutionDir)x64\dist\include
      copy ..\..\..\zconf.h $(SolutionDir)x64\dist\include
      copy ..\..\..\zlib.h $(SolutionDir)x64\dist\include
      mkdir $(SolutionDir)x64\dist\lib
      copy $(SolutionDir)x64\ZlibDllRelease\zlibwapi.exp $(SolutionDir)x64\dist\lib
      copy $(SolutionDir)x64\ZlibDllRelease\zlibwapi.lib $(SolutionDir)x64\dist\lib
      copy $(SolutionDir)x64\ZlibStatRelease\zlibstat.lib $(SolutionDir)x64\dist\lib
      copy $(SolutionDir)zlibvc.def $(SolutionDir)x64\dist\lib
      copy $(SolutionDir)LICENSE.ZLIB $(SolutionDir)x64\dist
    </ZlibDoInstall64>
  </PropertyGroup>
  <ItemDefinitionGroup>
    <ClCompile>
      <AdditionalIncludeDirectories>c:\WinDDK\7600.16385.1\inc\api;c:\WinDDK\7600.16385.1\inc\crt</AdditionalIncludeDirectories>
    </ClCompile>
    <Link>
      <WDK32Dependencies>msvcrt_winxp.obj</WDK32Dependencies>
      <WDK64Dependencies>msvcrt_win2003.obj</WDK64Dependencies>
      <WDK32LibraryDirectories>c:\WinDDK\7600.16385.1\lib\Crt\i386;c:\WinDDK\7600.16385.1\lib\wxp\i386</WDK32LibraryDirectories>
      <WDK64LibraryDirectories>c:\WinDDK\7600.16385.1\lib\Crt\amd64;c:\WinDDK\7600.16385.1\lib\wnet\amd64</WDK64LibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
  </ItemGroup>
</Project>
l.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/* HexChat
 * Copyright (C) 2015 Arnav Singh.
 *
 * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#include <gmodule.h>

#include "hexchat.h"
#include "plugin.h"

#include <Windows.h>

void (*winrt_notification_backend_show) (const char *title, const char *text) = NULL;
int (*winrt_notification_backend_init) (void) = NULL;
void (*winrt_notification_backend_deinit) (void) = NULL;
int (*winrt_notification_backend_supported) (void) = NULL;

void
notification_backend_show (const char *title, const char *text)
{
	if (winrt_notification_backend_show == NULL)
	{
		return;
	}

	winrt_notification_backend_show (title, text);
}

int
notification_backend_init (void)
{
	UINT original_error_mode;
	GModule *module;

	/* Temporarily suppress the "DLL could not be loaded" dialog box before trying to load hcnotifications-winrt.dll */
	original_error_mode = GetErrorMode ();
	SetErrorMode(SEM_FAILCRITICALERRORS);
	module = module_load (HEXCHATLIBDIR "\\hcnotifications-winrt.dll");
	SetErrorMode (original_error_mode);

	if (module == NULL)
	{
		return 0;
	}

	g_module_symbol (module, "notification_backend_show", (gpointer *) &winrt_notification_backend_show);
	g_module_symbol (module, "notification_backend_init", (gpointer *) &winrt_notification_backend_init);
	g_module_symbol (module, "notification_backend_deinit", (gpointer *) &winrt_notification_backend_deinit);
	g_module_symbol (module, "notification_backend_supported", (gpointer *) &winrt_notification_backend_supported);

	return winrt_notification_backend_init ();
}

void
notification_backend_deinit (void)
{
	if (winrt_notification_backend_deinit == NULL)
	{
		return;
	}

	winrt_notification_backend_deinit ();
}

int
notification_backend_supported (void)
{
	if (winrt_notification_backend_supported == NULL)
	{
		return 0;
	}

	return winrt_notification_backend_supported ();
}