利用virtools 4.0 sdk开发播放器
时间:2025-05-07
时间:2025-05-07
做个任务 传个文件
利用virtools 4.0 sdk开发播放器(.net 2003)
2008-11-04 11:24:08| 分类:虚拟现实| 标签:|字号大中小订阅
Procedure for Creating a Standalone Player With Virtools Dev 3.5/4 & VC++ 7 (.NET 2003)
This document will illustrate the procedure for creating a standalone exe player for Virtools CMO and VMO files.
This document will assume “$VT” as the installation directory of the Virtools Dev 3.5 or Virtools Dev 4.0. ? Standalone player “Linked DLL compilation”:
This player relies on external files to launch the Virtools composition or VMO in a windows executable application, it’s a single lightweight executable which calls other external resources (DLL) files in order to correctly play the Virtools file.
Procedure:
1) Go to $VT \Sdk\Samples\Runtime\Standalone Player\
2) Open CustomPlayer.sln using Visual Studio 2003
3) Build the solution.
4) Initial build should commence with no problems as this is the most basic compilation of the player.
5) Refer to $VT \Sdk\Temp\Win32.
6) You will see the project built into that directory, to change the output directory in which VC++ places the generated files do the following:
? Using the IDE, choose the solution explorer and right click on the CustomPlayer to view properties.
? In the Configuration Properties>>General pane, change the output directory & intermediate directory values though they are inconsequential.
? In the Linker>>General pane, change the Output File value to wherever you want the program to create the final EXE file.
? If you build the solution as it is, it will probably work fine on your PC but will generate an MFC related error on other stations, because the current configuration is set to DEBUG, to change that configuration, go the Properties of the solution and click on Configuration Manager, change the mode to RELEASE, hit ok and build solution.
? The exe File should be generated in the directory you specified -$VT \Sdk\Temp\Win32 by default-. 7) Browse the directory and test the application using the following procedure, assume you are at
$VT \Sdk\Temp\Win32\CustomPlayer\Release\:
? Place a test –operational- CMO file at the same level of the exe generated file –CustomPlayer.exe by default- name the file TEST123.CMO.
? Copy the following directories to the
$VT \Sdk\Temp\Win32\CustomPlayer\Release\ directory:
1) $VT \BuildingBlocks\
2) $VT \Managers\
3) $VT \Plugins\
4) $VT \RenderEngines\
Copy the following files to the
$VT \Sdk\Temp\Win32\CustomPlayer\Release\ directory:
1) $VT \CK2.dll\
做个任务 传个文件
2) $VT \CKZlib.dll\
3) $VT \VSL.dll\
4) $VT \VSLRT.dll\
5) $VT \VxMath.dll\
? Copy all of the following directory contents to the corresponding directories you copied in
$VT \Sdk\Temp\Win32\CustomPlayer\Release\
1) $VT \Sdk\Redist\BuildingBlocks\
2) $VT \Sdk\Redist\Manager
? Copy the following file to the
$VT \Sdk\Temp\Win32\CustomPlayer\Release\ Directory:
$VT \Sdk\Redist\VSLRT.dll
Note that not all of the previous files and directories are required,
you can minimize the size of the final output by selecting specific DLL’s-
those DLL’s that are required by your composition only-
This is a great and a very important way of doing things.
So when you are deploying an application make sure that you copy only the files you need.
8) Now the player should be accessible, to play the Virtools file do the following:
? Start >> Run.
? Type cmd and press enter.
? Issue the commands:
cd $VT \Sdk\Temp\Win32\CustomPlayer\Release\
CustomPlayer –file=TEST123.CMO –title=test –width=800 –height=900
? The player should play the file now, if not, backtrack and make sure you have all the steps right.
? Take a look at the readme.txt for further clarification on the parameters passed to the player.
The previous procedure compiles a basic player of the Virtools player. The following is what might be considered the pros and cons of the compilation:
? Pros:
1. Ease of deployment.
2. Ease of file transition, meaning it is suitable for playing a number of files instead of hard coding the filename and path, so if you create a batch file instead of issuing the run command at every turn, you can create a number of batch files for a number of Virtools files with different parameters.
3. Not all of the Virtools DLL’s are required, meaning you don’t have to copy the entire contents of the BuildingBlocks, Managers, Plugins and RenderEngines, just copy the ones you need and redistribute your application accordingly.
? Cons:
1. The Virtools DLL’s are visible and should be present when distributing the application, this can be considered a poor approach for deploying projects with Virtools, at least to me, having everything bundled in single packages sounds a lot more practical, plus you minimize the margin of error, when a user accidentally deletes a required DLL for example.
2. A deployed version might be tampered with, a batch file might be reconfigured to play a file with a parameter set other than the original one, and I strongly recommend that this approach be used to deploy Virtools applications for debugging purposes only regardless or whether you chose the DEBUG or RELEASE configuration types.
? Static Stand Alone Player “Single Bundled EXE File”
做个任务 传个文件
After d oing the previous compilation, it’s a good idea to get a single bundled EXE file, to do that, follow the following steps:
1. Go to Solution Explorer, Right click, choose Properties, in the dialog window click on Configuration Manager and choose “Rele …… 此处隐藏:11220字,全部文档内容请下载后查看。喜欢就下载吧 ……