File: Instructions.rtf

package info (click to toggle)
vtk 5.8.0-17.5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 130,804 kB
  • ctags: 169,145
  • sloc: cpp: 1,129,307; ansic: 708,203; tcl: 48,526; python: 20,878; xml: 6,779; yacc: 4,208; perl: 3,121; java: 2,773; lex: 931; sh: 660; asm: 471; makefile: 301
file content (118 lines) | stat: -rw-r--r-- 6,931 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww21440\viewh21360\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\f0\fs38 \cf0 SimpleCocoaVTK 1.7\
2010-06-17\
by: Sean McBride and Mike Jackson\

\fs34 This project is public domain.\
\
\ul Pre-Requisites:\
\ulnone \
1) you need Mac OS X 10.5 and Xcode 3.1 or later installed on your Mac.\
2) you need CMake 2.8 or later.\
3) you need to know the basics of Xcode, CMake, VTK, and Cocoa already.\
4) you have to build VTK 5.4 (or later) separately.  This project expects VTK to be built with certain options, see below.\
\
\ul Purpose of Example:\
\ulnone \
This simple example is intended to show how to use VTK in a Mac-only Cocoa application.  VTK's vtkCocoaGLView is a subclass of NSView and you can use it like pretty much any other NSView!\
\
This example is an NSDocument-based application, and has two independent vtkCocoaGLViews in the document's NIB.  One shows a cone, and one shows a cylinder.\
\
See the screenshot (in the same folder as this file) to see what the app looks like.\
\
\ul Instructions:\
\ulnone \
First, you need to build VTK.  SimpleCocoaVTK requires that you build VTK with the following options:\
	BUILD_SHARED_LIBS				OFF                                                                                                                                         \
	VTK_USE_CARBON					OFF                                                                                                                                         \
	VTK_USE_COCOA					ON                                                                                                                                          \
	CMAKE_BUILD_TYPE				Debug                                                                                                                                       \
\
It is recommended to also use these options, but if you don't you can change SimpleCocoaVTK easily enough by editing it's SimpleCocoaVTK.xcconfig file:\
	VTK_USE_SYSTEM_ZLIB					ON                                                                                                                                          	CMAKE_OSX_ARCHITECTURES			i386\
	CMAKE_OSX_SYSROOT						/Developer/SDKs/MacOSX10.5.sdk\
	CMAKE_OSX_DEPLOYMENT_TARGET		10.5\
\
The other settings are not so relevant or their defaults are fine.  If you've never built VTK before, please see Ryan Glover's excellent document here: <{\field{\*\fldinst{HYPERLINK "http://www.vtk.org/Wiki/Cocoa_VTK"}}{\fldrslt http://www.vtk.org/Wiki/Cocoa_VTK}}>.  Make sure you both build and install VTK!\
\
Next, you have to create two Source Trees in Xcode, named "vtk-debug-include" and "vtk-debug-lib".  Do this from Preferences > Source Trees.  Both should point to subfolders of where your built and installed VTK is.  The example in the VTK Wiki installs to "~/Development/VTKBuild".  So you would set them like so:\
\
	vtk-debug-include			~/Development/VTKBuild/include/vtk-5.4\
	vtk-debug-lib				~/Development/VTKBuild/lib/vtk-5.4\
\
Note that the path changes depending on your version of VTK.  Basically, you want the source trees to match your CMAKE_INSTALL_PREFIX setting.\
\
All the vtk files in the Xcode project are referenced relative to the source tree.  This allows you to have your vtk files anywhere without changing the project itself. If they appear in red in Xcode, it's probably because your source trees are missing or wrong.\
\
Now you should be able to build the project!\
\
The code has many comments, and hopefully they will answer any questions you may have.\
\
If you have any problems, please post to the vtk mailing list.\
<{\field{\*\fldinst{HYPERLINK "http://public.kitware.com/mailman/listinfo/vtkusers"}}{\fldrslt http://public.kitware.com/mailman/listinfo/vtkusers}}>\
\
\ul \ulc0 Version History:\
\ulnone \
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i \cf0 Changes in 1.7 (since 1.6)\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i0 \cf0 - this example can now be built by CMake.\
\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i \cf0 Changes in 1.6 (since 1.5)\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i0 \cf0 - converted all nibs to xibs.\
- the Xcode project had a reference to a path on my disk, removed.\
\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i \cf0 Changes in 1.5 (since 1.4)\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i0 \cf0 - now use two source trees instead of one.\
- updated example to better reflect current versions of VTK, Mac OS, and Xcode.\
\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i \cf0 Changes in 1.4 (since 1.3)\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i0 \cf0 - removed prefix file\
- renamed main.m to main.mm\
- converted tabs to spaces\
\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i \cf0 Changes in 1.3 (since 1.2)\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i0 \cf0 - switched to using just one Source Tree\
- tested in Mac OS X 10.5 and Xcode 3\
- improved these instructions\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i \cf0 \
Changes in 1.2 (since 1.1)\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i0 \cf0 - using smart pointers\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i \cf0 \
Changes in 1.1 (since 1.0)\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\tx7380\tx7940\tx8520\ql\qnatural\pardirnatural

\i0 \cf0 - fixed some memory leaks\
- minor code cleanup\
- added call to print out any leaking vtk objects\
- linked to Ryan Glover's great instructions on how to build vtk\
}