aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorspiff <spiff@xbmc.org>2011-05-15 19:58:36 +0200
committerspiff <spiff@xbmc.org>2011-05-15 20:59:30 +0200
commite502470772b45c9062faa4e9c7f198d998185090 (patch)
tree58316d7ee5554330837e46a6e253cc5aa67f7f50 /tools
parent58411707b808866a641e42dbb026a8c99aa3f71f (diff)
changed: remove XprPack tool
xpr's was a xbox pack format and this code could only compile using the xdk
Diffstat (limited to 'tools')
-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
5 files changed, 0 insertions, 299 deletions
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>