|
6 | 6 | - git |
7 | 7 | - brew |
8 | 8 | - Xcode |
9 | | -- cmake |
10 | | - - Version 3.2.2 confirmed to work. |
11 | | -- Qt |
12 | | - - http://download.qt.io/official_releases/qt/5.9/5.9.2/ |
13 | | - - qt-opensource-mac-x64-5.9.2.dmg |
14 | | -- boost |
15 | | - - http://www.boost.org/users/history/version_1_55_0.html (or later, though only 1.55.0 is supported) |
| 9 | +- cmake (3.2.2 or later) |
| 10 | +- Qt (5.9.2 or later) |
| 11 | +- boost (1.55.0 or later) |
16 | 12 |
|
17 | 13 | ## Building on MacOSX |
| 14 | +### Download boost from https://boost.org |
18 | 15 |
|
19 | | -### 0. Install Qt 5.9 (Most recent is 5.9.2) |
| 16 | +Download the .bz2 mac (unix if mac not specified) version 1_55_0 or later (last tested with 1_69_0) |
20 | 17 |
|
21 | | -### 1. Install Dependent Packages |
| 18 | +Save for later step. |
22 | 19 |
|
23 | | -With homebrew, you can install them with following command. |
| 20 | +### Download and install Xcode from Apple |
24 | 21 |
|
| 22 | +When downloading Xcode, you should use the appropriate version for your OS version. You can refer to the Version Comparison Table on https://en.wikipedia.org/wiki/Xcode to find out which version you should use. |
| 23 | + |
| 24 | +Apple store usually provides for the most recent macOS version. For older versions, you will need to go to the Apple Developer site. |
| 25 | + |
| 26 | +After installing the application, you will need to start it in order to complete the installation. |
| 27 | + |
| 28 | +### Install Homebrew from https://brew.sh |
| 29 | + |
| 30 | +Check site for any changes in installation instructions, but they will probably just be this: |
| 31 | + |
| 32 | +1. Open a Terminal window |
| 33 | +2. Execute the following statement: |
| 34 | +``` |
| 35 | +$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
| 36 | +``` |
| 37 | + |
| 38 | +### Install required software using brew |
| 39 | + |
| 40 | +In a Terminal window, execute the following statements: |
25 | 41 | ``` |
26 | | -$ brew install glew lz4 libjpeg libpng lzo pkg-config libusb cmake git-lfs libmypaint |
| 42 | +$ brew install glew lz4 libjpeg libpng lzo pkg-config libusb cmake git-lfs libmypaint qt |
| 43 | +$ git lfs install |
27 | 44 | ``` |
28 | 45 |
|
29 | | -Or, you should build and install them manually. |
| 46 | +NOTE: This will install the latest version of QT which may not be compatible with older OS versions. |
30 | 47 |
|
| 48 | +If you cannot use the most recent version, download the online installer from https://www.qt.io/download and install the appropriate `macOS` version (min 5.9.2). If installing via this method, be sure to install the `Qt Script (Deprecated)` libraries. |
31 | 49 |
|
32 | | -### 2. Clone the Repository |
| 50 | +### Set up OpenToonz repository |
33 | 51 |
|
| 52 | +These steps will put the OpenToonz repository under /Users/yourlogin/Documents. |
34 | 53 | ``` |
| 54 | +$ cd ~/Documents #or where you want to store the repository# |
35 | 55 | $ git clone https://github.com/opentoonz/opentoonz |
36 | | -cd opentoonz |
37 | | -git lfs pull |
| 56 | +$ cd opentoonz |
| 57 | +$ git lfs pull |
| 58 | +$ cd thirdparty/boost |
| 59 | +$ mv ~/Downloads/boost_1_69_0.tar.bz2 . #or whatever the boost filename you downloaded is# |
| 60 | +$ tar xvjf boost_1_69_0.tar.bz2 |
| 61 | +$ cd ../lzo |
| 62 | +$ cp -r 2.03/include/lzo driver |
| 63 | +$ cd ../tiff-4.0.3 |
| 64 | +$ ./configure && make |
38 | 65 | ``` |
39 | 66 |
|
40 | | -### (Optional) Create the stuff Directory |
| 67 | +### Configure build for QT version |
41 | 68 |
|
42 | | -If the directory `/Applications/OpenToonz/OpenToonz_stuff` does not exist, enter the following command: |
| 69 | +Edit the `/Users/yourlogin/Documents/opentoonz/toonz/sources/CMakeLists.txt` file at line 160 (64bit OS) or 172 (32bit OS) and modify the root path for the QT lib directory |
43 | 70 |
|
| 71 | +If you installed QT using `brew` , you can get the version and path to use with: `$ brew info qt`. The lib path will look something like this: `/usr/local/Cellar/qt/5.12.2/lib` |
| 72 | +If you downloaded the QT installer and installed to `/Users/yourlogin/Qt`, your lib path may look something like this: `~/Qt/5.12.2/clang_64/lib` or `~/Qt/5.12.2/clang_32/lib` |
| 73 | + |
| 74 | +### Configure environment and Build OpenToonz |
| 75 | + |
| 76 | +1. Create the build directory with the following: |
44 | 77 | ``` |
45 | | -$ sudo cp -r stuff /Applications/OpenToonz/OpenToonz_stuff |
| 78 | +$ cd ~/Documents/opentoonz/toonz |
| 79 | +$ mkdir build |
| 80 | +$ cd build |
46 | 81 | ``` |
47 | 82 |
|
48 | | -### 3. Build tiff in thirdparty |
| 83 | +2. Set up build environment |
49 | 84 |
|
| 85 | +To build from command line, do the following: |
50 | 86 | ``` |
51 | | -$ cd thirdparty/tiff-4.0.3 |
52 | | -$ ./configure && make |
| 87 | +$ CMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.12.2 cmake ../sources #replace QT path with your installed QT version# |
| 88 | +$ make |
53 | 89 | ``` |
54 | 90 |
|
55 | | -### 4. Put Boost library into thirdpaty directory |
56 | | -The following assumes `boost_1_55_0.tar.bz2` was downloaded to `~/Downloads`. |
57 | | - |
| 91 | +To build using Xcode, do the following: |
58 | 92 | ``` |
59 | | -$ cd ../boost |
60 | | -$ mv ~/Downloads/boost_1_55_0.tar.bz2 . |
61 | | -$ tar xjvf boost_1_55_0.tar.bz2 |
| 93 | +$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer |
| 94 | +$ CMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.12.2 cmake -G Xcode ../sources -B. #replace QT path with your installed QT version# |
62 | 95 | ``` |
63 | 96 |
|
64 | | -### 5. Update the path to your Qt 5.9 install in opentoonz/toonz/sources/CMakeLists.txt line 160 or 172 |
65 | | -If using Qt 5.9.2, this is unnecessary. |
| 97 | +- Open Xcode app and open project /Users/yourlogin/Documents/opentoonz/toonz/build/OpenToonz.xcodeproj |
| 98 | +- Change `ALL_BUILD` to `OpenToonz` |
| 99 | +- Start build with: Product -> Build |
66 | 100 |
|
67 | | -### 6. Copy the lzo header folder to the lzo driver directory |
| 101 | + - NOTE about rebuilding in Xcode: The initial build should succeed without any errors. There after, the build will succeed but the following 3 errors can be ignored: |
68 | 102 |
|
69 | 103 | ``` |
70 | | -$ cd ../lzo |
71 | | -$ cp -r 2.03/include/lzo driver |
| 104 | +/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: for: /Users/yourlogin/Documents/opentoonz/toonz/build/toonz/Debug/OpenToonz.app/Contents/MacOS/OpenToonz (for architecture x86_64) option "-add_rpath @executable_path/." would duplicate path, file already has LC_RPATH for: @executable_path/. |
| 105 | +/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: for: /Users/yourlogin/Documents/opentoonz/toonz/build/toonz/Debug/OpenToonz.app/Contents/MacOS/OpenToonz (for architecture x86_64) option "-add_rpath /usr/local/Cellar/qt/5.12.2/lib/" would duplicate path, file already has LC_RPATH for: /usr/local/Cellar/qt/5.12.2/lib/ |
| 106 | +Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure |
72 | 107 | ``` |
73 | 108 |
|
74 | | -### 6. Build Everything Together |
| 109 | +Side note: If you want the option to build by command line and Xcode, create a separate build directory for each. |
75 | 110 |
|
| 111 | +### Create the stuff Directory |
| 112 | + |
| 113 | +If you have installed OpenToonz on the machine already, you can skip this. Otherwise, you need to create the stuff folder with the following: |
76 | 114 | ``` |
77 | | -$ cd ../../toonz |
78 | | -$ mkdir build |
79 | | -$ cd build |
80 | | - CMAKE_PREFIX_PATH=~/Qt5.9.2/5.9.2/clang_64 cmake ../sources |
81 | | -$ make |
| 115 | +$ cd ~/Documents/opentoonz |
| 116 | +$ sudo mkdir /Applications/OpenToonz |
| 117 | +$ sudo cp -r stuff /Applications/OpenToonz/OpenToonz_stuff |
| 118 | +$ sudo chmod -R 777 /Applications/OpenToonz |
82 | 119 | ``` |
83 | 120 |
|
84 | | -Please be patient as the install will take a while. |
85 | | - |
86 | | -### After Building |
| 121 | +### Running the build |
87 | 122 |
|
| 123 | +- If built using command line, run the following: |
88 | 124 | ``` |
89 | | -$ open ./toonz/OpenToonz.app |
| 125 | +$ open ~/Documents/opentoonz/build/toonz/OpenToonz.app |
90 | 126 | ``` |
| 127 | + |
| 128 | +- If built using Xcode, do the following: |
| 129 | + |
| 130 | + - Open Scheme editor for OpenToonz: Product -> Scheme -> Edit Scheme |
| 131 | + - Uncheck: Run -> Options -> Document Versions |
| 132 | + - Run in Debug mode: Product -> Run |
| 133 | + |
| 134 | + - To open with command line or from Finder window, the application is found in `/Users/yourlogin/Documents/opentoonz/toonz/build/Debug/OpenToonz.app` |
0 commit comments