Changes between Version 1 and Version 2 of MigratingToVrjTwo
- Timestamp:
- 02/01/07 19:47:15 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MigratingToVrjTwo
v1 v2 1 1 2 2 3 = Porting from VR Juggler 1.0 to 2.x = 4 5 6 7 == Introduction == 8 3 = Porting from VR Juggler 1.0 to 2.x = 4 5 6 == Introduction == 9 7 First, please note that VR Juggler 1.1 is a development only version. All odd-numbered minor version numbers are development-only versions. There will never be a non-developer VR Juggler 1.1 release. VR Juggler 1.1 is only for VR Juggler development. The next non-developer release will be VR Juggler 2.0. It will be released when our development goals for VR Juggler 1.1 have been completed and the code has stabilized. 10 8 12 10 here. 13 11 14 === Summary of Changes === 15 16 ==== Separation of subsystems into modules with namespaces ==== 17 12 === Summary of Changes === 13 ==== Separation of subsystems into modules with namespaces ==== 18 14 To help make VR Juggler more modular, each of the major subsystems of VR Juggler has been split into a separate module. Each of these modules has an associated C++ namespace for all of the symbols in the module. For example, the new [http://www.vrjuggler.org/gadgeteer/ Gadgeteer] module (which handles all of the device interfaces you might use for a VR application) has the namespace `gadget`. Thus all symbols in Gadgeteer must be accessed using the `gadget::` scoping prefix. 19 15 20 16 Because of the move to namespaces, the "vj" prefix from all VR Juggler 1.0 class names has been removed and replaced with the namespace of the module that contains the given class. For example, `vjKernel` has moved to the VR Juggler module which defines the `vrj` namespace. So `vjKernel` is now `vrj::Kernel`. 21 17 22 ==== Cross-Platform System Abstraction ==== 23 18 ==== Cross-Platform System Abstraction ==== 24 19 VR Juggler now has a common module called [http://www.vrjuggler.org/vapor/ VPR] (VR Juggler Portable Runtime) that captures all platform-specific system abstractions. This includes programming constructs such as threads and semaphores and system access methods such as serial ports and sockets. This common abstraction makes it possible for VR Juggler applications to run on all supported platforms with little or no platform-specific code. 25 20 26 ==== Removal of `Juggler_utils` Library ==== 27 21 ==== Removal of `Juggler_utils` Library ==== 28 22 As a result of the separation of VR Juggler into multiple subsystems, the standalone `Juggler_utils` library became unnecessary. In VR Juggler 1.0 and early versions of VR Juggler 1.1, this library contained a lot of standalone "utility" code that was needed by the other VR Juggler libraries. The separationinto subsystems resulted in most of the utility code migrating to the VPR (Vapor) module mentioned before. 29 23 30 ==== New Math Library ==== 31 24 ==== New Math Library ==== 32 25 VR Juggler introduces the use of a new common math library called [http://ggt.sourceforge.net/ GMTL]. 33 26 34 == Interface Changes == 35 27 == Interface Changes == 36 28 If you've looked at the new VR Juggler 1.1, you'll notice that much has changed since 1.0. Of particular note is the directory structure. In the source code, you'll see many standalone modules where before they were mixed. The installation of Juggler has more directories in the include directory (=vrj=, `snx`, `tweek`, `vpr`, `gadget`, and `jccl`). Below is a step-by-step list of the things you will need to port and how to do it. 37 29 38 === Modules and Namespaces === 39 30 === Modules and Namespaces === 40 31 In VR Juggler 1.0, every object that was part of the Juggler API started with the prefix "vj". Since VR Juggler 1.1 has been broken up into distinct functional modules, there needed to be a way to differentiate between their respective objects. All of the classes and objects that used to start with "vj" now instead have a namespace designating which module they belong to. 41 32 44 35 For the purposes of VR Juggler 1.1, namespaces are used as a way to make it clear which module an object belongs to. As stated before, these modules are roughly defined along the lines of their functionality: 45 36 46 * [http://www.vrjuggler.org/vapor/ VR Juggler Portable Runtime] (namespace `vpr`): system-level functionality (threading and synchronization) and other utilities47 * [http://www.vrjuggler.org/jccl/ Juggler Configuration Library] (namespace `jccl`): system and application configuration48 * [http://www.vrjuggler.org/gadgeteer/ Gadgeteer] (namespace `gadget`): device input and management49 * [http://www.vrjuggler.org/vrjuggler/ VR Juggler] (namespace `vrj`): VR development platform that ties everything together50 * [http://ggt.sourceforge.net/ Generic Math Template Library] (namespace `gmtl`): general-purpose math library51 * [http://www.vrjuggler.org/tweek/ Tweek] (namespace `tweek`): distributed Model-View-Controller system that handles GUI communication with a remote C++ application52 * [http://www.vrjuggler.org/sonix/ Sonix] (namespace `snx`): audio library37 * [http://www.vrjuggler.org/vapor/ VR Juggler Portable Runtime] (namespace `vpr`): system-level functionality (threading and synchronization) and other utilities 38 * [http://www.vrjuggler.org/jccl/ Juggler Configuration Library] (namespace `jccl`): system and application configuration 39 * [http://www.vrjuggler.org/gadgeteer/ Gadgeteer] (namespace `gadget`): device input and management 40 * [http://www.vrjuggler.org/vrjuggler/ VR Juggler] (namespace `vrj`): VR development platform that ties everything together 41 * [http://ggt.sourceforge.net/ Generic Math Template Library] (namespace `gmtl`): general-purpose math library 42 * [http://www.vrjuggler.org/tweek/ Tweek] (namespace `tweek`): distributed Model-View-Controller system that handles GUI communication with a remote C++ application 43 * [http://www.vrjuggler.org/sonix/ Sonix] (namespace `snx`): audio library 53 44 54 45 To create and run VR Juggler applications, you only need to use the first five modules listed. The others are optional for VR Juggler 1.1 but can be extremely useful depending on your needs. These modules can also be used independent of VR Juggler for purposes other than VR applications. 100 91 //Passing a Juggler 1.0 matrix to an OpenGL function call 101 92 vjMatrix mat; 102 ... //Do stuff to mat93 ... //Do stuff to mat 103 94 glMultMatrixf(mat.getFloatPtr()); 104 95 105 96 //Passing a Juggler 1.1 matrix to an OpenGL function call 106 97 gmtl::Matrix44f mat; 107 ... //Do stuff to mat98 ... //Do stuff to mat 108 99 glMultMatrixf(mat.getData()); 109 100 }}} 111 102 This is by no means a complete list of changes necessary for every VR application. Read on for module-specific information regarding their header files and other porting changes. 112 103 113 === Base Application Object === 114 104 === Base Application Object === 115 105 In writing applications, the names of the application object parent classes have changed. For example, VR Juggler 1.0 applications that derived from `vjPfApp` now derive from `vrj::PfApp`. This is shown in the following: 116 106 139 129 When linking, the library names have changed, and more options are required because there are more libraries in VR Juggler 2.x than there were in VR JUggler 1.0. The libraries are the following: 140 130 141 * `vrj`: The base VR Juggler library.142 * `vrj_ogl`: The VR Juggler !OpenGL Draw Manager143 * `vrj_pf`: The VR Juggler Performer Draw Manager144 * `gadget`: Gadgeteer145 * `jccl`: JCCL146 * `vpr`: VPR131 * `vrj`: The base VR Juggler library. 132 * `vrj_ogl`: The VR Juggler !OpenGL Draw Manager 133 * `vrj_pf`: The VR Juggler Performer Draw Manager 134 * `gadget`: Gadgeteer 135 * `jccl`: JCCL 136 * `vpr`: VPR 147 137 148 138 For a simpler makefile, the following can be done: 150 140 {{{ 151 141 app: $(OBJECTS) 152 $(LINK) app $(OBJECTS) \ 153 `$(VJ_BASE_DIR)/bin/vrjuggler-config --libs` \ 154 `$(VJ_BASE_DIR)/bin/vrjuggler-config --extra-libs`142 $(LINK) app $(OBJECTS) \ 143 `$(VJ_BASE_DIR)/bin/vrjuggler-config --libs` \ 144 `$(VJ_BASE_DIR)/bin/vrjuggler-config --extra-libs` 155 145 }}} 156 146 161 151 For much more detailed information, interested developers can refer to the headers `vrj/Draw/Pf/PfApp.h`, `vrj/Draw/OGL/GlApp.h`, `vrj/Draw/OSG/OsgApp.h`, `gadget/Type/PositionInterface.h`, `gadget/Type/DigitalInterface.h`, and `vrj/Kernel/Kernel.h`. 162 152 163 === Application Drawing Pipeline === 164 153 === Application Drawing Pipeline === 165 154 To allow the user more control over the synchronization of applications, we have introduced the `bufferPreDraw()` function in these derived application classes: `vrj::GlApp`, `vrj::OpenSGApp`, and `vrj::OsgApp`. This function is executed once per graphics buffer each frame. For instance, if you are running in stereo, you have buffers for both the right and left eyes. You also have multiple buffers when rendering to multiple windows or surface displays. 166 155 171 160 class myApplication : public vjGlApp 172 161 { 173 ...174 void draw()175 {176 //Clear the window177 glClearColor(0.0, 0.0, 0.0, 0.0);178 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);179 180 //Render the scene181 ...182 }183 ...162 ... 163 void draw() 164 { 165 //Clear the window 166 glClearColor(0.0, 0.0, 0.0, 0.0); 167 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 168 169 //Render the scene 170 ... 171 } 172 ... 184 173 }; 185 174 }}} 191 180 class myApplication : public vrj::GlApp 192 181 { 193 ...194 void bufferPreDraw()195 {196 // Clear the window.197 glClearColor(0.0, 0.0, 0.0, 0.0);198 glClear(GL_COLOR_BUFFER_BIT);199 }200 201 void draw()202 {203 // Clear the depth buffer.204 glClear(GL_DEPTH_BUFFER_BIT);205 206 // Render the scene...207 ...208 }209 ...182 ... 183 void bufferPreDraw() 184 { 185 // Clear the window. 186 glClearColor(0.0, 0.0, 0.0, 0.0); 187 glClear(GL_COLOR_BUFFER_BIT); 188 } 189 190 void draw() 191 { 192 // Clear the depth buffer. 193 glClear(GL_DEPTH_BUFFER_BIT); 194 195 // Render the scene... 196 ... 197 } 198 ... 210 199 }; 211 200 }}} 219 208 Because when rendering multiple viewports within a single window, the `glClear()` command affects the entire window and not just the current viewport that you're trying to render. So if you clear the color buffer during `draw()`, all of the previously drawn viewports are cleared and you end up with just a single viewport being visible. 220 209 221 === Math Library === 222 210 === Math Library === 223 211 VR Juggler now uses the [http://ggt.sourceforge.net/ GMTL math library]. The old vjMath library is no longer available. There are some very fundamental changes between GMTL and Math from VR Juggler 1.0. You should definitely read the GMTL Programmer's Guide and FAQ, both of which are available from http://ggt.sourceforge.net/ 224 212 287 275 In order to aid in quick migration from 1.0 to the most recent version of VR Juggler, we have provided several optional math classes that have the same syntax from VR Juggler 1.0. These include the `vrj::Vec3`, `vrj::Matrix`, and `vrj::Quat` classes (which act exactly as `vjVec3`, `vjMatrix`, and `vjQuat` do). The class header files are located in your VR Juggler source tree in `modules/vrjuggler/deprecated/Math`. For a VR Juggler 2.0 installation, they can be found in `$VJ_BASE_DIR/include/deprecated/Math`. The file names are `Vec3.h`, `Matrix.h`, and `Quat.h`. 288 276 289 '''NOTE''': The `deprecated` header tree will not be available for VR Juggler releases beyond the 2.0.x series. Starting with VR Juggler 2.1/2.2, those headers are removed from the installation tree, so code must be migrated to the newer APIs.277 '''NOTE''': The `deprecated` header tree will not be available for VR Juggler releases beyond the 2.0.x series. Starting with VR Juggler 2.1/2.2, those headers are removed from the installation tree, so code must be migrated to the newer APIs. 290 278 291 279 Using these helper classes makes porting your code much easier. Instead of converting all of your math code to GMTL, all you have to do is include the header files and make namespace changes to all of your math code. For instance, if you have the following lines of VR Juggler 1.0 code: 313 301 For more information, refer to the http://ggt.sf.net/ website. It has excellent online reference guide and a programming guide that is more in depth than this short porting tutorial. If you don't have a web connection, refer to the header files in the `gmtl` directory. The header files have all the documentation used to generate the reference guide. Typically the headers you will use are `gmtl/Vec.h`, `gmtl/Point.h`, `gmtl/Matrix.h`, and `gmtl/Quat.h`. 314 302 315 === Threads and Synchronization === 316 303 === Threads and Synchronization === 317 304 One major change to VR Juggler 1.1 is the operating system abstraction in Juggler. It has been separated into a standalone, decoupled portable runtime called the VR Juggler Portable Runtime (VPR, pronounced "vapor"). VPR is a C++ abstraction the following: 318 305 319 * Threads320 * Synchronization primitives321 * Sockets322 * Serial I/O323 * High-precision timers324 * GUIDs325 * I/O statistics collection326 * Thread-safe ostreams with levels, categories, colors, and thread IDs327 * Performance monitoring306 * Threads 307 * Synchronization primitives 308 * Sockets 309 * Serial I/O 310 * High-precision timers 311 * GUIDs 312 * I/O statistics collection 313 * Thread-safe ostreams with levels, categories, colors, and thread IDs 314 * Performance monitoring 328 315 329 316 It even has simulated sockets (using a discrete-event simulator for sockets). What does this mean for you? What will you need to port? 330 317 331 * Every place you used a thread in your VR Juggler 1.0 application, you'll need to replace `vjThread` with `vpr::Thread`.332 * Replace `vjMutex` with `vpr::Mutex`.333 * Condition variables are now called `vpr::CondVar` instead of `vjCond`.334 * Replace `vjSemaphore` with `vpr::Semaphore`.335 * `vjDEBUG` is now `vprDEBUG`. Related output symbols (e.g., `vjDEBUG_FLUSH`, `vjDEBUG_BEGIN`, etc.) have been renamed similarly. When calling `vprDEBUG`, the category is now required. Previously, an integer constant could be used in place of a category symbol. For example, the following shows the use of the category `vprDBG_ALL`:318 * Every place you used a thread in your VR Juggler 1.0 application, you'll need to replace `vjThread` with `vpr::Thread`. 319 * Replace `vjMutex` with `vpr::Mutex`. 320 * Condition variables are now called `vpr::CondVar` instead of `vjCond`. 321 * Replace `vjSemaphore` with `vpr::Semaphore`. 322 * `vjDEBUG` is now `vprDEBUG`. Related output symbols (e.g., `vjDEBUG_FLUSH`, `vjDEBUG_BEGIN`, etc.) have been renamed similarly. When calling `vprDEBUG`, the category is now required. Previously, an integer constant could be used in place of a category symbol. For example, the following shows the use of the category `vprDBG_ALL`: 336 323 337 324 {{{ 339 326 }}} 340 327 341 * Related to this change is the location of the debugging output headers. In VR Juggler 1.0, the only debugging header was `Kernel/vjDebug.h`. Now, the basic header that is always needed is `vpr/Util/Debug.h`. Project-specific extensions are named similarly. For example, the JCCL debugging header is `jccl/Util/Debug.h`. In VR Juggler proper, the header is `vrj/Util/Debug.h`.342 * The VPR C++ portable runtime library is located in `libvpr`, and the headers can be found in `include/vpr`.328 * Related to this change is the location of the debugging output headers. In VR Juggler 1.0, the only debugging header was `Kernel/vjDebug.h`. Now, the basic header that is always needed is `vpr/Util/Debug.h`. Project-specific extensions are named similarly. For example, the JCCL debugging header is `jccl/Util/Debug.h`. In VR Juggler proper, the header is `vrj/Util/Debug.h`. 329 * The VPR C++ portable runtime library is located in `libvpr`, and the headers can be found in `include/vpr`. 343 330 344 331 For more detailed information, refer to the VPR ''Programmer's Reference''. 345 332 346 === Sound === 347 333 === Sound === 348 334 Your interface to sound is `snx::SoundHandle`, found in `snx/SoundHandle.h`. 349 335 364 350 The new sound library is located in `libsonix`, and the headers can be found in `include/snx`. See also: `include/snx/SoundHandle.h`, `include/snx/sonix.h`. 365 351 366 === Device Input === 367 352 === Device Input === 368 353 Header file includes for access to devices in Gadgeteer: 369 354 385 370 if (mAccelerateButton->getData() == gadget::Digital::TOGGLE_ON) 386 371 { 387 ... do stuff ...372 ... do stuff ... 388 373 } 389 374 }}} 391 376 Gadgeteer is located in `libgadget` and `include/gadget`. 392 377 393 === Position Filters === 394 378 === Position Filters === 395 379 In VR Juggler 1.0 all applications were treated in feet, which caused problems for all our friends outside the United States who use SI units. Therefore for VR Juggler 2.0 we have switched to meters and added a Position Filter Proxy that allows an application to use any units that it wishes. The addition of position filters causes three potential changes for applications. 396 380 414 398 gadget::PositionInterface posInt; 415 399 416 // Checking position device value's and scaling them by 3.28 which returns 400 // Checking position device value's and scaling them by 3.28 which returns 417 401 // the value in feet. 418 402 gmtl::Matrix44f mat = posInt.getData(3.28f); 423 407 There are 4 built in unit conversions that Juggler supplies they are: 424 408 425 1 `gadget::PositionUnitConversion::ConvertToFeet` 426 1 `gadget::PositionUnitConversion::ConvertToInches` 427 1 `gadget::PositionUnitConversion::ConvertToMeters` 428 1 `gadget::PositionUnitConversion::ConvertToCentimeters` 429 430 === Keyboard/Mouse Devices === 431 409 1 `gadget::PositionUnitConversion::ConvertToFeet` 410 1 `gadget::PositionUnitConversion::ConvertToInches` 411 1 `gadget::PositionUnitConversion::ConvertToMeters` 412 1 `gadget::PositionUnitConversion::ConvertToCentimeters` 413 414 === Keyboard/Mouse Devices === 432 415 Gadgeteer 1.0 Beta 1 includes refactored handling of keybard and mouse data. Plain windows (now referred to as "input windows") and graphics windows feed keyboard and mouse events from the windowing system into keyboard/mouse devices. User applications can get access to these events through the type `gadget::KeyboardMouseInterface` (formerly `gadget::EventWindowInterface` and `gadget::KeyboardInterface` before that). VR Juggler 1.0 used the name `vjKeyboardInterface`. 433 416 440 423 Other XSLT 1.0 processors such as [http://xml.apache.org/xalan-j/ Xalan-J] or [http://saxon.sourceforge.net/ Saxon] can be used instead of '''xsltproc''' if it is not available. Consult the documentation for specific tool you use for usage information. 441 424 442 === Configuration System === 443 425 === Configuration System === 444 426 The configuration system in VR Juggler has been separated into a standalone library. This library gives exactly the same features as before. This library has its own namespace: `jccl`. The library is called JCCL, short for Juggler Configuration and Control Library. 445 427 449 431 int main(int argc, char* argv[]) 450 432 { 451 vrj::Kernel* kernel = vrj::Kernel::instance(); // Declare a new Kernel452 for ( int i = 1; i < argc; ++i )453 {454 std::cout << "Loading Config File: " << argv[i] << "\n" << std::flush;455 kernel->loadConfigFile(argv[i]);456 }457 458 // other init stuff...433 vrj::Kernel* kernel = vrj::Kernel::instance(); // Declare a new Kernel 434 for ( int i = 1; i < argc; ++i ) 435 { 436 std::cout << "Loading Config File: " << argv[i] << "\n" << std::flush; 437 kernel->loadConfigFile(argv[i]); 438 } 439 440 // other init stuff... 459 441 } 460 442 }}} 523 505 The JCCL library is located in `libjccl`, and the headers are in `include/jccl`. 524 506 525 === Configuration Files === 526 507 === Configuration Files === 527 508 The configuration files used by VR Juggler have gone through quite a lot of changes since VR Juggler 1.0. The old formats used by description files and configuration files have been replaced completely by a new XML format. This means that the old formats are no longer supported by the Java or C++ code, so conversions must be made externally to VRJConfig and VR Juggler before trying to use existing configuration files. In this section, we explain some brief background information regarding the conversion to XML, and we then explain how to update existing configuration files to the latest format. 528 509 529 ==== History ==== 530 510 ==== History ==== 531 511 The configuration files used by VR Juggler have undergone three overhauls since version 1.0. In August 2001, the first pass at converting to XML was made. In the configuration definition files, the complex format was replaced by very straightforward XML. The job done by the definition files was already very hierarchical in nature, so the transition to a standard, inherently hierarchical file format was a natural progression. In the actual configuration files, the changes made were not so elegant. Essentially, the key tokens were replaced by XML elements, but the actual values were left as specially formatted strings that required extra parsing ''after'' the XML parser had done its job. 532 512 536 516 In July 2003, the third version fo the XML configuration file and definition file formats were introduced. These are the final versions for VR Juggler 2.0, and they include many important new features. The most valuable new feature is config element versioning and automatic element upgrading through VRJConfig. With the third version, there is now one config definition per `.jdef` file. Each `.jdef` file can contain multiple versions of its definition, and each version includes XSLT code for migrating config files of the previous version. VRJConfig uses this XSLT code to perform automatic upgrades of config elements. 537 517 538 ==== Configuration Definition File Versions ==== 539 518 ==== Configuration Definition File Versions ==== 540 519 The versions of the configuration definition files are as follows: 541 520 542 * 1.0: The VR Juggler 1.0 custom file format. This format has no version number information.543 * 1.9: The first iteration on the XML format, in use between August 2001, and May 23, 2002. This format has no version number information.544 * 2.0: The revamped XML format, in use between May 24, 2002, and July 17, 2002. Any definition files created using VjControl during that time period qualify as version 2.0, though they may lack the version number information. If a version number is missing, add the following as the second line of the file:521 * 1.0: The VR Juggler 1.0 custom file format. This format has no version number information. 522 * 1.9: The first iteration on the XML format, in use between August 2001, and May 23, 2002. This format has no version number information. 523 * 2.0: The revamped XML format, in use between May 24, 2002, and July 17, 2002. Any definition files created using VjControl during that time period qualify as version 2.0, though they may lack the version number information. If a version number is missing, add the following as the second line of the file: 545 524 546 525 {{{ 548 527 }}} 549 528 550 * 2.1: An iteration on 2.0 that removed some unnecessary complexity in dealing with the number of property values for a given configuration element. This version was in use between July 18, 2002, and January 15, 2003. All files created during this time period should have the following as the second line of the file:529 * 2.1: An iteration on 2.0 that removed some unnecessary complexity in dealing with the number of property values for a given configuration element. This version was in use between July 18, 2002, and January 15, 2003. All files created during this time period should have the following as the second line of the file: 551 530 552 531 {{{ 554 533 }}} 555 534 556 * 2.2: An iteration on 2.1 that improved the way that embedded configuration element types and element pointer types are specified. Instead of overloading the "enumeration" concept, a new element (=allowedType=) was added. This version was in use between January 15, 2003, and February 27, 2003. Note that no developer release snapshots were made during this time. All files created during this short period should have the following as the second line of the file:535 * 2.2: An iteration on 2.1 that improved the way that embedded configuration element types and element pointer types are specified. Instead of overloading the "enumeration" concept, a new element (=allowedType=) was added. This version was in use between January 15, 2003, and February 27, 2003. Note that no developer release snapshots were made during this time. All files created during this short period should have the following as the second line of the file: 557 536 558 537 {{{ 560 539 }}} 561 540 562 * 2.3: An iteration on 2.2 that added version support to individual configuration element definitions. This version was in use between February 27, 2003, and July 10, 2003. This was the format used by VR Juggler 2.0 Alpha 2 and 2.0 Alpha 3. Note that the version information is not used in VR Juggler 2.0 Alpha 1, so updating from the 2.2 format is not strictly required. All files should have the following as the second line of the file:541 * 2.3: An iteration on 2.2 that added version support to individual configuration element definitions. This version was in use between February 27, 2003, and July 10, 2003. This was the format used by VR Juggler 2.0 Alpha 2 and 2.0 Alpha 3. Note that the version information is not used in VR Juggler 2.0 Alpha 1, so updating from the 2.2 format is not strictly required. All files should have the following as the second line of the file: 563 542 564 543 {{{ 566 545 }}} 567 546 568 * 3.0: A complete rewrite of the config definition file format that split the definitions up into separate files and introduced support for definition versioning and automatic upgrades using XSLT. This version was in use between July 10, 2003, and September 17, 2004. All definition files now must use the file extension `.jdef`. This was the format used by VR Juggler 2.0 Alpha 4. All files must have the following as the second line of the file:547 * 3.0: A complete rewrite of the config definition file format that split the definitions up into separate files and introduced support for definition versioning and automatic upgrades using XSLT. This version was in use between July 10, 2003, and September 17, 2004. All definition files now must use the file extension `.jdef`. This was the format used by VR Juggler 2.0 Alpha 4. All files must have the following as the second line of the file: 569 548 570 549 {{{ 572 551 }}} 573 552 574 * 3.l: A minor iteration on the 3.0 file format that introduced the concept of "editable enumerations." This version has been in use since September 17, 2004. All files must have the following as the second line of the file:553 * 3.l: A minor iteration on the 3.0 file format that introduced the concept of "editable enumerations." This version has been in use since September 17, 2004. All files must have the following as the second line of the file: 575 554 576 555 {{{ 578 557 }}} 579 558 580 ==== Configuration File Versions ==== 581 559 ==== Configuration File Versions ==== 582 560 The versions of the configuration files are as follows: 583 561 584 * 1.0: The VR Juggler 1.0 custom file format. This format has no version number information.585 * 1.9: The first iteration on the XML format, in use between August 2001 and May 23, 2002. This format has no version number information.586 * 2.0: The revamped XML format, in use between May 24, 2002, and September 11, 2002. Any configuration files created using VjControl or VRJConfig during that time period qualify as version 2.0, though they may lack the version number information. If a version number is missing, add the following as the second line of the file:562 * 1.0: The VR Juggler 1.0 custom file format. This format has no version number information. 563 * 1.9: The first iteration on the XML format, in use between August 2001 and May 23, 2002. This format has no version number information. 564 * 2.0: The revamped XML format, in use between May 24, 2002, and September 11, 2002. Any configuration files created using VjControl or VRJConfig during that time period qualify as version 2.0, though they may lack the version number information. If a version number is missing, add the following as the second line of the file: 587 565 588 566 {{{ 590 568 }}} 591 569 592 * 2.1: An iteration on 2.0 that changed the way external files are included. This version was in use between September 12, 2002, and July 10, 2003. All files should have the following as the second line of the file:570 * 2.1: An iteration on 2.0 that changed the way external files are included. This version was in use between September 12, 2002, and July 10, 2003. All files should have the following as the second line of the file: 593 571 594 572 {{{ 596 574 }}} 597 575 598 * 3.0: A complete rewrite of the config file format that made use of config element versioning and simplified the handling of included external files. This version has been in use since July 10, 2003, and all config files using this format have the file extension `.jconf`. This is the file format used for VR Juggler 2.0 Alpha 4 and newer. All such files must have the following as the second line of the file:576 * 3.0: A complete rewrite of the config file format that made use of config element versioning and simplified the handling of included external files. This version has been in use since July 10, 2003, and all config files using this format have the file extension `.jconf`. This is the file format used for VR Juggler 2.0 Alpha 4 and newer. All such files must have the following as the second line of the file: 599 577 600 578 {{{ 602 580 }}} 603 581 604 ==== Updating ==== 605 582 ==== Updating ==== 606 583 We now explain how to update from one version of a file format toanother. We begin with the first step: updating from the (versionless) VR Juggler 1.0 formats to version 2.0 of the definition file format and version 2.0 of the configuration file format. We then move on to explain how to do iterative updates once you have converted to the base XML format. 607 584 608 ===== Migrating Configurations Between VR Juggler 2.0 Pre-Releases ===== 609 585 ===== Migrating Configurations Between VR Juggler 2.0 Pre-Releases ===== 610 586 Before we describe the generalized process for updating config files and config definitions, there are some higher level updates that must be applied when updating from one VR Juggler 2.0 pre-release to the next. This will be the process used by all users of a given VR Juggler 2.0 pre-release since 2.0 Alpha 1. 611 587 636 612 Users taking advantage of more advanced configuration features of VR Juggler by defining custom config element types should review the remaining updating descriptions. 637 613 638 ===== Version 1.0 to 2.0 (Definition Files and Configuration Files) ===== 639 614 ===== Version 1.0 to 2.0 (Definition Files and Configuration Files) ===== 640 615 At this time, there is no automated way to update VR Juggler 1.0 configuration files to the 2.0 format. Extensive changes have been made in the basic structure and the content of the files. It is recommended that users run VRJConfig and create new VR Juggler 2.0 configurations from scratch. This offers a chance to get familiar with the new configuration editor. We hope to offer an automated update mechanism in time for the full VR Juggler 2.0.0 release. 641 616 642 ===== Version 1.9 to 2.0 (Configuration Files) ===== 643 617 ===== Version 1.9 to 2.0 (Configuration Files) ===== 644 618 A Python 2 script has been written to update from the so-called 1.9 configuration file format version to 2.0. You can find it in `juggler/modules/jackal/tools/xmlupdate` or in `$VJ_BASE_DIR/share/jccl/tools/xmlupdate` depending on whether you have a source or a binary distribution of VR Juggler. The script is called '''xmlupdate.py''', and it is run as follows: 645 619 651 625 The updated files will have the same base name as the original file but with the extension `.new`. The original files will not be modified. 652 626 653 '''Note''': This script cannot process configuration definition files. As of this writing, we have no automated way to update from version 1.9 of the definition file format to version 2.0. 654 655 ===== Version 2.0 to 2.1 (Configuration Definition Files) ===== 656 627 '''Note''': This script cannot process configuration definition files. As of this writing, we have no automated way to update from version 1.9 of the definition file format to version 2.0. 628 629 ===== Version 2.0 to 2.1 (Configuration Definition Files) ===== 657 630 Updating to version 2.1 of the definition file format can be done through the use of an XSLT stylesheet. This stylesheet is found in `juggler/modules/jackal/tools/xmlupdate` or in `$VJ_BASE_DIR/share/jccl/tools/xmlupdate`, depending on whether you have a source or a binary distribution of VR Juggler. The stylesheet is named `desc_2.0-2.1.xsl`, and it can be used with any XSLT 1.0 processor. For example, if you have '''xsltproc''' available, you can use it to update a 658 631 definition file as follows: 672 645 At this time, the makefile only supports the use of '''xsltproc''' and the Xalan command-line utility. It defaults to using '''xsltproc'''. If that tool is not available, line 38 of the makefile so that the value of `$(XSLT_TARGET)` is `update-xalan`. If neither Xalan nor '''xsltproc''' is available, you will have to use whatever XSLT processor is available on your system. 673 646 674 ===== Version 2.1 to 2.2 (Configuration Definition Files) ===== 675 647 ===== Version 2.1 to 2.2 (Configuration Definition Files) ===== 676 648 Updating to version 2.2 of the definition file format can be done through the use of an XSLT stylesheet. This stylesheet is found in `juggler/modules/jackal/tools/xmlupdate` or in `$VJ_BASE_DIR/share/jccl/tools/xmlupdate`, depending on whether you have a source or a binary distribution of VR Juggler. The stylesheet is named `desc_2.1-2.2.xsl`, and it can be used with any XSLT 1.0 processor. For example, if you have '''xsltproc''' available, you can use it to update a 677 649 definition file as follows: 691 663 At this time, the makefile only supports the use of '''xsltproc''' and the Xalan command-line utility. It defaults to using '''xsltproc'''. If that tool is not available, line 38 of the makefile so that the value of `$(XSLT_TARGET)` is `update-xalan`. If neither Xalan nor '''xsltproc''' is available, you will have to use whatever XSLT processor is available on your system. 692 664 693 ===== Version 2.2 to 2.3 (Configuration Definition Files) ===== 694 665 ===== Version 2.2 to 2.3 (Configuration Definition Files) ===== 695 666 Updating to version 2.3 of the definition file format can be done through the use of an XSLT stylesheet. This stylesheet is found in `juggler/modules/jackal/tools/xmlupdate` or in `$VJ_BASE_DIR/share/jccl/tools/xmlupdate`, depending on whether you have a source or a binary distribution of VR Juggler. The stylesheet is named `desc_2.2-2.3.xsl`, and it can be used with any XSLT 1.0 processor. For example, if you have '''xsltproc''' available, you can use it to update a 696 667 definition file as follows: 710 681 At this time, the makefile only supports the use of '''xsltproc''' and the Xalan command-line utility. It defaults to using '''xsltproc'''. If that tool is not available, line 38 of the makefile so that the value of `$(XSLT_TARGET)` is `update-xalan`. If neither Xalan nor '''xsltproc''' is available, you will have to use whatever XSLT processor is available on your system. 711 682 712 ===== Version 2.3 to 3.0 (Configuration Definition Files) ===== 713 683 ===== Version 2.3 to 3.0 (Configuration Definition Files) ===== 714 684 Updating to version 3.0 of the definition file format can be done through the use of an XSLT stylesheet. This stylesheet is found in `juggler/modules/jackal/tools/xmlupdate` or in `$VJ_BASE_DIR/share/jccl/tools/xmlupdate`, depending on whether you have a source or a binary distribution of VR Juggler. The stylesheet is named `desc_2.3-3.0.xsl`, and it can be used with any XSLT 1.0 processor. For example, if you have '''xsltproc''' available, you can use it to update a 715 685 definition file as follows: 729 699 At this time, the makefile only supports the use of '''xsltproc''' and the Xalan command-line utility. It defaults to using '''xsltproc'''. If that tool is not available, line 38 of the makefile so that the value of `$(XSLT_TARGET)` is `update-xalan`. If neither Xalan nor '''xsltproc''' is available, you will have to use whatever XSLT processor is available on your system. 730 700 731 ===== Version 3.0 to 3.1 (Configuration Definition Files) ===== 732 701 ===== Version 3.0 to 3.1 (Configuration Definition Files) ===== 733 702 Updating to version 3.1 of the definition file format can be done through the use of an XSLT stylesheet. This stylesheet is found in `juggler/modules/jackal/tools/xmlupdate` or in `$VJ_BASE_DIR/share/jccl/tools/xmlupdate`, depending on whether you have a source or a binary distribution of VR Juggler. The stylesheet is named `jdef_3.0-3.1.xsl`, and it can be used with any XSLT 1.0 processor. For example, if you have '''xsltproc''' available, you can use it to update a 734 703 definition file as follows: 748 717 At this time, the makefile only supports the use of '''xsltproc''' and the Xalan command-line utility. It defaults to using '''xsltproc'''. If that tool is not available, line 38 of the makefile so that the value of `$(XSLT_TARGET)` is `update-xalan`. If neither Xalan nor '''xsltproc''' is available, you will have to use whatever XSLT processor is available on your system. 749 718 750 ===== Version 2.0 to 2.1 (Configuration Files) ===== 751 719 ===== Version 2.0 to 2.1 (Configuration Files) ===== 752 720 Updating to version 2.1 of the configuration file format can be done through the use of an XSLT stylesheet. This stylesheet is found in `juggler/modules/jackal/tools/xmlupdate` or in 753 721 =$VJ_BASE_DIR/share/jccl/tools/xmlupdate=, depending on whether you have a source or a binary distribution of VR Juggler. The stylesheet is named `cfg_2.0-2.1.xsl`, and it can be used with any XSLT 1.0 processor. For example, if you have '''xsltproc''' available, you can use it to update a definition file as follows: 767 735 At this time, the makefile only supports the use of '''xsltproc''' and the Xalan command-line utility. It defaults to using '''xsltproc'''. If that tool is not available, line 38 of the makefile so that the value of `$(XSLT_TARGET)` is `update-xalan`. If neither Xalan nor '''xsltproc''' is available, you will have to use whatever XSLT processor is available on your system. 768 736 769 ===== Version 2.1 to 3.0 (Configuration Files) ===== 770 737 ===== Version 2.1 to 3.0 (Configuration Files) ===== 771 738 Updating to version 3.0 of the configuration file format can be done through the use of an XSLT stylesheet. This stylesheet is found in `juggler/modules/jackal/tools/xmlupdate` or in 772 739 =$VJ_BASE_DIR/share/jccl/tools/xmlupdate=, depending on whether you have a source or a binary distribution of VR Juggler. The stylesheet is named `cfg_2.1-3.0.xsl`, and it can be used with any XSLT 1.0 processor. For example, if you have '''xsltproc''' available, you can use it to update a definition file as follows:
