aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Morten Kvarving <spiff@xbmc.org>2011-05-15 13:59:22 -0700
committerArne Morten Kvarving <spiff@xbmc.org>2011-05-15 13:59:22 -0700
commit8b3a9fc1fb4e2777f64ac4a8415c74f2850c81c5 (patch)
treefe1229522127e800b0ce7529cc88277b05ddef28
parent826b9ecf67bb5622efe910ea5de33fedd4a09a7c (diff)
parent1c07455e94cd08a3565a5875cfc16be82337be01 (diff)
Merge pull request #143 from cptspiff/removeoldtools
remove old tools
-rw-r--r--tools/Changelog/Changelog.cpp150
-rw-r--r--tools/Changelog/Changelog.exebin114688 -> 0 bytes
-rwxr-xr-xtools/Changelog/Changelog.py120
-rw-r--r--tools/Changelog/Changelog.sln21
-rw-r--r--tools/Changelog/Changelog.vcproj179
-rw-r--r--tools/Changelog/Makefile2
-rw-r--r--tools/Changelog/stdafx.cpp29
-rw-r--r--tools/Changelog/stdafx.h36
-rw-r--r--tools/HardwareConfigure/AvailableRemotes1
-rw-r--r--tools/HardwareConfigure/HardwareConfigure.cpp424
-rw-r--r--tools/HardwareConfigure/HardwareConfigure.h81
-rw-r--r--tools/HardwareConfigure/README12
-rwxr-xr-xtools/HardwareConfigure/build.sh1
-rw-r--r--tools/HardwareConfigure/mceusb2.hardware.conf39
-rw-r--r--tools/HardwareConfigure/mceusb2.lircd.conf104
-rw-r--r--tools/XBMCTex/AnimatedGif.cpp649
-rw-r--r--tools/XBMCTex/AnimatedGif.h168
-rw-r--r--tools/XBMCTex/Bundler.cpp186
-rw-r--r--tools/XBMCTex/Bundler.h53
-rw-r--r--tools/XBMCTex/Makefile.in31
-rw-r--r--tools/XBMCTex/Makefile.osx45
-rw-r--r--tools/XBMCTex/OSXGNUReplacements.c260
-rw-r--r--tools/XBMCTex/OSXGNUReplacements.h74
-rw-r--r--tools/XBMCTex/README.osx24
-rw-r--r--tools/XBMCTex/Surface.cpp209
-rw-r--r--tools/XBMCTex/Surface.h100
-rw-r--r--tools/XBMCTex/SurfaceSDL.cpp180
-rw-r--r--tools/XBMCTex/SurfaceSDL.h111
-rw-r--r--tools/XBMCTex/XBMCTex.cpp737
-rw-r--r--tools/XBMCTex/XBMCTex.exebin253952 -> 0 bytes
-rw-r--r--tools/XBMCTex/XBMCTex.sln27
-rw-r--r--tools/XBMCTex/XBMCTex.vcproj291
-rw-r--r--tools/XBMCTex/XFileUtils.cpp198
-rw-r--r--tools/XBMCTex/XFileUtils.h46
-rw-r--r--tools/XBMCTex/XHandle.cpp125
-rw-r--r--tools/XBMCTex/XHandle.h88
-rw-r--r--tools/XBMCTex/XTimeUtils.cpp56
-rw-r--r--tools/XBMCTex/XTimeUtils.h30
-rw-r--r--tools/XBMCTex/cmdlineargs.h144
-rw-r--r--tools/XBMCTex/sha.c132
-rw-r--r--tools/XBMCTex/stdint_win.h222
-rw-r--r--tools/XBMCTex/xbox.cpp166
-rw-r--r--tools/XBMCTex/xbox.h181
-rw-r--r--tools/XBMCTex/xwinapi.cpp101
-rw-r--r--tools/XBMCTex/xwinapi.h32
-rw-r--r--tools/XprPack/XprPack.cpp101
-rw-r--r--tools/XprPack/XprPack.sln21
-rw-r--r--tools/XprPack/XprPack.vcproj154
-rw-r--r--tools/XprPack/stdafx.cpp8
-rw-r--r--tools/XprPack/stdafx.h15
50 files changed, 0 insertions, 6164 deletions
diff --git a/tools/Changelog/Changelog.cpp b/tools/Changelog/Changelog.cpp
deleted file mode 100644
index 30817b6d5d..0000000000
--- a/tools/Changelog/Changelog.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// Changelog.cpp : Defines the entry point for the console application.
-//
-
-#include "stdafx.h"
-
-#include "tinyxml.h"
-#include "../../xbmc/utils/RegExp.h"
-
-#ifdef _LINUX
-#define _tmain main
-#define _TCHAR char
-#endif
-
-const char header[] = "*************************************************************************************************************\r\n"
- "*************************************************************************************************************\r\n"
- " XBMC CHANGELOG\r\n"
- "*************************************************************************************************************\r\n"
- "*************************************************************************************************************\r\n"
- "\r\n"
- "Date Rev Message\r\n"
- "=============================================================================================================\r\n";
-
-const char filter[][100] = {"[- ]*[0-9]+-[0-9]+-[0-9]+ *",
- "\\*\\*\\* empty log message \\*\\*\\*",
- "no message" };
-
-std::string FilterMessage(std::string message)
-{
- std::string filteredMessage = message;
- CRegExp reg;
- for (int i = 0; i < sizeof(filter) / 100; i++)
- {
- reg.RegComp(filter[i]);
- int findStart = reg.RegFind(message.c_str());
- while (findStart >= 0)
- {
- filteredMessage = message.substr(0, findStart);
- filteredMessage.append(message.substr(findStart + reg.GetFindLen(), message.length()));
- message = filteredMessage;
- findStart = reg.RegFind(message.c_str());
- }
- }
- return filteredMessage;
-}
-
-int _tmain(int argc, _TCHAR* argv[])
-{
- std::string input = "svn_log.xml";
- std::string output = "Changelog.txt";
- int limit = 0;
-
- if (argc < 2)
- {
- // output help information
- printf("usage:\n");
- printf("\n");
- printf(" Changelog input <output> <limit>\n");
- printf("\n");
- printf(" input : input .xml file generated from SVN (using svn log --xml)\n");
- printf(" DOWNLOAD to download direct from XBMC SVN\n");
- printf(" <output> : output .txt file for the changelog (defaults to Changelog.txt)\n");
- printf(" <limit> : the number of log entries for svn to fetch. (defaults to no limit)");
- printf("\n");
- return 0;
- }
- input = argv[1];
- if (argc > 2)
- output = argv[2];
- FILE *file = fopen(output.c_str(), "wb");
- if (!file)
- return 1;
- fprintf(file, header);
- if (input.compare("download") == 0)
- {
- if(argc > 3)
- limit = atoi(argv[3]);
- // download our input file
- std::string command = "svn log -r 'HEAD':8638 ";
- if (limit > 0)
- {
- command += "--limit ";
- command += argv[3]; // the limit as a string
- command += " ";
- }
-#ifndef _LINUX
- command += "--xml https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/XBMC > svn_log.xml";
-#else
- command += "--xml https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC > svn_log.xml";
-#endif
- printf("Downloading changelog from SVN - this will take some time (around 1MB to download with no limit)\n");
- system(command.c_str());
- input = "svn_log.xml";
- printf("Downloading done - processing\n");
- }
- TiXmlDocument doc;
- if (!doc.LoadFile(input.c_str()))
- {
- fclose(file);
- return 1;
- }
-
- TiXmlElement *root = doc.RootElement();
- if (!root) return 1;
-
- TiXmlElement *logitem = root->FirstChildElement("logentry");
- while (logitem)
- {
- int revision;
- logitem->Attribute("revision", &revision);
- TiXmlNode *date = logitem->FirstChild("date");
- std::string dateString;
- if (date && date->FirstChild())
- dateString = date->FirstChild()->Value();
- TiXmlNode *msg = logitem->FirstChild("msg");
- if (msg && msg->FirstChild())
- {
- // filter the message a bit
- std::string message = FilterMessage(msg->FirstChild()->Value());
- if (message.size())
- fprintf(file, "%s %4i %s\r\n", dateString.substr(0,10).c_str(), revision, message.c_str());
- else
- int breakhere = 1;
- }
- logitem = logitem->NextSiblingElement("logentry");
- }
- fclose(file);
- printf("Changelog saved as: %s\n", output.c_str());
- return 0;
-}
diff --git a/tools/Changelog/Changelog.exe b/tools/Changelog/Changelog.exe
deleted file mode 100644
index 5571d90375..0000000000
--- a/tools/Changelog/Changelog.exe
+++ /dev/null
Binary files differ
diff --git a/tools/Changelog/Changelog.py b/tools/Changelog/Changelog.py
deleted file mode 100755
index eeebd0d0c6..0000000000
--- a/tools/Changelog/Changelog.py
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-# Copyright (C) 2007-2010 Team XBMC
-# http://www.xbmc.org
-#
-# 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, 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 XBMC; see the file COPYING. If not, write to
-# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-# http://www.gnu.org/copyleft/gpl.html
-
-import re, os, sys
-
-def usage ():
- print " Changelog.py [option]"
- print " -h : display this message"
- print " -r <REV> : get log messages up until REV"
- print " -d <DIR> : place Changelog.txt in DIR"
- sys.exit()
-
-
-header = "*************************************************************************************************************\n" \
- "*************************************************************************************************************\n" \
- " XBMC CHANGELOG\n" \
- "*************************************************************************************************************\n" \
- "*************************************************************************************************************" \
- "\nDate Rev Message\n" \
- "=============================================================================================================\n"
-
-xmlre = re.compile("^<logentry.*?revision=\"([0-9]{4,})\".*?<date>([0-9]{4}-[0-9]{2}-[0-9]{2})T.*?<msg>(.*?)</msg>.*?</logentry>$", re.MULTILINE | re.DOTALL)
-txtre = re.compile("([0-9]{4}-[0-9]{2}-[0-9]{2}) ([0-9]{4,5}) {1,2}(.*)")
-
-old = None
-lastrev = 8638
-rev = 1000000
-dir = "."
-
-nargs = len(sys.argv)
-args = sys.argv
-
-i = 1
-while i < nargs:
- if args[i] == "-r":
- i += 1
- try:
- rev = int(sys.argv[i])
- except:
- rev=1000000
- elif args[i] == "-d":
- i+=1
- dir = args[i].replace(' ', '\ ')
- elif args[i] == "-h" or args[i] == "--help":
- usage()
- i+=1
-
-# print dir
-# print rev
-
-try:
- old = open("%s/Changelog.txt" % (dir))
-except:
- old = None
-
-if old != None:
- olddoc = old.read()
- old.close()
- oldmsgs = txtre.findall(olddoc)
- del olddoc
- if len(oldmsgs) > 0:
- lastrev = int(oldmsgs[0][1])
-try:
- output = open("%s/Changelog.txt" % (dir),"w")
-except:
- print "Can't open %s/Changelog.txt for writing." % (dir)
- sys.exit()
-
-output.write(header)
-
-if rev <= lastrev:
- for msg in oldmsgs:
- if int(msg[1]) <= rev:
- s = "%-11.11s %-5.5s %s\n" % (msg[0], msg[1], msg[2])
- output.write(s)
- sys.exit()
-
-svncmd = "svn log --xml -r %s:HEAD" % (lastrev)
-newlog = os.popen(svncmd)
-
-newlogdoc = newlog.read()
-newlog.close()
-
-newmsgs = xmlre.findall(newlogdoc)
-
-newmsgs.reverse()
-
-for msg in newmsgs:
- s = "%-11.11s %-5.5s %s\n" % (msg[1], msg[0], msg[2].replace('\n',''))
- output.write(s)
-
-skip = 0
-if old != None:
- for msg in oldmsgs:
- if skip == 1:
- s = "%-11.11s %-5.5s %s\n" % (msg[0], msg[1], msg[2])
- output.write(s)
- else:
- skip = 1
-
-output.close()
-
diff --git a/tools/Changelog/Changelog.sln b/tools/Changelog/Changelog.sln
deleted file mode 100644
index 1c4f46bce9..0000000000
--- a/tools/Changelog/Changelog.sln
+++ /dev/null
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Changelog", "Changelog.vcproj", "{05525588-A93C-4220-8C26-A93FBCE525BD}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {05525588-A93C-4220-8C26-A93FBCE525BD}.Debug.ActiveCfg = Debug|Win32
- {05525588-A93C-4220-8C26-A93FBCE525BD}.Debug.Build.0 = Debug|Win32
- {05525588-A93C-4220-8C26-A93FBCE525BD}.Release.ActiveCfg = Release|Win32
- {05525588-A93C-4220-8C26-A93FBCE525BD}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/tools/Changelog/Changelog.vcproj b/tools/Changelog/Changelog.vcproj
deleted file mode 100644
index 7a61e5d402..0000000000
--- a/tools/Changelog/Changelog.vcproj
+++ /dev/null
@@ -1,179 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="Changelog"
- ProjectGUID="{05525588-A93C-4220-8C26-A93FBCE525BD}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../guilib/tinyxml"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="5"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/Changelog.exe"
- LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/Changelog.pdb"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../guilib/tinyxml"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="4"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/Changelog.exe"
- LinkIncremental="1"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath=".\Changelog.cpp">
- </File>
- <File
- RelativePath="..\..\xbmc\utils\RegExp.cpp">
- </File>
- <File
- RelativePath=".\stdafx.cpp">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\guilib\tinyXML\tinystr.cpp">
- </File>
- <File
- RelativePath="..\..\guilib\tinyXML\tinyxml.cpp">
- </File>
- <File
- RelativePath="..\..\guilib\tinyXML\tinyxmlerror.cpp">
- </File>
- <File
- RelativePath="..\..\guilib\tinyXML\tinyxmlparser.cpp">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- <File
- RelativePath="..\..\xbmc\utils\RegExp.h">
- </File>
- <File
- RelativePath=".\stdafx.h">
- </File>
- <File
- RelativePath="..\..\guilib\tinyXML\tinystr.h">
- </File>
- <File
- RelativePath="..\..\guilib\tinyXML\tinyxml.h">
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
- </Filter>
- <File
- RelativePath=".\ReadMe.txt">
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/tools/Changelog/Makefile b/tools/Changelog/Makefile
deleted file mode 100644
index c2b5c94171..0000000000
--- a/tools/Changelog/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-Changelog: Changelog.cpp
- g++ -D_LINUX -I../../guilib/tinyXML -o Changelog Changelog.cpp ../../guilib/tinyXML/*.o ../../xbmc/utils/RegExp.o
diff --git a/tools/Changelog/stdafx.cpp b/tools/Changelog/stdafx.cpp
deleted file mode 100644
index 5cd322741d..0000000000
--- a/tools/Changelog/stdafx.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// stdafx.cpp : source file that includes just the standard includes
-// Changelog.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
diff --git a/tools/Changelog/stdafx.h b/tools/Changelog/stdafx.h
deleted file mode 100644
index 12f4e100cc..0000000000
--- a/tools/Changelog/stdafx.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#pragma once
-
-
-#include <iostream>
-#ifndef _LINUX
-#include <tchar.h>
-
-// TODO: reference additional headers your program requires here
-#include <windows.h>
-#endif
diff --git a/tools/HardwareConfigure/AvailableRemotes b/tools/HardwareConfigure/AvailableRemotes
deleted file mode 100644
index 18ff89c6ae..0000000000
--- a/tools/HardwareConfigure/AvailableRemotes
+++ /dev/null
@@ -1 +0,0 @@
-mceusb2 1137 2069
diff --git a/tools/HardwareConfigure/HardwareConfigure.cpp b/tools/HardwareConfigure/HardwareConfigure.cpp
deleted file mode 100644
index 85b127abda..0000000000
--- a/tools/HardwareConfigure/HardwareConfigure.cpp
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include "HardwareConfigure.h"
-#include <libhal-storage.h>
-#include <iostream>
-#include <fstream>
-#include <string.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-//#define HAL_HANDLEMOUNT
-
-bool CHalManager::NewMessage;
-DBusError CHalManager::m_Error;
-
-/* A Removed device, It isn't possible to make a LibHalVolume from a removed device therefor
- we catch the UUID from the udi on the removal */
-void CHalManager::DeviceRemoved(LibHalContext *ctx, const char *udi)
-{
- NewMessage = true;
- printf("HAL: Device (%s) Removed\n", udi);
-// g_HalManager.RemoveDevice(udi);
-}
-
-void CHalManager::DeviceNewCapability(LibHalContext *ctx, const char *udi, const char *capability)
-{
- NewMessage = true;
- printf("HAL: Device (%s) gained capability %s\n", udi, capability);
- g_HalManager.ParseDevice(udi);
-}
-
-void CHalManager::DeviceLostCapability(LibHalContext *ctx, const char *udi, const char *capability)
-{
- NewMessage = true;
- printf("HAL: Device (%s) lost capability %s\n", udi, capability);
- g_HalManager.ParseDevice(udi);
-}
-
-/* HAL Property modified callback. If a device is mounted. This is called. */
-void CHalManager::DevicePropertyModified(LibHalContext *ctx, const char *udi, const char *key, dbus_bool_t is_removed, dbus_bool_t is_added)
-{
- NewMessage = true;
- printf("HAL: Device (%s) Property %s modified\n", udi, key);
- g_HalManager.ParseDevice(udi);
-}
-
-void CHalManager::DeviceCondition(LibHalContext *ctx, const char *udi, const char *condition_name, const char *condition_details)
-{
- printf("HAL: Device (%s) Condition %s | %s\n", udi, condition_name, condition_details);
- NewMessage = true;
- g_HalManager.ParseDevice(udi);
-}
-
-/* HAL Device added. This is before mount. And here is the place to mount the volume in the future */
-void CHalManager::DeviceAdded(LibHalContext *ctx, const char *udi)
-{
- NewMessage = true;
- printf("HAL: Device (%s) Added\n", udi);
- g_HalManager.ParseDevice(udi);
-}
-
-CHalManager g_HalManager;
-
-/* Iterate through all devices currently on the computer. Needed mostly at startup */
-void CHalManager::GenerateGDL()
-{
- if (m_Context == NULL)
- return;
-
- char **GDL;
- int i = 0;
- printf("HAL: Generating global device list\n");
- GDL = libhal_get_all_devices(g_HalManager.m_Context, &i, &m_Error);
-
- if (!ReadAvailableRemotes())
- return;
-
- for (i = 0; GDL[i]; i++)
- {
- if (ParseDevice(GDL[i]))
- break;
- }
-
- printf("HAL: Generated global device list, found %i\n", i);
-}
-
-CHalManager::CHalManager()
-{
-}
-
-// Shutdown the connection and free the context
-CHalManager::~CHalManager()
-{
- if (m_Context != NULL)
- libhal_ctx_shutdown(m_Context, NULL);
- if (m_Context != NULL)
- libhal_ctx_free(m_Context);
-
- if (m_DBusSystemConnection != NULL)
- {
- dbus_connection_unref(m_DBusSystemConnection);
- m_DBusSystemConnection = NULL;
- }
- dbus_error_free(&m_Error); // Needed?
-}
-
-// Initialize
-void CHalManager::Initialize(const char *LircConfPath)
-{
- printf("HAL: Starting initializing\n");
- strcpy(m_LircConfPath, LircConfPath);
-
- g_HalManager.m_Context = g_HalManager.InitializeHal();
- if (g_HalManager.m_Context == NULL)
- {
- printf("HAL: no Hal context\n");
- return;
- }
-
- GenerateGDL();
-
- printf("HAL: Sucessfully initialized\n");
-}
-
-// Initialize basic DBus connection
-bool CHalManager::InitializeDBus()
-{
- if (m_DBusSystemConnection != NULL)
- return true;
-
- dbus_error_init (&m_Error);
- if (m_DBusSystemConnection == NULL && !(m_DBusSystemConnection = dbus_bus_get (DBUS_BUS_SYSTEM, &m_Error)))
- {
- printf("DBus: Could not get system bus: %s\n", m_Error.message);
- dbus_error_free (&m_Error);
- }
-
- if (m_DBusSystemConnection != NULL)
- return true;
- else
- return false;
-}
-
-// Initialize basic HAL connection
-LibHalContext *CHalManager::InitializeHal()
-{
- LibHalContext *ctx;
- char **devices;
- int nr;
-
- if (!InitializeDBus())
- return NULL;
-
- if (!(ctx = libhal_ctx_new()))
- {
- printf("HAL: failed to create a HAL context!\n");
- return NULL;
- }
-
- if (!libhal_ctx_set_dbus_connection(ctx, m_DBusSystemConnection))
- printf("HAL: Failed to connect with dbus\n");
-
- libhal_ctx_set_device_added(ctx, DeviceAdded);
- libhal_ctx_set_device_removed(ctx, DeviceRemoved);
- libhal_ctx_set_device_new_capability(ctx, DeviceNewCapability);
- libhal_ctx_set_device_lost_capability(ctx, DeviceLostCapability);
- libhal_ctx_set_device_property_modified(ctx, DevicePropertyModified);
- libhal_ctx_set_device_condition(ctx, DeviceCondition);
-
- if (!libhal_device_property_watch_all(ctx, &m_Error))
- {
- printf("HAL: Failed to set property watch %s\n", m_Error.message);
- dbus_error_free(&m_Error);
- libhal_ctx_free(ctx);
- return NULL;
- }
-
- if (!libhal_ctx_init(ctx, &m_Error))
- {
- printf("HAL: Failed to initialize hal context: %s\n", m_Error.message);
- dbus_error_free(&m_Error);
- libhal_ctx_free(ctx);
- return NULL;
- }
-
- /*
- * Do something to ping the HAL daemon - the above functions will
- * succeed even if hald is not running, so long as DBUS is. But we
- * want to exit silently if hald is not running, to behave on
- * pre-2.6 systems.
- */
- if (!(devices = libhal_get_all_devices(ctx, &nr, &m_Error)))
- {
- printf("HAL: seems that Hal daemon is not running: %s\n", m_Error.message);
- dbus_error_free(&m_Error);
-
- libhal_ctx_shutdown(ctx, NULL);
- libhal_ctx_free(ctx);
- return NULL;
- }
-
- libhal_free_string_array(devices);
-
- return ctx;
-}
-
-// Called from ProcessSlow to trigger the callbacks from DBus
-bool CHalManager::Update()
-{
- if (m_Context == NULL)
- return false;
-
- if (!dbus_connection_read_write_dispatch(m_DBusSystemConnection, 0)) // We choose 0 that means we won't wait for a message
- {
- printf("DBus: System - read/write dispatch\n");
- return false;
- }
- if (NewMessage)
- {
- NewMessage = false;
- return true;
- }
- else
- return false;
-}
-
-/* Parse newly found device and add it to our remembered devices */
-bool CHalManager::ParseDevice(const char *udi)
-{
- int VendorID, ProductID;
-
- VendorID = libhal_device_get_property_int(m_Context, udi, "usb.vendor_id", NULL);
- ProductID = libhal_device_get_property_int(m_Context, udi, "usb.product_id", NULL);
-
- const char *name = IsAllowedRemote(VendorID, ProductID);
-
- if (name != NULL)
- {
- printf("HAL: Found %s - %s\n", name, udi);
- if (MoveConfigs(name))
- {
- printf("HAL: Sucessfully created config for %s\n", name);
- return true;
-
- RunCommand(name);
- }
- else
- printf("HAL: Failed to create config for %s\n", name);
- }
-
- return false;
-}
-
-void Tokenize(const string& path, vector<string>& tokens, const string& delimiters)
-{
- // Tokenize ripped from http://www.linuxselfhelp.com/HOWTO/C++Programming-HOWTO-7.html
- // Skip delimiters at beginning.
- string::size_type lastPos = path.find_first_not_of(delimiters, 0);
- // Find first "non-delimiter".
- string::size_type pos = path.find_first_of(delimiters, lastPos);
-
- while (string::npos != pos || string::npos != lastPos)
- {
- // Found a token, add it to the vector.
- tokens.push_back(path.substr(lastPos, pos - lastPos));
- // Skip delimiters. Note the "not_of"
- lastPos = path.find_first_not_of(delimiters, pos);
- // Find next "non-delimiter"
- pos = path.find_first_of(delimiters, lastPos);
- }
-}
-
-bool CHalManager::ReadAvailableRemotes()
-{
- ifstream inputfile("AvailableRemotes");
- string line;
-
- m_AllowedRemotes.clear();
-
- if (inputfile.is_open())
- {
- while (!inputfile.eof())
- {
- getline(inputfile, line);
- if (line.size() > 0)
- {
- vector<string> tokens;
- Tokenize(line, tokens, " ");
-
- if (tokens[1].size() > 0 && tokens[0].size() > 0)
- {
- CHalDevice dev(atoi(tokens[1].c_str()), atoi(tokens[2].c_str()), tokens[0].c_str());
- printf("AvailableRemote: (%s) (%i) (%i)\n", dev.FriendlyName, dev.VendorID, dev.ProductID);
- m_AllowedRemotes.push_back(dev);
- }
- }
- }
- inputfile.close();
-
- return true;
- }
- return false;
-}
-
-const char *CHalManager::IsAllowedRemote(int VendorID, int ProductID)
-{
- for (unsigned int i = 0; i < m_AllowedRemotes.size(); i++)
- {
- if (VendorID == m_AllowedRemotes[i].VendorID && ProductID == m_AllowedRemotes[i].ProductID)
- return m_AllowedRemotes[i].FriendlyName;
- }
- return NULL;
-}
-
-void CHalManager::RunCommand(const char *name)
-{
- char script[1024];
- sprintf(script, "%s.sh", name);
- if (Exists(script))
- {
- popen(script, "r");
- }
-}
-
-bool CHalManager::MoveConfigs(const char *name)
-{
- char lircd[1024], hardware[1024], lircdout[1024], hardwareout[1024];
-
- sprintf(lircd, "%s.lircd.conf", name);
- sprintf(lircdout, "%s/lircd.conf", m_LircConfPath);
- sprintf(hardware, "%s.hardware.conf", name);
- sprintf(hardwareout, "%s/hardware.conf", m_LircConfPath);
-
- bool temp = true;
- if (!Exists(lircd))
- {
- temp = false;
- printf("%s didn't exist\n", lircd);
- }
- if (!Exists(hardware))
- {
- temp = false;
- printf("%s didn't exist\n", hardware);
- }
- if (temp)
- {
- bool temp2 = true;
- printf("Copying %s -> %s\n", lircd, lircdout);
- if (!MoveConfig(lircd, lircdout))
- {
- printf("Failed to move %s -> %s\n", lircd, lircdout);
- temp2 = false;
- }
- printf("Copying %s -> %s\n", hardware, hardwareout);
- if (!MoveConfig(hardware, hardwareout))
- {
- printf("Failed to move %s -> %s\n", hardware, hardwareout);
- temp2 = false;
- }
- return temp2;
- }
- else
- return false;
-}
-
-bool CHalManager::Exists(const char *path)
-{
- struct stat stFileInfo;
-
- if (stat(path, &stFileInfo) == 0)
- return true;
- else
- return false;
-}
-
-bool CHalManager::MoveConfig(const char *InputConfig, const char *OutputConfig)
-{
- string line;
-
- ifstream inputfile(InputConfig);
- ofstream outputfile(OutputConfig, ios_base::out);
-
- if (inputfile.is_open() && outputfile.is_open())
- {
- while (!inputfile.eof())
- {
- getline(inputfile, line);
- outputfile << line <<"\n";
- }
- inputfile.close();
- outputfile.close();
- return true;
- }
- else
- return false;
-}
-
-int main(int argc, char* argv[])
-{
- if (argc == 2)
- g_HalManager.Initialize(argv[1]);
- else
- printf("Usage: %s PathToLircConf\n", argv[0]);
-}
diff --git a/tools/HardwareConfigure/HardwareConfigure.h b/tools/HardwareConfigure/HardwareConfigure.h
deleted file mode 100644
index 6871bda893..0000000000
--- a/tools/HardwareConfigure/HardwareConfigure.h
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifndef HARDWARECONFIGURE_H
-#define HARDWARECONFIGURE_H
-
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include <string.h>
-#include <stdio.h>
-#include <dbus/dbus.h>
-#include <libhal.h>
-#include <vector>
-
-using namespace std;
-
-class CHalDevice
-{
-public:
- int ProductID;
- int VendorID;
- char FriendlyName[1024];
- CHalDevice(int vendorID, int productID, const char *friendlyName) { ProductID = productID; VendorID = vendorID; strcpy(FriendlyName, friendlyName); }
-};
-
-class CHalManager
-{
-public:
- bool Update();
-
- void Initialize(const char *LircConfPath);
- CHalManager();
- ~CHalManager();
-protected:
- DBusConnection *m_DBusSystemConnection;
- LibHalContext *m_Context;
- static DBusError m_Error;
- static bool NewMessage;
-
- bool ParseDevice(const char *udi);
-private:
- char m_LircConfPath[1024];
- vector<CHalDevice> m_AllowedRemotes;
-
- LibHalContext *InitializeHal();
- bool InitializeDBus();
- void GenerateGDL();
- bool MoveConfigs(const char *udi);
- bool MoveConfig(const char *InputConfig, const char *OutputConfig);
- bool Exists(const char *path);
- const char *IsAllowedRemote(int VendorID, int ProductID);
- bool ReadAvailableRemotes();
- void RunCommand(const char *name);
-
- //Callbacks HAL
- static void DeviceRemoved(LibHalContext *ctx, const char *udi);
- static void DeviceNewCapability(LibHalContext *ctx, const char *udi, const char *capability);
- static void DeviceLostCapability(LibHalContext *ctx, const char *udi, const char *capability);
- static void DevicePropertyModified(LibHalContext *ctx, const char *udi, const char *key, dbus_bool_t is_removed, dbus_bool_t is_added);
- static void DeviceCondition(LibHalContext *ctx, const char *udi, const char *condition_name, const char *condition_details);
- static void DeviceAdded(LibHalContext *ctx, const char *udi);
-};
-
-extern CHalManager g_HalManager;
-#endif
diff --git a/tools/HardwareConfigure/README b/tools/HardwareConfigure/README
deleted file mode 100644
index e0fd4fb377..0000000000
--- a/tools/HardwareConfigure/README
+++ /dev/null
@@ -1,12 +0,0 @@
-The HardwareConfigure is meant to look up known LIRC devices and copy the needed configure files for it. It will need root privelieges and it is only meant to be run at startup, no hotplugging.
-
-to compile it:
-./build.sh
-
-to run it:
-./HardwareConfigure PathToLIRC
-PathToLIRC in ubuntu is /etc/lirc/
-
-How to expand it:
-Add the usb.vendor_id and usb.product_id tag in AvailableRemotes along with a FriendlyName, FriendlyName udi (ie mceusb2 would be: mceusb2 mceusb2 1137 2069), these can be found in ie gnome-device-manager.
-Add friendlyname.hardware.conf and friendlyname.lircd.conf in the folder of HardwareConfigure and it will copy it if it finds the Hardware. also it's optional to add a friendlyname.sh that will be run at the time of configuration.
diff --git a/tools/HardwareConfigure/build.sh b/tools/HardwareConfigure/build.sh
deleted file mode 100755
index 8ead12b857..0000000000
--- a/tools/HardwareConfigure/build.sh
+++ /dev/null
@@ -1 +0,0 @@
-g++ HardwareConfigure.cpp -lhal-storage -ldbus-1 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -o HardwareConfigure
diff --git a/tools/HardwareConfigure/mceusb2.hardware.conf b/tools/HardwareConfigure/mceusb2.hardware.conf
deleted file mode 100644
index ba85300572..0000000000
--- a/tools/HardwareConfigure/mceusb2.hardware.conf
+++ /dev/null
@@ -1,39 +0,0 @@
-# /etc/lirc/hardware.conf
-#
-#Chosen Remote Control
-REMOTE="Windows Media Center Remotes (new version Philips et al.)"
-REMOTE_MODULES="lirc_dev lirc_mceusb2"
-REMOTE_DRIVER=""
-REMOTE_DEVICE="/dev/lirc0"
-REMOTE_LIRCD_CONF="mceusb/lircd.conf.mceusb"
-REMOTE_LIRCD_ARGS=""
-
-#Chosen IR Transmitter
-TRANSMITTER="None"
-TRANSMITTER_MODULES=""
-TRANSMITTER_DRIVER=""
-TRANSMITTER_DEVICE=""
-TRANSMITTER_LIRCD_CONF=""
-TRANSMITTER_LIRCD_ARGS=""
-
-#Enable lircd
-START_LIRCD="true"
-
-#Don't start lircmd even if there seems to be a good config file
-#START_LIRCMD="false"
-
-#Try to load appropriate kernel modules
-LOAD_MODULES="true"
-
-# Default configuration files for your hardware if any
-LIRCMD_CONF=""
-
-#Forcing noninteractive reconfiguration
-#If lirc is to be reconfigured by an external application
-#that doesn't have a debconf frontend available, the noninteractive
-#frontend can be invoked and set to parse REMOTE and TRANSMITTER
-#It will then populate all other variables without any user input
-#If you would like to configure lirc via standard methods, be sure
-#to leave this set to "false"
-FORCE_NONINTERACTIVE_RECONFIGURATION="false"
-START_LIRCMD=""
diff --git a/tools/HardwareConfigure/mceusb2.lircd.conf b/tools/HardwareConfigure/mceusb2.lircd.conf
deleted file mode 100644
index 041c2cbaf1..0000000000
--- a/tools/HardwareConfigure/mceusb2.lircd.conf
+++ /dev/null
@@ -1,104 +0,0 @@
-#
-# RC-6 config file
-#
-# source: http://home.hccnet.nl/m.majoor/projects__remote_control.htm
-# http://home.hccnet.nl/m.majoor/pronto.pdf
-#
-# used by: Philips
-#
-#########
-#
-# Philips Media Center Edition remote control
-# For use with the USB MCE ir receiver
-#
-# Dan Conti dconti|acm.wwu.edu
-#
-# Updated with codes for MCE 2005 Remote additional buttons
-# *, #, Teletext, Red, Green, Yellow & Blue Buttons
-# Note: TV power button transmits no code until programmed.
-# Updated 12th September 2005
-# Graham Auld - mce|graham.auld.me.uk
-#
-# Radio, Print, RecTV are only available on the HP Media Center remote control
-#
-
-begin remote
-
- name mceusb
- bits 16
- flags RC6|CONST_LENGTH
- eps 30
- aeps 100
-
- header 2667 889
- one 444 444
- zero 444 444
- pre_data_bits 21
- pre_data 0x37FF0
- gap 105000
- toggle_bit 22
- rc6_mask 0x100000000
-
-
- begin codes
-
- Blue 0x00007ba1
- Yellow 0x00007ba2
- Green 0x00007ba3
- Red 0x00007ba4
- Teletext 0x00007ba5
-
-# starts at af
- Radio 0x00007baf
- Print 0x00007bb1
- Videos 0x00007bb5
- Pictures 0x00007bb6
- RecTV 0x00007bb7
- Music 0x00007bb8
- TV 0x00007bb9
-# no ba - d8
-
- Guide 0x00007bd9
- LiveTV 0x00007bda
- DVD 0x00007bdb
- Back 0x00007bdc
- OK 0x00007bdd
- Right 0x00007bde
- Left 0x00007bdf
- Down 0x00007be0
- Up 0x00007be1
-
- Star 0x00007be2
- Hash 0x00007be3
-
- Replay 0x00007be4
- Skip 0x00007be5
- Stop 0x00007be6
- Pause 0x00007be7
- Record 0x00007be8
- Play 0x00007be9
- Rewind 0x00007bea
- Forward 0x00007beb
- ChanDown 0x00007bec
- ChanUp 0x00007bed
- VolDown 0x00007bee
- VolUp 0x00007bef
- More 0x00007bf0
- Mute 0x00007bf1
- Home 0x00007bf2
- Power 0x00007bf3
- Enter 0x00007bf4
- Clear 0x00007bf5
- Nine 0x00007bf6
- Eight 0x00007bf7
- Seven 0x00007bf8
- Six 0x00007bf9
- Five 0x00007bfa
- Four 0x00007bfb
- Three 0x00007bfc
- Two 0x00007bfd
- One 0x00007bfe
- Zero 0x00007bff
- end codes
-
-end remote
diff --git a/tools/XBMCTex/AnimatedGif.cpp b/tools/XBMCTex/AnimatedGif.cpp
deleted file mode 100644
index ffeba2befe..0000000000
--- a/tools/XBMCTex/AnimatedGif.cpp
+++ /dev/null
@@ -1,649 +0,0 @@
-
-// ****************************************************************************
-//
-// WINIMAGE.CPP : Generic classes for raster images (MSWindows specialization)
-//
-// Content: Member definitions for:
-// - class CAnimatedGif : Storage class for single images
-// - class CAnimatedGifSet : Storage class for sets of images
-//
-// (Includes routines to Load and Save BMP files and to load GIF files into
-// these classes).
-//
-// --------------------------------------------------------------------------
-//
-// Copyright (c) 2000, Juan Soulie <jsoulie@cplusplus.com>
-//
-// Permission to use, copy, modify, distribute and sell this software or any
-// part thereof and/or its documentation for any purpose is granted without fee
-// provided that the above copyright notice and this permission notice appear
-// in all copies.
-//
-// This software is provided "as is" without express or implied warranty of
-// any kind. The author shall have no liability with respect to the
-// infringement of copyrights or patents that any modification to the content
-// of this file or this file itself may incur.
-//
-// ****************************************************************************
-
-#include "xbox.h"
-#include "AnimatedGif.h"
-#include "EndianSwap.h"
-
-#ifdef _WIN32PC
-extern "C" FILE *fopen_utf8(const char *_Filename, const char *_Mode);
-#else
-#define fopen_utf8 fopen
-#endif
-
-#pragma pack(1)
-// Error processing macro (NO-OP by default):
-#define ERRORMSG(PARAM) {}
-
-#ifndef BI_RGB
- #define BI_RGB 0L
- #define BI_RLE8 1L
- #define BI_RLE4 2L
- #define BI_BITFIELDS 3L
-#endif
-
-// Macros to swap data endianness
-#define SWAP16(X) X=Endian_SwapLE16(X)
-#define SWAP32(X) X=Endian_SwapLE32(X)
-
-// pre-declaration:
-int LZWDecoder (char*, char*, short, int, int, int, const int);
-
-// ****************************************************************************
-// * CAnimatedGif Member definitions *
-// ****************************************************************************
-
-CAnimatedGif::CAnimatedGif()
-{
- Height = Width = 0;
- Raster = NULL;
- Palette = NULL;
- pbmi = NULL;
- BPP = Transparent = BytesPerRow = 0;
- xPos = yPos = Delay = Transparency = 0;
- nLoops = 1; //default=play animation 1 time
-}
-
-CAnimatedGif::~CAnimatedGif()
-{
- delete [] pbmi;
- delete [] Raster;
-}
-
-// Init: Allocates space for raster and palette in GDI-compatible structures.
-void CAnimatedGif::Init(int iWidth, int iHeight, int iBPP, int iLoops)
-{
- if (Raster)
- {
- delete[] Raster;
- Raster = NULL;
- }
-
- if (pbmi)
- {
- delete[] pbmi;
- pbmi = NULL;
- }
- // Standard members setup
- Transparent = -1;
- BytesPerRow = Width = PadPow2(iWidth);
- Height = PadPow2(iHeight);
- BPP = iBPP;
- // Animation Extra members setup:
- xPos = yPos = Delay = Transparency = 0;
- nLoops = iLoops;
-
- if (BPP == 24)
- {
- BytesPerRow *= 3;
- pbmi = (GUIBITMAPINFO*)new char [sizeof(GUIBITMAPINFO)];
- }
- else
- {
- pbmi = (GUIBITMAPINFO*)new char[sizeof(GUIBITMAPINFOHEADER) + (1 << BPP) * sizeof(COLOR)];
- Palette = (COLOR*)((char*)pbmi + sizeof(GUIBITMAPINFOHEADER));
- }
-
- BytesPerRow += (ALIGN - Width % ALIGN) % ALIGN; // Align BytesPerRow
- int size = BytesPerRow * Height;
-
- Raster = new char [size];
-
- pbmi->bmiHeader.biSize = sizeof (GUIBITMAPINFOHEADER);
- pbmi->bmiHeader.biWidth = Width;
- pbmi->bmiHeader.biHeight = -Height; // negative means up-to-bottom
- pbmi->bmiHeader.biPlanes = 1;
- pbmi->bmiHeader.biBitCount = (BPP < 8 ? 8 : BPP); // Our raster is byte-aligned
- pbmi->bmiHeader.biCompression = BI_RGB;
- pbmi->bmiHeader.biSizeImage = 0;
- pbmi->bmiHeader.biXPelsPerMeter = 11811;
- pbmi->bmiHeader.biYPelsPerMeter = 11811;
- pbmi->bmiHeader.biClrUsed = 0;
- pbmi->bmiHeader.biClrImportant = 0;
-}
-
-// operator=: copies an object's content to another
-CAnimatedGif& CAnimatedGif::operator = (CAnimatedGif& rhs)
-{
- Init(rhs.Width, rhs.Height, rhs.BPP); // respects virtualization
- memcpy(Raster, rhs.Raster, BytesPerRow*Height);
- memcpy((char*)Palette, (char*)rhs.Palette, (1 << BPP)*sizeof(*Palette));
- return *this;
-}
-
-
-
-CAnimatedGifSet::CAnimatedGifSet()
-{
- FrameHeight = FrameWidth = 0;
- nLoops = 1; //default=play animation 1 time
-}
-
-CAnimatedGifSet::~CAnimatedGifSet()
-{
- Release();
-}
-
-void CAnimatedGifSet::Release()
-{
- FrameWidth = 0;
- FrameHeight = 0;
- for (int i = 0; i < (int)m_vecimg.size(); ++i)
- {
- CAnimatedGif* pImage = m_vecimg[i];
- delete pImage;
- }
- m_vecimg.erase(m_vecimg.begin(), m_vecimg.end());
-
-}
-
-// ****************************************************************************
-// * CAnimatedGifSet Member definitions *
-// ****************************************************************************
-
-// AddImage: Adds an image object to the back of the img vector.
-void CAnimatedGifSet::AddImage (CAnimatedGif* newimage)
-{
- m_vecimg.push_back(newimage);
-}
-
-int CAnimatedGifSet::GetImageCount() const
-{
- return m_vecimg.size();
-}
-
-unsigned char CAnimatedGifSet::getbyte(FILE *fd)
-{
- unsigned char uchar;
- if (fread(&uchar, 1, 1, fd) == 1)
- return uchar;
- else
- return 0;
-}
-
-// ****************************************************************************
-// * LoadGIF *
-// * Load a GIF File into the CAnimatedGifSet object *
-// * (c) Nov 2000, Juan Soulie <jsoulie@cplusplus.com> *
-// ****************************************************************************
-int CAnimatedGifSet::LoadGIF (const char * szFileName)
-{
- int n;
- // Global GIF variables:
- int GlobalBPP; // Bits per Pixel.
- COLOR * GlobalColorMap; // Global colormap (allocate)
-
- struct GIFGCEtag
- { // GRAPHIC CONTROL EXTENSION
- unsigned char BlockSize; // Block Size: 4 bytes
- unsigned char PackedFields; // 3.. Packed Fields. Bits detail:
- // 0: Transparent Color Flag
- // 1: User Input Flag
- // 2-4: Disposal Method
- unsigned short Delay; // 4..5 Delay Time (1/100 seconds)
- unsigned char Transparent; // 6.. Transparent Color Index
- }
- gifgce;
-
- struct GIFNetscapeTag
- {
- unsigned char comment[11]; //4...14 NETSCAPE2.0
- unsigned char SubBlockLength; //15 0x3
- unsigned char reserved; //16 0x1
- unsigned short iIterations ; //17..18 number of iterations (lo-hi)
- }
- gifnetscape;
-
- int GraphicExtensionFound = 0;
-
- // OPEN FILE
- FILE *fd = fopen_utf8(szFileName, "rb");
- if (!fd)
- {
- return 0;
- }
-
- // *1* READ HEADERBLOCK (6bytes) (SIGNATURE + VERSION)
- char szSignature[6]; // First 6 bytes (GIF87a or GIF89a)
- int iRead = fread(szSignature, 1, 6, fd);
- if (iRead != 6)
- {
- fclose(fd);
- return 0;
- }
- if ( memcmp(szSignature, "GIF", 2) != 0)
- {
- fclose(fd);
- return 0;
- }
- // *2* READ LOGICAL SCREEN DESCRIPTOR
- struct GIFLSDtag
- {
- unsigned short ScreenWidth; // Logical Screen Width
- unsigned short ScreenHeight; // Logical Screen Height
- unsigned char PackedFields; // Packed Fields. Bits detail:
- // 0-2: Size of Global Color Table
- // 3: Sort Flag
- // 4-6: Color Resolution
- // 7: Global Color Table Flag
- unsigned char Background; // Background Color Index
- unsigned char PixelAspectRatio; // Pixel Aspect Ratio
- }
- giflsd;
-
- iRead = fread(&giflsd, 1, sizeof(giflsd), fd);
- if (iRead != sizeof(giflsd))
- {
- fclose(fd);
- return 0;
- }
- // endian swap
- SWAP16(giflsd.ScreenWidth);
- SWAP16(giflsd.ScreenHeight);
-
- GlobalBPP = (giflsd.PackedFields & 0x07) + 1;
-
- // fill some animation data:
- FrameWidth = giflsd.ScreenWidth;
- FrameHeight = giflsd.ScreenHeight;
- nLoops = 1; //default=play animation 1 time
-
- // *3* READ/GENERATE GLOBAL COLOR MAP
- GlobalColorMap = new COLOR [1 << GlobalBPP];
- if (giflsd.PackedFields & 0x80) // File has global color map?
- for (n = 0;n < 1 << GlobalBPP;n++)
- {
- GlobalColorMap[n].r = getbyte(fd);
- GlobalColorMap[n].g = getbyte(fd);
- GlobalColorMap[n].b = getbyte(fd);
- }
-
- else // GIF standard says to provide an internal default Palette:
- for (n = 0;n < 256;n++)
- GlobalColorMap[n].r = GlobalColorMap[n].g = GlobalColorMap[n].b = n;
-
- // *4* NOW WE HAVE 3 POSSIBILITIES:
- // 4a) Get and Extension Block (Blocks with additional information)
- // 4b) Get an Image Separator (Introductor to an image)
- // 4c) Get the trailer Char (End of GIF File)
- do
- {
- int charGot = getbyte(fd);
-
- if (charGot == 0x21) // *A* EXTENSION BLOCK
- {
- unsigned char extensionType = getbyte(fd);
- switch (extensionType)
- {
- case 0xF9: // Graphic Control Extension
- {
- if (fread((char*)&gifgce, 1, sizeof(gifgce), fd) == sizeof(gifgce))
- SWAP16(gifgce.Delay);
- GraphicExtensionFound++;
- getbyte(fd); // Block Terminator (always 0)
- }
- break;
-
- case 0xFE: // Comment Extension: Ignored
- {
- while (int nBlockLength = getbyte(fd))
- for (n = 0;n < nBlockLength;n++) getbyte(fd);
- }
- break;
-
- case 0x01: // PlainText Extension: Ignored
- {
- while (int nBlockLength = getbyte(fd))
- for (n = 0;n < nBlockLength;n++) getbyte(fd);
- }
- break;
-
- case 0xFF: // Application Extension: Ignored
- {
- int nBlockLength = getbyte(fd);
- if (nBlockLength == 0x0b)
- {
- struct GIFNetscapeTag tag;
- if (fread((char*)&tag, 1, sizeof(gifnetscape), fd) == sizeof(gifnetscape))
- {
- SWAP16(tag.iIterations);
- nLoops = tag.iIterations;
- }
- else
- nLoops = 0;
-
- if (nLoops) nLoops++;
- getbyte(fd);
- }
- else
- {
- do
- {
- for (n = 0;n < nBlockLength;n++) getbyte(fd);
- }
- while ((nBlockLength = getbyte(fd)) != 0);
- }
- }
- break;
-
- default: // Unknown Extension: Ignored
- {
- // read (and ignore) data sub-blocks
- while (int nBlockLength = getbyte(fd))
- for (n = 0;n < nBlockLength;n++) getbyte(fd);
- }
- break;
- }
- }
- else if (charGot == 0x2c)
- { // *B* IMAGE (0x2c Image Separator)
- // Create a new Image Object:
- CAnimatedGif* NextImage = new CAnimatedGif();
-
- // Read Image Descriptor
- struct GIFIDtag
- {
- unsigned short xPos; // Image Left Position
- unsigned short yPos; // Image Top Position
- unsigned short Width; // Image Width
- unsigned short Height; // Image Height
- unsigned char PackedFields; // Packed Fields. Bits detail:
- // 0-2: Size of Local Color Table
- // 3-4: (Reserved)
- // 5: Sort Flag
- // 6: Interlace Flag
- // 7: Local Color Table Flag
- }
- gifid;
-
- memset(&gifid, 0, sizeof(gifid));
-
- int LocalColorMap = 0;
- if (fread((char*)&gifid, 1, sizeof(gifid), fd) == sizeof(gifid))
- {
- SWAP16(gifid.xPos);
- SWAP16(gifid.yPos);
- SWAP16(gifid.Width);
- SWAP16(gifid.Height);
-
- LocalColorMap = (gifid.PackedFields & 0x08) ? 1 : 0;
- }
-
- NextImage->Init(gifid.Width, gifid.Height, LocalColorMap ? (gifid.PackedFields&7) + 1 : GlobalBPP);
-
- // Fill NextImage Data
- NextImage->xPos = gifid.xPos;
- NextImage->yPos = gifid.yPos;
- if (GraphicExtensionFound)
- {
- NextImage->Transparent = (gifgce.PackedFields & 0x01) ? gifgce.Transparent : -1;
- NextImage->Transparency = (gifgce.PackedFields & 0x1c) > 1 ? 1 : 0;
- NextImage->Delay = gifgce.Delay * 10;
- }
-
- if (NextImage->Transparent != -1)
- memset(NextImage->Raster, NextImage->Transparent, NextImage->BytesPerRow * NextImage->Height);
- else
- memset(NextImage->Raster, giflsd.Background, NextImage->BytesPerRow * NextImage->Height);
-
- // Read Color Map (if descriptor says so)
- size_t palSize = sizeof(COLOR)*(1 << NextImage->BPP);
- bool isPalRead = false;
- if (LocalColorMap && fread((char*)NextImage->Palette, 1, palSize, fd) == palSize)
- isPalRead = true;
-
- // Copy global, if no palette
- if (!isPalRead)
- memcpy(NextImage->Palette, GlobalColorMap, palSize);
-
- short firstbyte = getbyte(fd); // 1st byte of img block (CodeSize)
-
- // Calculate compressed image block size
- // to fix: this allocates an extra byte per block
- long ImgStart, ImgEnd;
- ImgEnd = ImgStart = ftell(fd);
- while ((n = getbyte(fd)) != 0) fseek (fd, ImgEnd += n + 1, SEEK_SET );
- fseek (fd, ImgStart, SEEK_SET);
-
- // Allocate Space for Compressed Image
- char * pCompressedImage = new char [ImgEnd - ImgStart + 4];
-
- // Read and store Compressed Image
- char * pTemp = pCompressedImage;
- while (int nBlockLength = getbyte(fd))
- {
- if (fread(pTemp, 1, nBlockLength, fd) != (size_t)nBlockLength)
- {
- // Error?
- }
- pTemp += nBlockLength;
- }
-
- // Call LZW/GIF decompressor
- n = LZWDecoder(
- (char*) pCompressedImage,
- (char*) NextImage->Raster,
- firstbyte, NextImage->BytesPerRow, //NextImage->AlignedWidth,
- gifid.Width, gifid.Height,
- ((gifid.PackedFields & 0x40) ? 1 : 0) //Interlaced?
- );
-
- if (n)
- AddImage(NextImage);
- else
- {
- delete NextImage;
- ERRORMSG("GIF File Corrupt");
- }
-
- // Some cleanup
- delete[] pCompressedImage;
- GraphicExtensionFound = 0;
- }
- else if (charGot == 0x3b)
- {
- // *C* TRAILER: End of GIF Info
- break; // Ok. Standard End.
- }
-
- }
- while ( !feof(fd) );
-
- delete[] GlobalColorMap;
- fclose(fd);
- if ( GetImageCount() == 0) ERRORMSG("Premature End Of File");
- return GetImageCount();
-}
-
-// ****************************************************************************
-// * LZWDecoder (C/C++) *
-// * Codec to perform LZW (GIF Variant) decompression. *
-// * (c) Nov2000, Juan Soulie <jsoulie@cplusplus.com> *
-// ****************************************************************************
-//
-// Parameter description:
-// - bufIn: Input buffer containing a "de-blocked" GIF/LZW compressed image.
-// - bufOut: Output buffer where result will be stored.
-// - InitCodeSize: Initial CodeSize to be Used
-// (GIF files include this as the first byte in a picture block)
-// - AlignedWidth : Width of a row in memory (including alignment if needed)
-// - Width, Height: Physical dimensions of image.
-// - Interlace: 1 for Interlaced GIFs.
-//
-int LZWDecoder (char * bufIn, char * bufOut,
- short InitCodeSize, int AlignedWidth,
- int Width, int Height, const int Interlace)
-{
- int n;
- int row = 0, col = 0; // used to point output if Interlaced
- int nPixels, maxPixels; // Output pixel counter
-
- short CodeSize; // Current CodeSize (size in bits of codes)
- short ClearCode; // Clear code : resets decompressor
- short EndCode; // End code : marks end of information
-
- long whichBit; // Index of next bit in bufIn
- long LongCode; // Temp. var. from which Code is retrieved
- short Code; // Code extracted
- short PrevCode; // Previous Code
- short OutCode; // Code to output
-
- // Translation Table:
- short Prefix[4096]; // Prefix: index of another Code
- unsigned char Suffix[4096]; // Suffix: terminating character
- short FirstEntry; // Index of first free entry in table
- short NextEntry; // Index of next free entry in table
-
- unsigned char OutStack[4097]; // Output buffer
- int OutIndex; // Characters in OutStack
-
- int RowOffset; // Offset in output buffer for current row
-
- // Set up values that depend on InitCodeSize Parameter.
- CodeSize = InitCodeSize + 1;
- ClearCode = (1 << InitCodeSize);
- EndCode = ClearCode + 1;
- NextEntry = FirstEntry = ClearCode + 2;
-
- whichBit = 0;
- nPixels = 0;
- maxPixels = Width * Height;
- RowOffset = 0;
- PrevCode = 0;
-
- while (nPixels < maxPixels)
- {
- OutIndex = 0; // Reset Output Stack
-
- // GET NEXT CODE FROM bufIn:
- // LZW compression uses code items longer than a single byte.
- // For GIF Files, code sizes are variable between 9 and 12 bits
- // That's why we must read data (Code) this way:
- LongCode = *((long*)(bufIn + whichBit / 8)); // Get some bytes from bufIn
- SWAP32(LongCode);
- LongCode >>= (whichBit&7); // Discard too low bits
- Code = (short)((LongCode & ((1 << CodeSize) - 1) )); // Discard too high bits
- whichBit += CodeSize; // Increase Bit Offset
-
- // SWITCH, DIFFERENT POSIBILITIES FOR CODE:
- if (Code == EndCode) // END CODE
- break; // Exit LZW Decompression loop
-
- if (Code == ClearCode)
- {
- // CLEAR CODE:
- CodeSize = InitCodeSize + 1; // Reset CodeSize
- NextEntry = FirstEntry; // Reset Translation Table
- PrevCode = Code; // Prevent next to be added to table.
- continue; // restart, to get another code
- }
- if (Code < NextEntry) // CODE IS IN TABLE
- OutCode = Code; // Set code to output.
-
- else
- { // CODE IS NOT IN TABLE:
- OutIndex++; // Keep "first" character of previous output.
- OutCode = PrevCode; // Set PrevCode to be output
- }
-
- // EXPAND OutCode IN OutStack
- // - Elements up to FirstEntry are Raw-Codes and are not expanded
- // - Table Prefices contain indexes to other codes
- // - Table Suffices contain the raw codes to be output
- while (OutCode >= FirstEntry)
- {
- if (OutIndex > 4096 || OutCode >= 4096)
- return 0;
- OutStack[OutIndex++] = Suffix[OutCode]; // Add suffix to Output Stack
- OutCode = Prefix[OutCode]; // Loop with preffix
- }
-
- // NOW OutCode IS A RAW CODE, ADD IT TO OUTPUT STACK.
- if (OutIndex > 4096)
- return 0;
- OutStack[OutIndex++] = (unsigned char) OutCode;
-
- // ADD NEW ENTRY TO TABLE (PrevCode + OutCode)
- // (EXCEPT IF PREVIOUS CODE WAS A CLEARCODE)
- if (PrevCode != ClearCode)
- {
- Prefix[NextEntry] = PrevCode;
- Suffix[NextEntry] = (unsigned char) OutCode;
- NextEntry++;
-
- // Prevent Translation table overflow:
- if (NextEntry >= 4096)
- return 0;
-
- // INCREASE CodeSize IF NextEntry IS INVALID WITH CURRENT CodeSize
- if (NextEntry >= (1 << CodeSize))
- {
- if (CodeSize < 12) CodeSize++;
- else
- {
- ;
- } // Do nothing. Maybe next is Clear Code.
- }
- }
-
- PrevCode = Code;
-
- // Avoid the possibility of overflow on 'bufOut'.
- if (nPixels + OutIndex > maxPixels) OutIndex = maxPixels - nPixels;
-
- // OUTPUT OutStack (LAST-IN FIRST-OUT ORDER)
- for (n = OutIndex - 1; n >= 0; n--)
- {
- if (col == Width) // Check if new row.
- {
- if (Interlace)
- {
- // If interlaced::
- if ((row&7) == 0) {row += 8; if (row >= Height) row = 4;}
- else if ((row&3) == 0) {row += 8; if (row >= Height) row = 2;}
- else if ((row&1) == 0) {row += 4; if (row >= Height) row = 1;}
- else row += 2;
- }
- else // If not interlaced:
- row++;
-
- RowOffset = row * AlignedWidth; // Set new row offset
- col = 0;
- }
- bufOut[RowOffset + col] = OutStack[n]; // Write output
- col++; nPixels++; // Increase counters.
- }
-
- } // while (main decompressor loop)
-
- return whichBit;
-}
-
-// Refer to WINIMAGE.TXT for copyright and patent notices on GIF and LZW.
-
-#pragma pack()
diff --git a/tools/XBMCTex/AnimatedGif.h b/tools/XBMCTex/AnimatedGif.h
deleted file mode 100644
index 28bbe65c1d..0000000000
--- a/tools/XBMCTex/AnimatedGif.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*!
-\file AnimatedGif.h
-\brief
-*/
-
-
-// ****************************************************************************
-//
-// WINIMAGE.H : Generic classes for raster images (MSWindows specialization)
-//
-// Content: Class declarations of:
-// - class CAnimatedGif : Storage class for single images
-// - class CAnimatedGifSet : Storage class for sets of images
-// - class C_AnimationWindow : Window Class to display animations
-//
-// (Includes declarations of routines to Load and Save BMP files and to load
-// GIF files into these classes).
-//
-// --------------------------------------------------------------------------
-//
-// Copyright 2000, Juan Soulie <jsoulie@cplusplus.com>
-//
-// Permission to use, copy, modify, distribute and sell this software or any
-// part thereof and/or its documentation for any purpose is granted without fee
-// provided that the above copyright notice and this permission notice appear
-// in all copies.
-//
-// This software is provided "as is" without express or implied warranty of
-// any kind. The author shall have no liability with respect to the
-// infringement of copyrights or patents that any modification to the content
-// of this file or this file itself may incur.
-//
-// ****************************************************************************
-
-#ifdef _LINUX
-#include "PlatformDefs.h"
-#else
-#include <windows.h>
-#endif
-
-#include <vector>
-#include <cstdio>
-
-#pragma pack(1)
-
-struct COLOR {unsigned char b,g,r,x;}; // Windows GDI expects 4bytes per color
-#undef ALIGN
-#define ALIGN sizeof(int) ///< Windows GDI expects all int-aligned
-
-/*!
- \ingroup textures
- \brief
- */
-typedef struct tagGUIRGBQUAD
-{
- BYTE rgbBlue;
- BYTE rgbGreen;
- BYTE rgbRed;
- BYTE rgbReserved;
-}
-GUIRGBQUAD;
-
-/*!
- \ingroup textures
- \brief
- */
-typedef struct tagGUIBITMAPINFOHEADER
-{
- DWORD biSize;
- LONG biWidth;
- LONG biHeight;
- WORD biPlanes;
- WORD biBitCount;
- DWORD biCompression;
- DWORD biSizeImage;
- LONG biXPelsPerMeter;
- LONG biYPelsPerMeter;
- DWORD biClrUsed;
- DWORD biClrImportant;
-}
-GUIBITMAPINFOHEADER;
-
-/*!
- \ingroup textures
- \brief
- */
-typedef struct tagGUIBITMAPINFO
-{
- GUIBITMAPINFOHEADER bmiHeader;
- GUIRGBQUAD bmiColors[1];
-} GUIBITMAPINFO;
-
-
-// ****************************************************************************
-// * CAnimatedGif *
-// * Storage class for single images *
-// ****************************************************************************
-/*!
- \ingroup textures
- \brief Storage class for single images
- */
-class CAnimatedGif
-{
-public:
- CAnimatedGif();
- virtual ~CAnimatedGif();
-
- // standard members:
- int Width, Height; ///< Dimensions in pixels
- int BPP; // Bits Per Pixel
- char* Raster; ///< Bits of Raster Data (Byte Aligned)
- COLOR* Palette; ///< Color Map
- int BytesPerRow; ///< Width (in bytes) including alignment!
- int Transparent; ///< Index of Transparent color (-1 for none)
-
- // Extra members for animations:
- int nLoops;
- int xPos, yPos; ///< Relative Position
- int Delay; ///< Delay after image in 1/1000 seconds.
- int Transparency; ///< Animation Transparency.
- // Windows GDI specific:
- GUIBITMAPINFO* pbmi; ///< BITMAPINFO structure
-
- // constructor and destructor:
-
- // operator= (object copy)
- CAnimatedGif& operator= (CAnimatedGif& rhs);
-
- /// \brief Image initializer (allocates space for raster and palette):
- void Init (int iWidth, int iHeight, int iBPP, int iLoops = 0);
-
- inline char& Pixel (int x, int y) { return Raster[y*BytesPerRow + x];}
-
-};
-
-// ****************************************************************************
-// * CAnimatedGifSet *
-// * Storage class for sets of images *
-// ****************************************************************************
-/*!
- \ingroup textures
- \brief Storage class for sets of images
- */
-class CAnimatedGifSet
-{
-public:
-
- // constructor and destructor:
- CAnimatedGifSet();
- virtual ~CAnimatedGifSet();
-
- int FrameWidth, FrameHeight; ///< Dimensions of ImageSet in pixels.
- int nLoops; // Number of Loops (0 = infinite)
-
- std::vector<CAnimatedGif*> m_vecimg; ///< Images' Vector.
-
- void AddImage (CAnimatedGif*); ///< Append new image to vector (push_back)
-
- int GetImageCount() const;
- // File Formats:
- int LoadGIF (const char* szFile);
-
- void Release();
-protected:
- unsigned char getbyte(FILE *fd);
-};
-
-#pragma pack()
diff --git a/tools/XBMCTex/Bundler.cpp b/tools/XBMCTex/Bundler.cpp
deleted file mode 100644
index 398af01086..0000000000
--- a/tools/XBMCTex/Bundler.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include "Bundler.h"
-#include "EndianSwap.h"
-
-#ifdef _LINUX
-#include <lzo1x.h>
-#else
-#include "../../xbmc/lib/liblzo/LZO1X.H"
-#endif
-
-// alignment of file blocks - should be a multiple of the sector size of the disk and a power of 2
-// HDD sector = 512 bytes, DVD/CD sector = 2048 bytes
-// XBMC supports caching of texures on the HDD for DVD loads, so this can be 512
-#undef ALIGN
-#define ALIGN (512)
-
-bool CBundler::StartBundle()
-{
- DataSize = 0;
- FileHeaders.clear();
-
- lzo_init();
-
- return true;
-}
-
-// On big-endian systems, to generate the same bundle on little-endian systems,
-// we need to swap all the values in the header
-
-int CBundler::WriteBundle(const char* Filename, int NoProtect)
-{
- // calc data offset
- DWORD headerSize = sizeof(XPR_FILE_HEADER) + FileHeaders.size() * sizeof(FileHeader_t);
-
- // setup header
- XPRHeader.dwMagic = Endian_SwapLE32(XPR_MAGIC_HEADER_VALUE | ((2+(NoProtect << 7)) << 24)); // version 2
- XPRHeader.dwHeaderSize = Endian_SwapLE32(headerSize);
-
- headerSize = (headerSize + (ALIGN-1)) & ~(ALIGN-1);
- XPRHeader.dwTotalSize = Endian_SwapLE32(headerSize + DataSize);
-
- // create our header in memory
- BYTE *headerBuf = (BYTE *)malloc(headerSize);
- if (!headerBuf) return -1;
-
- BYTE* buf = headerBuf;
- memcpy(buf, &XPRHeader, sizeof(XPR_FILE_HEADER));
- buf += sizeof(XPR_FILE_HEADER);
-
- for (std::list<FileHeader_t>::iterator i = FileHeaders.begin(); i != FileHeaders.end(); ++i)
- {
- // Swap values on big-endian systems
- i->Offset = Endian_SwapLE32(i->Offset + headerSize);
- i->UnpackedSize = Endian_SwapLE32(i->UnpackedSize);
- i->PackedSize = Endian_SwapLE32(i->PackedSize);
- memcpy(buf, &(*i), sizeof(FileHeader_t));
- buf += sizeof(FileHeader_t);
- }
- memset(buf, 0, headerBuf + headerSize - buf);
-
- // write file
- FILE *file = fopen(Filename, "wb");
- if (!file)
- {
- free(Data);
- free(headerBuf);
- return -1;
- }
-
- size_t n = fwrite(headerBuf, 1, headerSize, file);
- if (n != headerSize)
- {
- free(Data);
- free(headerBuf);
- fclose(file);
- return -1;
- }
-
- n = fwrite(Data, 1, DataSize, file);
- if (n != DataSize)
- {
- free(Data);
- free(headerBuf);
- fclose(file);
- return -1;
- }
-
- free(Data);
- free(headerBuf);
- fclose(file);
-
- return DataSize + headerSize;
-}
-
-bool CBundler::AddFile(const char* Filename, int nBuffers, const void** Buffers, DWORD* Sizes)
-{
- FileHeader_t Header;
-
- memset(Header.Name, 0, sizeof(Header.Name));
- for (int i = 0; i < (int)sizeof(Header.Name) && Filename[i]; ++i)
- Header.Name[i] = tolower(Filename[i]);
- Header.Name[sizeof(Header.Name)-1] = 0;
-
- Header.Offset = DataSize;
- Header.PackedSize = 0;
- Header.UnpackedSize = 0;
- for (int i = 0; i < nBuffers; ++i)
- Header.UnpackedSize += Sizes[i];
-
- // allocate enough memory for the total unpacked size
- BYTE* buf = (BYTE*)malloc(Header.UnpackedSize);
- if (!buf) return false; // failure to allocate memory
-
- BYTE* p = buf;
- for (int i = 0; i < nBuffers; ++i)
- {
- memcpy(p, Buffers[i], Sizes[i]);
- p += Sizes[i];
- }
-
- // grab a temporary buffer for unpacking into
- BYTE *compressedBuf = (BYTE*)malloc(Header.UnpackedSize);
- if (!compressedBuf)
- {
- free(buf);
- return false;
- }
-
- // and a working buffer for lzo
- lzo_voidp workingBuf = malloc(LZO1X_999_MEM_COMPRESS);
- if (!workingBuf)
- {
- free(buf);
- free(compressedBuf);
- return false;
- }
-
- if (lzo1x_999_compress(buf, Header.UnpackedSize, compressedBuf, (lzo_uint*)&Header.PackedSize, workingBuf) != LZO_E_OK)
- {
- printf("Compression failure\n");
- free(buf);
- free(compressedBuf);
- free(workingBuf);
- return false;
- }
- free(workingBuf);
-
- lzo_uint s = Header.UnpackedSize;
- lzo1x_optimize(compressedBuf, Header.PackedSize, buf, &s, NULL);
- free(buf);
-
- // now increase the size of our buffer
- DWORD ExtraNeeded = (Header.PackedSize + (ALIGN-1)) & ~(ALIGN-1);
-
- // reallocate our data dump
- Data = (BYTE*)realloc(Data, DataSize + ExtraNeeded);
-
- memcpy(Data + DataSize, compressedBuf, Header.PackedSize);
- free(compressedBuf);
-
- memset(Data + DataSize + Header.PackedSize, 0, ExtraNeeded - Header.PackedSize);
- DataSize += ExtraNeeded;
- FileHeaders.push_back(Header);
-
- return true;
-}
diff --git a/tools/XBMCTex/Bundler.h b/tools/XBMCTex/Bundler.h
deleted file mode 100644
index 15e8313b84..0000000000
--- a/tools/XBMCTex/Bundler.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#pragma once
-
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include <cstdlib>
-#include <ctype.h>
-#include <cstdio>
-#include <list>
-#include "xbox.h"
-
-class CBundler
-{
- XPR_FILE_HEADER XPRHeader;
- struct FileHeader_t
- {
- // 128 bytes total
- char Name[116];
- DWORD Offset;
- DWORD UnpackedSize;
- DWORD PackedSize;
- };
- std::list<FileHeader_t> FileHeaders;
- BYTE* Data;
- DWORD DataSize;
-
-public:
- CBundler() { Data = NULL; DataSize = 0; }
- ~CBundler() {}
-
- bool StartBundle();
- int WriteBundle(const char* Filename, int NoProtect);
-
- bool AddFile(const char* Filename, int nBuffers, const void** Buffers, DWORD* Sizes);
-};
diff --git a/tools/XBMCTex/Makefile.in b/tools/XBMCTex/Makefile.in
deleted file mode 100644
index 33042b5549..0000000000
--- a/tools/XBMCTex/Makefile.in
+++ /dev/null
@@ -1,31 +0,0 @@
-ARCH=@ARCH@
-
-INCLUDES = -I../../xbmc/linux -I../../guilib -I../../xbmc/ -I../../xbmc/utils
-DEFINES = -DHAS_SDL
-LIBS = @LIBS@ -lSDL_image
-OBJS = \
- AnimatedGif.o \
- Bundler.o \
- SurfaceSDL.o \
- XBMCTex.o \
- xbox.o \
- xwinapi.o \
- XFileUtils.o \
- XHandle.o \
- XTimeUtils.o \
- sha.o
-
-TARGET = XBMCTex
-CLEAN_FILES=$(TARGET)
-
-all: $(TARGET)
-
-include ../../Makefile.include
-
-$(TARGET): $(OBJS)
-ifeq ($(findstring osx,$(ARCH)), osx)
- $(MAKE) -f Makefile.osx
-else
- g++ $(OBJS) $(LDFLAGS) $(LIBS) -o $(TARGET)
-endif
-
diff --git a/tools/XBMCTex/Makefile.osx b/tools/XBMCTex/Makefile.osx
deleted file mode 100644
index 8fc626497d..0000000000
--- a/tools/XBMCTex/Makefile.osx
+++ /dev/null
@@ -1,45 +0,0 @@
-
-# To build an universal binary, uncomment out the "UNIVERSAL" variable below
-# You need to have installed MacPorts for both arch (at least lzo libsdl libsdl_image and their dependencies)
-# Follow the README.osx but keep both ppc and i386 for universal_archs in /opt/local/etc/macports/macports.conf:
-# "universal_archs ppc i386"
-#UNIVERSAL = -arch ppc -arch i386
-
-DEFINES = -DHAS_SDL -D_LINUX
-INCLUDES = -I../../xbmc/linux -I../../guilib -I../../xbmc/ -I../../xbmc/utils -I/opt/local/include
-# To build with shared MacPorts libs
-LIBS = -lSDL -lSDL_image -llzo
-LDFLAGS = -L/opt/local/lib -lSDLmain -framework Foundation -framework Cocoa
-# To build with static MacPorts libs
-# You need to have used "+universal" when installing MacPorts! (see README.osx)
-#LIBS = /opt/local/lib/liblzo.a /opt/local/lib/libSDL_image.a /opt/local/lib/libpng.a /opt/local/lib/libtiff.a /opt/local/lib/libjpeg.a /opt/local/lib/libz.a
-# LDFLAGS is the output of `sdl-config --static-libs`
-#LDFLAGS = -L/opt/local/lib /opt/local/lib/libSDLmain.a /opt/local/lib/libSDL.a -Wl,-framework,OpenGL -Wl,-framework,Cocoa -Wl,-framework,QuickTime -Wl,-framework,ApplicationServices -Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,IOKit
-OBJS = \
- AnimatedGif.o \
- Bundler.o \
- SurfaceSDL.o \
- XBMCTex.o \
- xbox.o \
- xwinapi.o \
- XFileUtils.o \
- XHandle.o \
- XTimeUtils.o \
- sha.o \
- OSXGNUReplacements.o
-
-TARGET = XBMCTex
-
-all: $(TARGET)
-
-$(TARGET): $(OBJS)
- g++ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 $(UNIVERSAL) $(OBJS) $(LDFLAGS) $(LIBS) -o $(TARGET)
-
-.cpp.o:
- g++ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 $(UNIVERSAL) $(DEFINES) $(INCLUDES) -c -o $@ $<
-
-.c.o:
- gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 $(UNIVERSAL) $(DEFINES) $(INCLUDES) -c -o $@ $<
-
-clean:
- rm -f $(TARGET) *.o
diff --git a/tools/XBMCTex/OSXGNUReplacements.c b/tools/XBMCTex/OSXGNUReplacements.c
deleted file mode 100644
index c94b0fa429..0000000000
--- a/tools/XBMCTex/OSXGNUReplacements.c
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright (C) 2005-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <netdb.h>
-#include <pthread.h>
-#include <errno.h>
-
-#include "OSXGNUReplacements.h"
-
-size_t strnlen(const char *s, size_t n)
-{
- size_t i;
- for (i=0; i<n && s[i] != '\0'; i++)
- /* noop */ ;
- return i;
-}
-
-char* strndup(char const *s, size_t n)
-{
- size_t len = strnlen(s, n);
- char *new_str = (char*)malloc(len + 1);
- if (new_str == NULL)
- return NULL;
- new_str[len] = '\0';
-
- return (char*)memcpy(new_str, s, len);
-}
-
-/*
-From http://svn.digium.com/view/asterisk/trunk/main/utils.c
-GNU General Public License Version 2
-Brief Reentrant replacement for gethostbyname for BSD-based systems. Note This
-routine is derived from code originally written and placed in the public
-domain by Enzo Michelangeli <em@em.no-ip.com>
-*/
-static pthread_mutex_t gethostbyname_r_mutex = PTHREAD_MUTEX_INITIALIZER;
-//
-int gethostbyname_r(const char *name, struct hostent *ret, char *buf,
- size_t buflen, struct hostent **result, int *h_errnop)
-{
- int hsave;
- struct hostent *ph;
- pthread_mutex_lock(&gethostbyname_r_mutex); /* begin critical area */
- hsave = h_errno;
-
- ph = gethostbyname(name);
- *h_errnop = h_errno; /* copy h_errno to *h_herrnop */
- if (ph == NULL) {
- *result = NULL;
- } else {
- char **p, **q;
- char *pbuf;
- int nbytes = 0;
- int naddr = 0, naliases = 0;
- /* determine if we have enough space in buf */
-
- /* count how many addresses */
- for (p = ph->h_addr_list; *p != 0; p++) {
- nbytes += ph->h_length; /* addresses */
- nbytes += sizeof(*p); /* pointers */
- naddr++;
- }
- nbytes += sizeof(*p); /* one more for the terminating NULL */
-
- /* count how many aliases, and total length of strings */
- for (p = ph->h_aliases; *p != 0; p++) {
- nbytes += (strlen(*p)+1); /* aliases */
- nbytes += sizeof(*p); /* pointers */
- naliases++;
- }
- nbytes += sizeof(*p); /* one more for the terminating NULL */
-
- /* here nbytes is the number of bytes required in buffer */
- /* as a terminator must be there, the minimum value is ph->h_length */
- if (nbytes > buflen) {
- *result = NULL;
- pthread_mutex_unlock(&gethostbyname_r_mutex); /* end critical area */
- return ERANGE; /* not enough space in buf!! */
- }
-
- /* There is enough space. Now we need to do a deep copy! */
- /* Allocation in buffer:
- from [0] to [(naddr-1) * sizeof(*p)]:
- pointers to addresses
- at [naddr * sizeof(*p)]:
- NULL
- from [(naddr+1) * sizeof(*p)] to [(naddr+naliases) * sizeof(*p)] :
- pointers to aliases
- at [(naddr+naliases+1) * sizeof(*p)]:
- NULL
- then naddr addresses (fixed length), and naliases aliases (asciiz).
- */
-
- *ret = *ph; /* copy whole structure (not its address!) */
-
- /* copy addresses */
- q = (char **)buf; /* pointer to pointers area (type: char **) */
- ret->h_addr_list = q; /* update pointer to address list */
- pbuf = buf + ((naddr + naliases + 2) * sizeof(*p)); /* skip that area */
- for (p = ph->h_addr_list; *p != 0; p++) {
- memcpy(pbuf, *p, ph->h_length); /* copy address bytes */
- *q++ = pbuf; /* the pointer is the one inside buf... */
- pbuf += ph->h_length; /* advance pbuf */
- }
- *q++ = NULL; /* address list terminator */
-
- /* copy aliases */
- ret->h_aliases = q; /* update pointer to aliases list */
- for (p = ph->h_aliases; *p != 0; p++) {
- strcpy(pbuf, *p); /* copy alias strings */
- *q++ = pbuf; /* the pointer is the one inside buf... */
- pbuf += strlen(*p); /* advance pbuf */
- *pbuf++ = 0; /* string terminator */
- }
- *q++ = NULL; /* terminator */
-
- strcpy(pbuf, ph->h_name); /* copy alias strings */
- ret->h_name = pbuf;
- pbuf += strlen(ph->h_name); /* advance pbuf */
- *pbuf++ = 0; /* string terminator */
-
- *result = ret; /* and let *result point to structure */
-
- }
- h_errno = hsave; /* restore h_errno */
- pthread_mutex_unlock(&gethostbyname_r_mutex); /* end critical area */
-
- return (*result == NULL); /* return 0 on success, non-zero on error */
-}
-
-/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <errno.h>
-
-/* Read up to (and including) a TERMINATOR from STREAM into *LINEPTR
- (and null-terminate it). *LINEPTR is a pointer returned from malloc (or
- NULL), pointing to *N characters of space. It is realloc'd as
- necessary. Returns the number of characters read (not including the
- null terminator), or -1 on error or EOF. */
-
-ssize_t
-getdelim (lineptr, n, terminator, stream)
- char **lineptr;
- size_t *n;
- int terminator;
- FILE *stream;
-{
- char *line, *p;
- size_t size, copy;
-
- if (stream == NULL || lineptr == NULL || n == NULL)
- {
- errno = EINVAL;
- return -1;
- }
-
- if (ferror (stream))
- return -1;
-
- /* Make sure we have a line buffer to start with. */
- if (*lineptr == NULL || *n < 2) /* !seen and no buf yet need 2 chars. */
- {
-#ifndef MAX_CANON
-#define MAX_CANON 256
-#endif
- line = realloc (*lineptr, MAX_CANON);
- if (line == NULL)
- return -1;
- *lineptr = line;
- *n = MAX_CANON;
- }
-
- line = *lineptr;
- size = *n;
-
- copy = size;
- p = line;
-
- while (1)
- {
- size_t len;
-
- while (--copy > 0)
- {
- register int c = getc (stream);
- if (c == EOF)
- goto lose;
- else if ((*p++ = c) == terminator)
- goto win;
- }
-
- /* Need to enlarge the line buffer. */
- len = p - line;
- size *= 2;
- line = realloc (line, size);
- if (line == NULL)
- goto lose;
- *lineptr = line;
- *n = size;
- p = line + len;
- copy = size - len;
- }
-
- lose:
- if (p == *lineptr)
- return -1;
- /* Return a partial line since we got an error in the middle. */
- win:
- *p = '\0';
- return p - *lineptr;
-}
-
-ssize_t
-getline (char **lineptr, size_t *n, FILE *stream)
-{
- return getdelim (lineptr, n, '\n', stream);
-}
diff --git a/tools/XBMCTex/OSXGNUReplacements.h b/tools/XBMCTex/OSXGNUReplacements.h
deleted file mode 100644
index 7209544140..0000000000
--- a/tools/XBMCTex/OSXGNUReplacements.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifndef __OSXPLATFORM_H__
-#define __OSXPLATFORM_H__
-/*
- * Copyright (C) 2005-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// This is a catch all for GNU routines that do not exist under OSX.
-#include <netdb.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-size_t strnlen(const char *s, size_t n);
-char* strndup(char const *s, size_t n);
-int gethostbyname_r(const char *name, struct hostent *ret, char *buf,
- size_t buflen, struct hostent **result, int *h_errnop);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* getdelim.h --- Prototype for replacement getdelim function.
- Copyright (C) 2005 Free Software Foundation, Inc.
-
- 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, or (at
- your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* Written by Simon Josefsson. */
-# include <stddef.h>
-# include <stdio.h>
-# include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-ssize_t getdelim(char **lineptr, size_t *n, int delimiter, FILE *stream);
-ssize_t getline (char **lineptr, size_t *n, FILE *stream);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/tools/XBMCTex/README.osx b/tools/XBMCTex/README.osx
deleted file mode 100644
index 3ba8fce82b..0000000000
--- a/tools/XBMCTex/README.osx
+++ /dev/null
@@ -1,24 +0,0 @@
-To compile XBMCTex on Mac OS X, run make -f Makefile.osx
-
-I) By default it will build XBMCTex with shared MacPorts libs
-
-II) To build with static MacPorts libs
-1) You need to have used "+universal" when installing MacPorts! (see XBMC/README.osx)
-2) You need to force lzo to build a static lib
- $ sudo nano /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/lzo/Portfile
- change "--disable-static" to "--enable-static"
-
- $ sudo port install lzo +universal
- (if lzo was previously installed, you will have to uninstall it first)
-
-3) Uncomment out the following variables in Makefile.osx
-LIBS = /opt/local/lib/liblzo.a /opt/local/lib/libSDL_image.a /opt/local/lib/libpng.a /opt/local/lib/libtiff.a /opt/local/lib/libjpeg.a /opt/local/lib/libz.a
-LDFLAGS = -L/opt/local/lib /opt/local/lib/libSDLmain.a /opt/local/lib/libSDL.a -Wl,-framework,OpenGL -Wl,-framework,Cocoa -Wl,-framework,QuickTime -Wl,-framework,ApplicationServices -Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,IOKit
-(LDFLAGS is the output of `sdl-config --static-libs`)
-
-III) To build an universal binary, uncomment out the "UNIVERSAL" variable in Makefile.osx
-You need to have installed MacPorts for both arch (at least lzo libsdl
-libsdl_image and their dependencies)
-Follow the XBMC/README.osx but keep both ppc and i386 for universal_archs
-in /opt/local/etc/macports/macports.conf:
- "universal_archs ppc i386"
diff --git a/tools/XBMCTex/Surface.cpp b/tools/XBMCTex/Surface.cpp
deleted file mode 100644
index 4ef572b8d1..0000000000
--- a/tools/XBMCTex/Surface.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// class CSurface
-#include "Surface.h"
-
-#ifndef HAS_SDL
-
-#include <stdio.h>
-#include "xbox.h"
-
-CGraphicsDevice g_device;
-
-CSurface::CSurface()
-{
- m_surface = NULL;
- m_width = 0;
- m_height = 0;
- m_bpp = 0;
-}
-
-CSurface::~CSurface()
-{
- if (m_surface)
- m_surface->Release();
-}
-
-bool CSurface::Create(unsigned int width, unsigned int height, CSurface::FORMAT format)
-{
- if (m_surface)
- {
- m_surface->Release();
- m_surface = NULL;
- }
-
- m_info.width = width;
- m_info.height = height;
- m_info.format = format;
-
- if (format == FMT_LIN_ARGB)
- { // round width to multiple of 64 pixels
- m_width = (width + 63) & ~63;
- m_height = height;
- }
- else
- { // round up to nearest power of 2
- m_width = PadPow2(width);
- m_height = PadPow2(height);
- }
- m_bpp = (format == FMT_PALETTED) ? 1 : 4;
-
- if (!g_device.CreateSurface(m_width, m_height, format, this))
- return false;
-
- Clear();
- return true;
-}
-
-void CSurface::Clear()
-{
- CSurfaceRect rect;
- if (Lock(&rect))
- {
- BYTE *pixels = rect.pBits;
- for (unsigned int i = 0; i < m_height; i++)
- {
- memset(pixels, 0, rect.Pitch);
- pixels += rect.Pitch;
- }
- Unlock();
- }
-}
-
-bool CSurface::CreateFromFile(const char *Filename, FORMAT format)
-{
- // get the info from the file
- D3DXIMAGE_INFO info;
- if (S_OK != D3DXGetImageInfoFromFile(Filename, &info))
- return false;
-
- if (!Create(info.Width, info.Height, format))
- return false;
-
- bool success = (S_OK == D3DXLoadSurfaceFromFile(m_surface, NULL, NULL, Filename, NULL, D3DX_FILTER_NONE, 0, NULL));
- ClampToEdge();
- return success;
-}
-
-
-void CSurface::ClampToEdge()
-{
- // fix up the last row and column to simulate clamp_to_edge
- if (!m_info.width || !m_info.height == 0)
- return; // invalid texture
- CSurfaceRect rect;
- if (Lock(&rect))
- {
- for (unsigned int y = 0; y < m_info.height; y++)
- {
- BYTE *src = rect.pBits + y * rect.Pitch;
- for (unsigned int x = m_info.width; x < m_width; x++)
- memcpy(src + x*m_bpp, src + (m_info.width - 1)*m_bpp, m_bpp);
- }
- BYTE *src = rect.pBits + (m_info.height - 1) * rect.Pitch;
- for (unsigned int y = m_info.height; y < m_height; y++)
- {
- BYTE *dest = rect.pBits + y * rect.Pitch;
- memcpy(dest, src, rect.Pitch);
- }
- Unlock();
- }
-}
-
-bool CSurface::Lock(CSurfaceRect *rect)
-{
- D3DLOCKED_RECT lr;
- if (m_surface && rect)
- {
- m_surface->LockRect(&lr, NULL, 0);
- rect->pBits = (BYTE *)lr.pBits;
- rect->Pitch = lr.Pitch;
- return true;
- }
- return false;
-}
-
-bool CSurface::Unlock()
-{
- if (m_surface)
- {
- m_surface->UnlockRect();
- return true;
- }
- return false;
-}
-
-CGraphicsDevice::CGraphicsDevice()
-{
- m_pD3D = NULL;
- m_pD3DDevice = NULL;
-}
-
-CGraphicsDevice::~CGraphicsDevice()
-{
- if (m_pD3DDevice)
- m_pD3DDevice->Release();
- if (m_pD3D)
- m_pD3D->Release();
-}
-
-bool CGraphicsDevice::Create()
-{
- m_pD3D = Direct3DCreate8(D3D_SDK_VERSION);
- if (!m_pD3D)
- {
- printf("Cannot init D3D\n");
- return false;
- }
-
- HRESULT hr;
- D3DDISPLAYMODE dispMode;
- D3DPRESENT_PARAMETERS presentParams;
-
- m_pD3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &dispMode);
-
- ZeroMemory(&presentParams, sizeof(presentParams));
- presentParams.Windowed = TRUE;
- presentParams.hDeviceWindow = GetConsoleWindow();
- presentParams.SwapEffect = D3DSWAPEFFECT_COPY;
- presentParams.BackBufferWidth = 8;
- presentParams.BackBufferHeight = 8;
- presentParams.BackBufferFormat = dispMode.Format;
-
- hr = m_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, NULL, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &presentParams, &m_pD3DDevice);
- if (FAILED(hr))
- {
- printf("Cannot init D3D device: %08x\n", hr);
- m_pD3D->Release();
- return false;
- }
- return true;
-}
-
-bool CGraphicsDevice::CreateSurface(unsigned int width, unsigned int height, enum CSurface::FORMAT format, CSurface *surface)
-{
- if (m_pD3DDevice)
- return (S_OK == m_pD3DDevice->CreateImageSurface(width, height, (format == CSurface::FMT_PALETTED) ? D3DFMT_P8 : D3DFMT_A8R8G8B8, &surface->m_surface));
- return false;
-}
-
-#endif \ No newline at end of file
diff --git a/tools/XBMCTex/Surface.h b/tools/XBMCTex/Surface.h
deleted file mode 100644
index b4f0c8d1dd..0000000000
--- a/tools/XBMCTex/Surface.h
+++ /dev/null
@@ -1,100 +0,0 @@
-#pragma once
-
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// class CSurface - wraps the various interfaces (SDL/DirectX)
-#ifdef HAS_SDL
-#include "SurfaceSDL.h"
-#else
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _WIN32_WINNT 0x500 // Win 2k/XP REQUIRED!
-#include <windows.h>
-
-#include "D3D8.h"
-#include "D3DX8.h"
-
-class CSurfaceRect
-{
-public:
- CSurfaceRect()
- {
- pBits = NULL;
- Pitch = 0;
- };
- BYTE *pBits;
- DWORD Pitch;
-};
-
-class CSurface
-{
-public:
- CSurface();
- ~CSurface();
-
- enum FORMAT { FMT_ARGB, FMT_LIN_ARGB, FMT_PALETTED };
- struct ImageInfo
- {
- unsigned int width;
- unsigned int height;
- FORMAT format;
- };
-
- bool CreateFromFile(const char *Filename, FORMAT format);
-
- bool Create(unsigned int width, unsigned int height, FORMAT format);
-
- bool Lock(CSurfaceRect *rect);
- bool Unlock();
-
- unsigned int Width() const { return m_width; };
- unsigned int Height() const { return m_height; };
- unsigned int BPP() const { return m_bpp; };
- unsigned int Pitch() const { return m_width * m_bpp; };
-
- const ImageInfo &Info() const { return m_info; };
-private:
- friend class CGraphicsDevice;
- void Clear();
- void ClampToEdge();
- LPDIRECT3DSURFACE8 m_surface;
- unsigned int m_width;
- unsigned int m_height;
- unsigned int m_bpp;
- ImageInfo m_info;
-};
-
-class CGraphicsDevice
-{
-public:
- CGraphicsDevice();
- ~CGraphicsDevice();
- bool Create();
- bool CreateSurface(unsigned int width, unsigned int height, CSurface::FORMAT format, CSurface *surface);
-private:
- LPDIRECT3D8 m_pD3D;
- LPDIRECT3DDEVICE8 m_pD3DDevice;
-};
-
-extern CGraphicsDevice g_device;
-#endif
-
diff --git a/tools/XBMCTex/SurfaceSDL.cpp b/tools/XBMCTex/SurfaceSDL.cpp
deleted file mode 100644
index ab9c90c909..0000000000
--- a/tools/XBMCTex/SurfaceSDL.cpp
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// class CSurface
-#include "SurfaceSDL.h"
-
-#ifdef HAS_SDL
-#include <stdio.h>
-#include "xbox.h"
-
-CGraphicsDevice g_device;
-
-CSurface::CSurface()
-{
- m_surface = NULL;
- m_width = 0;
- m_height = 0;
- m_bpp = 0;
-}
-
-CSurface::~CSurface()
-{
- if (m_surface)
- SDL_FreeSurface(m_surface);
-}
-
-bool CSurface::Create(unsigned int width, unsigned int height, CSurface::FORMAT format)
-{
- if (m_surface)
- {
- SDL_FreeSurface(m_surface);
- m_surface = NULL;
- }
-
- m_info.width = width;
- m_info.height = height;
- m_info.format = format;
-
- if (format == FMT_LIN_ARGB)
- { // round width to multiple of 64 pixels
- m_width = (width + 63) & ~63;
- m_height = height;
- }
- else
- { // round up to nearest power of 2
- m_width = PadPow2(width);
- m_height = PadPow2(height);
- }
- m_bpp = (format == FMT_PALETTED) ? 1 : 4;
-
- m_surface = SDL_CreateRGBSurface(SDL_SWSURFACE, m_width, m_height, m_bpp * 8,
- RMASK, GMASK, BMASK, AMASK);
-
- if (0 == m_surface)
- return false;
-
- Clear();
- return true;
-}
-
-void CSurface::Clear()
-{
- CSurfaceRect rect;
- if (Lock(&rect))
- {
- BYTE *pixels = rect.pBits;
- for (unsigned int i = 0; i < m_height; i++)
- {
- memset(pixels, 0, rect.Pitch);
- pixels += rect.Pitch;
- }
- Unlock();
- }
-}
-
-bool CSurface::CreateFromFile(const char *Filename, FORMAT format)
-{
- SDL_Surface *original = IMG_Load(Filename);
- if (!original)
- return false;
-
- if (!Create(original->w, original->h, format))
- {
- SDL_FreeSurface(original);
- return false;
- }
-
- // copy into our surface
- SDL_SetAlpha(original, 0, 255);
- int ret = SDL_BlitSurface(original, NULL, m_surface, NULL);
- SDL_FreeSurface(original);
-
- ClampToEdge();
-
- return (0 == ret);
-}
-
-void CSurface::ClampToEdge()
-{
- // fix up the last row and column to simulate clamp_to_edge
- if (!m_info.width || !m_info.height == 0)
- return; // invalid texture
- CSurfaceRect rect;
- if (Lock(&rect))
- {
- for (unsigned int y = 0; y < m_info.height; y++)
- {
- BYTE *src = rect.pBits + y * rect.Pitch;
- for (unsigned int x = m_info.width; x < m_width; x++)
- memcpy(src + x*m_bpp, src + (m_info.width - 1)*m_bpp, m_bpp);
- }
- BYTE *src = rect.pBits + (m_info.height - 1) * rect.Pitch;
- for (unsigned int y = m_info.height; y < m_height; y++)
- {
- BYTE *dest = rect.pBits + y * rect.Pitch;
- memcpy(dest, src, rect.Pitch);
- }
- Unlock();
- }
-}
-
-bool CSurface::Lock(CSurfaceRect *rect)
-{
- if (m_surface && rect)
- {
- SDL_LockSurface(m_surface);
- rect->pBits = (BYTE *)m_surface->pixels;
- rect->Pitch = m_surface->pitch;
- return true;
- }
- return false;
-}
-
-bool CSurface::Unlock()
-{
- if (m_surface)
- {
- SDL_UnlockSurface(m_surface);
- return true;
- }
- return false;
-}
-
-CGraphicsDevice::CGraphicsDevice()
-{
-}
-
-CGraphicsDevice::~CGraphicsDevice()
-{
-}
-
-bool CGraphicsDevice::Create()
-{
- return true;
-}
-
-bool CGraphicsDevice::CreateSurface(unsigned int width, unsigned int height, enum CSurface::FORMAT format, CSurface *surface)
-{
- return false;
-}
-#endif
-
diff --git a/tools/XBMCTex/SurfaceSDL.h b/tools/XBMCTex/SurfaceSDL.h
deleted file mode 100644
index 660ba14081..0000000000
--- a/tools/XBMCTex/SurfaceSDL.h
+++ /dev/null
@@ -1,111 +0,0 @@
-#pragma once
-
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// class CSurface - wraps the various interfaces (SDL/DirectX)
-#ifdef HAS_SDL
-
-#ifdef _LINUX
-#include "PlatformDefs.h"
-#else
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _WIN32_WINNT 0x500 // Win 2k/XP REQUIRED!
-#include <windows.h>
-#endif
-
-#include <SDL/SDL.h>
-#include <SDL/SDL_image.h>
-#include <SDL/SDL_endian.h>
-
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
-#define RMASK 0x0000ff00
-#define GMASK 0x00ff0000
-#define BMASK 0xff000000
-#define AMASK 0x000000ff
-#else
-#define RMASK 0x00ff0000
-#define GMASK 0x0000ff00
-#define BMASK 0x000000ff
-#define AMASK 0xff000000
-#endif
-
-class CSurfaceRect
-{
-public:
- CSurfaceRect()
- {
- pBits = NULL;
- Pitch = 0;
- };
- BYTE *pBits;
- DWORD Pitch;
-};
-
-class CSurface
-{
-public:
- CSurface();
- ~CSurface();
-
- enum FORMAT { FMT_ARGB, FMT_LIN_ARGB, FMT_PALETTED };
- struct ImageInfo
- {
- unsigned int width;
- unsigned int height;
- FORMAT format;
- };
-
- bool CreateFromFile(const char *Filename, FORMAT format);
-
- bool Create(unsigned int width, unsigned int height, FORMAT format);
-
- bool Lock(CSurfaceRect *rect);
- bool Unlock();
-
- unsigned int Width() const { return m_width; };
- unsigned int Height() const { return m_height; };
- unsigned int BPP() const { return m_bpp; };
- unsigned int Pitch() const { return m_width * m_bpp; };
-
- const ImageInfo &Info() const { return m_info; };
-private:
- void Clear();
- void ClampToEdge();
- friend class CGraphicsDevice;
- SDL_Surface *m_surface;
- unsigned int m_width;
- unsigned int m_height;
- unsigned int m_bpp;
- ImageInfo m_info;
-};
-
-class CGraphicsDevice
-{
-public:
- CGraphicsDevice();
- ~CGraphicsDevice();
- bool Create();
- bool CreateSurface(unsigned int width, unsigned int height, CSurface::FORMAT format, CSurface *surface);
-};
-
-extern CGraphicsDevice g_device;
-#endif
diff --git a/tools/XBMCTex/XBMCTex.cpp b/tools/XBMCTex/XBMCTex.cpp
deleted file mode 100644
index 0de0ab7e1b..0000000000
--- a/tools/XBMCTex/XBMCTex.cpp
+++ /dev/null
@@ -1,737 +0,0 @@
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// XBMCTex.cpp : Defines the entry point for the console application.
-//
-
-#include "AnimatedGif.h"
-#include "Bundler.h"
-#include <stdio.h>
-#include <algorithm>
-#include "cmdlineargs.h"
-#include "Surface.h"
-#include "EndianSwap.h"
-
-#ifdef _LINUX
-#ifndef __APPLE__
-#include <linux/limits.h>
-#endif
-#include <string.h>
-#include "XFileUtils.h"
-#include "PlatformDefs.h"
-#include "xwinapi.h"
-#define WIN32_FIND_DATAA WIN32_FIND_DATA
-#else
-#define XBMC_FILE_SEP '\\'
-#endif
-
-// Debug macros
-#if defined(_DEBUG) && defined(_MSC_VER)
-#include <crtdbg.h>
-#define TRACE0(f) _RPT0(_CRT_WARN, f)
-#define TRACE1(f, a) _RPT1(_CRT_WARN, f, a)
-#define TRACE2(f, a, b) _RPT2(_CRT_WARN, f, a, b)
-#define TRACE3(f, a, b, c) _RPT3(_CRT_WARN, f, a, b, c)
-#define TRACE4(f, a, b, c, d) _RPT4(_CRT_WARN, f, a, b, c, d)
-#define TRACE5(f, a, b, c, d, e) _RPT_BASE((_CRT_WARN, NULL, 0, NULL, f, a, b, c, d, e))
-
-#else
-
-#define TRACE0(f)
-#define TRACE1(f, a)
-#define TRACE2(f, a, b)
-#define TRACE3(f, a, b, c)
-#define TRACE4(f, a, b, c, d)
-#define TRACE5(f, a, b, c, d, e)
-#endif
-
-extern "C" void SHA1(const BYTE* buf, DWORD len, BYTE hash[20]);
-
-CBundler Bundler;
-
-UINT UncompressedSize;
-UINT CompressedSize;
-UINT TotalSrcPixels;
-UINT TotalDstPixels;
-
-#pragma pack(push,1)
-struct RGBCOLOUR
-{
- BYTE b;
- BYTE g;
- BYTE r;
- BYTE a;
-};
-#pragma pack(pop)
-
-void PrintImageInfo(const CSurface::ImageInfo& info)
-{
- printf("%4dx%-4d ", info.width, info.height);
- fputs("->", stdout);
-}
-
-void PrintAnimInfo(const CAnimatedGifSet& Anim)
-{
- printf("%4dx%-4d (%5df)->", Anim.FrameWidth, Anim.FrameHeight, Anim.GetImageCount());
-}
-
-#define CheckHR(hr) if (FAILED(hr)) { printf("ERROR: %08x\n", hr); if (pCompSurf) pCompSurf->Release(); if (pDstSurf) pDstSurf->Release(); return false; }
-
-struct XPRFile_t
-{
- // the following are pointers into our headerBuf
- DWORD* flags;
- struct AnimInfo_t {
- DWORD nLoops;
- DWORD RealSize;
- } *AnimInfo;
- D3DPalette* D3DPal;
- struct Texture_t {
- D3DTexture D3DTex;
- DWORD RealSize;
- } *Texture;
-
- int nImages;
-};
-
-BYTE *headerBuf = NULL;
-DWORD headerSize = 0;
-
-BYTE *imageData = NULL;
-DWORD imageSize = 0;
-
-static XPRFile_t XPRFile;
-
-enum XPR_FLAGS
-{
- XPRFLAG_PALETTE = 0x00000001,
- XPRFLAG_ANIM = 0x00000002
-};
-
-#undef CheckHR
-
-void CommitXPR(const char* Filename)
-{
- if (!XPRFile.nImages)
- return;
-
- // Conversion for big-endian systems
- // flags is used/updated in different places
- // so swap it only before to call AddFile
- *XPRFile.flags = Endian_SwapLE32(*XPRFile.flags);
-
- const void* Buffers[2] = { headerBuf, imageData };
- DWORD Sizes[2] = { headerSize, imageSize };
- if (!Bundler.AddFile(Filename, 2, Buffers, Sizes))
- printf("ERROR: Unable to compress data (out of memory?)\n");
-
- // free our image memory
- free(imageData);
- imageData = NULL;
- imageSize = 0;
-}
-
-void WriteXPRHeader(DWORD* pal, int nImages, DWORD nLoops = 0)
-{
- // compute how large our header requires
- headerSize = sizeof(DWORD);
- if (nImages > 1) // need AnimInfo header
- headerSize += sizeof(XPRFile_t::AnimInfo_t);
- if (pal) // need D3DPal header
- headerSize += sizeof(D3DPalette);
- headerSize += nImages * sizeof(XPRFile_t::Texture_t);
-
- // align to 128 byte boundary
- headerSize = (headerSize + 127) & ~127;
-
- // allocate space for our header
- headerBuf = (BYTE *)realloc(headerBuf, headerSize);
- memset(headerBuf, 0, headerSize);
-
- // setup our header
- unsigned int offset = 0;
- XPRFile.flags = (DWORD *)&headerBuf[offset];
- offset += sizeof(DWORD);
- if (nImages > 1)
- {
- XPRFile.AnimInfo = (XPRFile_t::AnimInfo_t *)&headerBuf[offset];
- offset += sizeof(XPRFile_t::AnimInfo_t);
- }
- else
- XPRFile.AnimInfo = NULL;
- if (pal)
- {
- XPRFile.D3DPal = (D3DPalette *)&headerBuf[offset];
- offset += sizeof(D3DPalette);
- }
- else
- XPRFile.D3DPal = NULL;
- XPRFile.Texture = (XPRFile_t::Texture_t *)&headerBuf[offset];
- XPRFile.nImages = 0;
-
- *XPRFile.flags = nImages << 16;
-
- if (nImages > 1)
- {
- *XPRFile.flags |= XPRFLAG_ANIM;
- XPRFile.AnimInfo->nLoops = nLoops;
- }
-
- if (pal)
- {
- // commit memory for palette
- imageData = (BYTE*)realloc(imageData, 1024);
-
- *XPRFile.flags |= XPRFLAG_PALETTE;
- XPRFile.D3DPal->Common = Endian_SwapLE32(1 | (3 << 16));
- XPRFile.D3DPal->Data = 0;
- XPRFile.D3DPal->Lock = 0;
- memcpy(imageData, pal, 1024);
- imageSize += 1024;
- }
-}
-
-void AppendXPRImage(CSurface &surface, XB_D3DFORMAT fmt)
-{
- UINT Size = ((surface.Pitch() * surface.Height()) + 127) & ~127; // must be 128-byte aligned for any following images
-
- // reallocate enough data for our image
- imageData = (BYTE*)realloc(imageData, imageSize + Size);
- memset(imageData + imageSize, 0, Size);
-
- CSurfaceRect rect;
- if (!surface.Lock(&rect))
- return;
-
- if (IsSwizzledFormat(fmt))
- {
- // Swizzle for xbox
- SwizzleRect(rect.pBits, 0, imageData + imageSize, surface.Width(), surface.Height(), surface.BPP());
- }
- else
- {
- // copy
- BYTE* src = rect.pBits;
- BYTE* dst = imageData + imageSize;
- for (UINT y = 0; y < surface.Height(); ++y)
- {
- memcpy(dst, src, surface.Pitch());
- src += rect.Pitch;
- dst += surface.Pitch();
- }
- }
-
- surface.Unlock();
-
- SetTextureHeader(surface.Width(), surface.Height(), 1, 0, fmt,
- &XPRFile.Texture[XPRFile.nImages].D3DTex, imageSize, surface.Pitch());
- if (!(*XPRFile.flags & XPRFLAG_ANIM))
- XPRFile.Texture[XPRFile.nImages].RealSize = Endian_SwapLE32((surface.Info().width & 0xffff) | ((surface.Info().height & 0xffff) << 16));
- ++XPRFile.nImages;
-
- imageSize += Size;
- CompressedSize += Size;
-}
-
-void AppendXPRImageLink(int iLinkedImage)
-{
- memcpy(&XPRFile.Texture[XPRFile.nImages].D3DTex, &XPRFile.Texture[iLinkedImage].D3DTex, sizeof(D3DTexture));
- ++XPRFile.nImages;
-}
-
-void WriteXPR(const char* Filename, CSurface &surface, XB_D3DFORMAT fmt, DWORD* pal)
-{
- WriteXPRHeader(pal, 1);
- AppendXPRImage(surface, fmt);
- CommitXPR(Filename);
-}
-
-#undef CheckHR
-#define CheckHR(hr) if (FAILED(hr)) { printf("ERROR: %08x\n", hr); if (pDstSurf) pDstSurf->Release(); return false; }
-
-// Converts to P8 format is colours <= 256
-bool ConvertP8(CSurface &source, CSurface &dest, DWORD* pal)
-{
- // note: This routine assumes the source is 32 bpp
- if (source.BPP() != 4)
- {
- printf("ERROR: ConvertP8 called on a source that's not 32bpp\n");
- return false;
- }
-
- // convert to p8
- if (!dest.Create(source.Info().width, source.Info().height, CSurface::FMT_PALETTED))
- return false;
-
- CSurfaceRect sr, dr;
- if (!dest.Lock(&dr) || !source.Lock(&sr))
- return false;
-
- DWORD* src = (DWORD*)sr.pBits;
- BYTE* dst = (BYTE*)dr.pBits;
- int n = 0, i;
- for (UINT y = 0; y < source.Info().height; ++y)
- {
- for (UINT x = 0; x < source.Info().width; ++x)
- {
- for (i = 0; i < n; ++i)
- {
- if (pal[i] == *src)
- break;
- }
- if (i == n)
- {
- if (n >= 256)
- {
- TRACE0(" Too many colours for P8\n");
- source.Unlock();
- dest.Unlock();
- return false;
- }
- pal[n++] = *src;
- }
- *dst++ = i;
- ++src;
- }
- for (UINT x = source.Info().width; x < dest.Width(); ++x)
- {
- *dst++ = 0; // we don't care about the colour outside of our real image
- ++src;
- }
- }
- for (UINT y = source.Info().height; y < dest.Height(); ++y)
- {
- for (UINT x = 0; x < dest.Width(); ++x)
- {
- *dst++ = 0; // we don't care about the colour outside of our real image
- ++src;
- }
- }
- for (int i = n; i < 256; i++)
- pal[i] = 0;
-
- TRACE1(" Colours Used: %d\n", n);
-
- dest.Unlock();
- source.Unlock();
-
- return true;
-}
-
-// Converts any fully transparent pixels to transparent black to make textures better compressable
-void FixTransparency(CSurface &surface)
-{
- CSurfaceRect rect;
-
- if (!surface.Lock(&rect))
- return;
-
- DWORD* pix = (DWORD*)rect.pBits;
- for (UINT y = 0; y < surface.Width(); ++y)
- {
- for (UINT x = 0; x < surface.Height(); ++x)
- {
- if (!(*pix & 0xff000000))
- *pix = 0;
- ++pix;
- }
- }
-
- surface.Unlock();
-}
-
-
-#undef CheckHR
-#define CheckHR(hr) if (FAILED(hr)) { printf("ERROR: %08x\n", hr); return; }
-
-void ConvertFile(const char* Dir, const char* Filename)
-{
- CSurface surface;
- char OutFilename[52];
- if (Dir)
- _snprintf(OutFilename, 52, "%s\\%s", Dir, Filename);
- else
- _snprintf(OutFilename, 52, "%s", Filename);
- OutFilename[51] = 0;
-
- printf("%s: ", OutFilename);
- TRACE1("%s:\n", OutFilename);
- int n = strlen(OutFilename);
- if (n < 40)
- printf("%*c", 40-n, ' ');
-
- CSurface srcSurface;
- if (!srcSurface.CreateFromFile(Filename, CSurface::FMT_ARGB))
- {
- printf("Error creating surface size %u by %u\n", srcSurface.Width(), srcSurface.Height());
- return;
- }
-
- // fix up the transparency (allows better compression)
- FixTransparency(srcSurface);
-
- // Use a paletted texture if possible as it's lossless + only 4 bytes per pixel (guaranteed smaller)
-#ifdef _XBOX
- CSurface tempSurface;
- DWORD pal[256];
- if (ConvertP8(srcSurface, tempSurface, pal))
- {
- float Waste = 100.f * (float)(srcSurface.Width() * srcSurface.Height() - srcSurface.Info().width * srcSurface.Info().height) / (float)(srcSurface.Width() * srcSurface.Height());
- printf("P8 %4dx%-4d (%5.2f%% waste)\n", srcSurface.Width(), srcSurface.Height(), Waste);
- TRACE0(" Selected Format: P8\n");
-
- WriteXPR(OutFilename, tempSurface, XB_D3DFMT_P8, pal);
- return;
- }
-#endif
- // we are going to use a 32bit texture, so work out what type to use
- // test linear format versus non-linear format
- // Linear format requires 64 pixel aligned width, whereas
- // Non-linear format requires power of 2 width and height
- bool useLinearFormat(false);
-#ifdef _XBOX
- UINT linearWidth = (srcSurface.Info().width + 0x3f) & ~0x3f;
- if (linearWidth * srcSurface.Info().height < srcSurface.Width() * srcSurface.Height())
-#endif
- useLinearFormat = true;
-
- // Use A8R8G8B8
- if (useLinearFormat)
- {
- // create the linear version as well
- // correct sizing information
- UncompressedSize += srcSurface.Width() * srcSurface.Height() * 4;
- TotalSrcPixels += srcSurface.Info().width * srcSurface.Info().height;
- TotalDstPixels += srcSurface.Width() * srcSurface.Height();
- float Waste = 100.f * (float)(srcSurface.Width() - srcSurface.Info().width) / (float)(srcSurface.Width());
-
- CSurface linearSurface;
- if (!linearSurface.CreateFromFile(Filename, CSurface::FMT_LIN_ARGB))
- return;
-
- printf("LIN_A8R8G8B8 %4dx%-4d (%5.2f%% waste)\n", srcSurface.Width(), srcSurface.Height(), Waste);
- TRACE0(" Selected Format: LIN_A8R8G8B8\n");
- WriteXPR(OutFilename, linearSurface, XB_D3DFMT_LIN_A8R8G8B8, NULL);
- }
- else
- {
- UncompressedSize += srcSurface.Width() * srcSurface.Height() * 4;
- TotalSrcPixels += srcSurface.Info().width * srcSurface.Info().height;
- TotalDstPixels += srcSurface.Width() * srcSurface.Height();
-
- float Waste = 100.f * (float)(srcSurface.Width() * srcSurface.Height() - srcSurface.Info().width * srcSurface.Info().height) / (float)(srcSurface.Width() * srcSurface.Height());
- printf("A8R8G8B8 %4dx%-4d (%5.2f%% waste)\n", srcSurface.Width(), srcSurface.Height(), Waste);
- TRACE0(" Selected Format: A8R8G8B8\n");
- WriteXPR(OutFilename, srcSurface, XB_D3DFMT_A8R8G8B8, NULL);
- }
-}
-
-// only works for gifs or other 256-colour anims
-void ConvertAnim(const char* Dir, const char* Filename)
-{
- char OutFilename[52];
- if (Dir)
- _snprintf(OutFilename, 52, "%s\\%s", Dir, Filename);
- else
- _snprintf(OutFilename, 52, "%s", Filename);
- OutFilename[51] = 0;
-
- printf("%s: ", OutFilename);
- TRACE1("%s:\n", OutFilename);
- int n = strlen(OutFilename);
- if (n < 40)
- printf("%*c", 40-n, ' ');
-
- // Load up the file
- CAnimatedGifSet Anim;
- int nImages = Anim.LoadGIF(Filename);
- if (!nImages)
- {
- puts("ERROR: Unable to load gif (file corrupt?)");
- return;
- }
- if (nImages > 65535)
- {
- printf("ERROR: Too many frames in gif (%d > 65535)\n", nImages);
- return;
- }
-
- PrintAnimInfo(Anim);
-
- UINT Width = PadPow2(Anim.FrameWidth);
- UINT Height = PadPow2(Anim.FrameHeight);
-
- PALETTEENTRY pal[256];
- memcpy(pal, Anim.m_vecimg[0]->Palette, 256 * sizeof(PALETTEENTRY));
- for (int i = 0; i < 256; i++)
- pal[i].peFlags = 0xff; // alpha
- if (Anim.m_vecimg[0]->Transparency && Anim.m_vecimg[0]->Transparent >= 0)
- memset(&pal[Anim.m_vecimg[0]->Transparent], 0, sizeof(PALETTEENTRY));
-
- // setup xpr header
- WriteXPRHeader((DWORD*)pal, nImages);
- if (nImages > 1)
- {
- XPRFile.AnimInfo->RealSize = Endian_SwapLE32((Anim.FrameWidth & 0xffff) | ((Anim.FrameHeight & 0xffff) << 16));
- XPRFile.AnimInfo->nLoops = Endian_SwapLE32(Anim.nLoops);
- }
-
- int nActualImages = 0;
-
- TotalSrcPixels += Anim.FrameWidth * Anim.FrameHeight * nImages;
- TotalDstPixels += Width * Height * nImages;
- float Waste = 100.f * (float)(Width * Height - Anim.FrameWidth * Anim.FrameHeight) / (float)(Width * Height);
-
- // alloc hash buffer
- BYTE (*HashBuf)[20] = new BYTE[nImages][20];
-
- for (int i = 0; i < nImages; ++i)
- {
- printf("%3d%%\b\b\b\b", 100 * i / nImages);
-
- UncompressedSize += Width * Height;
- CAnimatedGif* pGif = Anim.m_vecimg[i];
-
- if (nImages > 1)
- XPRFile.Texture[i].RealSize = Endian_SwapLE32(pGif->Delay);
-
- // generate sha1 hash
- SHA1((BYTE*)pGif->Raster, pGif->BytesPerRow * pGif->Height, HashBuf[i]);
-
- // duplicate scan
- int j;
- for (j = 0; j < i; ++j)
- {
- if (!memcmp(HashBuf[j], HashBuf[i], 20))
- {
- // duplicate image!
- TRACE2(" %03d: Duplicate of %03d\n", i, j);
- AppendXPRImageLink(j);
- break;
- }
- }
- if (j < i)
- continue;
-
- ++nActualImages;
-
- // P8 for animgifs
- CSurface surface;
- if (!surface.Create(Anim.FrameWidth, Anim.FrameHeight, CSurface::FMT_PALETTED))
- return;
-
- CSurfaceRect rect;
- if (!surface.Lock(&rect))
- return;
-
- memcpy(rect.pBits, pGif->Raster, pGif->Height * rect.Pitch);
- memset(rect.pBits + pGif->Height * rect.Pitch, pGif->Transparent, (Height - pGif->Height) * rect.Pitch);
-
- surface.Unlock();
-
- TRACE1(" %03d: Selected Format: P8\n", i);
- AppendXPRImage(surface, XB_D3DFMT_P8);
- }
-
- delete [] HashBuf;
-
- printf("(%5df) %4dx%-4d (%5.2f%% waste)\n", nActualImages, Width, Height, Waste);
-
- CommitXPR(OutFilename);
-}
-
-// returns true for png, bmp, tga, jpg and dds files, otherwise returns false
-bool IsGraphicsFile(char *strFileName)
-{
- int n = (int)strlen(strFileName);
- if (n<4)
- return false;
- if (strnicmp(&strFileName[n-4], ".png", 4) &&
- strnicmp(&strFileName[n-4], ".bmp", 4) &&
- strnicmp(&strFileName[n-4], ".tga", 4) &&
- strnicmp(&strFileName[n-4], ".jpg", 4))
- return false;
- return true;
-}
-
-// returns true if it's a ".gif" otherwise returns false
-bool IsGraphicsAnim(char *strFileName)
-{
- int n = (int)strlen(strFileName);
- if (n<4 || strnicmp(&strFileName[n-4], ".gif", 4))
- return false;
- return true;
-}
-
-void ConvertDirectory(const char *strFullPath, char *strRelativePath)
-{
- // Set our current directory
- if (strFullPath)
- SetCurrentDirectory(strFullPath);
- // Get our current pathname
- char strCurrentPath[MAX_PATH];
- GetCurrentDirectory(MAX_PATH, strCurrentPath);
-
- // Now run through our directory, and find all subdirs
- WIN32_FIND_DATAA FindData;
- char Filename[4] = "*.*";
- HANDLE hFind = FindFirstFile(Filename, &FindData);
- if (hFind != INVALID_HANDLE_VALUE)
- {
- do
- {
- // Check if we've found a subdir
- if (FindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- {
- // ignore any directory starting with a '.'
- if (strnicmp(FindData.cFileName,".",1))
- {
- char strNewFullPath[MAX_PATH];
- char strNewRelativePath[MAX_PATH];
- sprintf(strNewFullPath, "%s%c%s", strCurrentPath, XBMC_FILE_SEP, FindData.cFileName);
- if (strRelativePath)
- sprintf(strNewRelativePath, "%s%c%s", strRelativePath, XBMC_FILE_SEP, FindData.cFileName);
- else
- sprintf(strNewRelativePath, "%s", FindData.cFileName);
- // Recurse into the new directory
- ConvertDirectory(strNewFullPath, strNewRelativePath);
- // Restore our current directory
- SetCurrentDirectory(strCurrentPath);
- }
- }
- else
- { // just files - check if it's an allowed graphics file
- if (IsGraphicsFile(FindData.cFileName))
- { // got a graphics file
- ConvertFile(strRelativePath,FindData.cFileName);
- }
- if (IsGraphicsAnim(FindData.cFileName))
- { // got a .gif anim
- ConvertAnim(strRelativePath,FindData.cFileName);
- }
- }
- }
- while (FindNextFile(hFind, &FindData));
- FindClose(hFind);
- }
-}
-
-void Usage()
-{
- puts("Usage:");
- puts(" -help Show this screen.");
- puts(" -input <dir> Input directory. Default: current dir");
- puts(" -output <dir> Output directory/filename. Default: Textures.xpr");
- puts(" -quality <qual> Quality setting (min, low, normal, high, max). Default: normal");
- puts(" -noprotect XPR contents viewable at full quality in skin editor");
-}
-
-int main(int argc, char* argv[])
-{
- int NoProtect = 0;
- bool valid = false;
-
- CmdLineArgs args(argc, (const char**)argv);
-
- if (args.size() == 1)
- {
- Usage();
- return 1;
- }
-
- const char* InputDir = NULL;
- const char* OutputFilename = "Textures.xpr";
-
- for (unsigned int i = 1; i < args.size(); ++i)
- {
- if (!stricmp(args[i], "-help") || !stricmp(args[i], "-h") || !stricmp(args[i], "-?"))
- {
- Usage();
- return 1;
- }
- else if (!stricmp(args[i], "-input") || !stricmp(args[i], "-i"))
- {
- InputDir = args[++i];
- valid = true;
- }
- else if (!stricmp(args[i], "-output") || !stricmp(args[i], "-o"))
- {
- OutputFilename = args[++i];
- valid = true;
-#ifdef _LINUX
- char *c = NULL;
- while ((c = (char *)strchr(OutputFilename, '\\')) != NULL) *c = '/';
-#endif
- }
- else if (!stricmp(args[i], "-noprotect") || !stricmp(args[i], "-p"))
- {
- NoProtect = 1;
- valid = true;
- }
- else
- {
- printf("Unrecognised command line flag: %s\n", args[i]);
- }
- }
-
- if (!valid)
- {
- Usage();
- return 1;
- }
-
- // Initialize the graphics device
- if (!g_device.Create())
- return 1;
-
- char HomeDir[MAX_PATH];
- GetCurrentDirectory(MAX_PATH, HomeDir);
-
- Bundler.StartBundle();
-
- // Scan the input directory (or current dir if false) for media files
- ConvertDirectory(InputDir, NULL);
-
- free(headerBuf);
-
- SetCurrentDirectory(HomeDir);
- DWORD attr = GetFileAttributes(OutputFilename);
- if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_DIRECTORY))
- {
- SetCurrentDirectory(OutputFilename);
- OutputFilename = "Textures.xpr";
- }
-
- printf("\nWriting bundle: %s", OutputFilename);
- int BundleSize = Bundler.WriteBundle(OutputFilename, NoProtect);
- if (BundleSize == -1)
- {
- printf("\nERROR: %08x\n", GetLastError());
- return 1;
- }
-
- printf("\nUncompressed texture size: %6dkB\nCompressed texture size: %8dkB\nBundle size: %8dkB\n\nWasted Pixels: %u/%u (%5.2f%%)\n",
- (UncompressedSize + 1023) / 1024, (((CompressedSize + 1023) / 1024) + 3) & ~3, (BundleSize + 1023) / 1024,
- TotalDstPixels - TotalSrcPixels, TotalDstPixels, 100.f * (float)(TotalDstPixels - TotalSrcPixels) / (float)TotalDstPixels);
-
- return 0;
-}
-
diff --git a/tools/XBMCTex/XBMCTex.exe b/tools/XBMCTex/XBMCTex.exe
deleted file mode 100644
index dfb8c9ae99..0000000000
--- a/tools/XBMCTex/XBMCTex.exe
+++ /dev/null
Binary files differ
diff --git a/tools/XBMCTex/XBMCTex.sln b/tools/XBMCTex/XBMCTex.sln
deleted file mode 100644
index 8589f8722d..0000000000
--- a/tools/XBMCTex/XBMCTex.sln
+++ /dev/null
@@ -1,27 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XBMCTex", "XBMCTex.vcproj", "{AF7F7513-4425-4A27-B5B9-4CF68F01B5C6}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Debug SDL = Debug SDL
- Release = Release
- Release SDL = Release SDL
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {AF7F7513-4425-4A27-B5B9-4CF68F01B5C6}.Debug.ActiveCfg = Debug|Win32
- {AF7F7513-4425-4A27-B5B9-4CF68F01B5C6}.Debug.Build.0 = Debug|Win32
- {AF7F7513-4425-4A27-B5B9-4CF68F01B5C6}.Debug SDL.ActiveCfg = Debug SDL|Win32
- {AF7F7513-4425-4A27-B5B9-4CF68F01B5C6}.Debug SDL.Build.0 = Debug SDL|Win32
- {AF7F7513-4425-4A27-B5B9-4CF68F01B5C6}.Release.ActiveCfg = Release|Win32
- {AF7F7513-4425-4A27-B5B9-4CF68F01B5C6}.Release.Build.0 = Release|Win32
- {AF7F7513-4425-4A27-B5B9-4CF68F01B5C6}.Release SDL.ActiveCfg = Release SDL|Win32
- {AF7F7513-4425-4A27-B5B9-4CF68F01B5C6}.Release SDL.Build.0 = Release SDL|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/tools/XBMCTex/XBMCTex.vcproj b/tools/XBMCTex/XBMCTex.vcproj
deleted file mode 100644
index eaf9813a02..0000000000
--- a/tools/XBMCTex/XBMCTex.vcproj
+++ /dev/null
@@ -1,291 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="XBMCTex"
- ProjectGUID="{AF7F7513-4425-4A27-B5B9-4CF68F01B5C6}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="D3D8.lib D3DX8.lib"
- OutputFile="$(OutDir)/XBMCTex.exe"
- LinkIncremental="2"
- IgnoreDefaultLibraryNames="libci.lib,libm.lib,libirc.lib,libc"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/XBMCTex.pdb"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- OptimizeForProcessor="2"
- OptimizeForWindowsApplication="TRUE"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableEnhancedInstructionSet="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="D3D8.lib D3DX8.lib"
- OutputFile="$(OutDir)/XBMCTex.exe"
- LinkIncremental="1"
- IgnoreDefaultLibraryNames="libci.lib,libm.lib,libirc.lib,libc.lib"
- GenerateDebugInformation="FALSE"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Debug SDL|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAS_SDL"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="SDL.lib SDLmain.lib SDL_image.lib"
- OutputFile="$(OutDir)/XBMCTex.exe"
- LinkIncremental="2"
- IgnoreDefaultLibraryNames="libci.lib,libm.lib,libirc.lib,libc"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/XBMCTex.pdb"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release SDL|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- OptimizeForProcessor="2"
- OptimizeForWindowsApplication="TRUE"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAS_SDL"
- RuntimeLibrary="2"
- EnableEnhancedInstructionSet="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="SDL.lib SDLmain.lib SDL_image.lib"
- OutputFile="$(OutDir)/XBMCTex.exe"
- LinkIncremental="1"
- IgnoreDefaultLibraryNames="libci.lib,libm.lib,libirc.lib,libc.lib"
- GenerateDebugInformation="FALSE"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath=".\AnimatedGif.cpp">
- </File>
- <File
- RelativePath=".\Bundler.cpp">
- </File>
- <File
- RelativePath="..\..\lib\win32\liblzo\lzo.lib">
- </File>
- <File
- RelativePath=".\sha.c">
- </File>
- <File
- RelativePath=".\Surface.cpp">
- </File>
- <File
- RelativePath=".\SurfaceSDL.cpp">
- </File>
- <File
- RelativePath=".\XBMCTex.cpp">
- </File>
- <File
- RelativePath=".\xbox.cpp">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- <File
- RelativePath=".\AnimatedGif.h">
- </File>
- <File
- RelativePath=".\Bundler.h">
- </File>
- <File
- RelativePath=".\cmdlineargs.h">
- </File>
- <File
- RelativePath="..\..\xbmc\lib\liblzo\Lzo1x.h">
- </File>
- <File
- RelativePath="..\..\xbmc\lib\liblzo\Lzoconf.h">
- </File>
- <File
- RelativePath=".\stdint_win.h">
- </File>
- <File
- RelativePath=".\Surface.h">
- </File>
- <File
- RelativePath=".\SurfaceSDL.h">
- </File>
- <File
- RelativePath=".\xbox.h">
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
- </Filter>
- <File
- RelativePath=".\ReadMe.txt">
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/tools/XBMCTex/XFileUtils.cpp b/tools/XBMCTex/XFileUtils.cpp
deleted file mode 100644
index f27af32211..0000000000
--- a/tools/XBMCTex/XFileUtils.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include "system.h"
-#include "PlatformInclude.h"
-#include "XFileUtils.h"
-#include "XTimeUtils.h"
-#include "Util.h"
-#include "XHandle.h"
-
-#ifdef _LINUX
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#ifndef __APPLE__
-#include <sys/vfs.h>
-#else
-#include <sys/param.h>
-#endif
-#include <regex.h>
-#include <dirent.h>
-#include <errno.h>
-
-
-HANDLE FindFirstFile(LPCSTR szPath,LPWIN32_FIND_DATA lpFindData) {
- if (lpFindData == NULL || szPath == NULL)
- return NULL;
-
- CStdString strPath(szPath);
-
- if (strPath.empty())
- return INVALID_HANDLE_VALUE;
-
- strPath.Replace("\\","/");
-
- // if the file name is a directory then we add a * to look for all files in this directory
- DIR *testDir = opendir(szPath);
- if (testDir) {
- strPath += "/*";
- closedir(testDir);
- }
-
- int nFilePos = strPath.ReverseFind(XBMC_FILE_SEP);
-
- CStdString strDir = ".";
- CStdString strFiles = strPath;
-
- if (nFilePos > 0) {
- strDir = strPath.substr(0,nFilePos);
- strFiles = strPath.substr(nFilePos + 1);
- }
-
- if (strFiles == "*.*")
- strFiles = "*";
-
- strFiles = CStdString("^") + strFiles + "$";
- strFiles.Replace(".","\\.");
- strFiles.Replace("*",".*");
- strFiles.Replace("?",".");
-
- strFiles.MakeLower();
-
- int status;
- regex_t re;
- if (regcomp(&re, strFiles, REG_EXTENDED|REG_NOSUB) != 0) {
- return(INVALID_HANDLE_VALUE);
- }
-
- struct dirent **namelist = NULL;
- int n = scandir(strDir, &namelist, 0, alphasort);
-
- CXHandle *pHandle = new CXHandle(CXHandle::HND_FIND_FILE);
- pHandle->m_FindFileDir = strDir;
-
- while (n-- > 0) {
- CStdString strComp(namelist[n]->d_name);
- strComp.MakeLower();
-
- status = regexec(&re, strComp.c_str(), (size_t) 0, NULL, 0);
- if (status == 0) {
- pHandle->m_FindFileResults.push_back(namelist[n]->d_name);
- }
- free(namelist[n]);
- }
-
- if (namelist)
- free(namelist);
-
- regfree(&re);
-
- if (pHandle->m_FindFileResults.size() == 0) {
- delete pHandle;
- return INVALID_HANDLE_VALUE;
- }
-
- FindNextFile(pHandle, lpFindData);
-
- return pHandle;
-}
-
-BOOL FindNextFile(HANDLE hHandle, LPWIN32_FIND_DATA lpFindData) {
- if (lpFindData == NULL || hHandle == NULL || hHandle->GetType() != CXHandle::HND_FIND_FILE)
- return FALSE;
-
- if ((unsigned int) hHandle->m_nFindFileIterator >= hHandle->m_FindFileResults.size())
- return FALSE;
-
- CStdString strFileName = hHandle->m_FindFileResults[hHandle->m_nFindFileIterator++];
- CStdString strFileNameTest = hHandle->m_FindFileDir + '/' + strFileName;
-
- struct stat64 fileStat;
- if (stat64(strFileNameTest, &fileStat) != 0)
- return FALSE;
-
- bool bIsDir = false;
- DIR *testDir = opendir(strFileNameTest);
- if (testDir) {
- bIsDir = true;
- closedir(testDir);
- }
-
- memset(lpFindData,0,sizeof(WIN32_FIND_DATA));
-
- lpFindData->dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
- strcpy(lpFindData->cFileName, strFileName.c_str());
-
- if (bIsDir)
- lpFindData->dwFileAttributes |= FILE_ATTRIBUTE_DIRECTORY;
-
- if (strFileName[0] == '.')
- lpFindData->dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN;
-
- if (access(strFileName, R_OK) == 0 && access(strFileName, W_OK) != 0)
- lpFindData->dwFileAttributes |= FILE_ATTRIBUTE_READONLY;
-
- TimeTToFileTime(fileStat.st_ctime, &lpFindData->ftCreationTime);
- TimeTToFileTime(fileStat.st_atime, &lpFindData->ftLastAccessTime);
- TimeTToFileTime(fileStat.st_mtime, &lpFindData->ftLastWriteTime);
-
- lpFindData->nFileSizeHigh = (DWORD)(fileStat.st_size >> 32);
- lpFindData->nFileSizeLow = (DWORD)fileStat.st_size;
-
- return TRUE;
-}
-
-BOOL FindClose(HANDLE hFindFile) {
- return CloseHandle(hFindFile);
-}
-
-int _stat64( const char *path, struct __stat64 *buffer ) {
- if (buffer == NULL || path == NULL)
- return -1;
-
- return stat64(path, buffer);
-}
-
-DWORD GetFileAttributes(LPCTSTR lpFileName)
-{
- if (lpFileName == NULL) {
- return 0;
- }
-
- DWORD dwAttr = FILE_ATTRIBUTE_NORMAL;
- DIR *tmpDir = opendir(lpFileName);
- if (tmpDir) {
- dwAttr |= FILE_ATTRIBUTE_DIRECTORY;
- closedir(tmpDir);
- }
-
- if (lpFileName[0] == '.')
- dwAttr |= FILE_ATTRIBUTE_HIDDEN;
-
- if (access(lpFileName, R_OK) == 0 && access(lpFileName, W_OK) != 0)
- dwAttr |= FILE_ATTRIBUTE_READONLY;
-
- return dwAttr;
-}
-
-#endif
-
diff --git a/tools/XBMCTex/XFileUtils.h b/tools/XBMCTex/XFileUtils.h
deleted file mode 100644
index 5bf2a767d6..0000000000
--- a/tools/XBMCTex/XFileUtils.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef __X_FILE_UTILS_
-#define __X_FILE_UTILS_
-
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include "PlatformDefs.h"
-#include "XHandlePublic.h"
-
-#ifdef _LINUX
-#define XBMC_FILE_SEP '/'
-#else
-#define XBMC_FILE_SEP '\\'
-#endif
-
-HANDLE FindFirstFile(LPCSTR,LPWIN32_FIND_DATA);
-
-BOOL FindNextFile(HANDLE,LPWIN32_FIND_DATA);
-BOOL FindClose(HANDLE hFindFile);
-
-int _stat64(const char *path, struct __stat64 *buffer);
-int _stati64(const char *path,struct _stati64 *buffer);
-
-DWORD GetFileAttributes(LPCTSTR lpFileName);
-
-#define ERROR_ALREADY_EXISTS EEXIST
-
-#endif
diff --git a/tools/XBMCTex/XHandle.cpp b/tools/XBMCTex/XHandle.cpp
deleted file mode 100644
index abe769985b..0000000000
--- a/tools/XBMCTex/XHandle.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include <SDL/SDL.h>
-
-#include "XHandle.h"
-
-int CXHandle::m_objectTracker[10] = {0};
-
-CXHandle::CXHandle()
-{
- Init();
- m_objectTracker[m_type]++;
-}
-
-CXHandle::CXHandle(HandleType nType)
-{
- Init();
- m_type=nType;
- m_objectTracker[m_type]++;
-}
-
-CXHandle::~CXHandle()
-{
-
- m_objectTracker[m_type]--;
-
- if (RecursionCount > 0) {
- assert(false);
- }
-
- if (m_nRefCount > 1) {
- assert(false);
- }
-
- if (m_hSem) {
- SDL_DestroySemaphore(m_hSem);
- }
-
- if (m_hMutex) {
- SDL_DestroyMutex(m_hMutex);
- }
-
- if (m_internalLock) {
- SDL_DestroyMutex(m_internalLock);
- }
-
- if (m_hCond) {
- SDL_DestroyCond(m_hCond);
- }
-
- if (m_threadValid) {
- pthread_join(m_hThread,NULL);
- }
-
- if ( fd != 0 ) {
- close(fd);
- }
-
-}
-
-void CXHandle::Init()
-{
- fd=0;
- m_hSem=NULL;
- m_hMutex=NULL;
- m_threadValid=false;
- m_hCond=NULL;
- m_type = HND_NULL;
- RecursionCount=0;
- OwningThread=0;
- m_bManualEvent=FALSE;
- m_bEventSet=FALSE;
- m_nFindFileIterator=0 ;
- m_nRefCount=1;
- m_tmCreation = time(NULL);
- m_internalLock = SDL_CreateMutex();
-#ifdef __APPLE__
- m_machThreadPort = 0;
-#endif
-}
-
-void CXHandle::ChangeType(HandleType newType) {
- m_objectTracker[m_type]--;
- m_type = newType;
- m_objectTracker[m_type]++;
-}
-
-bool CloseHandle(HANDLE hObject) {
- if (!hObject)
- return false;
-
- if (hObject == INVALID_HANDLE_VALUE || hObject == (HANDLE)-1)
- return true;
-
- bool bDelete = false;
- SDL_LockMutex(hObject->m_internalLock);
- if (--hObject->m_nRefCount == 0)
- bDelete = true;
- SDL_UnlockMutex(hObject->m_internalLock);
-
- if (bDelete)
- delete hObject;
-
- return true;
-}
-
diff --git a/tools/XBMCTex/XHandle.h b/tools/XBMCTex/XHandle.h
deleted file mode 100644
index 96a1ed1a83..0000000000
--- a/tools/XBMCTex/XHandle.h
+++ /dev/null
@@ -1,88 +0,0 @@
-#ifndef __X_HANDLE__
-#define __X_HANDLE__
-
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#ifndef _WIN32
-
-#include "../../guilib/StdString.h"
-#include <SDL/SDL_mutex.h>
-#include <pthread.h>
-
-#include "PlatformDefs.h"
-#include "StringUtils.h"
-
-struct CXHandle {
-
-public:
- typedef enum { HND_NULL = 0, HND_FILE, HND_EVENT, HND_MUTEX, HND_THREAD, HND_FIND_FILE } HandleType;
-
- CXHandle();
- CXHandle(HandleType nType);
-
- virtual ~CXHandle();
- void Init();
- inline HandleType GetType() { return m_type; }
- void ChangeType(HandleType newType);
-
- SDL_sem *m_hSem;
- pthread_t m_hThread;
- bool m_threadValid;
- SDL_cond *m_hCond;
-
-#ifdef __APPLE__
- // Save the Mach thrad port, I don't think it can be obtained from
- // the pthread_t. We'll use it for querying timer information.
- //
- mach_port_t m_machThreadPort;
-#endif
-
- // simulate mutex and critical section
- SDL_mutex *m_hMutex;
- int RecursionCount; // for mutex - for compatibility with WIN32 critical section
- pthread_t OwningThread;
- int fd;
- bool m_bManualEvent;
- time_t m_tmCreation;
- CStdStringArray m_FindFileResults;
- int m_nFindFileIterator;
- CStdString m_FindFileDir;
- off64_t m_iOffset;
- bool m_bCDROM;
- bool m_bEventSet;
- int m_nRefCount;
- SDL_mutex *m_internalLock;
-
-protected:
- HandleType m_type;
- static int m_objectTracker[10];
-
-};
-
-#define HANDLE CXHandle*
-
-bool CloseHandle(HANDLE hObject);
-
-#endif
-
-#endif
-
diff --git a/tools/XBMCTex/XTimeUtils.cpp b/tools/XBMCTex/XTimeUtils.cpp
deleted file mode 100644
index 6a1c71fa54..0000000000
--- a/tools/XBMCTex/XTimeUtils.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include "system.h"
-#include "XTimeUtils.h"
-#include <errno.h>
-#include <time.h>
-#include <unistd.h>
-#include <sys/times.h>
-
-#ifdef __APPLE__
-#include <mach/mach.h>
-#include <mach/clock.h>
-#include <mach/mach_error.h>
-#endif
-
-#define WIN32_TIME_OFFSET ((unsigned long long)(369 * 365 + 89) * 24 * 3600 * 10000000)
-
-
-#ifdef _LINUX
-
-BOOL TimeTToFileTime(time_t timeT, FILETIME* lpLocalFileTime) {
-
- if (lpLocalFileTime == NULL)
- return false;
-
- ULARGE_INTEGER result;
- result.QuadPart = (unsigned long long) timeT * 10000000;
- result.QuadPart += WIN32_TIME_OFFSET;
-
- lpLocalFileTime->dwLowDateTime = result.u.LowPart;
- lpLocalFileTime->dwHighDateTime = result.u.HighPart;
-
- return true;
-}
-
-#endif
-
diff --git a/tools/XBMCTex/XTimeUtils.h b/tools/XBMCTex/XTimeUtils.h
deleted file mode 100644
index 10b944744e..0000000000
--- a/tools/XBMCTex/XTimeUtils.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __X_TIME_UTILS_
-#define __X_TIME_UTILS_
-
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include "PlatformDefs.h"
-
-BOOL TimeTToFileTime(time_t timeT, FILETIME* lpLocalFileTime);
-
-#endif
-
diff --git a/tools/XBMCTex/cmdlineargs.h b/tools/XBMCTex/cmdlineargs.h
deleted file mode 100644
index 0b99cad282..0000000000
--- a/tools/XBMCTex/cmdlineargs.h
+++ /dev/null
@@ -1,144 +0,0 @@
-#ifndef CMDLINEARGS_H
-#define CMDLINEARGS_H
-
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#ifdef _LINUX
-#include "PlatformDefs.h"
-#include "xwinapi.h"
-typedef LPSTR PSZ;
-#define _snprintf snprintf
-#else
-#include <windows.h>
-#endif
-#include <vector>
-#include <string>
-
-class CmdLineArgs : public std::vector<char*>
-{
-public:
- CmdLineArgs ()
- {
- // Save local copy of the command line string, because
- // ParseCmdLine() modifies this string while parsing it.
- PSZ cmdline = GetCommandLine();
- m_cmdline = new char [strlen (cmdline) + 1];
- if (m_cmdline)
- {
- strcpy (m_cmdline, cmdline);
- ParseCmdLine();
- } else {
-#ifdef _LINUX
- delete[] cmdline;
-#endif
- }
- }
-
- CmdLineArgs (const int argc, const char **argv)
- {
- std::string cmdline;
- for (int i = 0 ; i<argc ; i++)
- {
- cmdline += std::string(argv[i]);
- if ( i != (argc-1) )
- {
- cmdline += " ";
- }
- }
- m_cmdline = new char [cmdline.length() + 1];
- if (m_cmdline)
- {
- strcpy(m_cmdline, cmdline.c_str());
- ParseCmdLine();
- }
- }
-
- ~CmdLineArgs()
- {
- delete[] m_cmdline;
- }
-
-private:
- PSZ m_cmdline; // the command line string
-
- ////////////////////////////////////////////////////////////////////////////////
- // Parse m_cmdline into individual tokens, which are delimited by spaces. If a
- // token begins with a quote, then that token is terminated by the next quote
- // followed immediately by a space or terminator. This allows tokens to contain
- // spaces.
- // This input string: This "is" a ""test"" "of the parsing" alg"o"rithm.
- // Produces these tokens: This, is, a, "test", of the parsing, alg"o"rithm
- ////////////////////////////////////////////////////////////////////////////////
- void ParseCmdLine ()
- {
- enum { TERM = '\0',
- QUOTE = '\"' };
-
- bool bInQuotes = false;
- PSZ pargs = m_cmdline;
-
- while (*pargs)
- {
- while (isspace (*pargs)) // skip leading whitespace
- pargs++;
-
- bInQuotes = (*pargs == QUOTE); // see if this token is quoted
-
- if (bInQuotes) // skip leading quote
- pargs++;
-
- push_back (pargs); // store position of current token
-
- // Find next token.
- // NOTE: Args are normally terminated by whitespace, unless the
- // arg is quoted. That's why we handle the two cases separately,
- // even though they are very similar.
- if (bInQuotes)
- {
- // find next quote followed by a space or terminator
- while (*pargs &&
- !(*pargs == QUOTE && (isspace (pargs[1]) || pargs[1] == TERM)))
- pargs++;
- if (*pargs)
- {
- *pargs = TERM; // terminate token
- if (pargs[1]) // if quoted token not followed by a terminator
- pargs += 2; // advance to next token
- }
- }
- else
- {
- // skip to next non-whitespace character
- while (*pargs && !isspace (*pargs))
- pargs++;
- if (*pargs && isspace (*pargs)) // end of token
- {
- *pargs = TERM; // terminate token
- pargs++; // advance to next token or terminator
- }
- }
- } // while (*pargs)
- } // ParseCmdLine()
-}; // class CmdLineArgs
-
-
-#endif // CMDLINEARGS_H
diff --git a/tools/XBMCTex/sha.c b/tools/XBMCTex/sha.c
deleted file mode 100644
index fc49ff88bf..0000000000
--- a/tools/XBMCTex/sha.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include <string.h>
-#ifdef _LINUX
-#include <stdint.h>
-#else
-#include "stdint_win.h"
-#endif
-
-typedef unsigned long u32;
-typedef unsigned char u8;
-
-#ifdef _LINUX
-#include <string.h>
-#define __forceinline inline
-#define __int64 int64_t
-#endif
-
-__forceinline static u32 rol(u32 x, u8 n)
-{
- return (x << n) | (x >> (32-n));
-}
-
-static void bswapcpy(void* dst, const void* src, u32 n)
-{
- uint32_t d, b0, b1, b2, b3;
- uint32_t *nDst = (uint32_t *)dst;
- uint32_t *nSrc = (uint32_t *)src;
- n >>= 2;
- while (n != 0)
- {
- d = *nSrc;
- b0 = d >> 24;
- b1 = (d >> 8) & 0x0000ff00;
- b2 = (d << 8) & 0x00ff0000;
- b3 = (d << 24);
- *nDst = b3 | b2 | b1 | b0;
- --n;
- ++nSrc;
- ++nDst;
- }
-}
-
-void SHA1(const u8* buf, u32 len, u8 hash[20])
-{
- u32 a, b, c, d, e;
- u32 h[5] = { 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0 };
- u32 w[80];
- u32 n = len;
- int t;
- int done = 0;
-
- while (done != 2)
- {
- if (n >= 64)
- {
- bswapcpy(w, buf, 64);
- buf += 64;
- n -= 64;
- }
- else
- {
- u8 tmpbuf[64];
- memcpy(tmpbuf, buf, n);
- memset(tmpbuf+n, 0, 64-n);
- if (!done)
- tmpbuf[n] = 0x80;
- bswapcpy(w, tmpbuf, 64);
- if (n <= 55)
- {
- u32 bitlen = len * 8;
- w[14] = *(((u32*)&bitlen)+1);
- w[15] = *((u32*)&bitlen);
- done = 2;
- }
- else
- done = 1;
- n = 0;
- }
-
- for (t = 16; t < 80; ++t)
- {
- w[t] = rol(w[t-3] ^ w[t-8] ^ w[t-14] ^ w[t-16], 1);
- }
-
- a = h[0]; b = h[1]; c = h[2]; d = h[3]; e = h[4];
-
- for (t = 0; t < 20; ++t)
- {
- u32 temp = rol(a, 5) + ((b & c) | ((~b) & d)) + e + w[t] + 0x5A827999;
- e = d; d = c; c = rol(b, 30); b = a; a = temp;
- }
- for ( ; t < 40; ++t)
- {
- u32 temp = rol(a, 5) + (b ^ c ^ d) + e + w[t] + 0x6ED9EBA1;
- e = d; d = c; c = rol(b, 30); b = a; a = temp;
- }
- for ( ; t < 60; ++t)
- {
- u32 temp = rol(a, 5) + ((b & c) | (b & d) | (c & d)) + e + w[t] + 0x8F1BBCDC;
- e = d; d = c; c = rol(b, 30); b = a; a = temp;
- }
- for ( ; t < 80; ++t)
- {
- u32 temp = rol(a, 5) + (b ^ c ^ d) + e + w[t] + 0xCA62C1D6;
- e = d; d = c; c = rol(b, 30); b = a; a = temp;
- }
-
- h[0] += a; h[1] += b; h[2] += c; h[3] += d; h[4] += e;
- }
-
- bswapcpy(hash, h, 20);
-}
diff --git a/tools/XBMCTex/stdint_win.h b/tools/XBMCTex/stdint_win.h
deleted file mode 100644
index 7e200dc6fc..0000000000
--- a/tools/XBMCTex/stdint_win.h
+++ /dev/null
@@ -1,222 +0,0 @@
-// ISO C9x compliant stdint.h for Microsoft Visual Studio
-// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
-//
-// Copyright (c) 2006 Alexander Chemeris
-//
-// 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 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.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _MSC_VER // [
-#error "Use this header only with Microsoft Visual C++ compilers!"
-#endif // _MSC_VER ]
-
-#ifndef _MSC_STDINT_H_ // [
-#define _MSC_STDINT_H_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif
-
-#include <limits.h>
-
-// For Visual Studio 6 in C++ mode wrap <wchar.h> include with 'extern "C++" {}'
-// or compiler give many errors like this:
-// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
-#if (_MSC_VER < 1300) && defined(__cplusplus)
- extern "C++" {
-#endif
-# include <wchar.h>
-#if (_MSC_VER < 1300) && defined(__cplusplus)
- }
-#endif
-
-// 7.18.1 Integer types
-
-// 7.18.1.1 Exact-width integer types
-typedef __int8 int8_t;
-typedef __int16 int16_t;
-typedef __int32 int32_t;
-typedef __int64 int64_t;
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-
-// 7.18.1.2 Minimum-width integer types
-typedef int8_t int_least8_t;
-typedef int16_t int_least16_t;
-typedef int32_t int_least32_t;
-typedef int64_t int_least64_t;
-typedef uint8_t uint_least8_t;
-typedef uint16_t uint_least16_t;
-typedef uint32_t uint_least32_t;
-typedef uint64_t uint_least64_t;
-
-// 7.18.1.3 Fastest minimum-width integer types
-typedef int8_t int_fast8_t;
-typedef int16_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef int64_t int_fast64_t;
-typedef uint8_t uint_fast8_t;
-typedef uint16_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-typedef uint64_t uint_fast64_t;
-
-// 7.18.1.4 Integer types capable of holding object pointers
-#ifdef _WIN64 // [
- typedef __int64 intptr_t;
- typedef unsigned __int64 uintptr_t;
-#else // _WIN64 ][
- typedef int intptr_t;
- typedef unsigned int uintptr_t;
-#endif // _WIN64 ]
-
-// 7.18.1.5 Greatest-width integer types
-typedef int64_t intmax_t;
-typedef uint64_t uintmax_t;
-
-
-// 7.18.2 Limits of specified-width integer types
-
-#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
-
-// 7.18.2.1 Limits of exact-width integer types
-#define INT8_MIN ((int8_t)_I8_MIN)
-#define INT8_MAX _I8_MAX
-#define INT16_MIN ((int16_t)_I16_MIN)
-#define INT16_MAX _I16_MAX
-#define INT32_MIN ((int32_t)_I32_MIN)
-#define INT32_MAX _I32_MAX
-#define INT64_MIN ((int64_t)_I64_MIN)
-#define INT64_MAX _I64_MAX
-#define UINT8_MAX _UI8_MAX
-#define UINT16_MAX _UI16_MAX
-#define UINT32_MAX _UI32_MAX
-#define UINT64_MAX _UI64_MAX
-
-// 7.18.2.2 Limits of minimum-width integer types
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST8_MAX INT8_MAX
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST16_MAX INT16_MAX
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST32_MAX INT32_MAX
-#define INT_LEAST64_MIN INT64_MIN
-#define INT_LEAST64_MAX INT64_MAX
-#define UINT_LEAST8_MAX UINT8_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-#define UINT_LEAST64_MAX UINT64_MAX
-
-// 7.18.2.3 Limits of fastest minimum-width integer types
-#define INT_FAST8_MIN INT8_MIN
-#define INT_FAST8_MAX INT8_MAX
-#define INT_FAST16_MIN INT16_MIN
-#define INT_FAST16_MAX INT16_MAX
-#define INT_FAST32_MIN INT32_MIN
-#define INT_FAST32_MAX INT32_MAX
-#define INT_FAST64_MIN INT64_MIN
-#define INT_FAST64_MAX INT64_MAX
-#define UINT_FAST8_MAX UINT8_MAX
-#define UINT_FAST16_MAX UINT16_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-#define UINT_FAST64_MAX UINT64_MAX
-
-// 7.18.2.4 Limits of integer types capable of holding object pointers
-#ifdef _WIN64 // [
-# define INTPTR_MIN INT64_MIN
-# define INTPTR_MAX INT64_MAX
-# define UINTPTR_MAX UINT64_MAX
-#else // _WIN64 ][
-# define INTPTR_MIN INT32_MIN
-# define INTPTR_MAX INT32_MAX
-# define UINTPTR_MAX UINT32_MAX
-#endif // _WIN64 ]
-
-// 7.18.2.5 Limits of greatest-width integer types
-#define INTMAX_MIN INT64_MIN
-#define INTMAX_MAX INT64_MAX
-#define UINTMAX_MAX UINT64_MAX
-
-// 7.18.3 Limits of other integer types
-
-#ifdef _WIN64 // [
-# define PTRDIFF_MIN _I64_MIN
-# define PTRDIFF_MAX _I64_MAX
-#else // _WIN64 ][
-# define PTRDIFF_MIN _I32_MIN
-# define PTRDIFF_MAX _I32_MAX
-#endif // _WIN64 ]
-
-#define SIG_ATOMIC_MIN INT_MIN
-#define SIG_ATOMIC_MAX INT_MAX
-
-#ifndef SIZE_MAX // [
-# ifdef _WIN64 // [
-# define SIZE_MAX _UI64_MAX
-# else // _WIN64 ][
-# define SIZE_MAX _UI32_MAX
-# endif // _WIN64 ]
-#endif // SIZE_MAX ]
-
-// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
-#ifndef WCHAR_MIN // [
-# define WCHAR_MIN 0
-#endif // WCHAR_MIN ]
-#ifndef WCHAR_MAX // [
-# define WCHAR_MAX _UI16_MAX
-#endif // WCHAR_MAX ]
-
-#define WINT_MIN 0
-#define WINT_MAX _UI16_MAX
-
-#endif // __STDC_LIMIT_MACROS ]
-
-
-// 7.18.4 Limits of other integer types
-
-#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
-
-// 7.18.4.1 Macros for minimum-width integer constants
-
-#define INT8_C(val) val##i8
-#define INT16_C(val) val##i16
-#define INT32_C(val) val##i32
-#define INT64_C(val) val##i64
-
-#define UINT8_C(val) val##ui8
-#define UINT16_C(val) val##ui16
-#define UINT32_C(val) val##ui32
-#define UINT64_C(val) val##ui64
-
-// 7.18.4.2 Macros for greatest-width integer constants
-#define INTMAX_C INT64_C
-#define UINTMAX_C UINT64_C
-
-#endif // __STDC_CONSTANT_MACROS ]
-
-
-#endif // _MSC_STDINT_H_ ]
diff --git a/tools/XBMCTex/xbox.cpp b/tools/XBMCTex/xbox.cpp
deleted file mode 100644
index 8b072d76ea..0000000000
--- a/tools/XBMCTex/xbox.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include "xbox.h"
-#include "Surface.h"
-#include "EndianSwap.h"
-
-#ifndef min
-#define min(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-
-bool IsPowerOf2(UINT number)
-{
- return (number & (~number+1)) == number;
-}
-
-int GetLog2(UINT Number)
-{
- int power = 0;
- while (Number)
- {
- Number >>= 1;
- power++;
- }
- return power-1;
-}
-
-BOOL IsPaletted(XB_D3DFORMAT format)
-{
- switch (format)
- {
- case XB_D3DFMT_P8:
- return true;
- default:
- return false;
- }
-}
-
-void SetTextureHeader(UINT Width, UINT Height, UINT Levels, UINT Usage, XB_D3DFORMAT Format, D3DTexture *pTexture, UINT Data, UINT Pitch)
-{
- // TODO: No idea what most of this is.
- // Byte swapping to convert the header on big-endian system
- memset(pTexture, 0, sizeof(D3DTexture));
- pTexture->Common = Endian_SwapLE32(D3DCOMMON_TYPE_TEXTURE + 1); // what does the 1 give??
- pTexture->Format |= (Format & 0xFF) << 8;
- pTexture->Format |= 0x10029; // no idea why
- pTexture->Data = Endian_SwapLE32(Data); // offset of texture data
- if (IsPowerOf2(Width) && IsPowerOf2(Height))
- {
- pTexture->Format |= (GetLog2(Width) & 0xF) << 20;
- pTexture->Format |= (GetLog2(Height) & 0xF) << 24;
- }
- else
- {
- pTexture->Size |= (Width - 1) & 0xfff;
- pTexture->Size |= ((Height - 1) & 0xfff) << 12;
- pTexture->Size |= (((Pitch >> 6) & 0xff) - 1) << 24;
- }
- pTexture->Format = Endian_SwapLE32(pTexture->Format);
- pTexture->Size = Endian_SwapLE32(pTexture->Size);
-}
-
-BOOL IsSwizzledFormat(XB_D3DFORMAT format)
-{
- switch (format)
- {
- case XB_D3DFMT_A8R8G8B8:
- case XB_D3DFMT_P8:
- return true;
- default:
- return false;
- }
-}
-
-DWORD BytesPerPixelFromFormat(XB_D3DFORMAT format)
-{
- switch (format)
- {
- case XB_D3DFMT_A8R8G8B8:
- case XB_D3DFMT_LIN_A8R8G8B8:
- case XB_D3DFMT_DXT1:
- case XB_D3DFMT_DXT4:
- return 4;
- case XB_D3DFMT_P8:
- return 1;
- default:
- break;
- }
- return 0;
-}
-
-// Swizzle.
-// Format is:
-
-// 00 01 04 05
-// 02 03 06 07
-// 08 09 12 13
-// 10 11 14 15 ...
-
-// Currently only works for 32bit and 8bit textures, with power of 2 width and height
-void Swizzle(const void *src, unsigned int depth, unsigned int width, unsigned int height, void *dest)
-{
- for (UINT y = 0; y < height; y++)
- {
- UINT sy = 0;
- if (y < width)
- {
- for (int bit = 0; bit < 16; bit++)
- sy |= ((y >> bit) & 1) << (2*bit);
- sy <<= 1; // y counts twice
- }
- else
- {
- UINT y_mask = y % width;
- for (int bit = 0; bit < 16; bit++)
- sy |= ((y_mask >> bit) & 1) << (2*bit);
- sy <<= 1; // y counts twice
- sy += (y / width) * width * width;
- }
- BYTE *s = (BYTE *)src + y * width * depth;
- for (UINT x = 0; x < width; x++)
- {
- UINT sx = 0;
- if (x < height * 2)
- {
- for (int bit = 0; bit < 16; bit++)
- sx |= ((x >> bit) & 1) << (2*bit);
- }
- else
- {
- int x_mask = x % (2*height);
- for (int bit = 0; bit < 16; bit++)
- sx |= ((x_mask >> bit) & 1) << (2*bit);
- sx += (x / (2 * height)) * 2 * height * height;
- }
- BYTE *d = (BYTE *)dest + (sx + sy)*depth;
- for (unsigned int i = 0; i < depth; ++i)
- *d++ = *s++;
- }
- }
-}
-
-
-VOID SwizzleRect(LPCVOID pSource, DWORD Pitch, LPVOID pDest, DWORD Width, DWORD Height, DWORD BytesPerPixel)
-{
- // knows nothing about Pitch
- Swizzle(pSource, BytesPerPixel, Width, Height, pDest);
-}
diff --git a/tools/XBMCTex/xbox.h b/tools/XBMCTex/xbox.h
deleted file mode 100644
index c17a8f88eb..0000000000
--- a/tools/XBMCTex/xbox.h
+++ /dev/null
@@ -1,181 +0,0 @@
-#pragma once
-
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// Some XBox specific stuff
-#ifdef _LINUX
-#include "PlatformDefs.h"
-typedef struct tagPALETTEENTRY {
- BYTE peRed;
- BYTE peGreen;
- BYTE peBlue;
- BYTE peFlags;
-} PALETTEENTRY;
-#else
-typedef unsigned long DWORD;
-typedef unsigned int UINT;
-typedef int BOOL;
-typedef const void* LPCVOID;
-typedef void* LPVOID;
-typedef unsigned char BYTE;
-#endif
-
-struct D3DTexture
-{
- DWORD Common;
- DWORD Data;
- DWORD Lock;
-
- DWORD Format; // Format information about the texture.
- DWORD Size; // Size of a non power-of-2 texture, must be zero otherwise
-};
-
-struct D3DPalette
-{
- DWORD Common;
- DWORD Data;
- DWORD Lock;
-
-};
-
-typedef enum _XB_D3DFORMAT
-{
- XB_D3DFMT_UNKNOWN = 0xFFFFFFFF,
-
- /* Swizzled formats */
-
- XB_D3DFMT_A8R8G8B8 = 0x00000006,
- XB_D3DFMT_X8R8G8B8 = 0x00000007,
- XB_D3DFMT_R5G6B5 = 0x00000005,
- XB_D3DFMT_R6G5B5 = 0x00000027,
- XB_D3DFMT_X1R5G5B5 = 0x00000003,
- XB_D3DFMT_A1R5G5B5 = 0x00000002,
- XB_D3DFMT_A4R4G4B4 = 0x00000004,
- XB_D3DFMT_A8 = 0x00000019,
- XB_D3DFMT_A8B8G8R8 = 0x0000003A,
- XB_D3DFMT_B8G8R8A8 = 0x0000003B,
- XB_D3DFMT_R4G4B4A4 = 0x00000039,
- XB_D3DFMT_R5G5B5A1 = 0x00000038,
- XB_D3DFMT_R8G8B8A8 = 0x0000003C,
- XB_D3DFMT_R8B8 = 0x00000029,
- XB_D3DFMT_G8B8 = 0x00000028,
-
- XB_D3DFMT_P8 = 0x0000000B,
-
- XB_D3DFMT_L8 = 0x00000000,
- XB_D3DFMT_A8L8 = 0x0000001A,
- XB_D3DFMT_AL8 = 0x00000001,
- XB_D3DFMT_L16 = 0x00000032,
-
- XB_D3DFMT_V8U8 = 0x00000028,
- XB_D3DFMT_L6V5U5 = 0x00000027,
- XB_D3DFMT_X8L8V8U8 = 0x00000007,
- XB_D3DFMT_Q8W8V8U8 = 0x0000003A,
- XB_D3DFMT_V16U16 = 0x00000033,
-
- XB_D3DFMT_D16_LOCKABLE = 0x0000002C,
- XB_D3DFMT_D16 = 0x0000002C,
- XB_D3DFMT_D24S8 = 0x0000002A,
- XB_D3DFMT_F16 = 0x0000002D,
- XB_D3DFMT_F24S8 = 0x0000002B,
-
- /* YUV formats */
-
- XB_D3DFMT_YUY2 = 0x00000024,
- XB_D3DFMT_UYVY = 0x00000025,
-
- /* Compressed formats */
-
- XB_D3DFMT_DXT1 = 0x0000000C,
- XB_D3DFMT_DXT2 = 0x0000000E,
- XB_D3DFMT_DXT3 = 0x0000000E,
- XB_D3DFMT_DXT4 = 0x0000000F,
- XB_D3DFMT_DXT5 = 0x0000000F,
-
- /* Linear formats */
-
- XB_D3DFMT_LIN_A1R5G5B5 = 0x00000010,
- XB_D3DFMT_LIN_A4R4G4B4 = 0x0000001D,
- XB_D3DFMT_LIN_A8 = 0x0000001F,
- XB_D3DFMT_LIN_A8B8G8R8 = 0x0000003F,
- XB_D3DFMT_LIN_A8R8G8B8 = 0x00000012,
- XB_D3DFMT_LIN_B8G8R8A8 = 0x00000040,
- XB_D3DFMT_LIN_G8B8 = 0x00000017,
- XB_D3DFMT_LIN_R4G4B4A4 = 0x0000003E,
- XB_D3DFMT_LIN_R5G5B5A1 = 0x0000003D,
- XB_D3DFMT_LIN_R5G6B5 = 0x00000011,
- XB_D3DFMT_LIN_R6G5B5 = 0x00000037,
- XB_D3DFMT_LIN_R8B8 = 0x00000016,
- XB_D3DFMT_LIN_R8G8B8A8 = 0x00000041,
- XB_D3DFMT_LIN_X1R5G5B5 = 0x0000001C,
- XB_D3DFMT_LIN_X8R8G8B8 = 0x0000001E,
-
- XB_D3DFMT_LIN_A8L8 = 0x00000020,
- XB_D3DFMT_LIN_AL8 = 0x0000001B,
- XB_D3DFMT_LIN_L16 = 0x00000035,
- XB_D3DFMT_LIN_L8 = 0x00000013,
-
- XB_D3DFMT_LIN_V16U16 = 0x00000036,
- XB_D3DFMT_LIN_V8U8 = 0x00000017,
- XB_D3DFMT_LIN_L6V5U5 = 0x00000037,
- XB_D3DFMT_LIN_X8L8V8U8 = 0x0000001E,
- XB_D3DFMT_LIN_Q8W8V8U8 = 0x00000012,
-
- XB_D3DFMT_LIN_D24S8 = 0x0000002E,
- XB_D3DFMT_LIN_F24S8 = 0x0000002F,
- XB_D3DFMT_LIN_D16 = 0x00000030,
- XB_D3DFMT_LIN_F16 = 0x00000031,
-
- XB_D3DFMT_VERTEXDATA = 100,
- XB_D3DFMT_INDEX16 = 101,
-
- XB_D3DFMT_FORCE_DWORD =0x7fffffff
-} XB_D3DFORMAT;
-
-#define D3DCOMMON_TYPE_MASK 0x0070000
-#define D3DCOMMON_TYPE_TEXTURE 0x0040000
-
-// XPR header
-struct XPR_FILE_HEADER
-{
- DWORD dwMagic;
- DWORD dwTotalSize;
- DWORD dwHeaderSize;
-};
-
-#define XPR_MAGIC_HEADER_VALUE (('0' << 24) | ('R' << 16) | ('P' << 8) | 'X')
-
-DWORD BytesPerPixelFromFormat(XB_D3DFORMAT format);
-BOOL IsSwizzledFormat(XB_D3DFORMAT format);
-void SetTextureHeader(UINT Width, UINT Height, UINT Levels, UINT Usage, XB_D3DFORMAT Format, D3DTexture *pTexture, UINT Data, UINT Pitch);
-void SwizzleRect(LPCVOID pSource, DWORD Pitch, LPVOID pDest, DWORD Width, DWORD Height, DWORD BytesPerPixel);
-
-DWORD inline PadPow2(DWORD x)
-{
- --x;
- x |= x >> 1;
- x |= x >> 2;
- x |= x >> 4;
- x |= x >> 8;
- x |= x >> 16;
- return ++x;
-}
diff --git a/tools/XBMCTex/xwinapi.cpp b/tools/XBMCTex/xwinapi.cpp
deleted file mode 100644
index 54b4f8de6f..0000000000
--- a/tools/XBMCTex/xwinapi.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include "xwinapi.h"
-#ifdef __APPLE__
-#include "OSXGNUReplacements.h"
-#endif
-
-// I hope this doesn't need to handle unicode...
-LPTSTR GetCommandLine() {
- pid_t pid = 0;
- char procFile[32],
- *cmdline = NULL;
- FILE *fp = NULL;
- size_t cmdlinelen = 0;
- int i;
-
- pid = getpid();
- sprintf(procFile, "/proc/%u/cmdline", pid);
- if((fp = fopen(procFile, "r")) == NULL)
- return NULL;
-
- // getline() allocates memory so be sure to free it
- // after calling GetCommandLine()
- if (getline(&cmdline, &cmdlinelen, fp) == -1)
- {
- fclose(fp);
- return NULL;
- }
-
- fclose(fp);
- fp = NULL;
-
- for (i = 0; i < (int)cmdlinelen; i++) {
- if (cmdline[i] == 0x00) {
- if (cmdline[i + 1] == 0x00)
- break;
- cmdline[i] = ' ';
- }
- }
-
- cmdline = (char *)realloc(cmdline, strlen(cmdline) + 1);
- return cmdline;
-}
-
-DWORD GetCurrentDirectory(DWORD nBufferLength, LPTSTR lpBuffer) {
- bool bSizeTest = (nBufferLength == 0 && lpBuffer == NULL);
- if (getcwd(lpBuffer, nBufferLength) == NULL) {
- if (errno == ERANGE) {
- LPTSTR tmp = NULL;
- if (getcwd(tmp, 0) == NULL )
- nBufferLength = 0;
- else
- nBufferLength = strlen(tmp) + 1;
-
- free(tmp);
- return nBufferLength;
- }
- return 0;
- }
- if (bSizeTest) {
- nBufferLength = strlen(lpBuffer) + 1;
- free(lpBuffer);
- lpBuffer = NULL;
- return nBufferLength;
- }
- return strlen(lpBuffer);
-}
-
-BOOL SetCurrentDirectory(LPCTSTR lpPathName) {
- return (chdir(lpPathName) == 0);
-}
-
-DWORD GetLastError( ) {
- return errno;
-}
-
diff --git a/tools/XBMCTex/xwinapi.h b/tools/XBMCTex/xwinapi.h
deleted file mode 100644
index 88cc140e08..0000000000
--- a/tools/XBMCTex/xwinapi.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef XWINAPI_H__
-#define XWINAPI_H__
-
-/*
- * Copyright (C) 2004-2009 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include "PlatformDefs.h"
-
-LPTSTR GetCommandLine();
-DWORD GetCurrentDirectory(DWORD nBufferLength, LPTSTR lpBuffer);
-BOOL SetCurrentDirectory(LPCTSTR lpPathName);
-DWORD GetLastError();
-#endif // XWINAPI_H__
-
diff --git a/tools/XprPack/XprPack.cpp b/tools/XprPack/XprPack.cpp
deleted file mode 100644
index c60274ca51..0000000000
--- a/tools/XprPack/XprPack.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2004-2008 Team XBMC
- * http://www.xbmc.org
- *
- * 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, 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 XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// XprPack.cpp : Defines the entry point for the console application.
-//
-
-#include "stdafx.h"
-#include "../../xbmc/lib/liblzo/lzo1x.h"
-
-#pragma comment(lib, "../../lib/win32/liblzo/lzo.lib")
-
-int main(int argc, char* argv[])
-{
- if (argc < 2)
- {
- puts("Usage: XprPack xprfile");
- return 1;
- }
-
- printf("Compressing %s: ", argv[1]);
-
- HANDLE hFile = CreateFile(argv[1], GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
- if (hFile == INVALID_HANDLE_VALUE)
- {
- printf("Unable to open file: %x\n", GetLastError());
- return 1;
- }
-
- DWORD n;
- DWORD XprHeader[3]; // "XPR0", totalsize, headersize
- if (!ReadFile(hFile, XprHeader, 12, &n, 0) || n != 12)
- {
- printf("Unable to read header: %x\n", GetLastError());
- return 1;
- }
-
- SetFilePointer(hFile, XprHeader[2], 0, FILE_BEGIN);
-
- lzo_uint SrcSize = XprHeader[1] - XprHeader[2];
- lzo_byte* src = (lzo_byte*)VirtualAlloc(0, SrcSize, MEM_COMMIT, PAGE_READWRITE);
-
- if (!ReadFile(hFile, src, SrcSize, &n, 0) || n != SrcSize)
- {
- printf("Unable to read data: %x\n", GetLastError());
- return 1;
- }
-
- lzo_uint DstSize;
- lzo_byte* dst = (lzo_byte*)VirtualAlloc(0, SrcSize, MEM_COMMIT, PAGE_READWRITE);
-
- lzo_voidp tmp = VirtualAlloc(0, LZO1X_999_MEM_COMPRESS, MEM_COMMIT, PAGE_READWRITE);
- if (lzo1x_999_compress(src, SrcSize, dst + 4, &DstSize, tmp) != LZO_E_OK)
- {
- printf("Compression failure\n");
- return 1;
- }
-
- lzo_uint s;
- lzo1x_optimize(dst + 4, DstSize, src, &s, NULL);
-
- SetFilePointer(hFile, XprHeader[2], 0, FILE_BEGIN);
-
- *((lzo_uint*)dst) = SrcSize;
- if (!WriteFile(hFile, dst, DstSize + 4, &n, 0) || n != DstSize + 4)
- {
- printf("Unable to write data: %x\n", GetLastError());
- return 1;
- }
- SetEndOfFile(hFile);
-
- SetFilePointer(hFile, 0, 0, FILE_BEGIN);
-
- XprHeader[1] = XprHeader[2] + DstSize + 4;
- if (!WriteFile(hFile, XprHeader, 12, &n, 0) || n != 12)
- {
- printf("Unable to write data: %x\n", GetLastError());
- return 1;
- }
-
- printf("%.1f:1\n", double(SrcSize) / double(DstSize));
-
- return 0;
-} \ No newline at end of file
diff --git a/tools/XprPack/XprPack.sln b/tools/XprPack/XprPack.sln
deleted file mode 100644
index a8059fccc1..0000000000
--- a/tools/XprPack/XprPack.sln
+++ /dev/null
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XprPack", "XprPack.vcproj", "{D22B9076-1BD3-4A79-91EB-FE437DBB718D}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {D22B9076-1BD3-4A79-91EB-FE437DBB718D}.Debug.ActiveCfg = Debug|Win32
- {D22B9076-1BD3-4A79-91EB-FE437DBB718D}.Debug.Build.0 = Debug|Win32
- {D22B9076-1BD3-4A79-91EB-FE437DBB718D}.Release.ActiveCfg = Release|Win32
- {D22B9076-1BD3-4A79-91EB-FE437DBB718D}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/tools/XprPack/XprPack.vcproj b/tools/XprPack/XprPack.vcproj
deleted file mode 100644
index c7a92a81bc..0000000000
--- a/tools/XprPack/XprPack.vcproj
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="XprPack"
- ProjectGUID="{D22B9076-1BD3-4A79-91EB-FE437DBB718D}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="5"
- UsePrecompiledHeader="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/XprPack.exe"
- LinkIncremental="2"
- IgnoreDefaultLibraryNames="libc"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/XprPack.pdb"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="4"
- UsePrecompiledHeader="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/XprPack.exe"
- LinkIncremental="1"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath=".\stdafx.cpp">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\XprPack.cpp">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- <File
- RelativePath=".\stdafx.h">
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
- </Filter>
- <File
- RelativePath=".\ReadMe.txt">
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/tools/XprPack/stdafx.cpp b/tools/XprPack/stdafx.cpp
deleted file mode 100644
index 12ebb76034..0000000000
--- a/tools/XprPack/stdafx.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// stdafx.cpp : source file that includes just the standard includes
-// XprPack.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
diff --git a/tools/XprPack/stdafx.h b/tools/XprPack/stdafx.h
deleted file mode 100644
index da1eb595a8..0000000000
--- a/tools/XprPack/stdafx.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#pragma once
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _WIN32_WINNT 0x500 // Win 2k/XP REQUIRED!
-#include <windows.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <malloc.h>