1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-12-23 16:18:52 -05:00

Merge with default

This commit is contained in:
berkeviktor@aol.com 2011-07-27 09:07:09 +02:00
commit a11d1857f1
184 changed files with 37947 additions and 535 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

68
build/build-small.bat Normal file
View File

@ -0,0 +1,68 @@
@echo off
set WDK_ROOT=c:\WinDDK\7600.16385.1
cd ..
set DEV_32=%cd%\dep-x86
cd src
echo DEV = %DEV_32% > makeinc.mak
type makeinc.skel.mak >> makeinc.mak
set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt;%WDK_ROOT%\inc\api\crt\stl70
set LIB=%WDK_ROOT%\lib\wxp\i386;%WDK_ROOT%\lib\Crt\i386
set OPATH=%PATH%
set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin;%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\Common7\IDE;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin;%DEV_32%\bin
nmake /nologo /f makefile.mak clean
cd pixmaps
nmake /nologo /f makefile.mak
cd ..
nmake /nologo /f makefile.mak
cd ..\plugins
nmake /nologo /f makefile.mak clean
nmake /nologo /f makefile.mak
cd ..\build
set PATH=%OPATH%
set DEPS_ROOT=..\dep-x86
set XCHAT_DEST=..\tmp
rmdir /q /s %XCHAT_DEST%
mkdir %XCHAT_DEST%
echo 2> portable-mode
move portable-mode %XCHAT_DEST%
copy ..\src\fe-gtk\xchat.exe %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgtk-win32-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgdk_pixbuf-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgio-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libglib-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgmodule-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgobject-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgthread-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libpng14-14.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgdk-win32-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libcairo-2.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libfontconfig-1.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libexpat-1.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\freetype6.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libpango-1.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libpangocairo-1.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libpangoft2-1.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libpangowin32-1.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libatk-1.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\intl.dll %XCHAT_DEST%
xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\2.10.0\engines\libpixmap.dll %XCHAT_DEST%\lib\gtk-2.0\2.10.0\engines\
copy %DEPS_ROOT%\lib\gtk-2.0\2.10.0\engines\libwimp.dll %XCHAT_DEST%\lib\gtk-2.0\2.10.0\engines
xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\modules\libgail.dll %XCHAT_DEST%\lib\gtk-2.0\modules\
xcopy /q /s /i etc %XCHAT_DEST%\etc
copy %DEPS_ROOT%\bin\libeay32.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\ssleay32.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\zlib1.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\cert.pem %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libenchant.dll %XCHAT_DEST%
xcopy /q /s /i %DEPS_ROOT%\lib\enchant\libenchant_myspell.dll %XCHAT_DEST%\lib\enchant\
xcopy /q /s /i ..\plugins\checksum\xcchecksum.dll %XCHAT_DEST%\plugins\
copy ..\plugins\lua\xclua.dll %XCHAT_DEST%\plugins
copy ..\plugins\mpcinfo\xcmpcinfo.dll %XCHAT_DEST%\plugins
copy ..\plugins\python\xcpython.dll %XCHAT_DEST%\plugins
copy ..\plugins\tcl\xctcl.dll %XCHAT_DEST%\plugins
copy ..\plugins\upd\xcupd.dll %XCHAT_DEST%\plugins
::copy ..\plugins\xdcc\xcxdcc.dll %XCHAT_DEST%\plugins
copy ..\plugins\xtray\xtray.dll %XCHAT_DEST%\plugins
copy ..\plugins\winamp\xcwinamp.dll %XCHAT_DEST%\plugins
copy %DEPS_ROOT%\bin\lua51.dll %XCHAT_DEST%
pause

16
build/build-spell.bat Normal file
View File

@ -0,0 +1,16 @@
@echo off
set DEPS_ROOT=..\dep-x86
set XCHAT_DEST=..\tmp-spell
rmdir /q /s %XCHAT_DEST%
mkdir %XCHAT_DEST%
xcopy /q /s /i %DEPS_ROOT%\myspell %XCHAT_DEST%\share\myspell
copy ..\COPYING %XCHAT_DEST%
echo [Setup] > xchat-wdk-spell.iss
echo WizardImageFile=%cd%\bitmaps\wizardimage.bmp >> xchat-wdk-spell.iss
echo WizardSmallImageFile=%cd%\bitmaps\wizardsmallimage.bmp >> xchat-wdk-spell.iss
cd ..
echo SetupIconFile=%cd%\xchat.ico >> build\xchat-wdk-spell.iss
type build\xchat-wdk-spell.skel.iss >> build\xchat-wdk-spell.iss
set PATH=%PROGRAMFILES(X86)%\Inno Setup 5
compil32 /cc build\xchat-wdk-spell.iss
pause

35
build/build-x64.bat Normal file
View File

@ -0,0 +1,35 @@
@echo off
set PERL_512=c:\mozilla-build\perl-5.12-x64\perl
set PERL_514=c:\mozilla-build\perl-5.14-x64
cd ..
set DEV_64=%cd%\dep-x64
cd src
echo X64 = YES > makeinc.mak
echo DEV = %DEV_64% >> makeinc.mak
type makeinc.skel.mak >> makeinc.mak
set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt;%WDK_ROOT%\inc\api\crt\stl70
set LIB=%WDK_ROOT%\lib\wnet\amd64;%WDK_ROOT%\lib\Crt\amd64
set OPATH=%PATH%
set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin\amd64;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin\x64;%DEV_64%\bin
cd common
nmake /nologo /f makefile.mak clean
cd ..\fe-gtk
nmake /nologo /f makefile.mak clean
cd ..\fe-text
nmake /nologo /f makefile.mak clean
cd ..
nmake /nologo /f makefile.mak
cd ..\plugins
nmake /nologo /f makefile.mak clean
nmake /nologo /f makefile.mak
cd perl
set OOPATH=%PATH%
set PATH=%OOPATH%;%PERL_512%\bin
nmake /nologo /s /f makefile-512.mak clean
nmake /nologo /s /f makefile-512.mak
set PATH=%OOPATH%;%PERL_514%\bin
nmake /nologo /s /f makefile-514.mak clean
nmake /nologo /s /f makefile-514.mak
cd ..\..\build
set PATH=%OPATH%
call release-x64.bat

37
build/build-x86.bat Normal file
View File

@ -0,0 +1,37 @@
@echo off
set PERL_512=c:\mozilla-build\perl-5.12-x86\perl
set PERL_514=c:\mozilla-build\perl-5.14-x86
echo [Setup] > xchat-wdk.iss
echo WizardImageFile=%cd%\bitmaps\wizardimage.bmp >> xchat-wdk.iss
echo WizardSmallImageFile=%cd%\bitmaps\wizardsmallimage.bmp >> xchat-wdk.iss
cd ..
echo SetupIconFile=%cd%\xchat.ico >> build\xchat-wdk.iss
type build\xchat-wdk.skel.iss >> build\xchat-wdk.iss
set DEV_32=%cd%\dep-x86
cd src
echo DEV = %DEV_32% > makeinc.mak
type makeinc.skel.mak >> makeinc.mak
set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt;%WDK_ROOT%\inc\api\crt\stl70
set LIB=%WDK_ROOT%\lib\wxp\i386;%WDK_ROOT%\lib\Crt\i386
set OPATH=%PATH%
set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin;%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\Common7\IDE;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin;%DEV_32%\bin
nmake /nologo /f makefile.mak clean
cd pixmaps
nmake /nologo /f makefile.mak
cd ..
nmake /nologo /f makefile.mak
cd ..\plugins
nmake /nologo /f makefile.mak clean
nmake /nologo /f makefile.mak
cd perl
set OOPATH=%PATH%
set PATH=%OOPATH%;%PERL_512%\bin
nmake /nologo /s /f makefile-512.mak clean
nmake /nologo /s /f makefile-512.mak
set PATH=%OOPATH%;%PERL_514%\bin
nmake /nologo /s /f makefile-514.mak clean
nmake /nologo /s /f makefile-514.mak
cd ..\..\build
call compile-po-files.bat
set PATH=%OPATH%
call release-x86.bat

8
build/build.bat Normal file
View File

@ -0,0 +1,8 @@
@echo off
set WDK_ROOT=c:\WinDDK\7600.16385.1
call build-x86.bat
call build-x64.bat
::call compress.bat
set PATH=%PROGRAMFILES(X86)%\Inno Setup 5
compil32 /cc xchat-wdk.iss
pause

View File

@ -0,0 +1,7 @@
@echo off
echo.Compiling translations . . .
cd ..\po
rmdir /q /s locale
mkdir locale
for %%A in (am az be bg ca cs de el en_GB es et eu fi fr gl hi hu it ja kn ko lt lv mk ms nb nl no pa pl pt pt_BR ru sk sl sq sr sv th uk vi wa zh_CN zh_TW) do mkdir locale\%%A\LC_MESSAGES && msgfmt -co locale\%%A\LC_MESSAGES\xchat.mo %%A.po
cd ..\build

19
build/compress.bat Normal file
View File

@ -0,0 +1,19 @@
@echo off
set OPATH=%PATH%
set PATH=c:\mozilla-build\mpress;c:\mozilla-build\upx
cd ..\tmp
for %%A in (*.dll) do upx -9 -q %%A
for %%A in (*.x64) do mpress -q %%A
upx xchat.exe
cd lib\enchant
for %%A in (*.dll) do upx -9 -q %%A
for %%A in (*.x64) do mpress -q %%A
:: gtk-2.0\2.10.0\engines is already packed, skip it
cd ..\gtk-2.0\modules
for %%A in (*.dll) do upx -9 -q %%A
for %%A in (*.x64) do mpress -q %%A
cd ..\..\..\plugins
for %%A in (*.dll) do upx -9 -q %%A
for %%A in (*.x64) do mpress -q %%A
cd ..\..\build
set PATH=%OPATH%

2
build/deb-extract.bat Normal file
View File

@ -0,0 +1,2 @@
@echo off
for %%A in (*.deb) do 7z x %%A && 7z x data.tar && del data.tar

9
build/dep-extract.bat Normal file
View File

@ -0,0 +1,9 @@
@echo off
set PATH=%PROGRAMW6432%\7-Zip
cd ..\dep-x64
7z x *.zip
7z x *.7z
cd ..\dep-x86
7z x *.zip
7z x *.7z
pause

BIN
build/etc/download.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

71
build/etc/gtk-2.0/gtkrc Normal file
View File

@ -0,0 +1,71 @@
gtk-font-name = "sans 8"
gtk-icon-sizes = "gtk-menu=13,13:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32"
gtk-toolbar-icon-size = small-toolbar
# disable images in buttons. i've only seen ugly delphi apps use this feature.
gtk-button-images = 0
# enable/disable images in menus. most "stock" microsoft apps don't use these, except sparingly.
# the office apps use them heavily, though.
gtk-menu-images = 1
# use the win32 button ordering instead of the GNOME HIG one, where applicable
gtk-alternative-button-order = 1
# use the win32 sort indicators direction, as in Explorer
gtk-alternative-sort-arrows = 1
# Windows users don't expect the PC Speaker beeping at them when they backspace in an empty textview and stuff like that
gtk-error-bell = 0
# hide mnemonic underlines until the Alt key is pressed
gtk-auto-mnemonics = 1
style "msw-default"
{
GtkWidget::interior-focus = 1
GtkOptionMenu::indicator-size = { 9, 5 }
GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 }
GtkSpinButton::shadow-type = in
# Owen and I disagree that these should be themable
#GtkUIManager::add-tearoffs = 0
#GtkComboBox::add-tearoffs = 0
GtkComboBox::appears-as-list = 1
GtkComboBox::focus-on-click = 0
GOComboBox::add_tearoffs = 0
GtkTreeView::allow-rules = 0
GtkTreeView::expander-size = 12
GtkExpander::expander-size = 12
GtkScrolledWindow::scrollbar_spacing = 1
GtkSeparatorMenuItem::horizontal-padding = 2
engine "wimp"
{
}
}
class "*" style "msw-default"
binding "ms-windows-tree-view"
{
bind "Right" { "expand-collapse-cursor-row" (1,1,0) }
bind "Left" { "expand-collapse-cursor-row" (1,0,0) }
}
class "GtkTreeView" binding "ms-windows-tree-view"
style "msw-combobox-thickness" = "msw-default"
{
xthickness = 0
ythickness = 0
}
widget_class "*TreeView*ComboBox*" style "msw-combobox-thickness"
widget_class "*ComboBox*GtkFrame*" style "msw-combobox-thickness"

BIN
build/etc/music.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

7
build/release-src.bat Normal file
View File

@ -0,0 +1,7 @@
@echo off
set PATH=%PATH%;%PROGRAMW6432%\7-Zip;%PROGRAMFILES(X86)%\TortoiseHg
hg clone --branch wdk https://xchat-wdk.googlecode.com/hg/ xchat-wdk
rmdir /q /s xchat-wdk\.hg
7z a xchat-wdk-tip.7z xchat-wdk
rmdir /q /s xchat-wdk
pause

45
build/release-x64.bat Normal file
View File

@ -0,0 +1,45 @@
@echo off
set DEPS_ROOT=..\dep-x64
set XCHAT_DEST=..\tmp
copy ..\src\fe-gtk\xchat.exe %XCHAT_DEST%\xchat.exe.x64
copy ..\src\fe-text\xchat-text.exe %XCHAT_DEST%\xchat-text.exe.x64
copy %DEPS_ROOT%\bin\libgtk-win32-2.0-0.dll %XCHAT_DEST%\libgtk-win32-2.0-0.dll.x64
copy %DEPS_ROOT%\bin\libgdk_pixbuf-2.0-0.dll %XCHAT_DEST%\libgdk_pixbuf-2.0-0.dll.x64
copy %DEPS_ROOT%\bin\libgio-2.0-0.dll %XCHAT_DEST%\libgio-2.0-0.dll.x64
copy %DEPS_ROOT%\bin\libglib-2.0-0.dll %XCHAT_DEST%\libglib-2.0-0.dll.x64
copy %DEPS_ROOT%\bin\libgmodule-2.0-0.dll %XCHAT_DEST%\libgmodule-2.0-0.dll.x64
copy %DEPS_ROOT%\bin\libgobject-2.0-0.dll %XCHAT_DEST%\libgobject-2.0-0.dll.x64
copy %DEPS_ROOT%\bin\libgthread-2.0-0.dll %XCHAT_DEST%\libgthread-2.0-0.dll.x64
copy %DEPS_ROOT%\bin\libpng14-14.dll %XCHAT_DEST%\libpng14-14.dll.x64
copy %DEPS_ROOT%\bin\libgdk-win32-2.0-0.dll %XCHAT_DEST%\libgdk-win32-2.0-0.dll.x64
copy %DEPS_ROOT%\bin\libcairo-2.dll %XCHAT_DEST%\libcairo-2.dll.x64
copy %DEPS_ROOT%\bin\libfontconfig-1.dll %XCHAT_DEST%\libfontconfig-1.dll.x64
copy %DEPS_ROOT%\bin\libexpat-1.dll %XCHAT_DEST%\libexpat-1.dll.x64
copy %DEPS_ROOT%\bin\libfreetype-6.dll %XCHAT_DEST%\libfreetype-6.dll.x64
copy %DEPS_ROOT%\bin\libpango-1.0-0.dll %XCHAT_DEST%\libpango-1.0-0.dll.x64
copy %DEPS_ROOT%\bin\libpangocairo-1.0-0.dll %XCHAT_DEST%\libpangocairo-1.0-0.dll.x64
copy %DEPS_ROOT%\bin\libpangoft2-1.0-0.dll %XCHAT_DEST%\libpangoft2-1.0-0.dll.x64
copy %DEPS_ROOT%\bin\libpangowin32-1.0-0.dll %XCHAT_DEST%\libpangowin32-1.0-0.dll.x64
copy %DEPS_ROOT%\bin\libatk-1.0-0.dll %XCHAT_DEST%\libatk-1.0-0.dll.x64
copy %DEPS_ROOT%\bin\libintl-8.dll %XCHAT_DEST%\libintl-8.dll.x64
copy %DEPS_ROOT%\lib\gtk-2.0\2.10.0\engines\libpixmap.dll %XCHAT_DEST%\lib\gtk-2.0\2.10.0\engines\libpixmap.dll.x64
copy %DEPS_ROOT%\lib\gtk-2.0\2.10.0\engines\libwimp.dll %XCHAT_DEST%\lib\gtk-2.0\2.10.0\engines\libwimp.dll.x64
copy %DEPS_ROOT%\lib\gtk-2.0\modules\libgail.dll %XCHAT_DEST%\lib\gtk-2.0\modules\libgail.dll.x64
copy %DEPS_ROOT%\bin\libeay32.dll %XCHAT_DEST%\libeay32.dll.x64
copy %DEPS_ROOT%\bin\ssleay32.dll %XCHAT_DEST%\ssleay32.dll.x64
copy %DEPS_ROOT%\bin\zlib1.dll %XCHAT_DEST%\zlib1.dll.x64
copy %DEPS_ROOT%\bin\libenchant.dll %XCHAT_DEST%\libenchant.dll.x64
copy %DEPS_ROOT%\lib\enchant\libenchant_myspell.dll %XCHAT_DEST%\lib\enchant\libenchant_myspell.dll.x64
::copy ..\plugins\ewc\xcewc.dll %XCHAT_DEST%\plugins\xcewc.dll.x64
copy ..\plugins\checksum\xcchecksum.dll %XCHAT_DEST%\plugins\xcchecksum.dll.x64
copy ..\plugins\lua\xclua.dll %XCHAT_DEST%\plugins\xclua.dll.x64
copy ..\plugins\mpcinfo\xcmpcinfo.dll %XCHAT_DEST%\plugins\xcmpcinfo.dll.x64
copy ..\plugins\perl\xcperl-512.dll %XCHAT_DEST%\plugins\xcperl-512.dll.x64
copy ..\plugins\perl\xcperl-514.dll %XCHAT_DEST%\plugins\xcperl-514.dll.x64
copy ..\plugins\python\xcpython.dll %XCHAT_DEST%\plugins\xcpython.dll.x64
copy ..\plugins\tcl\xctcl.dll %XCHAT_DEST%\plugins\xctcl.dll.x64
copy ..\plugins\upd\xcupd.dll %XCHAT_DEST%\plugins\xcupd.dll.x64
::copy ..\plugins\xdcc\xcxdcc.dll %XCHAT_DEST%\plugins\xcxdcc.dll.x64
copy ..\plugins\xtray\xtray.dll %XCHAT_DEST%\plugins\xtray.dll.x64
copy ..\plugins\winamp\xcwinamp.dll %XCHAT_DEST%\plugins\xcwinamp.dll.x64
copy %DEPS_ROOT%\bin\lua51.dll %XCHAT_DEST%\lua51.dll.x64

59
build/release-x86.bat Normal file
View File

@ -0,0 +1,59 @@
@echo off
set DEPS_ROOT=..\dep-x86
set XCHAT_DEST=..\tmp
rmdir /q /s %XCHAT_DEST%
mkdir %XCHAT_DEST%
echo 2> portable-mode
move portable-mode %XCHAT_DEST%
copy ..\src\fe-gtk\xchat.exe %XCHAT_DEST%
copy ..\src\fe-text\xchat-text.exe %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgtk-win32-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgdk_pixbuf-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgio-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libglib-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgmodule-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgobject-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgthread-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libpng14-14.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libgdk-win32-2.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libcairo-2.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libfontconfig-1.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libexpat-1.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\freetype6.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libpango-1.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libpangocairo-1.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libpangoft2-1.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libpangowin32-1.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libatk-1.0-0.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\intl.dll %XCHAT_DEST%
xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\2.10.0\engines\libpixmap.dll %XCHAT_DEST%\lib\gtk-2.0\2.10.0\engines\
copy %DEPS_ROOT%\lib\gtk-2.0\2.10.0\engines\libwimp.dll %XCHAT_DEST%\lib\gtk-2.0\2.10.0\engines
xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\modules\libgail.dll %XCHAT_DEST%\lib\gtk-2.0\modules\
xcopy /q /s /i etc %XCHAT_DEST%\etc
copy ..\COPYING %XCHAT_DEST%
copy %DEPS_ROOT%\LICENSE.OPENSSL %XCHAT_DEST%
copy %DEPS_ROOT%\LICENSE.ZLIB %XCHAT_DEST%
copy %DEPS_ROOT%\share\doc\glib-2.26.1\COPYING %XCHAT_DEST%\LICENSE.GTK
copy %DEPS_ROOT%\share\doc\cairo_1.10.2-1_win32\COPYING-LGPL-2.1 %XCHAT_DEST%\LICENSE.CAIRO
copy %DEPS_ROOT%\LICENSE.LUA %XCHAT_DEST%
copy %DEPS_ROOT%\LICENSE.ENCHANT %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libeay32.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\ssleay32.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\zlib1.dll %XCHAT_DEST%
copy %DEPS_ROOT%\bin\cert.pem %XCHAT_DEST%
copy %DEPS_ROOT%\bin\libenchant.dll %XCHAT_DEST%
xcopy /q /s /i %DEPS_ROOT%\lib\enchant\libenchant_myspell.dll %XCHAT_DEST%\lib\enchant\
xcopy /q /s /i ..\plugins\checksum\xcchecksum.dll %XCHAT_DEST%\plugins\
copy ..\plugins\lua\xclua.dll %XCHAT_DEST%\plugins
copy ..\plugins\mpcinfo\xcmpcinfo.dll %XCHAT_DEST%\plugins
copy ..\plugins\perl\xcperl-512.dll %XCHAT_DEST%\plugins
copy ..\plugins\perl\xcperl-514.dll %XCHAT_DEST%\plugins
copy ..\plugins\python\xcpython.dll %XCHAT_DEST%\plugins
copy ..\plugins\tcl\xctcl.dll %XCHAT_DEST%\plugins
copy ..\plugins\upd\xcupd.dll %XCHAT_DEST%\plugins
::copy ..\plugins\xdcc\xcxdcc.dll %XCHAT_DEST%\plugins
copy ..\plugins\xtray\xtray.dll %XCHAT_DEST%\plugins
copy ..\plugins\winamp\xcwinamp.dll %XCHAT_DEST%\plugins
copy %DEPS_ROOT%\bin\lua51.dll %XCHAT_DEST%
xcopy /q /s /i ..\po\locale %XCHAT_DEST%\locale
xcopy /q /s /i %DEPS_ROOT%\share\locale %XCHAT_DEST%\share\locale

View File

@ -0,0 +1,39 @@
AppName=XChat-WDK Spelling Dictionaries
AppVerName=XChat-WDK Spelling Dictionaries r1
AppVersion=1.0
VersionInfoVersion=1.0
OutputBaseFilename=XChat-WDK Spelling Dictionaries r1
AppPublisher=XChat-WDK
AppPublisherURL=http://code.google.com/p/xchat-wdk/
AppCopyright=Copyright (C) 1998-2010 Peter Zelezny
AppSupportURL=http://code.google.com/p/xchat-wdk/issues/list
AppUpdatesURL=http://code.google.com/p/xchat-wdk/wiki/InfoXChat
LicenseFile=COPYING
UninstallDisplayIcon={app}\xchat.exe
UninstallDisplayName=XChat-WDK Spelling Dictionaries
DefaultDirName={pf}\XChat-WDK
DefaultGroupName=XChat-WDK
DisableProgramGroupPage=yes
SolidCompression=yes
SourceDir=..\tmp-spell
OutputDir=..\build
FlatComponentsList=no
PrivilegesRequired=none
ShowComponentSizes=no
CreateUninstallRegKey=not IsTaskSelected('portable')
Uninstallable=not IsTaskSelected('portable')
DirExistsWarning=no
ArchitecturesAllowed=x86 x64
ArchitecturesInstallIn64BitMode=x64
[Tasks]
Name: portable; Description: "Yes"; GroupDescription: "Portable Install (no Registry entries, no Start Menu icons, no uninstaller):"; Flags: unchecked
[Files]
Source: "share\myspell\*"; DestDir: "{app}\share\myspell"; Flags: createallsubdirs recursesubdirs
[Icons]
Name: "{group}\Uninstall Spelling Dictionaries"; Filename: "{uninstallexe}"; Tasks: not portable
[Messages]
BeveledLabel= XChat-WDK

302
build/xchat-wdk.skel.iss Normal file
View File

@ -0,0 +1,302 @@
AppName=XChat-WDK
AppVerName=XChat-WDK 1496-3
AppVersion=14.96.3
VersionInfoVersion=14.96.3
OutputBaseFilename=XChat-WDK 1496-3
AppPublisher=XChat-WDK
AppPublisherURL=http://code.google.com/p/xchat-wdk/
AppCopyright=Copyright (C) 1998-2010 Peter Zelezny
AppSupportURL=http://code.google.com/p/xchat-wdk/issues/list
AppUpdatesURL=http://code.google.com/p/xchat-wdk/wiki/InfoXChat
LicenseFile=COPYING
UninstallDisplayIcon={app}\xchat.exe
UninstallDisplayName=XChat-WDK
DefaultDirName={pf}\XChat-WDK
DefaultGroupName=XChat-WDK
DisableProgramGroupPage=yes
SolidCompression=yes
SourceDir=..\tmp
OutputDir=..\build
FlatComponentsList=no
PrivilegesRequired=none
ShowComponentSizes=no
CreateUninstallRegKey=not IsTaskSelected('portable')
Uninstallable=not IsTaskSelected('portable')
ArchitecturesAllowed=x86 x64
ArchitecturesInstallIn64BitMode=x64
[Types]
Name: "normal"; Description: "Normal Installation"
Name: "full"; Description: "Full Installation"
Name: "minimal"; Description: "Minimal Installation"
Name: "custom"; Description: "Custom Installation"; Flags: iscustom
[Components]
Name: "libs"; Description: "XChat-WDK"; Types: normal full minimal custom; Flags: fixed
Name: "xctext"; Description: "XChat-Text"; Types: full custom; Flags: disablenouninstallwarning
Name: "translations"; Description: "Translations"; Types: normal full custom; Flags: disablenouninstallwarning
;Name: "spelling"; Description: "Spelling Dictionaries"; Types: full custom; Flags: disablenouninstallwarning
Name: "plugins"; Description: "Plugins"; Types: full custom; Flags: disablenouninstallwarning
;Name: "plugins\ewc"; Description: "EasyWinampControl"; Types: full custom; Flags: disablenouninstallwarning
Name: "plugins\checksum"; Description: "Checksum"; Types: full custom; Flags: disablenouninstallwarning
Name: "plugins\mpcinfo"; Description: "mpcInfo"; Types: full custom; Flags: disablenouninstallwarning
Name: "plugins\upd"; Description: "Update Checker"; Types: normal full custom; Flags: disablenouninstallwarning
Name: "plugins\winamp"; Description: "Winamp"; Types: full custom; Flags: disablenouninstallwarning
;Name: "plugins\xdcc"; Description: "XDCC"; Types: full custom; Flags: disablenouninstallwarning
Name: "plugins\xtray"; Description: "X-Tray"; Types: full custom; Flags: disablenouninstallwarning
Name: "langs"; Description: "Language Interfaces"; Types: full custom; Flags: disablenouninstallwarning
Name: "langs\lua"; Description: "Lua"; Types: full custom; Flags: disablenouninstallwarning
Name: "langs\lua\luawdk"; Description: "Lua-WDK"; Types: full custom; Flags: disablenouninstallwarning
Name: "langs\perl"; Description: "Perl"; Types: full custom; Flags: disablenouninstallwarning
Name: "langs\python"; Description: "Python"; Types: full custom; Flags: disablenouninstallwarning
Name: "langs\tcl"; Description: "Tcl"; Types: full custom; Flags: disablenouninstallwarning
[Tasks]
Name: x86; Description: "x86"; GroupDescription: "XChat-WDK version:"; Flags: exclusive unchecked
Name: x64; Description: "x64"; GroupDescription: "XChat-WDK version:"; Flags: exclusive; Check: Is64BitInstallMode
Name: perl512; Description: "5.12"; GroupDescription: "Perl version:"; Flags: exclusive; Components: langs\perl
Name: perl514; Description: "5.14"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl
Name: portable; Description: "Yes"; GroupDescription: "Portable Install (no Registry entries, no Start Menu icons, no uninstaller):"; Flags: unchecked
[Registry]
Root: HKCR; Subkey: "irc"; ValueType: none; ValueName: ""; ValueData: ""; Flags: deletekey uninsdeletekey; Tasks: not portable
Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: ""; ValueData: "URL:IRC Protocol"; Flags: uninsdeletevalue; Tasks: not portable
Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Flags: uninsdeletevalue; Tasks: not portable
Root: HKCR; Subkey: "irc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe,0"; Flags: uninsdeletevalue; Tasks: not portable
Root: HKCR; Subkey: "irc\shell"; ValueType: string; ValueName: ""; ValueData: "open"; Flags: uninsdeletevalue; Tasks: not portable
Root: HKCR; Subkey: "irc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe --url=""%1"""; Flags: uninsdeletevalue; Tasks: not portable
[Run]
Filename: "{app}\xchat.exe"; Description: "Run XChat-WDK after closing the Wizard"; Flags: nowait postinstall skipifsilent
[Files]
Source: "cert.pem"; DestDir: "{app}"; Components: libs
Source: "COPYING"; DestDir: "{app}"; Components: libs
Source: "LICENSE.OPENSSL"; DestDir: "{app}"; Components: libs
Source: "LICENSE.ZLIB"; DestDir: "{app}"; Components: libs
Source: "LICENSE.GTK"; DestDir: "{app}"; Components: libs
Source: "LICENSE.CAIRO"; DestDir: "{app}"; Components: libs
Source: "LICENSE.LUA"; DestDir: "{app}"; Components: libs
Source: "LICENSE.ENCHANT"; DestDir: "{app}"; Components: libs
Source: "portable-mode"; DestDir: "{app}"; Tasks: portable
Source: "etc\*"; DestDir: "{app}\etc"; Flags: createallsubdirs recursesubdirs; Components: libs
Source: "locale\*"; DestDir: "{app}\locale"; Flags: createallsubdirs recursesubdirs; Components: translations
Source: "share\locale\*"; DestDir: "{app}\share\locale"; Flags: createallsubdirs recursesubdirs; Components: translations
;Source: "share\myspell\*"; DestDir: "{app}\share\myspell"; Flags: createallsubdirs recursesubdirs; Components: spelling
Source: "xchat.exe"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "xchat.exe.x64"; DestDir: "{app}"; DestName: "xchat.exe"; Components: libs; Tasks: x64
Source: "freetype6.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libfreetype-6.dll.x64"; DestDir: "{app}"; DestName: "libfreetype-6.dll"; Components: libs; Tasks: x64
Source: "intl.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libintl-8.dll.x64"; DestDir: "{app}"; DestName: "libintl-8.dll"; Components: libs; Tasks: x64
Source: "libatk-1.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libatk-1.0-0.dll.x64"; DestDir: "{app}"; DestName: "libatk-1.0-0.dll"; Components: libs; Tasks: x64
Source: "libcairo-2.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libcairo-2.dll.x64"; DestDir: "{app}"; DestName: "libcairo-2.dll"; Components: libs; Tasks: x64
Source: "libeay32.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libeay32.dll.x64"; DestDir: "{app}"; DestName: "libeay32.dll"; Components: libs; Tasks: x64
Source: "libexpat-1.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libexpat-1.dll.x64"; DestDir: "{app}"; DestName: "libexpat-1.dll"; Components: libs; Tasks: x64
Source: "libfontconfig-1.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libfontconfig-1.dll.x64"; DestDir: "{app}"; DestName: "libfontconfig-1.dll"; Components: libs; Tasks: x64
Source: "libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libgdk_pixbuf-2.0-0.dll.x64"; DestDir: "{app}"; DestName: "libgdk_pixbuf-2.0-0.dll"; Components: libs; Tasks: x64
Source: "libgdk-win32-2.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libgdk-win32-2.0-0.dll.x64"; DestDir: "{app}"; DestName: "libgdk-win32-2.0-0.dll"; Components: libs; Tasks: x64
Source: "libgio-2.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libgio-2.0-0.dll.x64"; DestDir: "{app}"; DestName: "libgio-2.0-0.dll"; Components: libs; Tasks: x64
Source: "libglib-2.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libglib-2.0-0.dll.x64"; DestDir: "{app}"; DestName: "libglib-2.0-0.dll"; Components: libs; Tasks: x64
Source: "libgmodule-2.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libgmodule-2.0-0.dll.x64"; DestDir: "{app}"; DestName: "libgmodule-2.0-0.dll"; Components: libs; Tasks: x64
Source: "libgobject-2.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libgobject-2.0-0.dll.x64"; DestDir: "{app}"; DestName: "libgobject-2.0-0.dll"; Components: libs; Tasks: x64
Source: "libgthread-2.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libgthread-2.0-0.dll.x64"; DestDir: "{app}"; DestName: "libgthread-2.0-0.dll"; Components: libs; Tasks: x64
Source: "libgtk-win32-2.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libgtk-win32-2.0-0.dll.x64"; DestDir: "{app}"; DestName: "libgtk-win32-2.0-0.dll"; Components: libs; Tasks: x64
Source: "libpango-1.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libpango-1.0-0.dll.x64"; DestDir: "{app}"; DestName: "libpango-1.0-0.dll"; Components: libs; Tasks: x64
Source: "libpangocairo-1.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libpangocairo-1.0-0.dll.x64"; DestDir: "{app}"; DestName: "libpangocairo-1.0-0.dll"; Components: libs; Tasks: x64
Source: "libpangoft2-1.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libpangoft2-1.0-0.dll.x64"; DestDir: "{app}"; DestName: "libpangoft2-1.0-0.dll"; Components: libs; Tasks: x64
Source: "libpangowin32-1.0-0.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libpangowin32-1.0-0.dll.x64"; DestDir: "{app}"; DestName: "libpangowin32-1.0-0.dll"; Components: libs; Tasks: x64
Source: "libpng14-14.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libpng14-14.dll.x64"; DestDir: "{app}"; DestName: "libpng14-14.dll"; Components: libs; Tasks: x64
Source: "lua51.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "lua51.dll.x64"; DestDir: "{app}"; DestName: "lua51.dll"; Components: libs; Tasks: x64
Source: "ssleay32.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "ssleay32.dll.x64"; DestDir: "{app}"; DestName: "ssleay32.dll"; Components: libs; Tasks: x64
Source: "zlib1.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "zlib1.dll.x64"; DestDir: "{app}"; DestName: "zlib1.dll"; Components: libs; Tasks: x64
Source: "libenchant.dll"; DestDir: "{app}"; Components: libs; Tasks: x86
Source: "libenchant.dll.x64"; DestDir: "{app}"; DestName: "libenchant.dll"; Components: libs; Tasks: x64
Source: "lib\enchant\libenchant_myspell.dll"; DestDir: "{app}\lib\enchant"; Components: libs; Tasks: x86
Source: "lib\enchant\libenchant_myspell.dll.x64"; DestDir: "{app}\lib\enchant"; DestName: "libenchant_myspell.dll"; Components: libs; Tasks: x64
Source: "lib\gtk-2.0\2.10.0\engines\libpixmap.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: libs; Tasks: x86
Source: "lib\gtk-2.0\2.10.0\engines\libpixmap.dll.x64"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; DestName: "libpixmap.dll"; Components: libs; Tasks: x64
Source: "lib\gtk-2.0\2.10.0\engines\libwimp.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: libs; Tasks: x86
Source: "lib\gtk-2.0\2.10.0\engines\libwimp.dll.x64"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; DestName: "libwimp.dll"; Components: libs; Tasks: x64
Source: "lib\gtk-2.0\modules\libgail.dll"; DestDir: "{app}\lib\gtk-2.0\modules"; Components: libs; Tasks: x86
Source: "lib\gtk-2.0\modules\libgail.dll.x64"; DestDir: "{app}\lib\gtk-2.0\modules"; DestName: "libgail.dll"; Components: libs; Tasks: x64
Source: "xchat-text.exe"; DestDir: "{app}"; Components: xctext; Tasks: x86
Source: "xchat-text.exe.x64"; DestDir: "{app}"; DestName: "xchat-text.exe"; Components: xctext; Tasks: x64
;Source: "plugins\xcewc.dll"; DestDir: "{app}\plugins"; Components: plugins\ewc; Tasks: x86
;Source: "plugins\xcewc.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcewc.dll"; Components: plugins\ewc; Tasks: x64
Source: "plugins\xcchecksum.dll"; DestDir: "{app}\plugins"; Components: plugins\checksum; Tasks: x86
Source: "plugins\xcchecksum.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcchecksum.dll"; Components: plugins\checksum; Tasks: x64
Source: "plugins\xcmpcinfo.dll"; DestDir: "{app}\plugins"; Components: plugins\mpcinfo; Tasks: x86
Source: "plugins\xcmpcinfo.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcmpcinfo.dll"; Components: plugins\mpcinfo; Tasks: x64
Source: "plugins\xcupd.dll"; DestDir: "{app}\plugins"; Components: plugins\upd; Tasks: x86
Source: "plugins\xcupd.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcupd.dll"; Components: plugins\upd; Tasks: x64
Source: "plugins\xcwinamp.dll"; DestDir: "{app}\plugins"; Components: plugins\winamp; Tasks: x86
Source: "plugins\xcwinamp.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcwinamp.dll"; Components: plugins\winamp; Tasks: x64
;Source: "plugins\xcxdcc.dll"; DestDir: "{app}\plugins"; Components: plugins\xdcc; Tasks: x86
;Source: "plugins\xcxdcc.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcxdcc.dll"; Components: plugins\xdcc; Tasks: x64
Source: "plugins\xtray.dll"; DestDir: "{app}\plugins"; Components: plugins\xtray; Tasks: x86
Source: "plugins\xtray.dll.x64"; DestDir: "{app}\plugins"; DestName: "xtray.dll"; Components: plugins\xtray; Tasks: x64
Source: "plugins\xclua.dll"; DestDir: "{app}\plugins"; Components: langs\lua; Tasks: x86
Source: "plugins\xclua.dll.x64"; DestDir: "{app}\plugins"; DestName: "xclua.dll"; Components: langs\lua; Tasks: x64
Source: "plugins\xcpython.dll"; DestDir: "{app}\plugins"; Components: langs\python; Tasks: x86
Source: "plugins\xcpython.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcpython.dll"; Components: langs\python; Tasks: x64
Source: "plugins\xctcl.dll"; DestDir: "{app}\plugins"; Components: langs\tcl; Tasks: x86
Source: "plugins\xctcl.dll.x64"; DestDir: "{app}\plugins"; DestName: "xctcl.dll"; Components: langs\tcl; Tasks: x64
Source: "plugins\xcperl-512.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: x86 and perl512
Source: "plugins\xcperl-512.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: x64 and perl512
Source: "plugins\xcperl-514.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: x86 and perl514
Source: "plugins\xcperl-514.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: x64 and perl514
[Icons]
Name: "{group}\XChat-WDK"; Filename: "{app}\xchat.exe"; Tasks: not portable
Name: "{group}\XChat-Text"; Filename: "{app}\xchat-text.exe"; Components: xctext; Tasks: not portable
Name: "{group}\Uninstall XChat-WDK"; Filename: "{uninstallexe}"; Tasks: not portable
[Messages]
BeveledLabel= XChat-WDK
[Code]
/////////////////////////////////////////////////////////////////////
// these are required for x86->x64 or reverse upgrades
/////////////////////////////////////////////////////////////////////
function GetUninstallString(): String;
var
sUnInstPath: String;
sUnInstallString: String;
begin
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\XChat-WDK_is1');
sUnInstallString := '';
if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then
RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
Result := sUnInstallString;
end;
/////////////////////////////////////////////////////////////////////
function IsUpgrade(): Boolean;
begin
Result := (GetUninstallString() <> '');
end;
/////////////////////////////////////////////////////////////////////
function UnInstallOldVersion(): Integer;
var
sUnInstallString: String;
iResultCode: Integer;
begin
// Return Values:
// 1 - uninstall string is empty
// 2 - error executing the UnInstallString
// 3 - successfully executed the UnInstallString
// default return value
Result := 0;
// get the uninstall string of the old app
sUnInstallString := GetUninstallString();
if sUnInstallString <> '' then begin
sUnInstallString := RemoveQuotes(sUnInstallString);
if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
Result := 3
else
Result := 2;
end else
Result := 1;
end;
/////////////////////////////////////////////////////////////////////
procedure CurStepChanged(CurStep: TSetupStep);
begin
if not (IsTaskSelected('portable')) then
begin
if (CurStep=ssInstall) then
begin
if (IsUpgrade()) then
begin
UnInstallOldVersion();
end;
end;
end;
end;

13
config.h Normal file
View File

@ -0,0 +1,13 @@
#define LOCALEDIR "./locale"
#define ENABLE_NLS
#define USE_GMODULE
#define USE_PLUGIN
#define USE_LIBSEXY
#define PACKAGE_NAME "xchat"
#define PACKAGE_VERSION "1496-3"
#define XCHAT_RELEASE "2.8.8"
#define XCHATLIBDIR "."
#define XCHATSHAREDIR "."
#define OLD_PERL
#define GETTEXT_PACKAGE "xchat"
#define PACKAGE_TARNAME "xchat-2.8.8"

21
dep-x64/deps-x64.txt Normal file
View File

@ -0,0 +1,21 @@
http://ftp.gnome.org/pub/gnome/binaries/win64/atk/1.32/atk_1.32.0-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/atk/1.32/atk-dev_1.32.0-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/cairo_1.10.2-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/cairo-dev_1.10.2-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/expat_2.0.1-3_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/fontconfig_2.8.0-2_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/freetype_2.4.4-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/gettext-runtime_0.18.1.1-2_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/gettext-runtime-dev_0.18.1.1-2_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/libpng_1.4.3-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/gdk-pixbuf/2.22/gdk-pixbuf_2.22.1-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/gdk-pixbuf/2.22/gdk-pixbuf-dev_2.22.1-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/glib/2.26/glib_2.26.1-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/glib/2.26/glib-dev_2.26.1-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+_2.22.1-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-dev_2.22.1-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/pango/1.28/pango_1.28.3-1_win64.zip
http://ftp.gnome.org/pub/gnome/binaries/win64/pango/1.28/pango-dev_1.28.3-1_win64.zip
http://xchat-wdk.googlecode.com/files/Enchant-WDK%201.6.0-2%20x64.7z
http://xchat-wdk.googlecode.com/files/Lua-WDK%205.1.4-2-2%20x64.7z
http://xchat-wdk.googlecode.com/files/OpenSSL-WDK%201.0.0d%20x64.7z

23
dep-x86/deps-x86.txt Normal file
View File

@ -0,0 +1,23 @@
http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.32/atk_1.32.0-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.32/atk-dev_1.32.0-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.10.2-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.10.2-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.0.1-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.4.4-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-dev_0.18.1.1-2_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.3-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/gdk-pixbuf/2.22/gdk-pixbuf_2.22.1-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/gdk-pixbuf/2.22/gdk-pixbuf-dev_2.22.1-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.26/glib_2.26.1-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.26/glib-dev_2.26.1-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+_2.22.1-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-dev_2.22.1-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.28/pango_1.28.3-1_win32.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.28/pango-dev_1.28.3-1_win32.zip
http://xchat-wdk.googlecode.com/files/Enchant-WDK%201.6.0-2%20x86.7z
http://xchat-wdk.googlecode.com/files/Lua-WDK%205.1.4-2-2%20x86.7z
http://xchat-wdk.googlecode.com/files/OpenSSL-WDK%201.0.0d%20x86.7z
http://xchat-wdk.googlecode.com/files/myspell-20101001.7z
http://xchat-wdk.googlecode.com/files/gettext-tools-0.17-msgfmt.zip

View File

@ -0,0 +1,13 @@
@echo off
set WDK_ROOT=c:\WinDDK\7600.16385.1
set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt;%WDK_ROOT%\inc\api\crt\stl70
set LIB=%WDK_ROOT%\lib\wnet\amd64;%WDK_ROOT%\lib\Crt\amd64
set OPATH=%PATH%
set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin\amd64;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin\x64
nmake -f makefile.mak clean
nmake -f makefile.mak X64=1 DLL=1 MFLAGS=-MD GLIBDIR=..\glib-x64\include\glib-2.0
echo.Press return when ready to install!
pause
set PATH=%OPATH%
call release-x64.bat
pause

View File

@ -0,0 +1,13 @@
@echo off
set WDK_ROOT=c:\WinDDK\7600.16385.1
set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt;%WDK_ROOT%\inc\api\crt\stl70
set LIB=%WDK_ROOT%\lib\wxp\i386;%WDK_ROOT%\lib\Crt\i386
set OPATH=%PATH%
set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin;%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\Common7\IDE
nmake -f makefile.mak clean
nmake -f makefile.mak DLL=1 MFLAGS=-MD GLIBDIR=..\glib-x86\include\glib-2.0
echo.Press return when ready to install!
pause
set PATH=%OPATH%
call release-x86.bat
pause

View File

@ -0,0 +1,15 @@
#include <sys/types.h>
#ifndef SSIZE_T_DEFINED
#ifdef ssize_t
#undef ssize_t
#endif
#ifdef _WIN64
typedef __int64 ssize_t;
#else
typedef _W64 int ssize_t;
#endif
#define SSIZE_T_DEFINED
#endif
#define ENCHANT_VERSION_STRING "1.6.0"

View File

@ -0,0 +1,29 @@
#include <winver.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,6,0,2
PRODUCTVERSION 1,6,0,0
FILEFLAGSMASK 0
FILEFLAGS 0
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "none"
VALUE "FileDescription", "libenchant"
VALUE "FileVersion", "1.6.0.2"
VALUE "InternalName", "libenchant"
VALUE "OriginalFilename", "libenchant.dll"
VALUE "ProductName", "libenchant"
VALUE "ProductVersion", "1.6.0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@ -0,0 +1,588 @@
# -*- Makefile -*- for libenchant
#
# WDK fixes by Berke Viktor, 2010
#
# This makefile targets the Microsoft Visual C++ platform and is intended to build the enchant library along with its executables and test programs.
# It was written by Tolon (alex@tolon.co.uk). He thinks it was originally based on an MSVC makefile from glib, but can't quite remember.
# Tolon surrenders all rights regarding this file to the enchant project (http://www.abisource.com/enchant).
# Please direct any comments, bug-fixes, etc. to alex@tolon.co.uk.
#
# Example of my usage of this makefile with MSVC9:
# NMAKE -f Makefile.msvc DLL=1 PREFIX=C:\usr-msvc9 GLIBDIR=D:\dev\lib\glib
#
# Example of my usage of this makefile with MSVC6:
# NMAKE -f Makefile.msvc DLL=1 PREFIX=C:\usr-msvc6 GLIBDIR=D:\dev\lib\glib MANIFEST=0
#
# This makefile expects glib-2.0.lib and gmodule-2.0.lib to be available in the $(PREFIX)\lib folder.
ENCHANT_MAJOR_VERSION=1
ENCHANT_MINOR_VERSION=6
ENCHANT_MICRO_VERSION=0
BUILDNUMBER=0
ENCHANT_VERSION="$(ENCHANT_MAJOR_VERSION).$(ENCHANT_MINOR_VERSION).$(ENCHANT_MICRO_VERSION)"
#### Start of system configuration section. ####
# Flags that can be set on the nmake command line:
# DLL=1 for compiling a .dll with a stub .lib (default is a static .lib)
# Note that this works only with MFLAGS=-MD.
# MFLAGS={-ML|-MT|-MD} for defining the compilation model
# MFLAGS=-ML (the default) Single-threaded, statically linked - libc.lib
# MFLAGS=-MT Multi-threaded, statically linked - libcmt.lib
# MFLAGS=-MD Multi-threaded, dynamically linked - msvcrt.lib
# DEBUG=1 for compiling with debugging information
# PREFIX=Some\Directory Base directory for installation
# IIPREFIX=Some\\Directory Same thing with doubled backslashes
# GLIBDIR=Some\Directory Path to glib include directory
# MANIFEST=0 Disables embedding of manifest
!if !defined(DLL)
DLL=0
!endif
!if !defined(DEBUG)
DEBUG=0
!endif
!if !defined(MFLAGS)
!if !$(DLL)
MFLAGS=
!else
!if !$(DEBUG)
MFLAGS=-MD
!else
MFLAGS=-MDd
!endif
!endif
!endif
!if !defined(PREFIX)
PREFIX = c:\usr
!endif
!if !defined(IIPREFIX)
IIPREFIX = c:\\usr
!endif
!if !defined(MANIFEST)
MANIFEST=1
!endif
# Directories used by "make":
glibdir = $(GLIBDIR)
rootdir = .\..
topsrcdir = $(rootdir)\src
toptestdir = $(rootdir)\tests
bindir=$(rootdir)\bin
!if $(DEBUG)
outdir=$(rootdir)\bin\debug
!else
outdir=$(rootdir)\bin\release
!endif
objdir=$(outdir)\obj
pdbdir=$(outdir)\pdb
libdir=$(outdir)
# Directories used by "make install":
prefix = $(PREFIX)
exec_prefix = $(prefix)
#bindir = $(exec_prefix)\bin
#otherlibdir = $(exec_prefix)\lib
otherlibdir = $(GLIBDIR)\..\..\lib
includedir = $(prefix)\include
#datadir = $(prefix)\share
#localedir = $(datadir)\locale
#aliaspath =
#IIprefix = $(IIPREFIX)
#IIexec_prefix = $(IIprefix)
#IIbindir = $(IIexec_prefix)\\bin
#IIlibdir = $(IIexec_prefix)\\lib
#IIincludedir = $(IIprefix)\\include
#IIdatadir = $(IIprefix)\\share
#IIlocaledir = $(IIdatadir)\\locale
#IIaliaspath =
# Programs used by "make":
CC = cl
LINK = link
MT = mt
# Set to -W3 if you want to see maximum amount of warnings, including stupid
# ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
WARN_CFLAGS = -W1
!if $(DEBUG)
OPTIMFLAGS = -Od
!else
# Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
OPTIMFLAGS = -DNDEBUG -D_NDEBUG -Ox -MP2
!endif
OUTPUTFLAGS = \
-Fo"$(objdir)\\"
WINFLAGS = \
-DWINDOWS \
-D_WINDOWS \
-DWIN32 \
-D_WIN32 \
-DUNICODE \
-D_UNICODE
DEBUGFLAGS = -Zi
EXCEPTIONFLAGS = -EHsc
CPPFLAGS = -D_STL70_ -D_STATIC_CPPLIB
CFLAGS = \
-FI "$(topsrcdir)\config.h" \
$(MFLAGS) \
$(WARN_CFLAGS) \
$(EXCEPTIONFLAGS) \
$(OPTIMFLAGS) \
$(CPPFLAGS) \
$(WINFLAGS) \
$(OUTPUTFLAGS)
INCLUDES = \
-I$(topsrcdir) \
-I$(rootdir) \
-I$(includedir) \
-I$(glibdir) \
-I$(glibdir)\glib \
-I$(glibdir)\gmodule \
-I$(glibdir)\..\..\lib\glib-2.0\include
!ifdef X64
LINKOBJ = msvcrt_win2003.obj
MACHINE_FLAG = X64
CFLAGS = $(CFLAGS) /favor:AMD64 /D_WIN64
!else
MACHINE_FLAG = X86
LINKOBJ = msvcrt_winxp.obj
!endif
LINKFLAGS = \
-INCREMENTAL:NO \
-MANIFEST \
-MANIFESTUAC:"level='asInvoker' uiAccess='false'" \
-PDB:$(pdbdir)\\ \
-MACHINE:$(MACHINE_FLAG) \
-OPT:REF \
-OPT:ICF \
-DEBUG \
$(LINKOBJ)
AR = lib
AR_FLAGS = /out:
LN = copy
RM = -del
# Programs used by "make install":
INSTALL = copy
INSTALL_PROGRAM = copy
INSTALL_DATA = copy
#### End of system configuration section. ####
SHELL = /bin/sh
CC_OBJ = $(CC) $(INCLUDES) $(CFLAGS) -c
CC_LINK = $(LINK) $(LINKFLAGS)
LINK_EXE = $(CC_LINK) /SUBSYSTEM:CONSOLE
LINK_DLL = $(CC_LINK) /DLL /SUBSYSTEM:WINDOWS
!if $(MANIFEST)
EMBED_MANIFEST = $(MT) /manifest $(outdir)\exe_name.manifest /outputresource:"$(outdir)\exe_name;1"
CLEAN_MANIFEST = $(RM) $(outdir)\exe_name.manifest
!else
EMBED_MANIFEST =
CLEAN_MANIFEST =
!endif
# test-enchantxx isn't part of all as it has problems on MSVC6.
all: makedirs libenchant libenchant_ispell libenchant_myspell enchant enchant_lsmod test-enchant
#all: makedirs libenchant libenchant_ispell enchant enchant_lsmod test-enchant
makedirs: force
-mkdir $(bindir)
-mkdir $(outdir)
-mkdir $(libdir)
-mkdir $(objdir)
-mkdir $(pdbdir)
################################################################################
#### ENCHANT ####
srcdir = $(toptestdir)
ENCHANT_EXE=$(outdir)\enchant.exe
ENCHANT_PDB=$(pdbdir)\enchant.pdb
ENCHANT_DEFINES = \
-D_CONSOLE \
-DVERSION=\"$(ENCHANT_VERSION)\"
ENCHANT_LIBS = \
$(otherlibdir)\glib-2.0.lib \
$(libdir)\libenchant.lib
ENCHANT_OBJECTS = \
$(objdir)\enchant-ispell.obj
$(objdir)\enchant-ispell.obj : $(srcdir)\enchant-ispell.c
$(CC_OBJ) $** $(ENCHANT_DEFINES)
enchant: $(ENCHANT_EXE)
$(ENCHANT_EXE): $(ENCHANT_OBJECTS)
$(LINK_EXE) $(ENCHANT_OBJECTS) $(ENCHANT_LIBS) -OUT:$(ENCHANT_EXE)
$(EMBED_MANIFEST:exe_name=enchant.exe)
$(CLEAN_MANIFEST:exe_name=enchant.exe)
enchant_clean:
$(RM) $(ENCHANT_OBJECTS) $(ENCHANT_EXE) $(ENCHANT_PDB)
################################################################################
#### ENCHANT-LSMOD ####
srcdir = $(toptestdir)
ENCHANT_LSMOD_EXE=$(outdir)\enchant-lsmod.exe
ENCHANT_LSMOD_PDB=$(pdbdir)\enchant-lsmod.pdb
ENCHANT_LSMOD_DEFINES = \
-D_CONSOLE \
-DVERSION=\"$(ENCHANT_VERSION)\"
ENCHANT_LSMOD_LIBS = \
$(otherlibdir)\glib-2.0.lib \
$(libdir)\libenchant.lib
ENCHANT_LSMOD_OBJECTS = \
$(objdir)\enchant-lsmod.obj
$(objdir)\enchant-lsmod.obj : $(srcdir)\enchant-lsmod.c
$(CC_OBJ) $** $(ENCHANT_LSMOD_DEFINES)
enchant_lsmod: $(ENCHANT_LSMOD_EXE)
$(ENCHANT_LSMOD_EXE): $(ENCHANT_LSMOD_OBJECTS)
$(LINK_EXE) $(ENCHANT_LSMOD_OBJECTS) $(ENCHANT_LSMOD_LIBS) -OUT:$(ENCHANT_LSMOD_EXE)
$(EMBED_MANIFEST:exe_name=enchant-lsmod.exe)
$(CLEAN_MANIFEST:exe_name=enchant-lsmod.exe)
enchant_lsmod_clean:
$(RM) $(ENCHANT_LSMOD_OBJECTS) $(ENCHANT_LSMOD_EXE) $(ENCHANT_LSMOD_PDB)
################################################################################
#### TEST-ENCHANT ####
srcdir = $(toptestdir)
TEST_ENCHANT_EXE=$(outdir)\test-enchant.exe
TEST_ENCHANT_PDB=$(pdbdir)\test-enchant.pdb
TEST_ENCHANT_DEFINES = \
-D_CONSOLE \
-DVERSION=\"$(ENCHANT_VERSION)\"
TEST_ENCHANT_LIBS = \
$(otherlibdir)\glib-2.0.lib \
$(libdir)\libenchant.lib
TEST_ENCHANT_OBJECTS = \
$(objdir)\test-enchant.obj
$(objdir)\test-enchant.obj : $(srcdir)\test-enchant.c
$(CC_OBJ) $** $(TEST_ENCHANT_DEFINES)
test-enchant: $(TEST_ENCHANT_EXE)
$(TEST_ENCHANT_EXE): $(TEST_ENCHANT_OBJECTS)
$(LINK_EXE) $(TEST_ENCHANT_OBJECTS) $(TEST_ENCHANT_LIBS) -OUT:$(TEST_ENCHANT_EXE)
$(EMBED_MANIFEST:exe_name=test-enchant.exe)
$(CLEAN_MANIFEST:exe_name=test-enchant.exe)
test-enchant_clean:
$(RM) $(TEST_ENCHANT_OBJECTS) $(TEST_ENCHANT_EXE) $(TEST_ENCHANT_PDB)
################################################################################
#### TEST-ENCHANTXX ####
srcdir = $(toptestdir)
TEST_ENCHANTXX_EXE=$(outdir)\test-enchantxx.exe
TEST_ENCHANTXX_PDB=$(pdbdir)\test-enchantxx.pdb
TEST_ENCHANTXX_DEFINES = \
-D_CONSOLE \
-DVERSION=\"$(ENCHANT_VERSION)\"
TEST_ENCHANTXX_LIBS = \
$(otherlibdir)\glib-2.0.lib \
$(libdir)\libenchant.lib
TEST_ENCHANTXX_OBJECTS = \
$(objdir)\test-enchantxx.obj
$(objdir)\test-enchantxx.obj : $(srcdir)\test-enchantxx.cpp
$(CC_OBJ) $** $(TEST_ENCHANTXX_DEFINES)
test-enchantxx: $(TEST_ENCHANTXX_EXE)
$(TEST_ENCHANTXX_EXE): $(TEST_ENCHANTXX_OBJECTS)
$(LINK_EXE) $(TEST_ENCHANTXX_OBJECTS) $(TEST_ENCHANTXX_LIBS) -OUT:$(TEST_ENCHANTXX_EXE)
$(EMBED_MANIFEST:exe_name=test-enchantxx.exe)
$(CLEAN_MANIFEST:exe_name=test-enchantxx.exe)
test-enchantxx_clean:
$(RM) $(TEST_ENCHANTXX_OBJECTS) $(TEST_ENCHANTXX_EXE) $(TEST_ENCHANTXX_PDB)
################################################################################
#### LIBENCHANT ####
srcdir = $(topsrcdir)
LIBENCHANT_DEFINES = \
-D_ENCHANT_BUILD=1 \
-DWINDLL
LIBENCHANT_DLL=$(outdir)\libenchant.dll
LIBENCHANT_LIB=$(outdir)\libenchant.lib
LIBENCHANT_PDB=$(pdbdir)\libenchant.pdb
LIBENCHANT_RES=$(srcdir)\libenchant.res
LIBENCHANT_RC=$(srcdir)\libenchant.rc
LIBENCHANT_LIBS = \
$(otherlibdir)\glib-2.0.lib \
$(otherlibdir)\gmodule-2.0.lib \
advapi32.lib
LIBENCHANT_OBJECTS = \
$(objdir)\enchant.obj \
$(objdir)\prefix.obj \
$(objdir)\pwl.obj
$(objdir)\pwl.obj : $(srcdir)\pwl.c
$(CC_OBJ) $** $(LIBENCHANT_DEFINES)
$(objdir)\prefix.obj : $(srcdir)\prefix.c
$(CC_OBJ) $** $(LIBENCHANT_DEFINES)
$(objdir)\enchant.obj : $(srcdir)\enchant.c
$(CC_OBJ) $** $(LIBENCHANT_DEFINES)
$(LIBENCHANT_RES) : $(LIBENCHANT_RC)
rc -Fo $(LIBENCHANT_RES) $(LIBENCHANT_RC)
!if !$(DLL)
libenchant: LIBENCHANT_LIB
libenchant_clean: libenchant_lib_clean
!else
libenchant: LIBENCHANT_DLL
libenchant_clean: libenchant_dll_clean
!endif
LIBENCHANT_LIB : $(LIBENCHANT_OBJECTS)
-$(RM) libenchant.lib
$(AR) $(AR_FLAGS)$(LIBENCHANT_LIB) $(LIBENCHANT_OBJECTS)
# libenchant.dll and libenchant.lib are created together.
LIBENCHANT_DLL : $(LIBENCHANT_OBJECTS) $(LIBENCHANT_RES)
$(LINK_DLL) $(LIBENCHANT_OBJECTS) $(LIBENCHANT_LIBS) $(LIBENCHANT_RES) -OUT:$(LIBENCHANT_DLL)
$(EMBED_MANIFEST:exe_name=libenchant.dll)
$(CLEAN_MANIFEST:exe_name=libenchant.dll)
libenchant_lib_clean:
$(RM) $(LIBENCHANT_OBJECTS) $(LIBENCHANT_LIB)
libenchant_dll_clean:
$(RM) $(LIBENCHANT_OBJECTS) $(LIBENCHANT_LIB) $(LIBENCHANT_DLL) $(LIBENCHANT_PDB) $(LIBENCHANT_RES) $(LIBENCHANT_RC)
################################################################################
#### LIBENCHANT_ISPELL ####
srcdir = $(topsrcdir)\ispell
LIBENCHANT_ISPELL_DEFINES = \
-D "_ENCHANT_BUILD=1" \
-D "ISPELL_PROVIDER_EXPORTS" \
-D_USRDLL \
-D_WINDLL
LIBENCHANT_ISPELL_DLL=$(outdir)\libenchant_ispell.dll
LIBENCHANT_ISPELL_LIB=$(libdir)\libenchant_ispell.lib
LIBENCHANT_ISPELL_PDB=$(pdbdir)\libenchant_ispell.pdb
LIBENCHANT_ISPELL_LIBS = \
$(otherlibdir)\glib-2.0.lib \
$(otherlibdir)\gmodule-2.0.lib \
$(libdir)\libenchant.lib \
advapi32.lib ntstc_msvcrt.lib
LIBENCHANT_ISPELL_OBJECTS = \
$(objdir)\correct.obj \
$(objdir)\good.obj \
$(objdir)\hash.obj \
$(objdir)\ispell_checker.obj \
$(objdir)\lookup.obj \
$(objdir)\makedent.obj \
$(objdir)\tgood.obj
!if !$(DLL)
libenchant_ispell: LIBENCHANT_ISPELL_LIB
libenchant_ispell_clean: libenchant_ispell_lib_clean
!else
libenchant_ispell: LIBENCHANT_ISPELL_DLL
libenchant_ispell_clean: libenchant_ispell_dll_clean
!endif
$(objdir)\correct.obj : $(srcdir)\correct.cpp
$(CC_OBJ) $** $(LIBENCHANT_ISPELL_DEFINES)
$(objdir)\good.obj : $(srcdir)\good.cpp
$(CC_OBJ) $** $(LIBENCHANT_ISPELL_DEFINES)
$(objdir)\hash.obj : $(srcdir)\hash.cpp
$(CC_OBJ) $** $(LIBENCHANT_ISPELL_DEFINES)
$(objdir)\ispell_checker.obj : $(srcdir)\ispell_checker.cpp
$(CC_OBJ) $** $(LIBENCHANT_ISPELL_DEFINES)
$(objdir)\lookup.obj : $(srcdir)\lookup.cpp
$(CC_OBJ) $** $(LIBENCHANT_ISPELL_DEFINES)
$(objdir)\makedent.obj : $(srcdir)\makedent.cpp
$(CC_OBJ) $** $(LIBENCHANT_ISPELL_DEFINES)
$(objdir)\tgood.obj : $(srcdir)\tgood.cpp
$(CC_OBJ) $** $(LIBENCHANT_ISPELL_DEFINES)
LIBENCHANT_ISPELL_LIB : $(LIBENCHANT_ISPELL_OBJECTS)
-$(RM) $(LIBENCHANT_ISPELL_LIB)
$(AR) $(AR_FLAGS)$(LIBENCHANT_ISPELL_LIB) $(LIBENCHANT_ISPELL_OBJECTS)
# libenchant_ispell.dll and libenchant_ispell.lib are created together.
LIBENCHANT_ISPELL_DLL : $(LIBENCHANT_ISPELL_OBJECTS)
$(LINK_DLL) $(LIBENCHANT_ISPELL_OBJECTS) $(LIBENCHANT_ISPELL_LIBS) -OUT:$(LIBENCHANT_ISPELL_DLL)
$(EMBED_MANIFEST:exe_name=libenchant_ispell.dll)
$(CLEAN_MANIFEST:exe_name=libenchant_ispell.dll)
libenchant_ispell_lib_clean:
$(RM) $(LIBENCHANT_ISPELL_OBJECTS) $(LIBENCHANT_ISPELL_LIB)
libenchant_ispell_dll_clean:
$(RM) $(LIBENCHANT_ISPELL_OBJECTS) $(LIBENCHANT_ISPELL_LIB) $(LIBENCHANT_ISPELL_DLL) $(LIBENCHANT_ISPELL_PDB)
################################################################################
#### LIBENCHANT_MYSPELL ####
srcdir = $(topsrcdir)\myspell
LIBENCHANT_MYSPELL_DEFINES = \
-D "HUNSPELL_STATIC" \
-D "_ENCHANT_BUILD=1" \
-D "_USRDLL" \
-D "MYSPELL_PROVIDER_EXPORTS" \
-D "_WINDLL"
LIBENCHANT_MYSPELL_DLL=$(outdir)\libenchant_myspell.dll
LIBENCHANT_MYSPELL_LIB=$(libdir)\libenchant_myspell.lib
LIBENCHANT_MYSPELL_PDB=$(pdbdir)\libenchant_myspell.pdb
LIBENCHANT_MYSPELL_LIBS = \
$(otherlibdir)\glib-2.0.lib \
$(otherlibdir)\gmodule-2.0.lib \
$(libdir)\libenchant.lib \
advapi32.lib ntstc_msvcrt.lib
LIBENCHANT_MYSPELL_OBJECTS = \
$(objdir)\affentry.obj \
$(objdir)\affixmgr.obj \
$(objdir)\dictmgr.obj \
$(objdir)\csutil.obj \
$(objdir)\utf_info.obj \
$(objdir)\hashmgr.obj \
$(objdir)\suggestmgr.obj \
$(objdir)\hunspell.obj \
$(objdir)\filemgr.obj \
$(objdir)\phonet.obj \
$(objdir)\hunzip.obj \
$(objdir)\myspell_checker.obj
!if !$(DLL)
libenchant_myspell: LIBENCHANT_MYSPELL_LIB
libenchant_myspell_clean: libenchant_myspell_lib_clean
!else
libenchant_myspell: LIBENCHANT_MYSPELL_DLL
libenchant_myspell_clean: libenchant_myspell_dll_clean
!endif
$(objdir)\affentry.obj : $(srcdir)\affentry.cxx
$(CC_OBJ) $** $(LIBENCHANT_MYSPELL_DEFINES)
$(objdir)\affixmgr.obj : $(srcdir)\affixmgr.cxx
$(CC_OBJ) $** $(LIBENCHANT_MYSPELL_DEFINES)
$(objdir)\dictmgr.obj : $(srcdir)\dictmgr.cxx
$(CC_OBJ) $** $(LIBENCHANT_MYSPELL_DEFINES)
$(objdir)\csutil.obj : $(srcdir)\csutil.cxx
$(CC_OBJ) $** $(LIBENCHANT_MYSPELL_DEFINES)
$(objdir)\utf_info.obj : $(srcdir)\utf_info.cxx
$(CC_OBJ) $** $(LIBENCHANT_MYSPELL_DEFINES)
$(objdir)\hashmgr.obj : $(srcdir)\hashmgr.cxx
$(CC_OBJ) $** $(LIBENCHANT_MYSPELL_DEFINES)
$(objdir)\suggestmgr.obj : $(srcdir)\suggestmgr.cxx
$(CC_OBJ) $** $(LIBENCHANT_MYSPELL_DEFINES)
$(objdir)\hunspell.obj : $(srcdir)\hunspell.cxx
$(CC_OBJ) $** $(LIBENCHANT_MYSPELL_DEFINES)
$(objdir)\filemgr.obj : $(srcdir)\filemgr.cxx
$(CC_OBJ) $** $(LIBENCHANT_MYSPELL_DEFINES)
$(objdir)\phonet.obj : $(srcdir)\phonet.cxx
$(CC_OBJ) $** $(LIBENCHANT_MYSPELL_DEFINES)
$(objdir)\hunzip.obj : $(srcdir)\hunzip.cxx
$(CC_OBJ) $** $(LIBENCHANT_MYSPELL_DEFINES)
$(objdir)\myspell_checker.obj : $(srcdir)\myspell_checker.cpp
$(CC_OBJ) $** $(LIBENCHANT_MYSPELL_DEFINES)
LIBENCHANT_MYSPELL_LIB : $(LIBENCHANT_MYSPELL_OBJECTS)
-$(RM) $(LIBENCHANT_MYSPELL_LIB)
$(AR) $(AR_FLAGS)$(LIBENCHANT_MYSPELL_LIB) $(LIBENCHANT_MYSPELL_OBJECTS)
# libenchant_myspell.dll and libenchant_myspell.lib are created together.
LIBENCHANT_MYSPELL_DLL : $(LIBENCHANT_MYSPELL_OBJECTS)
$(LINK_DLL) $(LIBENCHANT_MYSPELL_OBJECTS) $(LIBENCHANT_MYSPELL_LIBS) -OUT:$(LIBENCHANT_MYSPELL_DLL)
$(EMBED_MANIFEST:exe_name=libenchant_myspell.dll)
$(CLEAN_MANIFEST:exe_name=libenchant_myspell.dll)
libenchant_myspell_lib_clean:
$(RM) $(LIBENCHANT_MYSPELL_OBJECTS) $(LIBENCHANT_MYSPELL_LIB)
libenchant_myspell_dll_clean:
$(RM) $(LIBENCHANT_MYSPELL_OBJECTS) $(LIBENCHANT_MYSPELL_LIB) $(LIBENCHANT_MYSPELL_DLL) $(LIBENCHANT_MYSPELL_PDB)
################################################################################
check : all
mostlyclean : clean
clean: libenchant_clean libenchant_ispell_clean libenchant_myspell_clean enchant_clean enchant_lsmod_clean test-enchant_clean test-enchantxx_clean
distclean : clean
maintainer-clean : distclean
force :

View File

@ -0,0 +1,20 @@
@echo off
set ENCHANT_DEST=..\..\enchant-wdk-1.6.0-x64
set RELEASE_DIR=..\bin\release
rmdir /q /s %ENCHANT_DEST%
mkdir %ENCHANT_DEST%
copy ..\COPYING.LIB %ENCHANT_DEST%\LICENSE.ENCHANT
xcopy /q /s /i %RELEASE_DIR%\enchant.exe %ENCHANT_DEST%\bin\
copy %RELEASE_DIR%\enchant-lsmod.exe %ENCHANT_DEST%\bin
copy %RELEASE_DIR%\libenchant.dll %ENCHANT_DEST%\bin
xcopy /q /s /i enchant.h %ENCHANT_DEST%\include\enchant\
copy "enchant++.h" %ENCHANT_DEST%\include\enchant\
copy enchant-provider.h %ENCHANT_DEST%\include\enchant\
xcopy /q /s /i %RELEASE_DIR%\libenchant_ispell.dll %ENCHANT_DEST%\lib\enchant\
copy %RELEASE_DIR%\libenchant_ispell.exp %ENCHANT_DEST%\lib\enchant\
copy %RELEASE_DIR%\libenchant_ispell.lib %ENCHANT_DEST%\lib\enchant\
copy %RELEASE_DIR%\libenchant_myspell.dll %ENCHANT_DEST%\lib\enchant\
copy %RELEASE_DIR%\libenchant_myspell.exp %ENCHANT_DEST%\lib\enchant\
copy %RELEASE_DIR%\libenchant_myspell.lib %ENCHANT_DEST%\lib\enchant\
copy %RELEASE_DIR%\libenchant.exp %ENCHANT_DEST%\lib
copy %RELEASE_DIR%\libenchant.lib %ENCHANT_DEST%\lib

View File

@ -0,0 +1,20 @@
@echo off
set ENCHANT_DEST=..\..\enchant-wdk-1.6.0-x86
set RELEASE_DIR=..\bin\release
rmdir /q /s %ENCHANT_DEST%
mkdir %ENCHANT_DEST%
copy ..\COPYING.LIB %ENCHANT_DEST%\LICENSE.ENCHANT
xcopy /q /s /i %RELEASE_DIR%\enchant.exe %ENCHANT_DEST%\bin\
copy %RELEASE_DIR%\enchant-lsmod.exe %ENCHANT_DEST%\bin
copy %RELEASE_DIR%\libenchant.dll %ENCHANT_DEST%\bin
xcopy /q /s /i enchant.h %ENCHANT_DEST%\include\enchant\
copy "enchant++.h" %ENCHANT_DEST%\include\enchant\
copy enchant-provider.h %ENCHANT_DEST%\include\enchant\
xcopy /q /s /i %RELEASE_DIR%\libenchant_ispell.dll %ENCHANT_DEST%\lib\enchant\
copy %RELEASE_DIR%\libenchant_ispell.exp %ENCHANT_DEST%\lib\enchant\
copy %RELEASE_DIR%\libenchant_ispell.lib %ENCHANT_DEST%\lib\enchant\
copy %RELEASE_DIR%\libenchant_myspell.dll %ENCHANT_DEST%\lib\enchant\
copy %RELEASE_DIR%\libenchant_myspell.exp %ENCHANT_DEST%\lib\enchant\
copy %RELEASE_DIR%\libenchant_myspell.lib %ENCHANT_DEST%\lib\enchant\
copy %RELEASE_DIR%\libenchant.exp %ENCHANT_DEST%\lib
copy %RELEASE_DIR%\libenchant.lib %ENCHANT_DEST%\lib

33
ext/lua-wdk/build-x64.bat Normal file
View File

@ -0,0 +1,33 @@
@echo off
set WDK_ROOT=c:\WinDDK\7600.16385.1
set OPATH=%PATH%
set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt;%WDK_ROOT%\inc\ddk
set LIB=%WDK_ROOT%\lib\wnet\amd64;%WDK_ROOT%\lib\Crt\amd64
set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin\amd64
set DEST=..\lua-wdk-5.1.4-2-x64
call etc\luavs-x64.bat
@echo off
echo.Press return when ready to install!
pause
set PATH=%OPATH%
rmdir /Q /S %DEST%
mkdir %DEST%
mkdir %DEST%\bin
mkdir %DEST%\lib
mkdir %DEST%\include
copy COPYRIGHT %DEST%\LICENSE.LUA
:: binaries and libraries
copy src\lua.exe %DEST%\bin
copy src\lua51.dll %DEST%\bin
copy src\lua51.exp %DEST%\bin
copy src\luac.exe %DEST%\bin
:: library
copy src\lua51.lib %DEST%\lib
:: api
copy src\lua.h %DEST%\include
copy src\luaconf.h %DEST%\include
copy src\lualib.h %DEST%\include
copy src\lauxlib.h %DEST%\include
copy etc\lua.hpp %DEST%\include
echo.Finished!
pause

33
ext/lua-wdk/build-x86.bat Normal file
View File

@ -0,0 +1,33 @@
@echo off
set WDK_ROOT=c:\WinDDK\7600.16385.1
set OPATH=%PATH%
set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt;%WDK_ROOT%\inc\ddk
set LIB=%WDK_ROOT%\lib\wxp\i386;%WDK_ROOT%\lib\Crt\i386
set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin;%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\Common7\IDE
set DEST=..\lua-wdk-5.1.4-2-x86
call etc\luavs.bat
@echo off
echo.Press return when ready to install!
pause
set PATH=%OPATH%
rmdir /Q /S %DEST%
mkdir %DEST%
mkdir %DEST%\bin
mkdir %DEST%\lib
mkdir %DEST%\include
copy COPYRIGHT %DEST%\LICENSE.LUA
:: binaries and libraries
copy src\lua.exe %DEST%\bin
copy src\lua51.dll %DEST%\bin
copy src\lua51.exp %DEST%\bin
copy src\luac.exe %DEST%\bin
:: library
copy src\lua51.lib %DEST%\lib
:: api
copy src\lua.h %DEST%\include
copy src\luaconf.h %DEST%\include
copy src\lualib.h %DEST%\include
copy src\lauxlib.h %DEST%\include
copy etc\lua.hpp %DEST%\include
echo.Finished!
pause

46
ext/lua-wdk/lua-wdk.patch Normal file
View File

@ -0,0 +1,46 @@
diff -ruN --strip-trailing-cr lua-5.1.4.orig/etc/luavs-x64.bat lua-5.1.4/etc/luavs-x64.bat
--- lua-5.1.4.orig/etc/luavs-x64.bat 1970-01-01 01:00:00 +0100
+++ lua-5.1.4/etc/luavs-x64.bat 2010-08-16 13:02:08 +0200
@@ -0,0 +1,28 @@
+@rem Script to build Lua under "Visual Studio .NET Command Prompt".
+@rem Do not run from this directory; run it from the toplevel: etc\luavs.bat .
+@rem It creates lua51.dll, lua51.lib, lua.exe, and luac.exe in src.
+@rem (contributed by David Manura and Mike Pall)
+
+@setlocal
+@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c
+@set MYLINK=link /nologo msvcrt_win2003.obj
+@set MYMT=mt /nologo
+
+cd src
+%MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c
+del lua.obj luac.obj
+%MYLINK% /DLL /out:lua51.dll l*.obj
+if exist lua51.dll.manifest^
+ %MYMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2
+%MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c
+%MYLINK% /out:lua.exe lua.obj lua51.lib
+if exist lua.exe.manifest^
+ %MYMT% -manifest lua.exe.manifest -outputresource:lua.exe
+%MYCOMPILE% l*.c print.c
+del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^
+ loslib.obj ltablib.obj lstrlib.obj loadlib.obj
+%MYLINK% /out:luac.exe *.obj
+if exist luac.exe.manifest^
+ %MYMT% -manifest luac.exe.manifest -outputresource:luac.exe
+del *.obj *.manifest
+cd ..
diff -ruN --strip-trailing-cr lua-5.1.4.orig/etc/luavs.bat lua-5.1.4/etc/luavs.bat
--- lua-5.1.4.orig/etc/luavs.bat 2008-01-20 17:40:10 +0100
+++ lua-5.1.4/etc/luavs.bat 2010-08-16 13:02:18 +0200
@@ -4,8 +4,8 @@
@rem (contributed by David Manura and Mike Pall)
@setlocal
-@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE
-@set MYLINK=link /nologo
+@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c
+@set MYLINK=link /nologo msvcrt_winxp.obj
@set MYMT=mt /nologo
cd src

13
ext/nss-wdk/build-x64.bat Normal file
View File

@ -0,0 +1,13 @@
@echo off
set WDK_ROOT=c:\WinDDK\7600.16385.1
set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt;%WDK_ROOT%\inc\ddk
set LIB=%WDK_ROOT%\lib\wnet\amd64;%WDK_ROOT%\lib\Crt\amd64
set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin\amd64;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin\x64;c:\mozilla-build\msys\bin;c:\mozilla-build\moztools-x64\bin
set BUILD_OPT=1
set USE_64=1
set WINDDK_BUILD=1
cd mozilla\security\nss
make nss_build_all
cd ..\..\..
echo.Finished!
pause

13
ext/nss-wdk/build-x86.bat Normal file
View File

@ -0,0 +1,13 @@
@echo off
set WDK_ROOT=c:\WinDDK\7600.16385.1
set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt
set LIB=%WDK_ROOT%\lib\wxp\i386;%WDK_ROOT%\lib\Crt\i386
set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin;%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\Common7\IDE;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin;c:\mozilla-build\msys\bin;c:\mozilla-build\moztools\bin
set BUILD_OPT=1
set USE_64=
set WINDDK_BUILD=1
cd mozilla\security\nss
make nss_build_all
cd ..\..\..
echo.Finished!
pause

273
ext/nss-wdk/nss-wdk.patch Normal file
View File

@ -0,0 +1,273 @@
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/dbm/include/mcom_db.h nss-3.12.9/mozilla/dbm/include/mcom_db.h
--- nss-3.12.9.orig/mozilla/dbm/include/mcom_db.h 2009-06-05 01:18:50 +0200
+++ nss-3.12.9/mozilla/dbm/include/mcom_db.h 2011-02-11 00:03:42 +0100
@@ -40,6 +40,15 @@
#define off_t long
#endif
+#ifdef WINDDK_BUILD
+#ifndef stat
+#define stat _stat
+#endif
+#ifndef getpid
+#define getpid GetCurrentProcessId
+#endif
+#endif
+
#ifndef macintosh
#include <sys/types.h>
#endif
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/dbm/src/mktemp.c nss-3.12.9/mozilla/dbm/src/mktemp.c
--- nss-3.12.9.orig/mozilla/dbm/src/mktemp.c 2009-06-05 01:19:32 +0200
+++ nss-3.12.9/mozilla/dbm/src/mktemp.c 2011-02-11 00:03:42 +0100
@@ -45,13 +45,13 @@
#include <ctype.h>
#include "mcom_db.h"
-#ifndef _WINDOWS
-#include <unistd.h>
-#endif
-
#ifdef _WINDOWS
+#ifndef WINDDK_BUILD
#include <process.h>
+#endif
#include "winfile.h"
+#else
+#include <unistd.h>
#endif
static int _gettemp(char *path, register int *doopen, int extraFlags);
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/nsprpub/config/config.mk nss-3.12.9/mozilla/nsprpub/config/config.mk
--- nss-3.12.9.orig/mozilla/nsprpub/config/config.mk 2010-07-09 04:10:34 +0200
+++ nss-3.12.9/mozilla/nsprpub/config/config.mk 2011-02-11 00:03:42 +0100
@@ -154,6 +154,15 @@
DEFINES += -DMOZ_UNICODE
endif
+ifdef WINDDK_BUILD
+OS_CFLAGS += -DWINDDK_BUILD
+ifdef USE_64
+OS_LIBS += msvcrt_win2003.obj
+else
+OS_LIBS += msvcrt_winxp.obj
+endif
+endif
+
####################################################################
#
# Configuration for the release process
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/nsprpub/pr/src/Makefile.in nss-3.12.9/mozilla/nsprpub/pr/src/Makefile.in
--- nss-3.12.9.orig/mozilla/nsprpub/pr/src/Makefile.in 2010-10-13 02:52:54 +0200
+++ nss-3.12.9/mozilla/nsprpub/pr/src/Makefile.in 2011-02-11 00:03:42 +0100
@@ -197,9 +197,17 @@
ifdef NS_USE_GCC
OS_LIBS = -ladvapi32 -lwsock32 -lwinmm
else
+ifdef WINDDK_BUILD
+ifdef USE_64
+OS_LIBS = advapi32.lib wsock32.lib winmm.lib msvcrt_win2003.obj
+else
+OS_LIBS = advapi32.lib wsock32.lib winmm.lib msvcrt_winxp.obj
+endif
+else
OS_LIBS = advapi32.lib wsock32.lib winmm.lib
endif
endif
+endif
ifeq ($(OS_ARCH),WINCE)
OS_LIBS = ws2.lib
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/nsprpub/pr/src/md/windows/ntmisc.c nss-3.12.9/mozilla/nsprpub/pr/src/md/windows/ntmisc.c
--- nss-3.12.9.orig/mozilla/nsprpub/pr/src/md/windows/ntmisc.c 2010-08-15 22:59:14 +0200
+++ nss-3.12.9/mozilla/nsprpub/pr/src/md/windows/ntmisc.c 2011-02-11 00:03:42 +0100
@@ -625,7 +625,11 @@
*/
hasFdInheritBuffer = (attr && attr->fdInheritBuffer);
if ((envp == NULL) && hasFdInheritBuffer) {
+#ifdef WINDDK_BUILD
+ envp = getenv;
+#else
envp = environ;
+#endif
}
if (envp != NULL) {
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/security/coreconf/WIN32.mk nss-3.12.9/mozilla/security/coreconf/WIN32.mk
--- nss-3.12.9.orig/mozilla/security/coreconf/WIN32.mk 2010-08-18 03:28:06 +0200
+++ nss-3.12.9/mozilla/security/coreconf/WIN32.mk 2011-02-11 00:03:42 +0100
@@ -145,6 +145,14 @@
else # !NS_USE_GCC
OS_CFLAGS += -W3 -nologo -D_CRT_SECURE_NO_WARNINGS
OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS
+ ifdef WINDDK_BUILD
+ OS_CFLAGS += -DWINDDK_BUILD
+ ifdef USE_64
+ OS_LIBS += msvcrt_win2003.obj
+ else
+ OS_LIBS += msvcrt_winxp.obj
+ endif
+ endif
ifeq ($(_MSC_VER),$(_MSC_VER_6))
ifndef MOZ_DEBUG_SYMBOLS
OS_DLLFLAGS += -PDB:NONE
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/security/coreconf/arch.mk nss-3.12.9/mozilla/security/coreconf/arch.mk
--- nss-3.12.9.orig/mozilla/security/coreconf/arch.mk 2009-06-05 04:14:50 +0200
+++ nss-3.12.9/mozilla/security/coreconf/arch.mk 2011-02-11 00:03:42 +0100
@@ -268,7 +268,15 @@
# the uname.exe in the MSYS toolkit.
#
ifeq (MINGW32_NT,$(findstring MINGW32_NT,$(OS_ARCH)))
- OS_RELEASE := $(patsubst MINGW32_NT-%,%,$(OS_ARCH))
+ ifdef WINDDK_BUILD
+ ifdef USE_64
+ OS_RELEASE := 5.2
+ else
+ OS_RELEASE := 5.1
+ endif
+ else
+ OS_RELEASE := $(patsubst MINGW32_NT-%,%,$(OS_ARCH))
+ endif
OS_ARCH = WINNT
USE_MSYS = 1
ifndef CPU_ARCH
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/security/nss/cmd/platlibs.mk nss-3.12.9/mozilla/security/nss/cmd/platlibs.mk
--- nss-3.12.9.orig/mozilla/security/nss/cmd/platlibs.mk 2010-06-12 02:58:34 +0200
+++ nss-3.12.9/mozilla/security/nss/cmd/platlibs.mk 2011-02-11 00:03:42 +0100
@@ -249,3 +249,11 @@
endif
JAR_LIBS = $(DIST)/lib/$(LIB_PREFIX)jar.$(LIB_SUFFIX)
+
+ifdef WINDDK_BUILD
+ifdef USE_64
+OS_LIBS += msvcrt_win2003.obj
+else
+OS_LIBS += msvcrt_winxp.obj
+endif
+endif
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/security/nss/cmd/selfserv/selfserv.c nss-3.12.9/mozilla/security/nss/cmd/selfserv/selfserv.c
--- nss-3.12.9.orig/mozilla/security/nss/cmd/selfserv/selfserv.c 2010-04-03 20:27:28 +0200
+++ nss-3.12.9/mozilla/security/nss/cmd/selfserv/selfserv.c 2011-02-11 00:03:42 +0100
@@ -51,8 +51,13 @@
#endif
#if defined(_WINDOWS)
+#ifdef WINDDK_BUILD
+#include <windows.h>
+#define getpid GetCurrentProcessId
+#else
#include <process.h> /* for getpid() */
#endif
+#endif
#include <signal.h>
#include <stdlib.h>
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/security/nss/lib/freebl/mpi/mpcpucache.c nss-3.12.9/mozilla/security/nss/lib/freebl/mpi/mpcpucache.c
--- nss-3.12.9.orig/mozilla/security/nss/lib/freebl/mpi/mpcpucache.c 2009-03-10 22:18:08 +0100
+++ nss-3.12.9/mozilla/security/nss/lib/freebl/mpi/mpcpucache.c 2011-02-11 00:03:42 +0100
@@ -80,7 +80,11 @@
#elif defined(_MSC_VER)
+#ifdef WINDDK_BUILD
+#include <ntddk.h>
+#else
#include <intrin.h>
+#endif
void freebl_cpuid(unsigned long op, unsigned long *eax,
unsigned long *ebx, unsigned long *ecx,
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/security/nss/lib/freebl/win_rand.c nss-3.12.9/mozilla/security/nss/lib/freebl/win_rand.c
--- nss-3.12.9.orig/mozilla/security/nss/lib/freebl/win_rand.c 2011-01-06 20:05:58 +0100
+++ nss-3.12.9/mozilla/security/nss/lib/freebl/win_rand.c 2011-02-11 00:03:42 +0100
@@ -50,6 +50,13 @@
#include <sys/types.h>
#include <sys/stat.h>
#endif
+
+#ifdef WINDDK_BUILD
+#ifndef stat
+#define stat _stat
+#endif
+#endif
+
#include <stdio.h>
#include "prio.h"
#include "prerror.h"
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/security/nss/lib/softoken/legacydb/config.mk nss-3.12.9/mozilla/security/nss/lib/softoken/legacydb/config.mk
--- nss-3.12.9.orig/mozilla/security/nss/lib/softoken/legacydb/config.mk 2009-06-11 02:55:50 +0200
+++ nss-3.12.9/mozilla/security/nss/lib/softoken/legacydb/config.mk 2011-02-11 00:03:42 +0100
@@ -96,3 +96,11 @@
ifeq ($(OS_TARGET),WINCE)
DEFINES += -DDBM_USING_NSPR
endif
+
+ifdef WINDDK_BUILD
+ifdef USE_64
+OS_LIBS += msvcrt_win2003.obj
+else
+OS_LIBS += msvcrt_winxp.obj
+endif
+endif
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/security/nss/lib/sqlite/sqlite3.c nss-3.12.9/mozilla/security/nss/lib/sqlite/sqlite3.c
--- nss-3.12.9.orig/mozilla/security/nss/lib/sqlite/sqlite3.c 2010-01-08 06:42:38 +0100
+++ nss-3.12.9/mozilla/security/nss/lib/sqlite/sqlite3.c 2011-02-11 00:03:42 +0100
@@ -10980,7 +10980,8 @@
** localtime_s().
*/
#if !defined(HAVE_LOCALTIME_R) && !defined(HAVE_LOCALTIME_S) && \
- defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE)
+ defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE) && \
+ !defined(WINDDK_BUILD)
#define HAVE_LOCALTIME_S 1
#endif
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/security/nss/lib/ssl/sslimpl.h nss-3.12.9/mozilla/security/nss/lib/ssl/sslimpl.h
--- nss-3.12.9.orig/mozilla/security/nss/lib/ssl/sslimpl.h 2010-07-31 06:33:52 +0200
+++ nss-3.12.9/mozilla/security/nss/lib/ssl/sslimpl.h 2011-02-11 00:03:42 +0100
@@ -1624,8 +1624,13 @@
#elif defined(_WIN32_WCE)
#define SSL_GETPID GetCurrentProcessId
#elif defined(WIN32)
+#ifdef WINDDK_BUILD
+#include <windows.h>
+#define SSL_GETPID GetCurrentProcessId
+#else
extern int __cdecl _getpid(void);
#define SSL_GETPID _getpid
+#endif
#else
#define SSL_GETPID() 0
#endif
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/security/nss/lib/zlib/config.mk nss-3.12.9/mozilla/security/nss/lib/zlib/config.mk
--- nss-3.12.9.orig/mozilla/security/nss/lib/zlib/config.mk 2009-11-07 02:13:10 +0100
+++ nss-3.12.9/mozilla/security/nss/lib/zlib/config.mk 2011-02-11 00:03:42 +0100
@@ -46,3 +46,11 @@
PROGRAM =
EXTRA_LIBS = $(LIBRARY)
+
+ifdef WINDDK_BUILD
+ifdef USE_64
+OS_LIBS += msvcrt_win2003.obj
+else
+OS_LIBS += msvcrt_winxp.obj
+endif
+endif
diff -ruN --strip-trailing-cr nss-3.12.9.orig/mozilla/security/nss/lib/zlib/gzio.c nss-3.12.9/mozilla/security/nss/lib/zlib/gzio.c
--- nss-3.12.9.orig/mozilla/security/nss/lib/zlib/gzio.c 2009-11-07 02:13:10 +0100
+++ nss-3.12.9/mozilla/security/nss/lib/zlib/gzio.c 2011-02-11 00:03:42 +0100
@@ -11,6 +11,12 @@
#include "zutil.h"
+#ifdef WINDDK_BUILD
+#ifndef vsnprintf
+#define vsnprintf _vsnprintf
+#endif
+#endif
+
#ifdef NO_DEFLATE /* for compatibility with old definition */
# define NO_GZCOMPRESS
#endif

View File

@ -0,0 +1,30 @@
@echo off
set WDK_ROOT=c:\WinDDK\7600.16385.1
set PERL_PATH=c:\mozilla-build\perl-5.12-x64\bin
set NASM_PATH=c:\mozilla-build\nasm
set OPENSSL_DEST=..\openssl-wdk-1.0.0d-x64
set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt;%WDK_ROOT%\inc\ddk;ms;zlib-x64\include
set LIB=%WDK_ROOT%\lib\wnet\amd64;%WDK_ROOT%\lib\Crt\amd64;zlib-x64\lib
set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin\amd64;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin\x64;%PERL_PATH%;%NASM_PATH%;%SystemRoot%\System32;..\zlib-x64\bin
perl Configure VC-WIN64A enable-camellia zlib-dynamic --openssldir=./
call ms\do_win64a
nmake -f ms\ntdll.mak vclean
nmake -f ms\ntdll.mak
nmake -f ms\ntdll.mak test
perl mk-ca-bundle.pl -n
echo.Press return when ready to install!
pause
move include include-orig
nmake -f ms\ntdll.mak install
rmdir /q /s %OPENSSL_DEST%
mkdir %OPENSSL_DEST%
move bin %OPENSSL_DEST%
move include %OPENSSL_DEST%
move lib %OPENSSL_DEST%
mkdir %OPENSSL_DEST%\share
move openssl.cnf %OPENSSL_DEST%\share\openssl.cnf.example
move include-orig include
copy zlib-x64\bin\zlibwapi.dll %OPENSSL_DEST%\bin
move cert.pem %OPENSSL_DEST%\bin
echo.Finished!
pause

View File

@ -0,0 +1,31 @@
@echo off
set WDK_ROOT=c:\WinDDK\7600.16385.1
set PERL_PATH=c:\mozilla-build\perl-5.12-x86\bin
set NASM_PATH=c:\mozilla-build\nasm
set OPENSSL_DEST=..\openssl-wdk-1.0.0d-x86
set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt;%WDK_ROOT%\inc\ddk;ms;zlib-x86\include
set LIB=%WDK_ROOT%\lib\wxp\i386;%WDK_ROOT%\lib\Crt\i386;zlib-x86\lib
set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin;%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\Common7\IDE;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin;%PERL_PATH%;%NASM_PATH%;%SystemRoot%\System32;..\zlib-x86\bin
perl Configure VC-WIN32 enable-camellia zlib-dynamic --openssldir=./
call ms\do_nasm
@echo off
nmake -f ms\ntdll.mak vclean
nmake -f ms\ntdll.mak
nmake -f ms\ntdll.mak test
perl mk-ca-bundle.pl -n
echo.Press return when ready to install!
pause
move include include-orig
nmake -f ms\ntdll.mak install
rmdir /q /s %OPENSSL_DEST%
mkdir %OPENSSL_DEST%
move bin %OPENSSL_DEST%
move include %OPENSSL_DEST%
move lib %OPENSSL_DEST%
mkdir %OPENSSL_DEST%\share
move openssl.cnf %OPENSSL_DEST%\share\openssl.cnf.example
move include-orig include
copy zlib-x86\bin\zlibwapi.dll %OPENSSL_DEST%\bin
move cert.pem %OPENSSL_DEST%\bin
echo.Finished!
pause

22016
ext/openssl-wdk/certdata.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,195 @@
#!/usr/bin/perl -w
# ***************************************************************************
# * _ _ ____ _
# * Project ___| | | | _ \| |
# * / __| | | | |_) | |
# * | (__| |_| | _ <| |___
# * \___|\___/|_| \_\_____|
# *
# * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
# *
# * This software is licensed as described in the file COPYING, which
# * you should have received as part of this distribution. The terms
# * are also available at http://curl.haxx.se/docs/copyright.html.
# *
# * You may opt to use, copy, modify, merge, publish, distribute and/or sell
# * copies of the Software, and permit persons to whom the Software is
# * furnished to do so, under the terms of the COPYING file.
# *
# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# * KIND, either express or implied.
# *
# * $Id: mk-ca-bundle.pl,v 1.10 2008/02/15 00:41:54 gknauf Exp $
# ***************************************************************************
# This Perl script creates a fresh ca-bundle.crt file for use with libcurl.
# It downloads certdata.txt from Mozilla's source tree (see URL below),
# then parses certdata.txt and extracts CA Root Certificates into PEM format.
# These are then processed with the OpenSSL commandline tool to produce the
# final ca-bundle.crt file.
# The script is based on the parse-certs script written by Roland Krikava.
# This Perl script works on almost any platform since its only external
# dependency is the OpenSSL commandline tool for optional text listing.
# Hacked by Guenter Knauf.
#
# Hacked again by Cameron Kaiser to use cURL *instead* of LWP.
#
use Getopt::Std;
use MIME::Base64;
#use LWP::UserAgent;
use strict;
use vars qw($opt_b $opt_h $opt_i $opt_l $opt_n $opt_q $opt_t $opt_u $opt_v);
# more up-to-date revisions can always be found at http://hg.mozilla.org/mozilla-central/
# in the security/nss/lib/ckfw/builtins folder
my $url = 'http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1';
# If the OpenSSL commandline is not in search path you can configure it here!
my $openssl = 'openssl';
my $version = $1 if ('$Revision: 1.10 $' =~ /\s(\d+\.\d+)\s/);
getopts('bhilnqtuv');
if ($opt_i) {
print ("=" x 78 . "\n");
print "Script Version : $version\n";
print "Perl Version : $]\n";
print "Operating System Name : $^O\n";
print "Getopt::Std.pm Version : ${Getopt::Std::VERSION}\n";
print "MIME::Base64.pm Version : ${MIME::Base64::VERSION}\n";
# print "LWP::UserAgent.pm Version : ${LWP::UserAgent::VERSION}\n";
# print "LWP.pm Version : ${LWP::VERSION}\n";
print "This version uses cURL. As it should.\n";
print `curl --version`;
print ("=" x 78 . "\n");
}
$0 =~ s/\\/\//g;
$0 = substr($0, rindex($0, '/') + 1);
if ($opt_h) {
printf("Usage:\t%s [-b] [-i] [-l] [-n] [-q] [-t] [-u] [-v] [<outputfile>]\n", $0);
print "\t-b\tbackup an existing version of ca-bundle.crt\n";
print "\t-i\tprint version info about used modules\n";
print "\t-l\tprint license info about certdata.txt\n";
print "\t-n\tno download of certdata.txt (to use existing)\n";
print "\t-q\tbe really quiet (no progress output at all)\n";
print "\t-t\tinclude plain text listing of certificates\n";
print "\t-u\tunlink (remove) certdata.txt after processing\n";
print "\t-v\tbe verbose and print out processed CAs\n";
exit;
}
#my $crt = $ARGV[0] || 'ca-bundle.crt';
my $crt = $ARGV[0] || 'cert.pem';
my $txt = substr($url, rindex($url, '/') + 1);
$txt =~ s/\?.*//;
if (!$opt_n || !-e $txt) {
print "Downloading '$txt' ...\n" if (!$opt_q);
#my $ua = new LWP::UserAgent(agent => "$0/$version");
#my $req = new HTTP::Request('GET', $url);
#my $res = $ua->request($req);
#if ($res->is_success) {
# open(TXT,">$txt") or die "Couldn't open $txt: $!";
# print TXT $res->content . "\n";
# close(TXT) or die "Couldn't close $txt: $!";
#} else {
# die $res->status_line;
#}
system("curl $url > $txt");
}
if ($opt_b && -e $crt) {
my $bk = 1;
while (-e "$crt.~${bk}~") {
$bk++;
}
rename $crt, "$crt.~${bk}~";
}
my $format = $opt_t ? "plain text and " : "";
my $currentdate = scalar gmtime() . " UTC";
open(CRT,">$crt") or die "Couldn't open $crt: $!";
print CRT <<EOT;
##
## $crt -- Bundle of CA Root Certificates
##
## Converted at: ${currentdate}
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## '/mozilla/security/nss/lib/ckfw/builtins/certdata.txt'
##
## It contains the certificates in ${format}PEM format and therefore
## can be directly used with curl / libcurl / php_curl, or with
## an Apache+mod_ssl webserver for SSL client authentication.
## Just configure this file as the SSLCACertificateFile.
##
EOT
close(CRT) or die "Couldn't close $crt: $!";
print "Processing '$txt' ...\n" if (!$opt_q);
my $caname;
my $certnum = 0;
open(TXT,"$txt") or die "Couldn't open $txt: $!";
while (<TXT>) {
if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) {
open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
print CRT;
print if ($opt_l);
while (<TXT>) {
print CRT;
print if ($opt_l);
last if (/\*\*\*\*\* END LICENSE BLOCK \*\*\*\*\*/);
}
close(CRT) or die "Couldn't close $crt: $!";
}
next if /^#|^\s*$/;
chomp;
if (/^CVS_ID\s+\"(.*)\"/) {
open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
print CRT "# $1\n";
close(CRT) or die "Couldn't close $crt: $!";
}
if (/^CKA_LABEL\s+[A-Z0-9]+\s+\"(.*)\"/) {
$caname = $1;
}
if (/^CKA_VALUE MULTILINE_OCTAL/) {
my $data;
while (<TXT>) {
last if (/^END/);
chomp;
my @octets = split(/\\/);
shift @octets;
for (@octets) {
$data .= chr(oct);
}
}
my $pem = "-----BEGIN CERTIFICATE-----\n"
. MIME::Base64::encode($data)
. "-----END CERTIFICATE-----\n";
open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
print CRT "\n$caname\n";
print CRT ("=" x length($caname) . "\n");
if (!$opt_t) {
print CRT $pem;
}
close(CRT) or die "Couldn't close $crt: $!";
if ($opt_t) {
open(TMP, "|$openssl x509 -md5 -fingerprint -text -inform PEM >> $crt") or die "Couldn't open openssl pipe: $!";
print TMP $pem;
close(TMP) or die "Couldn't close openssl pipe: $!";
}
print "Parsing: $caname\n" if ($opt_v);
$certnum ++;
}
}
close(TXT) or die "Couldn't close $txt: $!";
unlink $txt if ($opt_u);
print "Done ($certnum CA certs processed).\n" if (!$opt_q);
exit;

View File

@ -0,0 +1,90 @@
diff -ruN --strip-trailing-cr openssl-1.0.0d.orig/Configure openssl-1.0.0d/Configure
--- openssl-1.0.0d.orig/Configure 2010-11-30 22:19:26 +0100
+++ openssl-1.0.0d/Configure 2011-03-28 04:16:11 +0200
@@ -491,12 +491,12 @@
#
# Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
"VC-WIN64I","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32",
-"VC-WIN64A","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32",
+"VC-WIN64A","cl:-W3 -MP -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32",
"debug-VC-WIN64I","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32",
"debug-VC-WIN64A","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32",
# x86 Win32 target defaults to ANSI API, if you want UNICODE, complement
# 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE'
-"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
+"VC-WIN32","cl:-W3 -WX -MP -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
# Unified CE target
"debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32",
diff -ruN --strip-trailing-cr openssl-1.0.0d.orig/crypto/comp/c_zlib.c openssl-1.0.0d/crypto/comp/c_zlib.c
--- openssl-1.0.0d.orig/crypto/comp/c_zlib.c 2010-01-13 18:46:00 +0100
+++ openssl-1.0.0d/crypto/comp/c_zlib.c 2011-03-28 04:44:35 +0200
@@ -346,8 +346,12 @@
if (!zlib_loaded)
{
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
+#ifdef ZLIB_DLL
zlib_dso = DSO_load(NULL, "ZLIB1", NULL, 0);
#else
+ zlib_dso = DSO_load(NULL, "ZLIBWAPI", NULL, 0);
+#endif
+#else
zlib_dso = DSO_load(NULL, "z", NULL, 0);
#endif
if (zlib_dso != NULL)
diff -ruN --strip-trailing-cr openssl-1.0.0d.orig/engines/e_aep.c openssl-1.0.0d/engines/e_aep.c
--- openssl-1.0.0d.orig/engines/e_aep.c 2010-11-18 22:59:42 +0100
+++ openssl-1.0.0d/engines/e_aep.c 2011-03-28 05:48:11 +0200
@@ -61,7 +61,12 @@
#include <sys/types.h>
#include <unistd.h>
#else
+#ifdef _MSC_VER
+#include <windows.h>
+#define _getpid GetCurrentProcessId
+#else
#include <process.h>
+#endif
typedef int pid_t;
#endif
diff -ruN --strip-trailing-cr openssl-1.0.0d.orig/util/pl/VC-32.pl openssl-1.0.0d/util/pl/VC-32.pl
--- openssl-1.0.0d.orig/util/pl/VC-32.pl 2010-09-13 18:28:34 +0200
+++ openssl-1.0.0d/util/pl/VC-32.pl 2011-03-28 04:53:44 +0200
@@ -11,7 +11,8 @@
$mkdir='$(PERL) util/mkdir-p.pl';
$rm='del /Q';
-$zlib_lib="zlib1.lib";
+#$zlib_lib="zlib1.lib";
+$zlib_lib="zlibwapi.lib";
# Santize -L options for ms link
$l_flags =~ s/-L("\[^"]+")/\/libpath:$1/g;
@@ -37,7 +38,7 @@
$lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
$opt_cflags=$f.' /Ox';
$dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
- $lflags="/nologo /subsystem:console /opt:ref";
+ $lflags="/nologo /subsystem:console /opt:ref msvcrt_win2003.obj";
*::perlasm_compile_target = sub {
my ($target,$source,$bname)=@_;
@@ -118,7 +119,7 @@
$lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
$opt_cflags=$f.' /Ox /O2 /Ob2';
$dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
- $lflags="/nologo /subsystem:console /opt:ref";
+ $lflags="/nologo /subsystem:console /opt:ref msvcrt_winxp.obj";
}
$mlflags='';
@@ -179,7 +180,7 @@
$lfile='/out:';
$shlib_ex_obj="";
-$app_ex_obj="setargv.obj" if ($FLAVOR !~ /CE/);
+$app_ex_obj="" if ($FLAVOR !~ /CE/);
if ($FLAVOR =~ /WIN64A/) {
if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) {
$asm='nasm -f win64 -DNEAR -Ox -g';

29
ext/zlib-wdk/LICENSE.ZLIB Normal file
View File

@ -0,0 +1,29 @@
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.3, July 18th, 2005
Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
The data format used by the zlib library is described by RFCs (Request for
Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
(zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
*/

View File

@ -0,0 +1,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>

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<None Include="install.props">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6064E3A9-3939-4937-A387-C09299FC2952}</ProjectGuid>
<RootNamespace>install</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="install.props" />
</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" />
<Import Project="install.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>x86\Install$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IntDir>x86\Install$(Configuration)\Tmp\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>x64\Install$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IntDir>x64\Install$(Configuration)\Tmp\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
<Command>$(ZlibDoInstall32)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
<Command>$(ZlibDoInstall64)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<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="install.props">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<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>{C52F9E7B-498A-42BE-8DB4-85A15694382A}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</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" />
<Import Project="install.props" />
</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" />
<Import Project="install.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;NO_MSCVER_FILE64_FUNC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(WDK32Dependencies);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)miniunz.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>%(WDK32LibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;NO_MSCVER_FILE64_FUNC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(WDK64Dependencies);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)miniunz.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalLibraryDirectories>%(WDK64LibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\minizip\miniunz.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="zlibvc.vcxproj">
<Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,22 @@
<?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>{048af943-022b-4db6-beeb-a54c34774ee2}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{c1d600d2-888f-4aea-b73e-8b0dd9befa0c}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{0844199a-966b-4f19-81db-1e0125e141b9}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\minizip\miniunz.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<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>{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</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" />
<Import Project="install.props" />
</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" />
<Import Project="install.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniZip$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniZip$(Configuration)\Tmp\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;NO_MSCVER_FILE64_FUNC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(WDK32Dependencies);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)minizip.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>%(WDK32LibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;NO_MSCVER_FILE64_FUNC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(WDK64Dependencies);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)minizip.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalLibraryDirectories>%(WDK64LibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\minizip\minizip.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="zlibvc.vcxproj">
<Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,22 @@
<?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>{c0419b40-bf50-40da-b153-ff74215b79de}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{bb87b070-735b-478e-92ce-7383abb2f36c}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{f46ab6a6-548f-43cb-ae96-681abb5bd5db}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\minizip\minizip.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<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>{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
<RootNamespace>testzlib</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</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" />
<Import Project="install.props" />
</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" />
<Import Project="install.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;NO_MSCVER_FILE64_FUNC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>%(WDK32Dependencies);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(WDK32LibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;WIN64;NO_MSCVER_FILE64_FUNC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
</ClCompile>
<Link>
<AdditionalDependencies>%(WDK64Dependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>%(WDK64LibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\adler32.c" />
<ClCompile Include="..\..\..\compress.c" />
<ClCompile Include="..\..\..\crc32.c" />
<ClCompile Include="..\..\..\deflate.c" />
<ClCompile Include="..\..\..\infback.c" />
<ClCompile Include="..\..\masmx64\inffas8664.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\inffast.c" />
<ClCompile Include="..\..\..\inflate.c" />
<ClCompile Include="..\..\..\inftrees.c" />
<ClCompile Include="..\..\testzlib\testzlib.c" />
<ClCompile Include="..\..\..\trees.c" />
<ClCompile Include="..\..\..\uncompr.c" />
<ClCompile Include="..\..\..\zutil.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,58 @@
<?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>{c1f6a2e3-5da5-4955-8653-310d3efe05a9}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{c2aaffdc-2c95-4d6f-8466-4bec5890af2c}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{c274fe07-05f2-461c-964b-f6341e4e7eb5}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\adler32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\compress.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\crc32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\deflate.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\infback.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\masmx64\inffas8664.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\inffast.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\inflate.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\inftrees.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\testzlib\testzlib.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\trees.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\uncompr.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\zutil.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<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>{C52F9E7B-498A-42BE-8DB4-85A15694366A}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</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" />
<Import Project="install.props" />
</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" />
<Import Project="install.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;NO_MSCVER_FILE64_FUNC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(WDK32Dependencies);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>%(WDK32LibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;NO_MSCVER_FILE64_FUNC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(WDK64Dependencies);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalLibraryDirectories>%(WDK64LibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\testzlib\testzlib.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="zlibvc.vcxproj">
<Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,22 @@
<?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>{fa61a89f-93fc-4c89-b29e-36224b7592f4}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{d4b85da0-2ba2-4934-b57f-e2584e3848ee}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{e573e075-00bd-4a7d-bd67-a8cc9bfc5aca}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\testzlib\testzlib.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

32
ext/zlib-wdk/zlib.rc Normal file
View File

@ -0,0 +1,32 @@
#include <windows.h>
#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION 1,2,5,0
PRODUCTVERSION 1,2,5,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0 // not used
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
//language ID = U.S. English, char set = Windows, Multilingual
BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.5\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlib.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
VALUE "LegalCopyright", "(C) 1995-2010 Jean-loup Gailly & Mark Adler\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1252
END
END

View File

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<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>{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</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" />
<Import Project="install.props" />
</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" />
<Import Project="install.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_WARNINGS;NO_MSCVER_FILE64_FUNC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<Culture>0x040c</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_WARNINGS;WIN64;NO_MSCVER_FILE64_FUNC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<Culture>0x040c</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\adler32.c" />
<ClCompile Include="..\..\..\compress.c" />
<ClCompile Include="..\..\..\crc32.c" />
<ClCompile Include="..\..\..\deflate.c" />
<ClCompile Include="..\..\..\gzclose.c" />
<ClCompile Include="..\..\..\gzlib.c" />
<ClCompile Include="..\..\..\gzread.c" />
<ClCompile Include="..\..\..\gzwrite.c" />
<ClCompile Include="..\..\..\infback.c" />
<ClCompile Include="..\..\masmx64\inffas8664.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\inffast.c" />
<ClCompile Include="..\..\..\inflate.c" />
<ClCompile Include="..\..\..\inftrees.c" />
<ClCompile Include="..\..\minizip\ioapi.c" />
<ClCompile Include="..\..\..\trees.c" />
<ClCompile Include="..\..\..\uncompr.c" />
<ClCompile Include="..\..\minizip\unzip.c" />
<ClCompile Include="..\..\minizip\zip.c" />
<ClCompile Include="..\..\..\zutil.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="zlib.rc" />
</ItemGroup>
<ItemGroup>
<None Include="zlibvc.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,77 @@
<?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>{174213f6-7f66-4ae8-a3a8-a1e0a1e6ffdd}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\adler32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\compress.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\crc32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\deflate.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\gzclose.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\gzlib.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\gzread.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\gzwrite.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\infback.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\masmx64\inffas8664.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\inffast.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\inflate.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\inftrees.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\minizip\ioapi.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\trees.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\uncompr.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\minizip\unzip.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\minizip\zip.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\zutil.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="zlib.rc">
<Filter>Source Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="zlibvc.def">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

130
ext/zlib-wdk/zlibvc.def Normal file
View File

@ -0,0 +1,130 @@
LIBRARY
; zlib data compression and ZIP file I/O library
VERSION 1.24
EXPORTS
adler32 @1
compress @2
crc32 @3
deflate @4
deflateCopy @5
deflateEnd @6
deflateInit2_ @7
deflateInit_ @8
deflateParams @9
deflateReset @10
deflateSetDictionary @11
gzclose @12
gzdopen @13
gzerror @14
gzflush @15
gzopen @16
gzread @17
gzwrite @18
inflate @19
inflateEnd @20
inflateInit2_ @21
inflateInit_ @22
inflateReset @23
inflateSetDictionary @24
inflateSync @25
uncompress @26
zlibVersion @27
gzprintf @28
gzputc @29
gzgetc @30
gzseek @31
gzrewind @32
gztell @33
gzeof @34
gzsetparams @35
zError @36
inflateSyncPoint @37
get_crc_table @38
compress2 @39
gzputs @40
gzgets @41
inflateCopy @42
inflateBackInit_ @43
inflateBack @44
inflateBackEnd @45
compressBound @46
deflateBound @47
gzclearerr @48
gzungetc @49
zlibCompileFlags @50
deflatePrime @51
unzOpen @61
unzClose @62
unzGetGlobalInfo @63
unzGetCurrentFileInfo @64
unzGoToFirstFile @65
unzGoToNextFile @66
unzOpenCurrentFile @67
unzReadCurrentFile @68
unzOpenCurrentFile3 @69
unztell @70
unzeof @71
unzCloseCurrentFile @72
unzGetGlobalComment @73
unzStringFileNameCompare @74
unzLocateFile @75
unzGetLocalExtrafield @76
unzOpen2 @77
unzOpenCurrentFile2 @78
unzOpenCurrentFilePassword @79
zipOpen @80
zipOpenNewFileInZip @81
zipWriteInFileInZip @82
zipCloseFileInZip @83
zipClose @84
zipOpenNewFileInZip2 @86
zipCloseFileInZipRaw @87
zipOpen2 @88
zipOpenNewFileInZip3 @89
unzGetFilePos @100
unzGoToFilePos @101
fill_win32_filefunc @110
; zlibwapi v1.2.4 added:
fill_win32_filefunc64 @111
fill_win32_filefunc64A @112
fill_win32_filefunc64W @113
unzOpen64 @120
unzOpen2_64 @121
unzGetGlobalInfo64 @122
unzGetCurrentFileInfo64 @124
unzGetCurrentFileZStreamPos64 @125
unztell64 @126
unzGetFilePos64 @127
unzGoToFilePos64 @128
zipOpen64 @130
zipOpen2_64 @131
zipOpenNewFileInZip64 @132
zipOpenNewFileInZip2_64 @133
zipOpenNewFileInZip3_64 @134
zipOpenNewFileInZip4_64 @135
zipCloseFileInZipRaw64 @136
; zlib1 v1.2.4 added:
adler32_combine @140
crc32_combine @142
deflateSetHeader @144
deflateTune @145
gzbuffer @146
gzclose_r @147
gzclose_w @148
gzdirect @149
gzoffset @150
inflateGetHeader @156
inflateMark @157
inflatePrime @158
inflateReset2 @159
inflateUndermine @160

62
ext/zlib-wdk/zlibvc.sln Normal file
View File

@ -0,0 +1,62 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcxproj", "{6064E3A9-3939-4937-A387-C09299FC2952}"
ProjectSection(ProjectDependencies) = postProject
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} = {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}
{C52F9E7B-498A-42BE-8DB4-85A15694366A} = {C52F9E7B-498A-42BE-8DB4-85A15694366A}
{C52F9E7B-498A-42BE-8DB4-85A15694382A} = {C52F9E7B-498A-42BE-8DB4-85A15694382A}
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B} = {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} = {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}
{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64
{6064E3A9-3939-4937-A387-C09299FC2952}.Release|Win32.ActiveCfg = Release|Win32
{6064E3A9-3939-4937-A387-C09299FC2952}.Release|Win32.Build.0 = Release|Win32
{6064E3A9-3939-4937-A387-C09299FC2952}.Release|x64.ActiveCfg = Release|x64
{6064E3A9-3939-4937-A387-C09299FC2952}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

199
ext/zlib-wdk/zlibvc.vcxproj Normal file
View File

@ -0,0 +1,199 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<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>{8FD826F8-3739-44E6-8CC8-997122E53B8D}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</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" />
<Import Project="install.props" />
</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" />
<Import Project="install.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;NO_MSCVER_FILE64_FUNC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
<AssemblerOutput>All</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x040c</Culture>
</ResourceCompile>
<Link>
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
<ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(OutDir)zlibwapi.map</MapFileName>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(WDK32Dependencies);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(WDK32LibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;NO_MSCVER_FILE64_FUNC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
<AssemblerOutput>All</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x040c</Culture>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
<ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(OutDir)zlibwapi.map</MapFileName>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(WDK64Dependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(WDK64LibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\adler32.c" />
<ClCompile Include="..\..\..\compress.c" />
<ClCompile Include="..\..\..\crc32.c" />
<ClCompile Include="..\..\..\deflate.c" />
<ClCompile Include="..\..\..\gzclose.c" />
<ClCompile Include="..\..\..\gzlib.c" />
<ClCompile Include="..\..\..\gzread.c" />
<ClCompile Include="..\..\..\gzwrite.c" />
<ClCompile Include="..\..\..\infback.c" />
<ClCompile Include="..\..\masmx64\inffas8664.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\inffast.c" />
<ClCompile Include="..\..\..\inflate.c" />
<ClCompile Include="..\..\..\inftrees.c" />
<ClCompile Include="..\..\minizip\ioapi.c" />
<ClCompile Include="..\..\minizip\iowin32.c" />
<ClCompile Include="..\..\..\trees.c" />
<ClCompile Include="..\..\..\uncompr.c" />
<ClCompile Include="..\..\minizip\unzip.c" />
<ClCompile Include="..\..\minizip\zip.c" />
<ClCompile Include="..\..\..\zutil.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="zlib.rc" />
</ItemGroup>
<ItemGroup>
<None Include="zlibvc.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\deflate.h" />
<ClInclude Include="..\..\..\infblock.h" />
<ClInclude Include="..\..\..\infcodes.h" />
<ClInclude Include="..\..\..\inffast.h" />
<ClInclude Include="..\..\..\inftrees.h" />
<ClInclude Include="..\..\..\infutil.h" />
<ClInclude Include="..\..\..\zconf.h" />
<ClInclude Include="..\..\..\zlib.h" />
<ClInclude Include="..\..\..\zutil.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,118 @@
<?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>{07934a85-8b61-443d-a0ee-b2eedb74f3cd}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{1d99675b-433d-4a21-9e50-ed4ab8b19762}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;fi;fd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{431c0958-fa71-44d0-9084-2d19d100c0cc}</UniqueIdentifier>
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\adler32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\compress.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\crc32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\deflate.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\gzclose.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\gzlib.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\gzread.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\gzwrite.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\infback.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\masmx64\inffas8664.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\inffast.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\inflate.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\inftrees.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\minizip\ioapi.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\minizip\iowin32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\trees.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\uncompr.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\minizip\unzip.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\minizip\zip.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\zutil.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="zlib.rc">
<Filter>Source Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="zlibvc.def">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\deflate.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\infblock.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\infcodes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\inffast.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\inftrees.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\infutil.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\zconf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\zlib.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\zutil.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

351
plugins/checksum/checksum.c Normal file
View File

@ -0,0 +1,351 @@
/* XChat-WDK
* Copyright (c) 2010-2011 Berke Viktor.
*
* Use of OpenSSL SHA256 interface: http://adamlamers.com/?p=5
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <openssl/sha.h>
#include "xchat-plugin.h"
#define BUFSIZE 32768
#define DEFAULT_MAX_HASH_SIZE 268435456 /* default size is 256 MB */
#define FILE_BUF_SIZE 512
#ifndef snprintf
#define snprintf _snprintf
#endif
#ifndef stat64
#define stat64 _stat64
#endif
static xchat_plugin *ph; /* plugin handle */
static int config_fail; /* variable for config availability */
static void
sha256_hash_string (unsigned char hash[SHA256_DIGEST_LENGTH], char outputBuffer[65])
{
int i;
for (i = 0; i < SHA256_DIGEST_LENGTH; i++)
{
sprintf (outputBuffer + (i * 2), "%02x", hash[i]);
}
outputBuffer[64] = 0;
}
static void
sha256 (char *string, char outputBuffer[65])
{
int i;
unsigned char hash[SHA256_DIGEST_LENGTH];
SHA256_CTX sha256;
SHA256_Init (&sha256);
SHA256_Update (&sha256, string, strlen (string));
SHA256_Final (hash, &sha256);
for (i = 0; i < SHA256_DIGEST_LENGTH; i++)
{
sprintf (outputBuffer + (i * 2), "%02x", hash[i]);
}
outputBuffer[64] = 0;
}
static int
sha256_file (char *path, char outputBuffer[65])
{
int bytesRead;
unsigned char *buffer;
unsigned char hash[SHA256_DIGEST_LENGTH];
SHA256_CTX sha256;
FILE *file = fopen (path, "rb");
if (!file)
{
return -534;
}
SHA256_Init (&sha256);
buffer = malloc (BUFSIZE);
bytesRead = 0;
if (!buffer)
{
return ENOMEM;
}
while ((bytesRead = fread (buffer, 1, BUFSIZE, file)))
{
SHA256_Update (&sha256, buffer, bytesRead);
}
SHA256_Final (hash, &sha256);
sha256_hash_string (hash, outputBuffer);
fclose (file);
free (buffer);
return 0;
}
static void
init ()
{
/* check whether the config file exists, if it doesn't, try to create it */
FILE * file_in;
FILE * file_out;
char buffer[FILE_BUF_SIZE];
config_fail = 0;
snprintf (buffer, sizeof (buffer), "%s/checksum.conf", xchat_get_info (ph, "xchatdirfs"));
if ((file_in = fopen (buffer, "r")) == NULL)
{
if ((file_out = fopen (buffer, "w")) == NULL)
{
config_fail = 1;
} else
{
fprintf (file_out, "%llu\n", (unsigned long long) DEFAULT_MAX_HASH_SIZE);
fclose (file_out);
}
} else
{
fclose (file_in);
}
/* nasty easter egg: if FILE_BUF_SIZE is set to 1024 and you build for x86, you can do fclose ()
at the end of init (), which is plain wrong as it will only work if fopen () != 0. */
}
static unsigned long long
get_max_hash_size ()
{
FILE * file_in;
char buffer[FILE_BUF_SIZE];
unsigned long long max_hash_size;
if (config_fail)
{
return (unsigned long long) DEFAULT_MAX_HASH_SIZE;
} else
{
snprintf (buffer, sizeof (buffer), "%s/checksum.conf", xchat_get_info (ph, "xchatdirfs"));
file_in = fopen (buffer, "r");
fscanf (file_in, "%llu", &max_hash_size);
fclose (file_in);
return max_hash_size;
}
}
static void
print_size ()
{
unsigned long long size;
char suffix[3];
size = get_max_hash_size ();
if (size >= 1073741824)
{
size /= 1073741824;
snprintf (suffix, sizeof (suffix), "GB");
} else if (size >= 1048576)
{
size /= 1048576;
snprintf (suffix, sizeof (suffix), "MB");
} else if (size >= 1024)
{
size /= 1024;
snprintf (suffix, sizeof (suffix), "kB");
} else
{
snprintf (suffix, sizeof (suffix), "B");
}
xchat_printf (ph, "File size limit for checksums: %llu %s\n", size, suffix);
}
static void
increase_max_hash_size ()
{
unsigned long long size;
FILE * file_out;
char buffer[FILE_BUF_SIZE];
if (config_fail)
{
xchat_printf (ph, "Config file is unavailable, falling back to the default value\n");
print_size ();
} else
{
size = get_max_hash_size ();
if (size <= ULLONG_MAX/2)
{
size *= 2;
}
snprintf (buffer, sizeof (buffer), "%s/checksum.conf", xchat_get_info (ph, "xchatdirfs"));
file_out = fopen (buffer, "w");
fprintf (file_out, "%llu\n", size);
fclose (file_out);
print_size ();
}
}
static void
decrease_max_hash_size ()
{
unsigned long long size;
FILE * file_out;
char buffer[FILE_BUF_SIZE];
if (config_fail)
{
xchat_printf (ph, "Config file is unavailable, falling back to the default value\n");
print_size ();
} else
{
size = get_max_hash_size ();
if (size >= 2)
{
size /= 2;
}
snprintf (buffer, sizeof (buffer), "%s/checksum.conf", xchat_get_info (ph, "xchatdirfs"));
file_out = fopen (buffer, "w");
fprintf (file_out, "%llu\n", size);
fclose (file_out);
print_size ();
}
}
static int
dccrecv_cb (char *word[], void *userdata)
{
int result;
struct stat64 buffer; /* buffer for storing file info */
char sum[65]; /* buffer for checksum */
result = stat64 (word[2], &buffer);
if (result == 0) /* stat returns 0 on success */
{
if (buffer.st_size <= get_max_hash_size ())
{
sha256_file (word[2], sum); /* word[2] is the full filename */
/* try to print the checksum in the privmsg tab of the sender */
xchat_set_context (ph, xchat_find_context (ph, NULL, word[3]));
xchat_printf (ph, "SHA-256 checksum for %s (local): %s\n", word[1], sum);
} else
{
xchat_set_context (ph, xchat_find_context (ph, NULL, word[3]));
xchat_printf (ph, "SHA-256 checksum for %s (local): (size limit reached, no checksum calculated, you can increase it with /CHECKSUM INC)\n", word[1]);
}
} else
{
xchat_printf (ph, "File access error\n");
}
return XCHAT_EAT_NONE;
}
static int
dccoffer_cb (char *word[], void *userdata)
{
int result;
struct stat64 buffer; /* buffer for storing file info */
char sum[65]; /* buffer for checksum */
result = stat64 (word[3], &buffer);
if (result == 0) /* stat returns 0 on success */
{
if (buffer.st_size <= get_max_hash_size ())
{
sha256_file (word[3], sum); /* word[3] is the full filename */
xchat_commandf (ph, "quote PRIVMSG %s :SHA-256 checksum for %s (remote): %s", word[2], word[1], sum);
} else
{
xchat_set_context (ph, xchat_find_context (ph, NULL, word[3]));
xchat_printf (ph, "quote PRIVMSG %s :SHA-256 checksum for %s (remote): (size limit reached, no checksum calculated)", word[2], word[1]);
}
} else
{
xchat_printf (ph, "File access error\n");
}
return XCHAT_EAT_NONE;
}
static void
checksum (char *word[], void *userdata)
{
if (!stricmp ("GET", word[2]))
{
print_size ();
} else if (!stricmp ("INC", word[2]))
{
increase_max_hash_size ();
} else if (!stricmp ("DEC", word[2]))
{
decrease_max_hash_size ();
} else
{
xchat_printf (ph, "Usage: /CHECKSUM GET|INC|DEC\n");
xchat_printf (ph, " GET - print the maximum file size to be hashed\n");
xchat_printf (ph, " INC - double the maximum file size to be hashed\n");
xchat_printf (ph, " DEC - halve the maximum file size to be hashed\n");
}
}
int
xchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
*plugin_name = "Checksum";
*plugin_desc = "Calculate checksum for DCC file transfers";
*plugin_version = "2.0";
init ();
xchat_hook_command (ph, "CHECKSUM", XCHAT_PRI_NORM, checksum, "Usage: /CHECKSUM GET|INC|DEC", 0);
xchat_hook_print (ph, "DCC RECV Complete", XCHAT_PRI_NORM, dccrecv_cb, NULL);
xchat_hook_print (ph, "DCC Offer", XCHAT_PRI_NORM, dccoffer_cb, NULL);
xchat_print (ph, "Checksum plugin loaded\n");
return 1;
}
int
xchat_plugin_deinit (void)
{
xchat_print (ph, "Checksum plugin unloaded\n");
return 1;
}

View File

@ -0,0 +1,18 @@
include "..\..\src\makeinc.mak"
all: checksum.obj checksum.def
link $(LDFLAGS) $(LIBS) /dll /out:xcchecksum.dll /def:checksum.def checksum.obj
checksum.def:
echo EXPORTS > checksum.def
echo xchat_plugin_init >> checksum.def
echo xchat_plugin_deinit >> checksum.def
checksum.obj: checksum.c makefile.mak
cl $(CFLAGS) /I.. checksum.c
clean:
del *.obj
del *.dll
del *.exp
del *.lib

502
plugins/ewc/COPYING Normal file
View File

@ -0,0 +1,502 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

231
plugins/ewc/ewc.c Normal file
View File

@ -0,0 +1,231 @@
/*
EasyWinampControl - A Winamp "What's playing" plugin for Xchat
Copyright (C) Yann HAMON & contributors
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "xchat-plugin.h"
#include <windows.h>
static xchat_plugin *ph; /* plugin handle */
static int enable = 1;
// For example, circularstrstr("winamp", "pwi", 3) would return 5 (the index of p)
int circularstrstr(char* a, char* b, int nb)
{
int equal = 1;
int length;
int pos=-1;
int i, j;
length = strlen(a);
for (i=0; i<length && pos == -1; ++i) {
equal = 1;
for (j=0; j<nb;j++) {
if (a[(i+j)%length] != b[j])
equal = 0;
}
if (equal == 1)
pos = i;
}
return pos;
}
void GetCurrentSongsName(HWND hwndWinamp, char* title, int titlesize)
{
int pos;
char *title2;
int i, j=0;
int length;
char *p;
GetWindowText(hwndWinamp, title, titlesize);
length = strlen(title);
if ((pos = circularstrstr(title, "- Winamp ***", 12)) != -1) {
// The option "scroll song title in taskbar" is on
title2 = (char*) malloc (titlesize*sizeof(char));
for (i=(pos+12)%length; i!=pos; i=(i+1)%length)
title2[j++] = title[i];
title2[j] = '\0';
p = title2;
while (p<title2+titlesize && *p != '.')
p++;
p+=2; // Delete the . and the following white space
strcpy(title, p);
free(title2);
}
else {
p = title;
while (p<title+titlesize && *p != '.')
p++;
p+=2; // Delete the . and the following white space
if (p<title+titlesize)
strncpy(title, p, titlesize-(p-title));
// Delete the trailing "- winamp"
p = title + titlesize - 1;
while (p>title && *p != '-') p--;
*p = '\0';
}
}
// Controlling winamp
static int wcmd_cb(char *word[], char *word_eol[], void *userdata)
{
// Everything's here : http://winamp.com/nsdn/winamp2x/dev/sdk/api.php
// The previous url seems dead, see http://forums.winamp.com/showthread.php?threadid=180297
HWND hwndWinamp = NULL;
if ((hwndWinamp = FindWindow("Winamp v1.x",NULL)) == NULL) {
xchat_print(ph, "Winamp's window not found - Is winamp really running?\n");
}
else {
if (strcmp(word[1], "") == 0)
xchat_print(ph, "Usage: wcmd [command]\n");
else if (strcmp(word[2], "next") == 0) {
xchat_print(ph, "Loading next song...\n");
SendMessage (hwndWinamp, WM_COMMAND, 40048, 0);
}
else if (strcmp(word[2], "prev") == 0) {
xchat_print(ph, "Loading previous song...\n");
SendMessage (hwndWinamp, WM_COMMAND, 40044, 0);
}
else if (strcmp(word[2], "play") == 0) {
xchat_print(ph, "Playin'...\n");
SendMessage (hwndWinamp, WM_COMMAND, 40045, 0);
}
else if (strcmp(word[2], "stop") == 0) {
xchat_print(ph, "Winamp stopped!...\n");
SendMessage (hwndWinamp, WM_COMMAND, 40047, 0);
}
else if (strcmp(word[2], "pause") == 0) {
SendMessage (hwndWinamp, WM_COMMAND, 40046, 0);
}
}
return XCHAT_EAT_ALL;
}
// Display current song
static int wp_cb(char *word[], char *word_eol[], void *userdata)
{
HWND hwndWinamp = NULL;
int bitrate, length, elapsed, minutes, seconds, eminutes, eseconds, samplerate, nbchannels;
char elapsedtime[7];
char totaltime[7];
char this_title[1024];
if ((hwndWinamp = FindWindow("Winamp v1.x",NULL)) == NULL)
xchat_print(ph, "Winamp's window not found - Is winamp really running?\n");
else {
//Winamp's running
// Seems buggy when winamp2's agent is running, and winamp not (or winamp3) -> crashes xchat.
SendMessage(hwndWinamp, WM_USER, (WPARAM)0, (LPARAM)125);
if ((samplerate = SendMessage(hwndWinamp, WM_USER, (WPARAM)0, (LPARAM)126)) == 0) {
xchat_print(ph, "Could not get current song's samplerate... !?\n");
return XCHAT_EAT_ALL;
}
if ((bitrate = SendMessage(hwndWinamp, WM_USER, (WPARAM)1, (LPARAM)126)) == 0) {
xchat_print(ph, "Could not get current song's bitrate... !?\n");
return XCHAT_EAT_ALL;
}
if ((nbchannels = SendMessage(hwndWinamp, WM_USER, (WPARAM)2, (LPARAM)126)) == 0) {
xchat_print(ph, "Could not get the number of channels... !?\n");
return XCHAT_EAT_ALL;
}
if ((length = SendMessage(hwndWinamp, WM_USER, (WPARAM)1, (LPARAM)105)) == 0) {
// Could be buggy when streaming audio or video, returned length is unexpected;
// How to detect is Winamp is streaming, and display ??:?? in that case?
xchat_print(ph, "Could not get current song's length... !?\n");
return XCHAT_EAT_ALL;
}
else {
minutes = length/60;
seconds = length%60;
if (seconds>9)
wsprintf(totaltime, "%d:%d", minutes, seconds);
else
wsprintf(totaltime, "%d:0%d", minutes, seconds);
}
if ((elapsed = SendMessage(hwndWinamp, WM_USER, (WPARAM)0, (LPARAM)105)) == 0) {
xchat_print(ph, "Could not get current song's elapsed time... !?\n");
return XCHAT_EAT_ALL;
}
else {
eminutes = (elapsed/1000)/60; /* kinda stupid sounding, but e is for elapsed */
eseconds = (elapsed/1000)%60;
if (eseconds>9)
wsprintf(elapsedtime, "%d:%d", eminutes, eseconds);
else
wsprintf(elapsedtime, "%d:0%d", eminutes, eseconds);
}
if ((bitrate = SendMessage(hwndWinamp, WM_USER, (WPARAM)1, (LPARAM)126)) == 0) {
xchat_print(ph, "Could not get current song's bitrate... !?\n");
return XCHAT_EAT_ALL;
}
GetCurrentSongsName(hwndWinamp, this_title, 1024);
xchat_commandf(ph, "dispcurrsong %d %d %d %s %s %s", samplerate, bitrate, nbchannels, elapsedtime, totaltime, this_title);
}
return XCHAT_EAT_ALL; /* eat this command so xchat and other plugins can't process it */
}
int xchat_plugin_init(xchat_plugin *plugin_handle,
char **plugin_name,
char **plugin_desc,
char **plugin_version,
char *arg)
{
/* we need to save this for use with any xchat_* functions */
ph = plugin_handle;
*plugin_name = "EasyWinampControl";
*plugin_desc = "Some commands to remotely control winamp";
*plugin_version = "1.2";
xchat_hook_command(ph, "wp", XCHAT_PRI_NORM, wp_cb,
"Usage: wp", 0);
xchat_hook_command(ph, "wcmd", XCHAT_PRI_NORM, wcmd_cb,
"Usage: wcmd [play|pause|stop|prev|next]", 0);
xchat_print(ph, "EasyWinampControl plugin loaded\n");
return 1; /* return 1 for success */
}
int xchat_plugin_deinit(void)
{
xchat_print(ph, "EasyWinampControl plugin unloaded\n");
return 1;
}

18
plugins/ewc/makefile.mak Normal file
View File

@ -0,0 +1,18 @@
include "..\..\src\makeinc.mak"
all: ewc.obj ewc.def
link $(LDFLAGS) $(LIBS) /dll /out:xcewc.dll /def:ewc.def ewc.obj
ewc.def:
echo EXPORTS > ewc.def
echo xchat_plugin_init >> ewc.def
echo xchat_plugin_deinit >> ewc.def
ewc.obj: ewc.c makefile.mak
cl $(CFLAGS) ewc.c
clean:
del *.obj
del *.dll
del *.exp
del *.lib

1882
plugins/lua/lua.c Normal file

File diff suppressed because it is too large Load Diff

20
plugins/lua/makefile.mak Normal file
View File

@ -0,0 +1,20 @@
include "..\..\src\makeinc.mak"
DIRENTLIB = ..\..\src\common\dirent.lib
all: lua.obj lua.def
link $(LDFLAGS) $(LIBS) /dll /out:xclua.dll $(LUALIB).lib $(DIRENTLIB) /def:lua.def lua.obj
lua.def:
echo EXPORTS > lua.def
echo xchat_plugin_init >> lua.def
echo xchat_plugin_deinit >> lua.def
lua.obj: lua.c makefile.mak
cl $(CFLAGS) /I.. /Dsnprintf=g_snprintf lua.c
clean:
del *.obj
del *.dll
del *.exp
del *.lib

66
plugins/makefile.mak Normal file
View File

@ -0,0 +1,66 @@
all:
@cd checksum
@-$(MAKE) /nologo /s /f makefile.mak $@
@cd ..\lua
@-$(MAKE) /nologo /s /f makefile.mak $@
@cd ..\mpcinfo
@-$(MAKE) /nologo /s /f makefile.mak $@
@cd ..\python
@-$(MAKE) /nologo /s /f makefile.mak $@
@cd ..\tcl
@-$(MAKE) /nologo /s /f makefile.mak $@
@cd ..\upd
@-$(MAKE) /nologo /s /f makefile.mak $@
# @cd ..\xdcc
# @-$(MAKE) /nologo /s /f makefile.mak $@
@cd ..\xtray
@-$(MAKE) /nologo /s /f makefile.mak $@
@cd ..\winamp
@-$(MAKE) /nologo /s /f makefile.mak $@
clean:
@del checksum\*.def
@del checksum\*.dll
@del checksum\*.exp
@del checksum\*.lib
@del checksum\*.obj
@del lua\*.def
@del lua\*.dll
@del lua\*.exp
@del lua\*.lib
@del lua\*.obj
@del mpcinfo\*.def
@del mpcinfo\*.dll
@del mpcinfo\*.exp
@del mpcinfo\*.lib
@del mpcinfo\*.obj
@del python\*.def
@del python\*.dll
@del python\*.exp
@del python\*.lib
@del python\*.obj
@del tcl\*.def
@del tcl\*.dll
@del tcl\*.exp
@del tcl\*.lib
@del tcl\*.obj
@del upd\*.def
@del upd\*.dll
@del upd\*.exp
@del upd\*.lib
@del upd\*.obj
# @del xdcc\*.def
# @del xdcc\*.dll
# @del xdcc\*.exp
# @del xdcc\*.lib
# @del xdcc\*.obj
@del xtray\*.def
@del xtray\*.dll
@del xtray\*.exp
@del xtray\*.lib
@del xtray\*.obj
@del winamp\*.def
@del winamp\*.dll
@del winamp\*.exp
@del winamp\*.lib
@del winamp\*.obj

167
plugins/mpcinfo/functions.c Normal file
View File

@ -0,0 +1,167 @@
/*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*
typedef int (*MYPROC)(HWND,HWND,char*,char*,BOOL,BOOL);
int dllProc(char *name, char *data){
HINSTANCE hinstLib;
hinstLib = LoadLibrary("mpcinfo");
//MYPROC proc;
int res;
if (hinstLib != NULL){
//proc = ;
if ((MYPROC) GetProcAddress(hinstLib, name)!=NULL){
res=(MYPROC)(NULL,NULL,data,NULL,TRUE,TRUE);
}
else{fprintf(stderr,"can't get proc: %s\n",name);res=-2;}
}
else{fprintf(stderr,"can't access dll\n");return -1;}
FreeLibrary(hinstLib);
return res;
}
*/
/*
int dllProc(char *name, char *data)
{
static HMODULE lib = NULL;
if (!lib)
{
lib = LoadLibraryA ("mpcinfo");
if (!lib)
{
return FALSE;
}
FreeLibrary (lib);
}
return TRUE;
}
*/
char *split(char *text, char seperator){
//if (DEBUG==1) putlog("splitting");
int i;int pos=-1;
for (i=0;i<strlen(text);i++){
if (text[i]==seperator){pos=i;i=strlen(text)+1;}
}
if (pos==-1) return text;
text[pos]=0;
return &(text[pos+1]);
}
int endsWith(char *text, char *suffix){
char *tmp=strstr(text,suffix);
if (tmp==NULL) return 0;
if (strlen(tmp)==strlen(suffix)) return 1;
return 0;
}
int inStr(char *s1, int sl1, char *s2){
//if (DEBUG==1) putlog("checking instr");
int i;int j;
for(i=0;i<sl1-strlen(s2);i++){
for (j=0;j<strlen(s2);j++){
if (s1[i+j]!=s2[j]) j=strlen(s2)+2;
}
if (j==strlen(s2)) return i;
}
return -1;
}
static char *subString(char *text, int first, int length, int spcKill){
//if (DEBUG==1) putlog("creating substring");
char *ret=(char*) calloc (length+1,sizeof(char)); //malloc(sizeof(char)*(length+1));
int i;
ret[length]=0;
for (i=0;i<length;i++){
ret[i]=text[i+first];
//if (ret[i]==0) ret[i]='0';
}
if (spcKill==1){
for (i=length-1;i>=0;i--){
if (ret[i]==32) ret[i]=0;
else i=-1;
}
}
//if (DEBUG==1) putlog("substring created");
return ret;
}
static char *substring(char *text, int first, int length){return subString(text,first,length,0);}
char *readLine(FILE *f){
//if (DEBUG==1) putlog("reading line from file");
char *buffer=(char*)calloc(1024,sizeof(char)); //malloc(sizeof(char)*1024);
int pos=0;
int cc=0;
while((cc!=EOF)&&(pos<1024)&&(cc!=10)){
cc=fgetc(f);
if ((cc!=10)&&(cc!=13)){
if (cc==EOF) buffer[pos]=0;
else buffer[pos]=(char)cc;pos++;
}
}
if (buffer[pos]==EOF) xchat_printf(ph,"EOF: %i\n",pos);
return buffer;
}
char *toUpper(char *text){
//if (DEBUG==1) putlog("converting text to upper case");
char *ret=(char*) calloc(strlen(text)+1,sizeof(char));
int i;
for (i=0;i<strlen(text);i++) ret[i]=toupper(text[i]);
ret[strlen(text)]=0;
//if (DEBUG==1) putlog("uc done");
return ret;
}
static char *str3cat(char *s1, char *s2, char *s3){
//if (DEBUG==1) putlog("cating 3 strings");
char *ret=(char*)calloc(strlen(s1)+strlen(s2)+strlen(s3)+1,sizeof(char));
strcpy(ret,s1);strcat(ret,s2);strcat(ret,s3);
ret[strlen(s1)+strlen(s2)+strlen(s3)]=0;
//if (DEBUG==1) putlog("strings cated");
return ret;
}
char *replace(char *text, char *from, char *to){
//if (DEBUG==1) putlog("replacing");
char *ret=(char*)calloc( strlen(text)+(strlen(to)-strlen(from)),sizeof(char));
char *left;
char *right;
int pos=inStr(text,strlen(text),from);
if (pos!=-1){
left=substring(text,0,pos);
right=substring(text,pos+strlen(from),strlen(text)-(pos+strlen(from)));
ret=str3cat(left,to,right);
return replace(ret,from,to);
}
//if (DEBUG==1) putlog("replaced");
return text;
}
char *intReplaceF(char *text, char *from, int to, char *form){
//if (DEBUG==1) putlog("replaceF");
char *buffer=(char*) calloc(16,sizeof(char));
sprintf(buffer,form,to);
//if (DEBUG==1) putlog("replaceF done");
return replace(text,from,buffer);
}
char *intReplace(char *text, char *from, int to){return intReplaceF(text,from,to,"%i");}

View File

@ -0,0 +1,18 @@
include "..\..\src\makeinc.mak"
all: mpcinfo.obj mpcinfo.def
link $(LDFLAGS) $(LIBS) /dll /out:xcmpcinfo.dll /def:mpcinfo.def mpcinfo.obj
mpcinfo.def:
echo EXPORTS > mpcinfo.def
echo xchat_plugin_init >> mpcinfo.def
echo xchat_plugin_deinit >> mpcinfo.def
mpcinfo.obj: mpcinfo.c makefile.mak
cl $(CFLAGS) $(GLIB) /I.. mpcinfo.c
clean:
del *.obj
del *.dll
del *.exp
del *.lib

361
plugins/mpcinfo/mp3Info.c Normal file
View File

@ -0,0 +1,361 @@
/*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//#include <stdio.h>
#include <sys/stat.h>
//#include "functions.c"
struct tagInfo{
int mode;
int cbr;
int bitrate;
unsigned int freq;
char *artist;
char *title;
char *album;
char *comment;
char *genre;
//int genre;
//int track;
};
static int RATES[2][3][15]={
{//mpeg2
{-1,8,16,24,32,64,80,56,64,128,160,112,128,256,320},//layer3 (V2)
{-1,32,48,56,64,80,96,112,128,160,192,224,256,320,384},//layer2 (V2)
{-1,32,64,96,128,160,192,224,256,288,320,352,384,416,448},//layer1 (V2)
},
{//mpeg1
{-1,32,40,48,56,64,80,96,112,128,160,192,224,256,320},//layer3 (V1)
{-1,32,48,56,64,80,96,112,128,160,192,224,256,320,384},//layer2 (V1)
{-1,32,64,96,128,160,192,224,256,288,320,352,384,416,448},//layer1 (V1)
}};
static int FREQS[2][4]={{22050,24000,16000,-1},{44100,48000,32000,-1}};
//static double FRATES[]={38.5,32.5,27.8,0.0};
static char GENRES[][50]={"Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge","Hip-Hop","Jazz","Metal",
"New Age","Oldies","Other","Pop","R&B","Rap","Reggae","Rock","Techno","Industrial",
"Alternative","Ska","Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient","Trip-Hop","Vocal","Jazz+Funk",
"Fusion","Trance","Classical","Instrumental","Acid","House","Game","Sound Clip","Gospel","Noise",
"AlternRock","Bass","Soul","Punk","Space","Meditative","Instrumental Pop","Instrumental Rock","Ethnic","Gothic",
"Darkwave","Techno-Industrial","Electronic","Pop-Folk","Eurodance","Dream","Southern Rock","Comedy","Cult","Gangsta",
"Top 40","Christian Rap","Pop/Funk","Jungle","Native American","Cabaret","New Wave","Psychadelic","Rave","Showtunes",
"Trailer","Lo-Fi","Tribal","Acid Punk","Acid Jazz","Polka","Retro","Musical","Rock & Roll","Hard Rock",
//################## END OF OFFICIAL ID3 TAGS, WINAMP TAGS BELOW ########################################
"Folk","Folk/Rock","National Folk","Swing","Fast Fusion","Bebob","Latin","Revival","Celtic","Bluegrass",
"Avantgarde","Gothic Rock","Progressive Rock","Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band","Chorus","Easy Listening","Acoustic",
"Humour","Speech","Chanson","Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus","Porn Groove",
"Satire","Slow Jam","Club","Tango","Samba","Folklore","Ballad","Poweer Ballad","Rhytmic Soul","Freestyle",
"Duet","Punk Rock","Drum Solo","A Capela","Euro-House","Dance Hall",
//################## FOUND AT http://en.wikipedia.org/wiki/ID3 ###########################################
"Goa","Drum & Bass","Club-House","Hardcore",
"Terror","Indie","BritPop","Negerpunk","Polsk Punk","Beat","Christian Gangsta Rap","Heavy Metal","Black Metal","Crossover",
"Contemporary Christian","Christian Rock","Merengue","Salsa","Thrash Metal","Anime","JPop","Synthpop"
};
static char MODES [][13]={"Stereo","Joint-Stereo","Dual-Channel","Mono"};
int iPow(int x, int y){return (int)(pow((double)x,(double) y));}
int str2int(char *text){
//if (DEBUG==1) putlog("converting string to int");
int i;
int ret=0;
for (i=1;i<=strlen(text);i++){
if ((text[strlen(text)-i]>57)||(text[strlen(text)-i]<48)){
xchat_printf(ph,"invalid char in string: %i",text[strlen(text)-i]);
return 255;
}
ret+=((int)text[strlen(text)-i]-48)*iPow(10,i-1);
}
//xchat_printf(ph, "str2int(%s)=%i",text,ret);
//if (DEBUG==1) putlog("int converted");
return ret;
}
/*
static int getSize(char *file){
//if (DEBUG==1) putlog("reading filesize");
struct stat info;
if (stat(file,&info)!=0) return -1;
return info.st_size;
}*/
/*
int inStr(char *s1, int sl1, char *s2){
//if (DEBUG==1) putlog("checking instr");
int i;int j;
for(i=0;i<sl1-strlen(s2);i++){
for (j=0;j<strlen(s2);j++){
if (s1[i+j]!=s2[j]) j=strlen(s2)+2;
}
if (j==strlen(s2)) return i;
}
return -1;
}
static char *subString(char *text, int first, int length, int spcKill){
//if (DEBUG==1) putlog("creating substring");
char *ret=(char*) calloc (length+1,sizeof(char)); //malloc(sizeof(char)*(length+1));
ret[length]=0;int i;
for (i=0;i<length;i++){
ret[i]=text[i+first];
//if (ret[i]==0) ret[i]='0';
}
if (spcKill==1){
for (i=length-1;i>=0;i--){
if (ret[i]==32) ret[i]=0;
else i=-1;
}
}
//if (DEBUG==1) putlog("substring created");
return ret;
}
static char *substring(char *text, int first, int length){return subString(text,first,length,0);} //1
*/
static char *tagExtract(char *tag, int tagLen, char* info){
//if (DEBUG==1) putlog("extracting tag");
int pos, len, i;
pos=inStr(tag,tagLen,info);
//xchat_printf(ph,"pos=%i",pos);
if (pos==-1) return "";//NULL;
//printf("position of %s = %i\n",info,pos);
len=0;
//for (i=pos;i<pos+10;i++)printf("tag[%i]=%i \n",i,tag[i]);
for (i=0;i<4;i++) {
len+=tag[pos+strlen(info)+i]*iPow(255,3-i);
}
//printf("Tag-Length: %i\n",len);
if (strcmp("COMM",info)!=0) return substring(tag,pos+7+strlen(info),len-1);//11
return substring(tag,pos+7+strlen(info),len-1);//11
//char *ct=substring(tag,pos+7+strlen(info),len-1);//11
//return substring(ct,strlen(ct)+1,len-1-strlen(ct)); //<-- do not understand, what i did here :(
}
struct tagInfo readID3V1(char *file){
//if (DEBUG==1) putlog("reading ID3V1");
FILE *f;
struct tagInfo ret;
int res, i, c, val;
char *tag;
char *id;
char *tmp;
tag = (char*) malloc(sizeof(char)*129);
ret.artist=NULL;
f=fopen(file,"rb");
if (f==NULL){
xchat_print(ph,"file not found while trying to read id3v1");
//if (DEBUG==1) putlog("file not found while trying to read id3v1");
return ret;
}
//int offset=getSize(file)-128;
res=fseek(f,-128,SEEK_END);
if (res!=0) {printf("seek failed\n");fclose(f);return ret;}
//long int pos=ftell(f);
//printf("position= %li\n",pos);
for (i=0;i<128;i++) {
c=fgetc(f);
if (c==EOF) {xchat_printf(ph,"read ID3V1 failed\n");fclose(f);return ret;}
tag[i]=(char)c;
}
fclose(f);
//printf("tag readed: \n");
id=substring(tag,0,3);
//printf("header: %s\n",id);
if (strcmp(id,"TAG")!=0){xchat_printf(ph,"no id3 v1 found\n");return ret;}
ret.title=subString(tag,3,30,1);
ret.artist=subString(tag,33,30,1);
ret.album=subString(tag,63,30,1);
ret.comment=subString(tag,97,30,1);
tmp=substring(tag,127,1);
//ret.genre=substring(tag,127,1);
val=(int)tmp[0];
if (val<0)val+=256;
//xchat_printf(ph, "tmp[0]=%i (%i)",val,tmp[0]);
if ((val<148)&&(val>=0))
ret.genre=GENRES[val];//#############changed
else {
ret.genre="unknown";
//xchat_printf(ph, "tmp[0]=%i (%i)",val,tmp[0]);
}
//xchat_printf(ph, "tmp: \"%s\" -> %i",tmp,tmp[0]);
//xchat_printf(ph,"genre \"%s\"",ret.genre);
//if (DEBUG==1) putlog("id3v1 extracted");
return ret;
}
char *extractID3Genre(char *tag){
//if (DEBUG==1) putlog("extracting id3 genre");
if (tag[strlen(tag)-1]==')'){
tag[strlen(tag)-1]=0;
tag=&tag[1];
return GENRES[str2int(tag)];
//return tag;
}
else{
int i;
//xchat_print(ph, "Using 2 criteria");
for (i=0;i<strlen(tag);i++){
if (tag[i]==')'){ tag=&tag[i]+1;return tag;}
//return tag;
}
}
return "[152] failed";
}
struct tagInfo readID3V2(char *file){
//if (DEBUG==1) putlog("reading id3v2");
FILE *f;
int i, c, len;
char header[10];
char *tag;
struct tagInfo ret;
f = fopen(file,"rb");
//xchat_printf(ph,"file :%s",file);
if (f==NULL)
{
xchat_print(ph,"file not found whilt trying to read ID3V2");
//if (DEBUG==1)putlog("file not found while trying to read ID3V2");
return ret;
}
ret.artist=NULL;
for (i=0;i<10;i++){
c=fgetc(f);
if (c==EOF){
//putlog("found eof while reading id3v2");
return ret;
}
header[i]=(char)c;
}
if (strstr(header,"ID3")==header){
//xchat_printf(ph,"found id3v2\n");
len=0;
for (i=6;i<10;i++) len+=(int)header[i]*iPow(256,9-i);
//char *tag=(char*)malloc(sizeof(char)*len);
tag=(char*) calloc(len,sizeof(char)); //malloc(sizeof(char)*len);
for (i=0;i<len;i++){c=fgetc(f);tag[i]=(char)c;}
//xchat_printf(ph,"tag length: %i\n",len);
//xchat_printf(ph,"tag: %s\n",tag);
fclose(f);
ret.comment=tagExtract(tag,len,"COMM");
//xchat_printf(ph,"Comment: %s\n",ret.comment);
ret.genre=tagExtract(tag,len,"TCON");
//if (strcmp(ret.genre,"(127)")==0) ret.genre="unknown";
//xchat_printf(ph, "ret.genre = %s",ret.genre);
if ((ret.genre!=NULL)&&(ret.genre[0]=='(')) ret.genre=extractID3Genre(ret.genre);
//xchat_printf(ph,"genre: %s\n",ret.genre);
ret.title=tagExtract(tag,len,"TIT2");
//xchat_printf(ph,"Title: %s\n",ret.title);
ret.album=tagExtract(tag,len,"TALB");
//xchat_printf(ph,"Album: %s\n",ret.album);
ret.artist=tagExtract(tag,len,"TPE1");
//xchat_printf(ph,"Artist: %s\n",ret.artist);
}
else{fclose(f);printf("no id3v2 tag found\n"); return ret;}
//printf("id2v2 done\n");
//if (DEBUG==1) putlog("id3v2 readed");
return ret;
}
struct tagInfo readHeader(char *file){
//if (DEBUG==1) putlog("reading header");
FILE *f;
//int buffer[5120];
int versionB, layerB, bitrateB, freqB, modeB;
int header[4];
int count=0;
int cc=0;
struct tagInfo info;
info.artist=NULL;
f = fopen(file,"rb");
if (f==NULL)
{
xchat_print(ph,"file not found while trying to read mp3 header");
//if (DEBUG==1) putlog("file not found while trying to read mp3 header");
return info;
}
//struct tagInfo tagv2
info=readID3V2(file);
//struct tagInfo tagv1;//=readID3V1(file);
//if (tagv2.artist!=NULL){info=tagv2;}
//else {
if (info.artist==NULL){
//printf("searching for id3v1\n");
//tagv1=readID3V1(file);
info=readID3V1(file); //#####################
}
/*
if (tagv1.artist!=NULL){
//printf("Artist: %s\nTitle: %s\nAlbum: %s\nComment: %s\nGenre: %s\n",tagv1.artist,tagv1.title,tagv1.album,tagv1.comment,tagv1.genre);
info=tagv1;
}
*/
while ((count<5120)&&(cc!=EOF)&&(cc!=255)) {cc=fgetc(f);count++;}
if ((cc==EOF)||(count==5119)) printf("no header found\n");
else {
//printf("located header at %i\n",count);
header[0]=255;
for (count=1;count<4;count++){
header[count]=fgetc(f);
//printf("header[%i]=%i\n",count,header[count]);
}
versionB=(header[1]&8)>>3;
layerB=(header[1]&6)>>1;
bitrateB=(header[2]&240)>>4; //4
freqB=(header[2]&12)>>2;//2
modeB=(header[3]&192)>>6;//6
//printf("Mpeg: %i\nLayer: %i\nBitrate: %i\nFreq: %i\nMode: %i\n",versionB, layerB, bitrateB, freqB, modeB);
//int Bitrate=RATES[versionB][layerB-1][bitrateB];
//int Freq=FREQS[versionB][freqB];
info.bitrate=RATES[versionB][layerB-1][bitrateB];
info.freq=FREQS[versionB][freqB];
info.mode=modeB;
}
fclose(f);
//if (DEBUG==1) putlog("header readed");
return info;
}
/*
static void printMp3Info(char *file){
//printf("\nScanning Mp3-File for Informations: %s\n",file);
//printf("size:\t%10d byte\n",getSize(file));
struct tagInfo info =readHeader(file);
printf("%s | %10d",file,getSize(file));
if (info.bitrate>0){
//printf("Bitrate: %i\nFreq: %i\nMode: %s\n",info.bitrate,info.freq,MODES[info.mode]);
printf(" | %i kbps | %i kHz | %s",info.bitrate,info.freq,MODES[info.mode]);
//if (info.artist!=NULL) printf("\nArtist: %s\nTitle: %s\nAlbum: %s\nComment: %s\nGenre: %s\n",info.artist,info.title,info.album,info.comment,info.genre);
if (info.artist!=NULL) {
printf("| %s | %s | %s | %s | %s",info.artist,info.title,info.album,info.comment,info.genre);
//printf("| %s ",info.title);//,info.title,info.album,info.comment,info.genre
}
}
printf("\n");
}
*/

149
plugins/mpcinfo/mpcInfo.c Normal file
View File

@ -0,0 +1,149 @@
/*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//static int DEBUG=0;
static char *VERSION="0.0.6";
#include <windows.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include "xchat-plugin.h"
static xchat_plugin *ph;
#include "functions.c"
#include "mp3Info.c"
#include "oggInfo.c"
#include "theme.c"
static int print_themes (char *word[], char *word_eol[], void *userdata){
printThemes();
return XCHAT_EAT_ALL;
}
static int mpc_themeReload(char *word[], char *word_eol[], void *userdata){
themeInit();
loadThemes();
return XCHAT_EAT_ALL;
}
static int mpc_tell(char *word[], char *word_eol[], void *userdata){
char *tTitle, *zero, *oggLine, *line;
struct tagInfo info;
HWND hwnd = FindWindow("MediaPlayerClassicW",NULL);
if (hwnd==0) {xchat_command(ph, randomLine(notRunTheme));return XCHAT_EAT_ALL;}
tTitle=(char*)malloc(sizeof(char)*1024);
GetWindowText(hwnd, tTitle, 1024);
zero=strstr(tTitle," - Media Player Classic");
if (zero!=NULL) zero[0]=0;
else xchat_print(ph,"pattern not found");
if ((tTitle[1]==':')&&(tTitle[2]=='\\')){
//xchat_print(ph,"seams to be full path");
if (endsWith(tTitle,".mp3")==1){
//xchat_print(ph,"seams to be a mp3 file");
info = readHeader(tTitle);
if ((info.artist!=NULL)&&(strcmp(info.artist,"")!=0)){
char *mode=MODES[info.mode];
//xchat_printf(ph,"mode: %s\n",mode);
char *mp3Line=randomLine(mp3Theme);
mp3Line=replace(mp3Line,"%art",info.artist);
mp3Line=replace(mp3Line,"%tit",info.title);
mp3Line=replace(mp3Line,"%alb",info.album);
mp3Line=replace(mp3Line,"%com",info.comment);
mp3Line=replace(mp3Line,"%gen",info.genre);
//mp3Line=replace(mp3Line,"%time",pos);
//mp3Line=replace(mp3Line,"%length",len);
//mp3Line=replace(mp3Line,"%ver",waVers);
//mp3Line=intReplace(mp3Line,"%br",br);
//mp3Line=intReplace(mp3Line,"%frq",frq);
mp3Line=intReplace(mp3Line,"%br",info.bitrate);
mp3Line=intReplace(mp3Line,"%frq",info.freq);
mp3Line=replace(mp3Line,"%mode",mode);
//mp3Line=replace(mp3Line,"%size",size);
//mp3Line=intReplace(mp3Line,"%perc",perc);
//mp3Line=replace(mp3Line,"%plTitle",title);
mp3Line=replace(mp3Line,"%file",tTitle);
xchat_command(ph, mp3Line);
return XCHAT_EAT_ALL;
}
}
if (endsWith(tTitle,".ogg")==1){
xchat_printf(ph,"Ogg detected\n");
info = getOggHeader(tTitle);
if (info.artist!=NULL){
char *cbr;
if (info.cbr==1) cbr="CBR"; else cbr="VBR";
oggLine=randomLine(oggTheme);
//if (cue==1) oggLine=cueLine;
//xchat_printf(ph,"ogg-line: %s\n",oggLine);
oggLine=replace(oggLine,"%art",info.artist);
oggLine=replace(oggLine,"%tit",info.title);
oggLine=replace(oggLine,"%alb",info.album);
oggLine=replace(oggLine,"%com",info.comment);
oggLine=replace(oggLine,"%gen",info.genre);
//oggLine=replace(oggLine,"%time",pos);
//oggLine=replace(oggLine,"%length",len);
//oggLine=replace(oggLine,"%ver",waVers);
oggLine=intReplace(oggLine,"%chan",info.mode);
oggLine=replace(oggLine,"%cbr",cbr);
oggLine=intReplace(oggLine,"%br",info.bitrate/1000);//br);
oggLine=intReplace(oggLine,"%frq",info.freq);
//oggLine=replace(oggLine,"%size",size);
//oggLine=intReplace(oggLine,"%perc",perc);
//oggLine=replace(oggLine,"%plTitle",title);
oggLine=replace(oggLine,"%file",tTitle);
xchat_command(ph, oggLine);
return XCHAT_EAT_ALL;
}
}
}
line=randomLine(titleTheme);
line=replace(line,"%title", tTitle);
xchat_command(ph,line);
return XCHAT_EAT_ALL;
}
int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg){
ph = plugin_handle;
*plugin_name = "mpcInfo";
*plugin_desc = "Information-Script for Media Player Classic";
*plugin_version=VERSION;
xchat_hook_command(ph, "mpc", XCHAT_PRI_NORM, mpc_tell,"no help text", 0);
xchat_hook_command(ph, "mpc_themes", XCHAT_PRI_NORM, print_themes,"no help text", 0);
xchat_hook_command(ph, "mpc_reloadthemes", XCHAT_PRI_NORM, mpc_themeReload,"no help text", 0);
xchat_command (ph, "MENU -ietc\\music.png ADD \"Window/Display Current Song (MPC)\" \"MPC\"");
themeInit();
loadThemes();
xchat_printf(ph, "%s %s plugin loaded\n",*plugin_name, VERSION);
return 1;
}
int
xchat_plugin_deinit (void)
{
xchat_command (ph, "MENU DEL \"Window/Display Current Song (MPC)\"");
xchat_print (ph, "mpcInfo plugin unloaded\n");
return 1;
}

122
plugins/mpcinfo/oggInfo.c Normal file
View File

@ -0,0 +1,122 @@
/*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
static int getOggInt(char *buff, int beg, int bytes){
//if (DEBUG==1) putlog("getOggInt");
int ret=0;
int i;
for (i=0;i<bytes;i++){
if (buff[i+beg]>=0) ret+=buff[i+beg]*iPow(256,i);else ret+=(256+buff[i+beg])*iPow(256,i);
//printf("[%i]=%i\n",i,buff[i+beg]);
}
return ret;
}
static char *upperStr(char *text){
//if (DEBUG==1) putlog("converting text to uc");
//printf("upperStr(%s)\n",text);
int i;
char *ret=(char*) malloc(sizeof(char)*(strlen(text)+1));
ret[strlen(text)]=0;
for (i=0;i<strlen(text);i++) ret[i]=toupper(text[i]);
//printf("Result: %s\n",ret);
return ret;
}
struct tagInfo getOggHeader(char *file){
//if (DEBUG==1) putlog("reading ogg header");
char header[4096];
int i, c;
int h1pos, h3pos, maxBr, nomBr, minBr, pos, count, tagLen;
char *sub;
char *name;
char *val;
char *HEADLOC1, *HEADLOC3, *HEADLOC5;
FILE *f;
struct tagInfo info;
info.artist=NULL;
f = fopen(file,"rb");
if (f==NULL){
xchat_print(ph,"file not found while trying to read ogg header");
//if (DEBUG==1) putlog("file not found while trying to read ogg header");
return info;
}
for (i=0;i<4095;i++) {c=fgetc(f);header[i]=(char)c;}
fclose(f);
HEADLOC1="_vorbis";
HEADLOC1[0]=1;
HEADLOC3="_vorbis";
HEADLOC3[0]=3;
HEADLOC5="_vorbis";
HEADLOC5[0]=5;
h1pos=inStr(header,4096,HEADLOC1);
h3pos=inStr(header,4096,HEADLOC3);
//int h5pos=inStr(header,4096,HEADLOC5); //not needed
//printf("loc1: %i\n",h1pos);printf("loc3: %i\n",h3pos);printf("loc5: %i\n",h5pos);
maxBr=getOggInt(header,h1pos+7+9,4);
nomBr=getOggInt(header,h1pos+7+13,4);
minBr=getOggInt(header,h1pos+7+17,4);
info.freq=getOggInt(header,h1pos+7+5,4);
info.mode=header[h1pos+7+4];
info.bitrate=nomBr;
if (((maxBr==nomBr)&&(nomBr=minBr))||((minBr==0)&&(maxBr==0))||((minBr=-1)&&(maxBr=-1)) )info.cbr=1;else info.cbr=0;
printf("bitrates: %i|%i|%i\n",maxBr,nomBr,minBr);
printf("freq: %i\n",info.freq);
pos=h3pos+7;
pos+=getOggInt(header,pos,4)+4;
count=getOggInt(header,pos,4);
//printf("tags: %i\n",count);
pos+=4;
info.artist=NULL;info.title=NULL;info.album=NULL;info.comment=NULL;info.genre=NULL;
for (i=0;i<count;i++){
tagLen=getOggInt(header,pos,4);
//printf("taglength: %i\n",tagLen);
sub=substring(header,pos+4,tagLen);
name=upperStr(substring(sub,0,inStr(sub,tagLen,"=")));
val=substring(sub,inStr(sub,tagLen,"=")+1,tagLen-inStr(sub,tagLen,"=")-1);
//printf("Tag: %s\n",sub);
//printf("Name: %s\n",name);
//printf("value: %s\n",val);
if (strcmp(name,"ARTIST")==0) info.artist=val;
if (strcmp(name,"TITLE")==0) info.title=val;
if (strcmp(name,"ALBUM")==0) info.album=val;
if (strcmp(name,"GENRE")==0) info.genre=val;
if (strcmp(name,"COMMENT")==0) info.comment=val;
pos+=4+tagLen;
}
if (info.artist==NULL) info.artist="";
if (info.album==NULL) info.album ="";
if (info.title==NULL) info.title="";
if (info.genre==NULL) info.genre="";
if (info.comment==NULL) info.comment="";
printf("Artist: %s\nTitle: %s\nAlbum: %s\n",info.artist,info.title, info.album);
printf("Genre: %s\nComment: %s\nMode: %i\nCBR: %i\n",info.genre,info.comment,info.mode,info.cbr);
//if (DEBUG==1) putlog("ogg header readed");
return info;
}
/*
void printOggInfo(char *file){
printf("Scanning Ogg-File for Informations: %s\n",file);
printf("size:\t%10d byte\n",getSize(file));
struct tagInfo info = getOggHeader(file);
}
*/

136
plugins/mpcinfo/theme.c Normal file
View File

@ -0,0 +1,136 @@
/*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <time.h>
struct theme{
int size;
char **line;
};
static struct theme notRunTheme;
static struct theme titleTheme;
static struct theme mp3Theme;
static struct theme oggTheme;
void themeInit(){
//if (DEBUG==1) putlog("init theme");
/*mp3Theme.size=0;oggTheme.size=0;cueTheme.size=0;streamTheme.size=0;etcTheme.size=0;
stopTheme.size=0;pauseTheme.size=0;*/
notRunTheme.size=0;titleTheme.size=0;
srand((unsigned int)time((time_t *)NULL));
//if (DEBUG==1) putlog("theme init done");
}
void printTheme(struct theme data){
int i;
for (i=0;i<data.size;i++) xchat_printf(ph,"line[%i]=%s\n",i,data.line[i]);
}
void printThemes(){
xchat_printf(ph,"\nNotRun-Theme:\n");printTheme(notRunTheme);
xchat_printf(ph,"\nMP3-Theme:\n");printTheme(mp3Theme);
xchat_printf(ph,"\nOGG-Theme:\n");printTheme(oggTheme);
xchat_printf(ph,"\nTitle-Theme:\n");printTheme(titleTheme);
}
void cbFix(char *line){
//if (DEBUG==1) putlog("cbfix");
int i, j;
for (i=0;i<strlen(line);i++){
if (line[i]=='%'){
if ((line[i+1]=='C')||(line[i+1]=='B')||(line[i+1]=='U')||(line[i+1]=='O')||(line[i+1]=='R')){
if(line[i+1]=='C') line[i]=3;
if(line[i+1]=='B') line[i]=2;
if(line[i+1]=='U') line[i]=37;
if(line[i+1]=='O') line[i]=17;
if(line[i+1]=='R') line[i]=26;
for (j=i+1;j<strlen(line)-1;j++) line[j]=line[j+1];
line[strlen(line)-1]=0;
}
}
}
//if (DEBUG==1) putlog("cbfix done");
}
struct theme themeAdd(struct theme data, char *info){
//if (DEBUG==1) putlog("adding theme");
struct theme ret;
char **newLine=(char **)calloc(data.size+1,sizeof(char*));
int i;
for (i=0;i<data.size;i++) newLine[i]=data.line[i];
cbFix(info);
newLine[data.size]=info;
ret.line=newLine;ret.size=data.size+1;
//if (DEBUG==1) putlog("theme added");
return ret;
}
void loadThemes(){
char *hDir, *hFile, *line, *val;
FILE *f;
xchat_print(ph,"loading themes\n");
hDir=(char*)calloc(1024,sizeof(char));
strcpy(hDir,xchat_get_info(ph,"xchatdirfs"));
hFile=str3cat(hDir,"\\","mpcInfo.theme.txt");
f = fopen(hFile,"r");
if(f==NULL)
{
xchat_print(ph,"no theme in homedir, checking global theme");
f=fopen("mpcInfo.theme.txt","r");
}
//xchat_printf(ph,"file_desc: %p\n",f);
if (f==NULL) xchat_print(ph, "no theme found, using hardcoded\n");
else {
if (f > 0)
{
line=" ";
} else
{
line="\0";
}
while (line[0]!=0)
{
line=readLine(f);
val=split(line,'=');
printf("line: %s\n",line);
printf("val: %s\n",val);
if (strcmp(toUpper(line),"OFF_LINE")==0) notRunTheme=themeAdd(notRunTheme,val);
if (strcmp(toUpper(line),"TITLE_LINE")==0) titleTheme=themeAdd(titleTheme,val);
if (strcmp(toUpper(line),"MP3_LINE")==0) mp3Theme=themeAdd(mp3Theme,val);
if (strcmp(toUpper(line),"OGG_LINE")==0) mp3Theme=themeAdd(oggTheme,val);
}
fclose(f);
xchat_print(ph, "theme loaded successfull\n");
}
if (notRunTheme.size==0) notRunTheme=themeAdd(notRunTheme,"say Media Player Classic not running");
if (titleTheme.size==0) titleTheme=themeAdd(titleTheme,"say Playing %title in Media Player Classic");
if (mp3Theme.size==0) mp3Theme=themeAdd(mp3Theme,"me listens to %art with %tit from %alb [%gen|%br kbps|%frq kHz|%mode] in Media Player Classic ");
if (oggTheme.size==0) oggTheme=themeAdd(oggTheme,"me listens to %art with %tit from %alb [%gen|%br kbps|%frq kHz|%chan channels] in Media Player Classic ");
//mp3Theme=themeAdd(mp3Theme,"me listens to %art with %tit from %alb [%time|%length|%perc%|%br kbps|%frq kHz|%mode] in Media Player Classic ");
}
int rnd(int max){
return rand()%max;
}
char *randomLine(struct theme data){
return data.line[rnd(data.size)];
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
@echo off
set PATH=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64
cd c:\mozilla-build\perl-5.12-x64\perl\lib\CORE
echo.Overwrite existing def file?
pause
dumpbin /exports ..\..\bin\perl512.dll > perl512.def
echo.Please adjust the resulting file manually, then hit return!
pause
lib /machine:x64 /def:perl512.def
pause

View File

@ -0,0 +1,10 @@
@echo off
set PATH=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
cd c:\mozilla-build\perl-5.12-x86\perl\lib\CORE
echo.Overwrite existing def file?
pause
dumpbin /exports ..\..\bin\perl512.dll > perl512.def
echo.Please adjust the resulting file manually, then hit return!
pause
lib /machine:x86 /def:perl512.def
pause

View File

@ -0,0 +1,30 @@
include "..\..\src\makeinc.mak"
DIRENTLIB = ..\..\src\common\dirent.lib
TARGET = $(PERL512OUTPUT)
all: $(TARGET)
perl.def:
echo EXPORTS > perl.def
echo xchat_plugin_init >> perl.def
echo xchat_plugin_deinit >> perl.def
echo xchat_plugin_get_info >> perl.def
perl.obj: perl.c
$(CC) $(CFLAGS) perl.c $(GLIB) /I$(PERL512PATH) /I.. /DPERL_DLL=\"$(PERL512LIB).dll\"
perl.c: xchat.pm.h
xchat.pm.h: lib/Xchat.pm lib/IRC.pm
perl.exe generate_header
$(TARGET): perl.obj perl.def
$(LINK) /DLL /out:$(TARGET) perl.obj $(LDFLAGS) $(PERL512LIB).lib /libpath:$(PERL512PATH) /delayload:$(PERL512LIB).dll $(DIRENTLIB) delayimp.lib user32.lib shell32.lib advapi32.lib /def:perl.def
clean:
@del $(TARGET)
@del *.obj
@del perl.def
@del *.lib
@del *.exp

View File

@ -0,0 +1,30 @@
include "..\..\src\makeinc.mak"
DIRENTLIB = ..\..\src\common\dirent.lib
TARGET = $(PERL514OUTPUT)
all: $(TARGET)
perl.def:
echo EXPORTS > perl.def
echo xchat_plugin_init >> perl.def
echo xchat_plugin_deinit >> perl.def
echo xchat_plugin_get_info >> perl.def
perl.obj: perl.c
$(CC) $(CFLAGS) perl.c $(GLIB) /I$(PERL514PATH) /I.. /DPERL_DLL=\"$(PERL514LIB).dll\"
perl.c: xchat.pm.h
xchat.pm.h: lib/Xchat.pm lib/IRC.pm
perl.exe generate_header
$(TARGET): perl.obj perl.def
$(LINK) /DLL /out:$(TARGET) perl.obj $(LDFLAGS) $(PERL514LIB).lib /libpath:$(PERL514PATH) /delayload:$(PERL514LIB).dll $(DIRENTLIB) delayimp.lib user32.lib shell32.lib advapi32.lib /def:perl.def
clean:
@del $(TARGET)
@del *.obj
@del perl.def
@del *.lib
@del *.exp

View File

@ -22,12 +22,15 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <dirent.h>
#ifdef ENABLE_NLS #ifdef ENABLE_NLS
#include <locale.h> #include <locale.h>
#endif #endif
#ifdef WIN32 #ifdef WIN32
#include <windows.h> #include <windows.h>
#define _INC_DIRENT
#include "../../src/common/dirent.h"
#else
#include <dirent.h>
#endif #endif
#undef PACKAGE #undef PACKAGE
@ -1342,7 +1345,11 @@ perl_load_file (char *filename)
if (GetLastError () == ERROR_BAD_EXE_FORMAT) if (GetLastError () == ERROR_BAD_EXE_FORMAT)
/* http://forum.xchat.org/viewtopic.php?t=3277 */ /* http://forum.xchat.org/viewtopic.php?t=3277 */
thread_mbox ("Cannot use this " PERL_DLL "\n\n" thread_mbox ("Cannot use this " PERL_DLL "\n\n"
#ifdef _WIN64
"64-bit ActivePerl is required.");
#else
"32-bit ActivePerl is required."); "32-bit ActivePerl is required.");
#endif
else { else {
/* a lot of people install this old version */ /* a lot of people install this old version */
lib = LoadLibraryA ("perl56.dll"); lib = LoadLibraryA ("perl56.dll");
@ -1357,7 +1364,7 @@ perl_load_file (char *filename)
thread_mbox ("Cannot open " PERL_DLL "\n\n" thread_mbox ("Cannot open " PERL_DLL "\n\n"
"You must have ActivePerl " PERL_REQUIRED_VERSION " installed in order to\n" "You must have ActivePerl " PERL_REQUIRED_VERSION " installed in order to\n"
"run perl scripts.\n\n" "run perl scripts.\n\n"
"http://www.activestate.com/ActivePerl/\n\n" "http://www.activestate.com/activeperl/downloads\n\n"
"Make sure perl's bin directory is in your PATH."); "Make sure perl's bin directory is in your PATH.");
} }
} }

View File

@ -0,0 +1,25 @@
include "..\..\src\makeinc.mak"
DIRENTLIB = ..\..\src\common\dirent.lib
TARGET = $(PYTHONOUTPUT)
all: $(TARGET)
python.def:
echo EXPORTS > python.def
echo xchat_plugin_init >> python.def
echo xchat_plugin_deinit >> python.def
echo xchat_plugin_get_info >> python.def
python.obj: python.c
$(CC) $(CFLAGS) /I.. /Dusleep=_sleep /DPATH_MAX=255 python.c $(GLIB) /I$(PYTHONPATH)\include /DPYTHON_DLL=\"$(PYTHONLIB).dll\"
$(TARGET): python.obj python.def
$(LINK) /dll /out:$(TARGET) $(LDFLAGS) python.obj /libpath:$(PYTHONPATH)\libs $(PYTHONLIB).lib $(DIRENTLIB) $(LIBS) /def:python.def
clean:
del $(TARGET)
del *.obj
del python.def
del *.lib
del *.exp

View File

@ -53,10 +53,10 @@
#include <glib.h> #include <glib.h>
#include <string.h> #include <string.h>
#include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
#include <dirent.h> #include "../../src/common/dirent.h"
#include "../../config.h"
#include "xchat-plugin.h" #include "xchat-plugin.h"
#include "Python.h" #include "Python.h"
@ -68,7 +68,7 @@
#ifdef WIN32 #ifdef WIN32
#undef WITH_THREAD /* Thread support locks up xchat on Win32. */ #undef WITH_THREAD /* Thread support locks up xchat on Win32. */
#define VERSION "0.8/2.4" /* Linked to python24.dll */ #define VERSION "0.8/2.7" /* Linked to python27.dll */
#else #else
#define VERSION "0.8" #define VERSION "0.8"
#endif #endif

22
plugins/tcl/makefile.mak Normal file
View File

@ -0,0 +1,22 @@
include "..\..\src\makeinc.mak"
TARGET = $(TCLOUTPUT)
all: $(TARGET)
tcl.def:
echo EXPORTS > tcl.def
echo xchat_plugin_init >> tcl.def
echo xchat_plugin_deinit >> tcl.def
echo xchat_plugin_get_info >> tcl.def
tclplugin.obj: tclplugin.c
$(CC) $(CFLAGS) /I.. tclplugin.c /I$(TCLPATH)\include /DTCL_DLL=\"$(TCLLIB).dll\"
$(TARGET): tclplugin.obj tcl.def
$(LINK) /dll /out:$(TARGET) $(LDFLAGS) tclplugin.obj /libpath:$(TCLPATH)\lib $(TCLLIB).lib /delayload:$(TCLLIB).dll delayimp.lib /def:tcl.def
clean:
del $(TARGET)
del *.obj
del tcl.def

View File

@ -32,8 +32,6 @@ static char RCSID[] = "$Id: tclplugin.c,v 1.64 2010/03/10 04:24:16 mooooooo Exp
#include <windows.h> #include <windows.h>
#define bzero(mem, sz) memset((mem), 0, (sz)) #define bzero(mem, sz) memset((mem), 0, (sz))
#define bcopy(src, dest, count) memmove((dest), (src), (count)) #define bcopy(src, dest, count) memmove((dest), (src), (count))
#else
#include <unistd.h>
#endif #endif
#include "xchat-plugin.h" #include "xchat-plugin.h"
@ -2221,7 +2219,7 @@ int xchat_plugin_init(xchat_plugin * plugin_handle, char **plugin_name, char **p
#ifdef WIN32 #ifdef WIN32
lib = LoadLibraryA(TCL_DLL); lib = LoadLibraryA(TCL_DLL);
if (!lib) { if (!lib) {
xchat_print(ph, "You must have ActiveTCL installed in order to run Tcl scripts.\n" "http://aspn.activestate.com/ASPN/Tcl/\n" "Make sure Tcl's bin directory is in your PATH.\n\n"); xchat_print(ph, "You must have ActiveTCL 8.5 installed in order to run Tcl scripts.\n" "http://www.activestate.com/activetcl/downloads\n" "Make sure Tcl's bin directory is in your PATH.\n\n");
return 0; return 0;
} }
FreeLibrary(lib); FreeLibrary(lib);

18
plugins/upd/makefile.mak Normal file
View File

@ -0,0 +1,18 @@
include "..\..\src\makeinc.mak"
all: upd.obj upd.def
link $(LDFLAGS) $(LIBS) /dll /out:xcupd.dll /def:upd.def upd.obj
upd.def:
echo EXPORTS > upd.def
echo xchat_plugin_init >> upd.def
echo xchat_plugin_deinit >> upd.def
upd.obj: upd.c makefile.mak
cl $(CFLAGS) $(GLIB) /I.. upd.c
clean:
del *.obj
del *.dll
del *.exp
del *.lib

111
plugins/upd/upd.c Normal file
View File

@ -0,0 +1,111 @@
/* XChat-WDK
* Copyright (c) 2010-2011 Berke Viktor.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <windows.h>
#include <wininet.h>
#include "xchat-plugin.h"
static xchat_plugin *ph; /* plugin handle */
static char*
check_version ()
{
HINTERNET hINet, hFile;
hINet = InternetOpen ("Update Checker", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
if (!hINet)
{
return "Unknown";
}
hFile = InternetOpenUrl (hINet, "http://xchat-wdk.googlecode.com/hg/version.txt?r=wdk", NULL, 0, 0, 0);
if (hFile)
{
static char buffer[1024];
DWORD dwRead;
while (InternetReadFile (hFile, buffer, 1023, &dwRead))
{
if (dwRead == 0)
{
break;
}
buffer[dwRead] = 0;
}
InternetCloseHandle (hFile);
return buffer;
}
InternetCloseHandle (hINet);
return "Unknown";
}
static void
print_version ()
{
char *version = check_version ();
if (strcmp (version, xchat_get_info (ph, "wdk_version")) == 0)
{
xchat_printf (ph, "You have the latest version of XChat-WDK installed!\n");
}
else if (strcmp (version, "Unknown") == 0)
{
xchat_printf (ph, "Unable to check for XChat-WDK updates!\n");
}
else
{
xchat_printf (ph, "An XChat-WDK update is available! You can download it from here:\nhttp://xchat-wdk.googlecode.com/files/XChat-WDK%%20%s.exe\n", version);
}
}
int
xchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
*plugin_name = "Update Checker";
*plugin_desc = "Plugin for checking for XChat-WDK updates";
*plugin_version = "1.3";
xchat_hook_command (ph, "UPDCHK", XCHAT_PRI_NORM, print_version, 0, 0);
xchat_command (ph, "MENU -ietc\\download.png ADD \"Help/Check for Updates\" \"UPDCHK\"");
xchat_print (ph, "Update Checker plugin loaded\n");
print_version ();
return 1; /* return 1 for success */
}
int
xchat_plugin_deinit (void)
{
xchat_command (ph, "MENU DEL \"Help/Check for updates\"");
xchat_print (ph, "Update Checker plugin unloaded\n");
return 1;
}

View File

@ -0,0 +1,18 @@
include "..\..\src\makeinc.mak"
all: winamp.obj winamp.def
link $(LDFLAGS) $(LIBS) /dll /out:xcwinamp.dll /def:winamp.def winamp.obj
winamp.def:
echo EXPORTS > winamp.def
echo xchat_plugin_init >> winamp.def
echo xchat_plugin_deinit >> winamp.def
winamp.obj: winamp.c makefile.mak
cl $(CFLAGS) /I.. winamp.c
clean:
del *.obj
del *.dll
del *.exp
del *.lib

189
plugins/winamp/winamp.c Normal file
View File

@ -0,0 +1,189 @@
/********************* 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 "xchat-plugin.h"
#define PLAYING 1
#define PAUSED 3
static xchat_plugin *ph; /* plugin handle */
BOOL winamp_found = FALSE;
int status = 0;
/* Slightly modified from X-Chat's log_escape_strcpy */
static char *
song_strcpy (char *dest, char *src)
{
while (*src)
{
*dest = *src;
dest++;
src++;
if (*src == '%')
{
dest[0] = '%';
dest++;
}
}
dest[0] = 0;
return dest - 1;
}
static int
winamp(char *word[], char *word_eol[], void *userdata)
{
char current_play[2048], *p;
char p_esc[2048];
char cur_esc[2048];
char truc[2048];
HWND hwndWinamp = FindWindow("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)
xchat_printf(ph, "Winamp: playing");
else
xchat_printf(ph, "Winamp: paused");
}
}
else
if (!stricmp("STOP", word[2]))
{
SendMessage(hwndWinamp, WM_COMMAND, 40047, 0);
xchat_printf(ph, "Winamp: stopped");
}
else
if (!stricmp("PLAY", word[2]))
{
SendMessage(hwndWinamp, WM_COMMAND, 40045, 0);
xchat_printf(ph, "Winamp: playing");
}
else
if (!stricmp("NEXT", word[2]))
{
SendMessage(hwndWinamp, WM_COMMAND, 40048, 0);
xchat_printf(ph, "Winamp: next playlist entry");
}
else
if (!stricmp("PREV", word[2]))
{
SendMessage(hwndWinamp, WM_COMMAND, 40044, 0);
xchat_printf(ph, "Winamp: previous playlist entry");
}
else
if (!stricmp("START", word[2]))
{
SendMessage(hwndWinamp, WM_COMMAND, 40154, 0);
xchat_printf(ph, "Winamp: playlist start");
}
else
if (!word_eol[2][0])
{
GetWindowText(hwndWinamp, current_play, sizeof(current_play));
if (strchr(current_play, '-'))
{
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;
p = strchr(current_play, '.') + 1;
song_strcpy(p_esc, p);
song_strcpy(cur_esc, current_play);
if (p)
{
sprintf(truc, "me is now playing:%s", p_esc);
}
else
{
sprintf(truc, "me is now playing:%s", cur_esc);
}
xchat_commandf(ph, truc);
}
else xchat_print(ph, "Winamp: Nothing being played.");
}
else
xchat_printf(ph, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START]\n");
}
}
else
{
xchat_print(ph, "Winamp not found.\n");
}
return XCHAT_EAT_ALL;
}
int
xchat_plugin_init(xchat_plugin *plugin_handle,
char **plugin_name,
char **plugin_desc,
char **plugin_version,
char *arg)
{
/* we need to save this for use with any xchat_* functions */
ph = plugin_handle;
*plugin_name = "Winamp";
*plugin_desc = "Winamp plugin for XChat";
*plugin_version = "0.5";
xchat_hook_command (ph, "WINAMP", XCHAT_PRI_NORM, winamp, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START] - control Winamp or show what's currently playing", 0);
xchat_command (ph, "MENU -ietc\\music.png ADD \"Window/Display Current Song (Winamp)\" \"WINAMP\"");
xchat_print (ph, "Winamp plugin loaded\n");
return 1; /* return 1 for success */
}
int
xchat_plugin_deinit(void)
{
xchat_command (ph, "MENU DEL \"Window/Display Current Song (Winamp)\"");
xchat_print (ph, "Winamp plugin unloaded\n");
return 1;
}

18
plugins/xdcc/makefile.mak Normal file
View File

@ -0,0 +1,18 @@
include "..\..\src\makeinc.mak"
all: xdcc.obj xdcc.def
link $(LDFLAGS) $(LIBS) /dll /out:xcxdcc.dll /def:xdcc.def xdcc.obj
xdcc.def:
echo EXPORTS > xdcc.def
echo xchat_plugin_init >> xdcc.def
echo xchat_plugin_deinit >> xdcc.def
xdcc.obj: xdcc.c makefile.mak
cl $(CFLAGS) $(GLIB) /I.. xdcc.c
clean:
del *.obj
del *.dll
del *.exp
del *.lib

View File

@ -2,11 +2,11 @@
#include <glib.h> #include <glib.h>
#include <string.h> #include <string.h>
#include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "xchat-plugin.h" #include "xchat-plugin.h"
#include "../../src/common/xchat.h"
static xchat_plugin *ph; /* plugin handle */ static xchat_plugin *ph; /* plugin handle */

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

733
plugins/xtray/callbacks.cpp Normal file
View File

@ -0,0 +1,733 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define _WIN32_IE 0x0601
#include <windows.h>
#include <stdio.h>
#include <commctrl.h>
#include <tchar.h>
#include "utility.h"
#include "plugin.h"
#include "xtray.h"
#include "xchat.h"
#include "callbacks.h"
#include "resource.h"
#include "sdTray.h"
#include "sdAlerts.h"
HWND g_hPrefTabEvents;
HWND g_hPrefTabSettings;
HWND g_hPrefTabAlerts;
HWND g_hPrefTabAbout;
bool g_bCanQuit;
int g_iIsActive = 1;
BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
{
TCHAR szTitle[10];
GetWindowText(hWnd, szTitle, 9);
if(_tcsstr(szTitle, _T("XChat [")))
{
g_hXchatWnd = hWnd;
return false;
}
return true;
}
/***********************************************************************************************/
/******* our xchat event call back, get the name and info for each event and save it ***********/
/******* for our alerts later ***********/
/***********************************************************************************************/
int event_cb(char *word[], void *userdata)
{
int iEvent = (int)userdata;
if(iEvent > 10 && iEvent != 21)
return XCHAT_EAT_NONE;
/***************************************************************************************/
/***** if the window is minimized or if we're allowed to show alerts when its not **/
/***** and if the option to show the specified alert is true and if we're even **/
/***** allowed to show alerts at all then we show them (a bit confusing but it works) **/
/***************************************************************************************/
if(((g_iIsActive == 0) || !(g_dwPrefs & (1<<PREF_OSBWM))) && (g_dwPrefs & (1<<PREF_AMAE)) && (g_dwPrefs & (1<<iEvent)))
{
/*********************************/
/*********** Our Buffers *********/
/*********************************/
char szInfo[512];
char szName[64];
DWORD dwInfoFlags;
int iTime = g_iTime*1000;
char *szTemp = NULL;
if(g_dwPrefs & (1<<PREF_KAOI))
{
iTime = 0;
}
switch(iEvent)
{
case CHAN_HILIGHT:
_snprintf(szInfo, 512, "%s:\r\n%s", word[1], word[2]);
_snprintf(szName, 64, "Hilight");
dwInfoFlags = NIIF_INFO;
break;
case CHAN_MESSAGE:
_snprintf(szInfo, 512, "%s:\r\n%s", word[1], word[2]);
_snprintf(szName, 64, "Channel Message");
dwInfoFlags = NIIF_INFO;
break;
case CHAN_TOPIC_CHANGE:
_snprintf(szInfo, 512, "%s has changed the topic to %s", word[1], word[2]);
_snprintf(szName, 64, "Topic Change: %s", word[3]);
dwInfoFlags = NIIF_INFO;
break;
case CHAN_INVITE:
_snprintf(szInfo, 512, "%s has invited you into %s", word[1], word[2]);
_snprintf(szName, 64, "Invite");
dwInfoFlags = NIIF_INFO;
break;
case CHAN_KICKED:
_snprintf(szInfo, 512, "Kicked from %s by %s:\r\n%s", word[2], word[3], word[4]);
_snprintf(szName, 64, "Kick");
dwInfoFlags = NIIF_WARNING;
break;
case CHAN_BANNED:
_snprintf(szInfo, 512, "Cannot join #%s You are banned.", word[1]);
_snprintf(szName, 64, "Banned");
dwInfoFlags = NIIF_WARNING;
break;
case CTCP_GENERIC:
_snprintf(szInfo, 512, "%s:\r\nCTCP %s", word[2], word[1]);
_snprintf(szName, 64, "CTCP");
dwInfoFlags = NIIF_INFO;
break;
case PMSG_RECEIVE:
_snprintf(szInfo, 512, "%s:\r\n%s", word[1], word[2]);
_snprintf(szName, 64, "Private Message");
dwInfoFlags = NIIF_INFO;
break;
case SERV_DISCONNECT:
_snprintf(szInfo, 512, "Disconnected\r\nError: %s", word[1]);
_snprintf(szName, 64, "Disconnect");
dwInfoFlags = NIIF_ERROR;
break;
case SERV_KILLED:
_snprintf(szInfo, 512, "Killed(%s(%s))", word[1], word[2]);
_snprintf(szName, 64, "Server Admin has killed you");
dwInfoFlags = NIIF_ERROR;
break;
case SERV_NOTICE:
_snprintf(szInfo, 512, "Notice:\r\n%s: %s", word[1], word[2]);
_snprintf(szName, 64, "Notice");
dwInfoFlags = NIIF_INFO;
break;
case 11:
_snprintf(szInfo, 512, ":\r\n%s: %s", word[1], word[2]);
_snprintf(szName, 64, "Notice");
dwInfoFlags = NIIF_INFO;
break;
}
/**************************************************************************************/
/***** Use windows instead of balloons, and if its a window should we keep it open ****/
/***** indefinately? ****/
/**************************************************************************************/
szTemp = xchat_strip_color(szInfo);
if(g_dwPrefs & (1<<PREF_UWIOB))
{
sdSystemAlert((HINSTANCE)g_hInstance, IDD_ALERT, szTemp, szName, iTime);
}
else
{
ShowBalloon(g_hXchatWnd, 1, szTemp, szName, iTime, dwInfoFlags);
}
free(szTemp);
}
if(g_dwPrefs & (1<<PREF_BLINK) && (g_dwPrefs & (1<<iEvent)))
{
BlinkIcon(g_hXchatWnd, 1, g_hIcons[0], g_hIcons[(iEvent+1)], 700, 5);
}
/***********************************/
/***** pass the events to xchat ****/
/***********************************/
return XCHAT_EAT_NONE;
}
int command_cb(char *word[], char *word_eol[], void *userdata)
{
char szInfo[512];
char *szTemp = NULL;
int iTime = g_iTime*1000;
_snprintf(szInfo, 512, word_eol[2]);
szTemp = xchat_strip_color(szInfo);
if(g_dwPrefs & (1<<PREF_KAOI))
{
iTime = 0;
}
if(((g_iIsActive == 0) || !(g_dwPrefs & (1<<PREF_OSBWM))) && (g_dwPrefs & (1<<PREF_AMAE)))
{
if(g_dwPrefs & (1<<PREF_UWIOB))
{
sdSystemAlert((HINSTANCE)g_hInstance, IDD_ALERT, szTemp, "Alert", iTime);
}
else
{
ShowBalloon(g_hXchatWnd, 1, szTemp, "Alert", iTime, NIIF_INFO);
}
}
free(szTemp);
return XCHAT_EAT_ALL;
}
LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_CLOSE:
{
if((g_dwPrefs & (1<<PREF_MIOC)) && (g_bCanQuit == false))
{
/*******************************************/
/**** to autoaway or not to autoaway... ***/
/*******************************************/
if(g_dwPrefs & (1<<PREF_AOM))
{
xchat_globally_away(g_szAway);
}
/**************************************************/
/**** Win32 API call to hide the window and **/
/**** save the fact that its minimized for later **/
/**************************************************/
g_iIsActive = 0;
ShowWindow(hWnd, SW_HIDE);
return 0;
}
else
{
if(g_hPrefDlg != NULL)
{
DestroyWindow(g_hPrefDlg);
}
StopBlink(hWnd, 1, g_hIcons[0]);
if(sdAlertNum())
{
sdCloseAlerts();
HoldClose();
return 0;
}
}
}
break;
case WM_SIZE:
{
/******************************************/
/***** User wants to minimize xChat, ******/
/***** are we allowed to go to tray? ******/
/******************************************/
if((g_dwPrefs & (1<<PREF_TOT)) && (wparam == SIZE_MINIMIZED))
{
/*******************************************/
/**** to autoaway or not to autoaway... ***/
/*******************************************/
if(g_dwPrefs & (1<<PREF_AOM))
{
xchat_globally_away(g_szAway);
}
/**************************************************/
/**** Win32 API call to hide the window and **/
/**** save the fact that its minimized for later **/
/**************************************************/
g_iIsActive = 0;
ShowWindow(hWnd, SW_HIDE);
}
}
break;
/**********************************/
/*** user clicked the tray icon ***/
/**********************************/
case WM_TRAYMSG:
{
switch(lparam)
{
case WM_LBUTTONDOWN:
{
if(!g_iIsActive)
{
/*********************************************************/
/*** 0: its hiden, restore it and show it, if autoaway ***/
/*** is on, set us as back ***/
/*********************************************************/
SendMessage(hWnd, WM_SYSCOMMAND, SC_RESTORE, 0);
SetForegroundWindow(hWnd);
g_iIsActive = 1;
if(g_dwPrefs & (1<<PREF_AOM))
{
xchat_globally_back();
}
}
else
{
SendMessage(hWnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
}
}
break;
case WM_RBUTTONDOWN:
{
/******************************************/
/*** user wants to see the menu find out **/
/*** where the mouse is and show it **/
/******************************************/
POINT pt;
int iRet;
GetCursorPos(&pt);
SetForegroundWindow(hWnd);
ModifyMenu(g_hTrayMenu, 2, (MF_POPUP | MF_BYPOSITION), (UINT)setServerMenu(), _T("Away"));
Sleep(175);
iRet = TrackPopupMenuEx(g_hTrayMenu, (TPM_RETURNCMD | TPM_LEFTALIGN), pt.x, pt.y, hWnd, NULL);
/***********************************/
/*** nRet is the users selection, **/
/*** process it **/
/***********************************/
sdTrayProc(hWnd, iRet);
}
break;
}
}
break;
default:
{
/*****************************************************/
/*** the taskbar has been restarted, re-add our icon */
/*****************************************************/
if(msg == RegisterWindowMessage(_T("TaskbarCreated")))
{
char szVersion[64];
_snprintf(szVersion, 64, "XChat-WDK [%s]", xchat_get_info(ph, "version"));
AddIcon(g_hXchatWnd, 1, g_hIcons[0], szVersion, (NIF_ICON | NIF_MESSAGE | NIF_TIP), WM_TRAYMSG);
}
}
break;
}
return CallWindowProc(g_hOldProc, hWnd, msg, wparam, lparam);
}
/****************************************************/
/*** process messages from the tray menu ************/
/****************************************************/
LRESULT CALLBACK sdTrayProc(HWND hWnd, int msg)
{
switch(msg)
{
case ACT_EXIT:
{
g_bCanQuit = true;
PostMessage(hWnd, WM_CLOSE, 0, 0);
}
break;
case ACT_RESTORE:
{
/***********************************************/
/** user wants us to restore the xchat window **/
/** and of autoaway is on, set as back **/
/***********************************************/
SendMessage(g_hXchatWnd, WM_SYSCOMMAND, SC_RESTORE, 0);
SetForegroundWindow(hWnd);
if((!g_iIsActive) && (g_dwPrefs & (1<<PREF_AOM)))
{
xchat_globally_back();
g_iIsActive = 1;
}
}
break;
case ACT_SETTINGS:
{
ShowWindow(g_hPrefDlg, SW_SHOW);
}
break;
case ACT_AWAY:
{
xchat_globally_away(g_szAway);
}
break;
case ACT_BACK:
{
xchat_globally_back();
}
break;
default:
{
if(msg > 0)
{
xchat_set_context(ph, xchat_find_server(msg-1));
if(!xchat_get_info(ph, "away"))
{
xchat_away(g_szAway);
}
else
{
xchat_back();
}
}
}
break;
}
return 1;
}
int CALLBACK PrefProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_INITDIALOG:
{
TCITEM tci1;
TCITEM tci2;
TCITEM tci3;
TCITEM tci4;
tci1.mask = TCIF_TEXT;
tci1.pszText = _T("Settings");
tci1.cchTextMax = strlen("Settings");
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_INSERTITEM, 0, (LPARAM)&tci1);
tci2.mask = TCIF_TEXT;
tci2.pszText = _T("Alerts");
tci2.cchTextMax = strlen("Alerts");
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_INSERTITEM, 1, (LPARAM)&tci2);
tci3.mask = TCIF_TEXT;
tci3.pszText = _T("Events");
tci3.cchTextMax = strlen("Events");
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_INSERTITEM, 2, (LPARAM)&tci3);
tci4.mask = TCIF_TEXT;
tci4.pszText = _T("About");
tci4.cchTextMax = strlen("About");
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_INSERTITEM, 3, (LPARAM)&tci4);
/***********************************************************************************/
/***********************************************************************************/
/***********************************************************************************/
g_hPrefTabSettings = CreateDialog((HINSTANCE)g_hInstance,
MAKEINTRESOURCE(IDD_SETTINGS),
hWnd,
(DLGPROC)SettingsProc);
SetDialog(g_hPrefTabSettings, IDD_SETTINGS);
g_hPrefTabAlerts = CreateDialog((HINSTANCE)g_hInstance,
MAKEINTRESOURCE(IDD_ALERTS),
hWnd,
(DLGPROC)AlertsProc);
SetDialog(g_hPrefTabAlerts, IDD_ALERTS);
g_hPrefTabEvents = CreateDialog((HINSTANCE)g_hInstance,
MAKEINTRESOURCE(IDD_EVENTS),
hWnd,
(DLGPROC)EventsProc);
SetDialog(g_hPrefTabEvents, IDD_EVENTS);
g_hPrefTabAbout = CreateDialog((HINSTANCE)g_hInstance,
MAKEINTRESOURCE(IDD_ABOUT),
hWnd,
(DLGPROC)AboutProc);
}
break;
case WM_SHOWWINDOW:
{
if(wparam)
{
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_SETCURSEL, 0, 0);
ShowWindow(g_hPrefTabSettings, SW_SHOW);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
}
}
break;
case WM_NOTIFY:
{
NMHDR *pData = (NMHDR *)lparam;
switch(pData->code)
{
case TCN_SELCHANGE:
{
switch(SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_GETCURSEL, 0, 0))
{
case 0:
{
ShowWindow(g_hPrefTabSettings, SW_SHOW);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
}
break;
case 1:
{
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_SHOW);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
}
break;
case 2:
{
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabEvents, SW_SHOW);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
}
break;
case 3:
{
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_SHOW);
}
break;
}
}
break;
}
}
break;
case WM_CLOSE:
{
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
ShowWindow(hWnd, SW_HIDE);
return TRUE;
}
break;
case WM_COMMAND:
{
switch(wparam)
{
case IDC_PREF_OK:
{
CheckPrefs(g_hPrefTabEvents, IDD_EVENTS);
CheckPrefs(g_hPrefTabSettings, IDD_SETTINGS);
CheckPrefs(g_hPrefTabAlerts, IDD_ALERTS);
SavePrefs(0);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
ShowWindow(hWnd, SW_HIDE);
return TRUE;
}
break;
case IDC_PREF_CANCEL:
{
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
ShowWindow(hWnd, SW_HIDE);
return TRUE;
}
break;
case IDC_PREF_APPLY:
{
CheckPrefs(g_hPrefTabEvents, IDD_EVENTS);
CheckPrefs(g_hPrefTabSettings, IDD_SETTINGS);
CheckPrefs(g_hPrefTabAlerts, IDD_ALERTS);
SavePrefs(0);
return FALSE;
}
break;
}
}
break;
case WM_DESTROY:
{
SendMessage(g_hPrefTabEvents, WM_CLOSE, 0, 0);
SendMessage(g_hPrefTabSettings, WM_CLOSE, 0, 0);
SendMessage(g_hPrefTabAbout, WM_CLOSE, 0, 0);
SendMessage(g_hPrefTabAlerts, WM_CLOSE, 0, 0);
}
break;
}
return FALSE;
}
/****************************************************/
/****************************************************/
/****************************************************/
LRESULT CALLBACK AlertsProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_CLOSE:
{
DestroyWindow(hWnd);
return TRUE;
break;
}
break;
case WM_COMMAND:
{
switch(LOWORD(wparam))
{
case PREF_AMAE:
{
SetToggle(hWnd, PREF_OSBWM, PREF_AMAE, TRUE);
SetToggle(hWnd, PREF_UWIOB, PREF_AMAE, TRUE);
SetToggle(hWnd, PREF_KAOI, PREF_AMAE, TRUE);
if(IsDlgButtonChecked(hWnd, PREF_AMAE))
{
SetToggle(hWnd, IDC_ALERT_HOTKEY, PREF_UWIOB, TRUE);
SetToggle(hWnd, IDC_ALERT_HOTKEY_TEXT, PREF_UWIOB, TRUE);
SetToggle(hWnd, IDC_ALERT_TIME, PREF_KAOI, FALSE);
SetToggle(hWnd, IDC_ALERT_TIME_TEXT, PREF_KAOI, FALSE);
}
else
{
SetToggle(hWnd, IDC_ALERT_HOTKEY, PREF_AMAE, TRUE);
SetToggle(hWnd, IDC_ALERT_HOTKEY_TEXT, PREF_AMAE, TRUE);
SetToggle(hWnd, IDC_ALERT_TIME, PREF_AMAE, TRUE);
SetToggle(hWnd, IDC_ALERT_TIME_TEXT, PREF_AMAE, TRUE);
}
}
break;
case PREF_UWIOB:
{
SetToggle(hWnd, IDC_ALERT_HOTKEY, PREF_UWIOB, TRUE);
SetToggle(hWnd, IDC_ALERT_HOTKEY_TEXT, PREF_UWIOB, TRUE);
}
break;
case PREF_KAOI:
{
SetToggle(hWnd, IDC_ALERT_TIME, PREF_KAOI, FALSE);
SetToggle(hWnd, IDC_ALERT_TIME_TEXT, PREF_KAOI, FALSE);
}
break;
}
break;
}
}
return FALSE;
}
/****************************************************/
/****************************************************/
/****************************************************/
LRESULT CALLBACK AboutProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_CLOSE)
{
DestroyWindow(hWnd);
return true;
}
return FALSE;
}
/*****************************************************/
/** Process the events for our event dialog **********/
/*****************************************************/
LRESULT CALLBACK EventsProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_CLOSE)
{
DestroyWindow(hWnd);
return true;
}
return FALSE;
}
/*****************************************************/
/** Process the events for our settings dialog this **/
/** is alot more complicated because options are **/
/** enabled/disabled based on the state of others **/
/*****************************************************/
LRESULT CALLBACK SettingsProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_CLOSE)
{
DestroyWindow(hWnd);
return true;
}
return FALSE;
}
/*****************************************************/
/** this is the hotkey message processing function **/
/** this window is always open and ready to be told **/
/** if someone has hit the hotkey, if they did, we **/
/** need to close out all of the tray alerts, for **/
/** this I wrote sdCloseAlerts, more info there **/
/*****************************************************/
LRESULT CALLBACK HotKeyProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_CLOSE)
{
DestroyWindow(hWnd);
return true;
}
else if(msg == WM_HOTKEY)
{
sdCloseAlerts();
}
return FALSE;
}

37
plugins/xtray/callbacks.h Normal file
View File

@ -0,0 +1,37 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _H_CALLBACKS_H
#define _H_CALLBACKS_H
int event_cb (char *word[], void *userdata);
int command_cb (char *word[], char *word_eol[], void *userdata);
LRESULT CALLBACK WindowProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
BOOL CALLBACK EnumWindowsProc (HWND hWnd, LPARAM lParam);
LRESULT CALLBACK sdTrayProc (HWND hwnd, int msg);
LRESULT CALLBACK AlertProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK HotKeyProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK EventsProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK AboutProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK AlertsProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK SettingsProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
int CALLBACK PrefProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
#endif

Some files were not shown because too many files have changed in this diff Show More