integrate with panda environment a bit better

This commit is contained in:
David Rose 2009-09-15 19:38:14 +00:00
parent 9a96ac6a23
commit a5a779cf33
7 changed files with 294 additions and 296 deletions

View File

@ -1,10 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 8.00 Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "P3DActiveX", "P3DActiveX.vcproj", "{74451B00-2D87-412B-9359-B5CA2C2FEC2A}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "P3DActiveX", "P3DActiveX.vcproj", "{74451B00-2D87-412B-9359-B5CA2C2FEC2A}"
ProjectSection(ProjectDependencies) = postProject
{1278896B-1978-40CC-B1A0-2D6A7450A32C} = {1278896B-1978-40CC-B1A0-2D6A7450A32C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyxml", "..\..\..\wintools\sdk\tinyxml\tinyxml_lib_mfc_static.vcproj", "{1278896B-1978-40CC-B1A0-2D6A7450A32C}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
EndProjectSection EndProjectSection
EndProject EndProject
@ -13,17 +8,11 @@ Global
Debug = Debug Debug = Debug
Release = Release Release = Release
EndGlobalSection EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution GlobalSection(ProjectConfiguration) = postSolution
{74451B00-2D87-412B-9359-B5CA2C2FEC2A}.Debug.ActiveCfg = Debug|Win32 {74451B00-2D87-412B-9359-B5CA2C2FEC2A}.Debug.ActiveCfg = Debug|Win32
{74451B00-2D87-412B-9359-B5CA2C2FEC2A}.Debug.Build.0 = Debug|Win32 {74451B00-2D87-412B-9359-B5CA2C2FEC2A}.Debug.Build.0 = Debug|Win32
{74451B00-2D87-412B-9359-B5CA2C2FEC2A}.Release.ActiveCfg = Release|Win32 {74451B00-2D87-412B-9359-B5CA2C2FEC2A}.Release.ActiveCfg = Release|Win32
{74451B00-2D87-412B-9359-B5CA2C2FEC2A}.Release.Build.0 = Release|Win32 {74451B00-2D87-412B-9359-B5CA2C2FEC2A}.Release.Build.0 = Release|Win32
{1278896B-1978-40CC-B1A0-2D6A7450A32C}.Debug.ActiveCfg = Debug|Win32
{1278896B-1978-40CC-B1A0-2D6A7450A32C}.Debug.Build.0 = Debug|Win32
{1278896B-1978-40CC-B1A0-2D6A7450A32C}.Release.ActiveCfg = Release|Win32
{1278896B-1978-40CC-B1A0-2D6A7450A32C}.Release.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection EndGlobalSection

View File

@ -15,33 +15,36 @@
OutputDirectory="Debug" OutputDirectory="Debug"
IntermediateDirectory="Debug" IntermediateDirectory="Debug"
ConfigurationType="2" ConfigurationType="2"
UseOfMFC="1" UseOfMFC="2"
CharacterSet="2"> CharacterSet="2">
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\;..\..\.." AdditionalIncludeDirectories="..\plugin;..\..\..\wintools\sdk\tinyxml"
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL" PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL"
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="TRUE"
UsePrecompiledHeader="3" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="TRUE" Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"/> DebugInformationFormat="3"/>
<Tool <Tool
Name="VCCustomBuildTool"/> Name="VCCustomBuildTool"/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="tinyxml_d.lib"
OutputFile="$(OutDir)/P3DActiveX.ocx" OutputFile="$(OutDir)/P3DActiveX.ocx"
LinkIncremental="2" LinkIncremental="1"
AdditionalLibraryDirectories="" AdditionalLibraryDirectories="../../../wintools/built/lib"
IgnoreDefaultLibraryNames="LIBCI.LIB MSVCRTD.LIB MSVCRT.LIB"
ModuleDefinitionFile=".\P3DActiveX.def" ModuleDefinitionFile=".\P3DActiveX.def"
GenerateDebugInformation="TRUE" GenerateDebugInformation="TRUE"
SubSystem="2" SubSystem="2"
ImportLibrary="$(OutDir)/P3DActiveX.lib" ImportLibrary="$(OutDir)/P3DActiveX.lib"
TargetMachine="1"/> TargetMachine="1"
FixedBaseAddress="1"/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
@ -77,15 +80,15 @@
OutputDirectory="Release" OutputDirectory="Release"
IntermediateDirectory="Release" IntermediateDirectory="Release"
ConfigurationType="2" ConfigurationType="2"
UseOfMFC="1" UseOfMFC="2"
CharacterSet="2"> CharacterSet="2">
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\;..\..\.." AdditionalIncludeDirectories="..\plugin;..\..\..\wintools\sdk\tinyxml"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL" PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL"
RuntimeLibrary="0" RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="TRUE"
UsePrecompiledHeader="3" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="TRUE" Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/> DebugInformationFormat="3"/>
@ -93,16 +96,19 @@
Name="VCCustomBuildTool"/> Name="VCCustomBuildTool"/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="tinyxml.lib"
OutputFile="$(OutDir)/P3DActiveX.ocx" OutputFile="$(OutDir)/P3DActiveX.ocx"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="" AdditionalLibraryDirectories="../../../wintools/built/lib"
IgnoreDefaultLibraryNames="LIBCI.LIB MSVCRTD.LIB MSVCRT.LIB"
ModuleDefinitionFile=".\P3DActiveX.def" ModuleDefinitionFile=".\P3DActiveX.def"
GenerateDebugInformation="TRUE" GenerateDebugInformation="TRUE"
SubSystem="2" SubSystem="2"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/P3DActiveX.lib" ImportLibrary="$(OutDir)/P3DActiveX.lib"
TargetMachine="1"/> TargetMachine="1"
FixedBaseAddress="1"/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"

View File

@ -14,7 +14,7 @@
#pragma once #pragma once
#include "plugin/p3d_plugin.h" #include "p3d_plugin.h"
#include <string> #include <string>
class PPInterface; class PPInterface;

View File

@ -33,13 +33,11 @@
#include "PPBrowserObject.h" #include "PPBrowserObject.h"
#include "PPDownloadRequest.h" #include "PPDownloadRequest.h"
#include "wintools/sdk/tinyxml/tinyxml.h" #include "p3d_plugin_config.h"
#include "tinyxml.h"
#define P3D_CONTENTS_FILENAME "contents.xml" #define P3D_CONTENTS_FILENAME "contents.xml"
#define P3D_BASE_URL "http://www.ddrose.com/~drose/p3d_7/"
//#define P3D_BASE_URL "file:///C:/p3dstage/"
#define P3D_FILE_BASE_URL "http://www.ddrose.com/~drose/plugin/" #define P3D_FILE_BASE_URL "http://www.ddrose.com/~drose/plugin/"
//#define P3D_FILE_BASE_URL "file:///C:/temp/" //#define P3D_FILE_BASE_URL "file:///C:/temp/"
@ -171,13 +169,18 @@ int PPInstance::DownloadP3DComponents( std::string& p3dDllFilename, std::string&
std::string localContentsFileName( tempFolderName, pathLength ); std::string localContentsFileName( tempFolderName, pathLength );
localContentsFileName += P3D_CONTENTS_FILENAME; localContentsFileName += P3D_CONTENTS_FILENAME;
std::string remoteContentsFilename( P3D_BASE_URL ); std::string hostUrl( PANDA_PACKAGE_HOST_URL );
if (!hostUrl.empty() && hostUrl[hostUrl.size() - 1] != '/') {
hostUrl += '/';
}
std::string remoteContentsFilename( hostUrl );
remoteContentsFilename += P3D_CONTENTS_FILENAME; remoteContentsFilename += P3D_CONTENTS_FILENAME;
error = DownloadFile( remoteContentsFilename, localContentsFileName ); error = DownloadFile( remoteContentsFilename, localContentsFileName );
if ( !error ) if ( !error )
{ {
std::string p3dRemoteModuleFileName( P3D_BASE_URL ); std::string p3dRemoteModuleFileName( hostUrl );
error = ReadContents( localContentsFileName, p3dRemoteModuleFileName ); error = ReadContents( localContentsFileName, p3dRemoteModuleFileName );
if ( !error ) if ( !error )
{ {

View File

@ -18,7 +18,7 @@
#include <math.h> #include <math.h>
#include "afxmt.h" #include "afxmt.h"
#include "plugin/p3d_plugin.h" #include "p3d_plugin.h"
#include "PPDownloadCallback.h" #include "PPDownloadCallback.h"
#include "PPLogger.h" #include "PPLogger.h"

View File

@ -14,7 +14,7 @@
#pragma once #pragma once
#include "plugin/p3d_plugin.h" #include "p3d_plugin.h"
class PPInterface class PPInterface
{ {

View File

@ -17,7 +17,7 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include "plugin/p3d_plugin.h" #include "p3d_plugin.h"
#include "PPInterface.h" #include "PPInterface.h"
class PPandaObject : public IDispatch class PPandaObject : public IDispatch