From 6c556786fbc3bc2071f1aa39c39969f737d2ab24 Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Wed, 22 Dec 2010 06:00:36 +0000 Subject: [PATCH] Move AES to common lib move pch includes to vcproj file for discio git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6643 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/CMakeLists.txt | 2 + Source/Core/Common/Common.vcproj | 124 ++++ .../Src/AES => Common/Src/Crypto}/aes.h | 0 .../Src/AES => Common/Src/Crypto}/aes_cbc.c | 0 .../Src/AES => Common/Src/Crypto}/aes_core.c | 0 .../Src/AES => Common/Src/Crypto}/aes_locl.h | 0 Source/Core/Common/Src/SConscript | 2 + Source/Core/DiscIO/CMakeLists.txt | 4 +- Source/Core/DiscIO/DiscIO.vcproj | 668 +----------------- Source/Core/DiscIO/Src/BannerLoader.cpp | 1 - Source/Core/DiscIO/Src/BannerLoaderGC.cpp | 2 - Source/Core/DiscIO/Src/BannerLoaderWii.cpp | 4 +- Source/Core/DiscIO/Src/CompressedBlob.cpp | 2 - Source/Core/DiscIO/Src/DiscScrubber.cpp | 2 - Source/Core/DiscIO/Src/DriveBlob.cpp | 1 - Source/Core/DiscIO/Src/FileBlob.cpp | 2 - Source/Core/DiscIO/Src/FileHandlerARC.cpp | 1 - Source/Core/DiscIO/Src/FileMonitor.cpp | 7 +- Source/Core/DiscIO/Src/FileSystemGCWii.cpp | 1 - Source/Core/DiscIO/Src/Filesystem.cpp | 1 - Source/Core/DiscIO/Src/NANDContentLoader.cpp | 3 +- Source/Core/DiscIO/Src/SConscript | 2 - Source/Core/DiscIO/Src/VolumeCreator.cpp | 2 +- Source/Core/DiscIO/Src/VolumeDirectory.cpp | 1 - Source/Core/DiscIO/Src/VolumeWad.cpp | 1 - Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp | 2 - Source/Core/DiscIO/Src/VolumeWiiCrypted.h | 2 +- Source/Core/DiscIO/Src/WiiWad.cpp | 1 - .../Src/MemoryCards/WiiSaveCrypted.h | 2 +- 29 files changed, 141 insertions(+), 699 deletions(-) rename Source/Core/{DiscIO/Src/AES => Common/Src/Crypto}/aes.h (100%) rename Source/Core/{DiscIO/Src/AES => Common/Src/Crypto}/aes_cbc.c (100%) rename Source/Core/{DiscIO/Src/AES => Common/Src/Crypto}/aes_core.c (100%) rename Source/Core/{DiscIO/Src/AES => Common/Src/Crypto}/aes_locl.h (100%) diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt index 61f6fded60..612d8d14fe 100644 --- a/Source/Core/Common/CMakeLists.txt +++ b/Source/Core/Common/CMakeLists.txt @@ -30,6 +30,8 @@ set(SRCS Src/ABI.cpp Src/Version.cpp Src/x64Analyzer.cpp Src/x64Emitter.cpp + Src/Crypto/aes_cbc.cpp + Src/Crypto/aes_core.cpp Src/Crypto/bn.cpp Src/Crypto/ec.cpp Src/Crypto/md5.cpp diff --git a/Source/Core/Common/Common.vcproj b/Source/Core/Common/Common.vcproj index cee7a849b9..b21c8c61bc 100644 --- a/Source/Core/Common/Common.vcproj +++ b/Source/Core/Common/Common.vcproj @@ -532,6 +532,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Core/DiscIO/Src/AES/aes.h b/Source/Core/Common/Src/Crypto/aes.h similarity index 100% rename from Source/Core/DiscIO/Src/AES/aes.h rename to Source/Core/Common/Src/Crypto/aes.h diff --git a/Source/Core/DiscIO/Src/AES/aes_cbc.c b/Source/Core/Common/Src/Crypto/aes_cbc.c similarity index 100% rename from Source/Core/DiscIO/Src/AES/aes_cbc.c rename to Source/Core/Common/Src/Crypto/aes_cbc.c diff --git a/Source/Core/DiscIO/Src/AES/aes_core.c b/Source/Core/Common/Src/Crypto/aes_core.c similarity index 100% rename from Source/Core/DiscIO/Src/AES/aes_core.c rename to Source/Core/Common/Src/Crypto/aes_core.c diff --git a/Source/Core/DiscIO/Src/AES/aes_locl.h b/Source/Core/Common/Src/Crypto/aes_locl.h similarity index 100% rename from Source/Core/DiscIO/Src/AES/aes_locl.h rename to Source/Core/Common/Src/Crypto/aes_locl.h diff --git a/Source/Core/Common/Src/SConscript b/Source/Core/Common/Src/SConscript index 12b74ea82f..7c8433ed2d 100644 --- a/Source/Core/Common/Src/SConscript +++ b/Source/Core/Common/Src/SConscript @@ -42,6 +42,8 @@ files = [ "Version.cpp", "x64Emitter.cpp", "x64Analyzer.cpp", + "Crypto/aes_cbc.cpp", + "Crypto/aes_core.cpp", "Crypto/bn.cpp", "Crypto/ec.cpp", "Crypto/md5.cpp", diff --git a/Source/Core/DiscIO/CMakeLists.txt b/Source/Core/DiscIO/CMakeLists.txt index d1433e91f1..34cfc8f4ce 100644 --- a/Source/Core/DiscIO/CMakeLists.txt +++ b/Source/Core/DiscIO/CMakeLists.txt @@ -17,9 +17,7 @@ set(SRCS Src/BannerLoader.cpp Src/VolumeGC.cpp Src/VolumeWad.cpp Src/VolumeWiiCrypted.cpp - Src/WiiWad.cpp - Src/AES/aes_cbc.c - Src/AES/aes_core.c) + Src/WiiWad.cpp) add_library(discio STATIC ${SRCS}) target_link_libraries(discio common) diff --git a/Source/Core/DiscIO/DiscIO.vcproj b/Source/Core/DiscIO/DiscIO.vcproj index 55c928865f..72864e2af9 100644 --- a/Source/Core/DiscIO/DiscIO.vcproj +++ b/Source/Core/DiscIO/DiscIO.vcproj @@ -53,7 +53,7 @@ UsePrecompiledHeader="2" WarningLevel="3" DebugInformationFormat="4" - ForcedIncludeFiles="" + ForcedIncludeFiles="stdafx.h" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -548,106 +420,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #include "Common.h" @@ -211,4 +209,4 @@ void CBannerLoaderWii::decode5A3image(u32* dst, u16* src, int width, int height) } } -} // namespace +} // namespace \ No newline at end of file diff --git a/Source/Core/DiscIO/Src/CompressedBlob.cpp b/Source/Core/DiscIO/Src/CompressedBlob.cpp index 00a2fe24aa..4c5cdf5777 100644 --- a/Source/Core/DiscIO/Src/CompressedBlob.cpp +++ b/Source/Core/DiscIO/Src/CompressedBlob.cpp @@ -15,8 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" - #ifdef _WIN32 #include #include diff --git a/Source/Core/DiscIO/Src/DiscScrubber.cpp b/Source/Core/DiscIO/Src/DiscScrubber.cpp index 44ad6bb6b1..1f99b8d867 100644 --- a/Source/Core/DiscIO/Src/DiscScrubber.cpp +++ b/Source/Core/DiscIO/Src/DiscScrubber.cpp @@ -15,8 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" - #include "Filesystem.h" #include "VolumeCreator.h" #include "FileUtil.h" diff --git a/Source/Core/DiscIO/Src/DriveBlob.cpp b/Source/Core/DiscIO/Src/DriveBlob.cpp index b2b66f7c88..67a1fa6118 100644 --- a/Source/Core/DiscIO/Src/DriveBlob.cpp +++ b/Source/Core/DiscIO/Src/DriveBlob.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" #include "DriveBlob.h" namespace DiscIO diff --git a/Source/Core/DiscIO/Src/FileBlob.cpp b/Source/Core/DiscIO/Src/FileBlob.cpp index e2ef5d1f64..7e4790acd5 100644 --- a/Source/Core/DiscIO/Src/FileBlob.cpp +++ b/Source/Core/DiscIO/Src/FileBlob.cpp @@ -15,8 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" - #include "Blob.h" #include "FileBlob.h" #include "FileUtil.h" diff --git a/Source/Core/DiscIO/Src/FileHandlerARC.cpp b/Source/Core/DiscIO/Src/FileHandlerARC.cpp index ceca59742b..f1918f6431 100644 --- a/Source/Core/DiscIO/Src/FileHandlerARC.cpp +++ b/Source/Core/DiscIO/Src/FileHandlerARC.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" #include "Common.h" #include "FileHandlerARC.h" diff --git a/Source/Core/DiscIO/Src/FileMonitor.cpp b/Source/Core/DiscIO/Src/FileMonitor.cpp index 1b3ccb0be8..d6998bf57d 100644 --- a/Source/Core/DiscIO/Src/FileMonitor.cpp +++ b/Source/Core/DiscIO/Src/FileMonitor.cpp @@ -15,18 +15,13 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ - -// ----------- -// Include - -#include "stdafx.h" #include #include #include #include -#include "Common.h" // Common +#include "Common.h" #include "IniFile.h" #include "LogManager.h" diff --git a/Source/Core/DiscIO/Src/FileSystemGCWii.cpp b/Source/Core/DiscIO/Src/FileSystemGCWii.cpp index db9c8af2b0..d5cfa7ae94 100644 --- a/Source/Core/DiscIO/Src/FileSystemGCWii.cpp +++ b/Source/Core/DiscIO/Src/FileSystemGCWii.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" #include "Common.h" #include "FileUtil.h" diff --git a/Source/Core/DiscIO/Src/Filesystem.cpp b/Source/Core/DiscIO/Src/Filesystem.cpp index b2953a1f15..bff8b804f9 100644 --- a/Source/Core/DiscIO/Src/Filesystem.cpp +++ b/Source/Core/DiscIO/Src/Filesystem.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" #include "Filesystem.h" #include "VolumeCreator.h" diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.cpp b/Source/Core/DiscIO/Src/NANDContentLoader.cpp index 52489351bc..fef659428e 100644 --- a/Source/Core/DiscIO/Src/NANDContentLoader.cpp +++ b/Source/Core/DiscIO/Src/NANDContentLoader.cpp @@ -15,12 +15,11 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" #include "NANDContentLoader.h" #include #include -#include "AES/aes.h" +#include "Crypto/aes.h" #include "MathUtil.h" #include "FileUtil.h" #include "Log.h" diff --git a/Source/Core/DiscIO/Src/SConscript b/Source/Core/DiscIO/Src/SConscript index 087e3aea3a..374f4b575b 100644 --- a/Source/Core/DiscIO/Src/SConscript +++ b/Source/Core/DiscIO/Src/SConscript @@ -23,8 +23,6 @@ files = [ 'FileMonitor.cpp', 'NANDContentLoader.cpp', 'WiiWad.cpp', - 'AES/aes_cbc.c', - 'AES/aes_core.c', ] libs = [ diff --git a/Source/Core/DiscIO/Src/VolumeCreator.cpp b/Source/Core/DiscIO/Src/VolumeCreator.cpp index 15a825aced..4ac6dd6c31 100644 --- a/Source/Core/DiscIO/Src/VolumeCreator.cpp +++ b/Source/Core/DiscIO/Src/VolumeCreator.cpp @@ -17,7 +17,7 @@ #include -#include "AES/aes.h" +#include "Crypto/aes.h" #include "VolumeCreator.h" diff --git a/Source/Core/DiscIO/Src/VolumeDirectory.cpp b/Source/Core/DiscIO/Src/VolumeDirectory.cpp index d06f4efbd8..eb162703b4 100644 --- a/Source/Core/DiscIO/Src/VolumeDirectory.cpp +++ b/Source/Core/DiscIO/Src/VolumeDirectory.cpp @@ -14,7 +14,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" #include "Common.h" #include "CommonPaths.h" diff --git a/Source/Core/DiscIO/Src/VolumeWad.cpp b/Source/Core/DiscIO/Src/VolumeWad.cpp index 0bd76f19fb..a0f424905e 100644 --- a/Source/Core/DiscIO/Src/VolumeWad.cpp +++ b/Source/Core/DiscIO/Src/VolumeWad.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" #include #include "VolumeWad.h" diff --git a/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp index d3232e2095..9e7865d9c6 100644 --- a/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp +++ b/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp @@ -15,8 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" - #include "VolumeWiiCrypted.h" #include "StringUtil.h" diff --git a/Source/Core/DiscIO/Src/VolumeWiiCrypted.h b/Source/Core/DiscIO/Src/VolumeWiiCrypted.h index f15e8b0bad..f69bcfb490 100644 --- a/Source/Core/DiscIO/Src/VolumeWiiCrypted.h +++ b/Source/Core/DiscIO/Src/VolumeWiiCrypted.h @@ -20,7 +20,7 @@ #include "Volume.h" #include "Blob.h" -#include "AES/aes.h" +#include "Crypto/aes.h" // --- this volume type is used for encrypted Wii images --- diff --git a/Source/Core/DiscIO/Src/WiiWad.cpp b/Source/Core/DiscIO/Src/WiiWad.cpp index 28d98bfa88..f2c5093825 100644 --- a/Source/Core/DiscIO/Src/WiiWad.cpp +++ b/Source/Core/DiscIO/Src/WiiWad.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" #include "NANDContentLoader.h" #include diff --git a/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.h b/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.h index fbf40c4c50..6d999e1981 100644 --- a/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.h +++ b/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.h @@ -18,8 +18,8 @@ #ifndef _WII_SAVE_CRYPTED #define _WII_SAVE_CRYPTED -#include "AES/aes.h" #include "StringUtil.h" +#include "Crypto/aes.h" #include "Crypto/tools.h" #include "Crypto/md5.h"