Skip to content

Commit

Permalink
Merge branch 'master' from opentoonz
Browse files Browse the repository at this point in the history
  • Loading branch information
manongjohn committed Apr 11, 2021
2 parents d38cead + dfaa67a commit caf5b6e
Show file tree
Hide file tree
Showing 180 changed files with 13,006 additions and 3,159 deletions.
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.4.0.{build}
version: 1.5.0.{build}
pull_requests:
do_not_increment_build_number: true
skip_tags: true
Expand Down Expand Up @@ -50,7 +50,7 @@ after_build:
copy /Y ..\..\thirdparty\libmypaint\dist\64\libmypaint-1-4-0.dll %CONFIGURATION%\OpenToonz
copy /Y "C:\Tools\opencv\build\x64\vc15\bin\opencv_world412.dll" %CONFIGURATION%\OpenToonz
copy /Y "C:\Tools\opencv\build\x64\vc15\bin\opencv_world452.dll" %CONFIGURATION%\OpenToonz
mkdir "%CONFIGURATION%\OpenToonz stuff"
Expand Down
31 changes: 31 additions & 0 deletions doc/how_to_build_bsd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Setting up the development environment for BSD operatings systems such as NetBSD, FreeBSD, Dragonfly BSD, or OpenBSD

## Required software

Building OpenToonz from source requires the following dependencies:
- Git
- GCC or Clang
- CMake (3.4.1 or newer).
- Qt5 (5.9 or newer)
- Boost (1.55 or newer)
- LibPNG
- SuperLU
- Lzo2
- FreeType
- LibMyPaint (1.3 or newer)
- Jpeg-Turbo (1.4 or newer)
- OpenCV 3.2 or newer

## OpenBSD example
```
# pkg_add git cmake pkgconf boost qt5 lz4 usb lzo2 png jpeg glew freeglut freetype json-c mypaint opencv
```
For programs such as SuperLU or Jpeg-Turbo, you might need to compile from source.

Notes:
* It's possible we also need `libgsl2` (Called gsl in BSD systems or maybe `libopenblas-dev` (called just blas in BSD.))
* We may also need `libegl1-mesa-dev libgles2-mesa-dev libglib2.0-dev liblzma-dev` Install the BSD equivilency to those GNU/Linux packages. They might not be available as precompiled packages, so compiling from source might be required.
* If your BSD operating system doesn't have the up to date packages such as gsl, you may install them by compiling from source.


Continue the instructions as stated in [the linux guide](https://github.com/opentoonz/opentoonz/blob/master/doc/how_to_build_linux.md) to finish the compilation.
21 changes: 0 additions & 21 deletions doc/how_to_build_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,27 +118,6 @@ $ cp -r opentoonz/stuff $HOME/.config/OpenToonz/

*Currently this is required to run OpenToonz.*

### Creating SystemVar.ini

TODO: fix the code to discover it automatically

```
$ cat << EOF > $HOME/.config/OpenToonz/SystemVar.ini
[General]
OPENTOONZROOT="$HOME/.config/OpenToonz/stuff"
OpenToonzPROFILES="$HOME/.config/OpenToonz/stuff/profiles"
TOONZCACHEROOT="$HOME/.config/OpenToonz/stuff/cache"
TOONZCONFIG="$HOME/.config/OpenToonz/stuff/config"
TOONZFXPRESETS="$HOME/.config/OpenToonz/stuff/fxs"
TOONZLIBRARY="$HOME/.config/OpenToonz/stuff/library"
TOONZPROFILES="$HOME/.config/OpenToonz/stuff/profiles"
TOONZPROJECTS="$HOME/.config/OpenToonz/stuff/projects"
TOONZROOT="$HOME/.config/OpenToonz/stuff"
TOONZSTUDIOPALETTE="$HOME/.config/OpenToonz/stuff/studiopalette"
EOF
```
Note the generated file must not actually contain `$HOME`, this expands to an absolute path in the generated file.

### Building LibTIFF

TODO: make sure we can use the system libtiff instead and remove this section.
Expand Down
17 changes: 11 additions & 6 deletions doc/how_to_build_macosx.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- brew
- Xcode
- cmake (3.2.2 or later)
- Qt (5.9.2 or later)
- Qt 5.x (5.9.2 or later)
- boost (1.55.0 or later)
- OpenCV
- Jpeg-turbo
Expand Down Expand Up @@ -37,11 +37,11 @@ $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/

In a Terminal window, execute the following statements:
```
$ brew install glew lz4 libjpeg libpng lzo pkg-config libusb cmake git-lfs libmypaint qt boost opencv jpeg-turbo
$ brew install glew lz4 libjpeg libpng lzo pkg-config libusb cmake git-lfs libmypaint qt@5 boost opencv jpeg-turbo
$ git lfs install
```

NOTE: This will install the latest version of QT which may not be compatible with older OS versions.
NOTE: This will install the latest version of QT v5.x which may not be compatible with older OS versions.

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.

Expand Down Expand Up @@ -82,20 +82,25 @@ $ mkdir build
$ cd build
$ export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/jpeg-turbo/lib/pkgconfig"
```
2. Include libjpeg-turbo path to PKG_CONFIG_PATH

2. Set up build environment
```
$ export PKG_CONFIG_PATH="/usr/local/opt/jpeg-turbo/lib/pkgconfig:$PKG_CONFIG_PATH"
```

3. Set up build environment

To build from command line, do the following:
```
$ cmake ../sources -DQT_PATH='/usr/local/opt/qt/lib' #replace QT path with your installed QT version#
$ cmake ../sources -DQT_PATH='/usr/local/opt/qt@5/lib' #replace QT path with your installed QT version#
$ make
```
- If you downloaded the QT installer and installed to `/Users/yourlogin/Qt` instead of by using homebrew, your lib path may look something like this: `~/Qt/5.12.2/clang_64/lib` or `~/Qt/5.12.2/clang_32/lib`

To build using Xcode, do the following:
```
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
$ cmake -G Xcode ../sources -B. -DQT_PATH='/usr/local/opt/qt/lib' -DWITH_TRANSLATION=OFF #replace QT path with your installed QT version#
$ cmake -G Xcode ../sources -B. -DQT_PATH='/usr/local/opt/qt@5/lib' -DWITH_TRANSLATION=OFF #replace QT path with your installed QT version#
```
- Note that the option `-DWITH_TRANSLATION=OFF` is needed to avoid error when using XCode 12+ which does not allow to add the same source to multiple targets.
- Open Xcode app and open project /Users/yourlogin/Documents/opentoonz/toonz/build/OpenToonz.xcodeproj
Expand Down
40 changes: 20 additions & 20 deletions doc/how_to_build_win.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,38 @@

# Building on Windows

This software can be built using Visual Studio 2015 or above and Qt 5.9 (later Qt versions still not working correctly.)
This software can be built using Visual Studio 2019 and Qt 5.x

## Required Software

### Visual Studio Express 2015 or higher for Windows Desktop
- https://www.visualstudio.com/vs/older-downloads/
- Make sure the target platform is "for Windows Desktop", not "for Windows".
- Community and Professional versions of Visual Studio for Windows Desktop also work.
### Visual Studio Community 2019
- https://www.visualstudio.microsoft.com
- During the installation, make sure to select all the Visual C++ packages.

### CMake
- https://cmake.org/download/
- This will be used to create the `MSVC 2015` project file.
- This will be used to create the `MSVC 2019` project file.

### Qt
- https://www.qt.io/download-open-source/
- Qt is a cross-platform GUI framework.
- Install Qt 5.9 or higher (64-bit version, tested up to 5.9.9) with the [Qt Online Installer for Windows](http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe).
- Install Qt 5.9 or higher (64-bit version, tested up to 5.15.2) with the [Qt Online Installer for Windows](http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe).

#### Customized Qt v5.15.2 with WinTab support
- Qt have started to support Windows Ink from 5.12. Unlike WinTab API used in Qt 5.9 the tablet behaviors are different and are (at least, for OT) problematic.
- The customized Qt5.15.2 are made with cherry-picking the WinTab feature to be officially introduced from 6.0.
- You can build OT with WinTab support by using the prebuilt package of the customized version of Qt for MSVC2019-x64 provided [here](https://github.com/shun-iwasawa/qt5/releases/tag/v5.15.2_wintab) and checking the `WITH_WINTAB` checkbox in CMake to build.

### boost
- Boost 1.55.0 or later is required (tested up to 1.61.0).
- http://www.boost.org/users/history/version_1_61_0.html
- Boost 1.55.0 or later is required (tested up to 1.73.0).
- http://www.boost.org/users/history/version_1_73_0.html
- Download boost_1_73_0.zip from the above link. Extract all contents to the - '$opentoonz/thirdparty/boost' directory.
- Install the following patch (Make the changes listed in the patch file), if you use Boost 1.55.0 with Visual Studio 2013.
- https://svn.boost.org/trac/boost/attachment/ticket/9369/vc12_fix_has_member_function_callable_with.patch

### OpenCV
- v4.1.0 and later
- https://opencv.org/
- On configuring with CMake or in the environmental variables, specify `OpenCV_DIR` to the `build` folder in the install folder of OpenCV (like `C:/opencv/build`).

### libjpeg-turbo
- https://www.libjpeg-turbo.org/
- Copy the lib and include folders from libjpeg-turbo64 into `$opentoonz/thirdparty/libjpeg-turbo64`.

## Acquiring the Source Code
- Note: You can also perform these next commands with Github for Desktop client.
- Clone the base repository.
Expand All @@ -58,7 +55,7 @@ This software can be built using Visual Studio 2015 or above and Qt 5.9 (later Q
- If the build directory is in the git repository, be sure to add the directory to .gitignore
- If the build directory is different from the one above, be sure to change to the specified directory where appropriate below.
-Click on Configure and select the version of Visual Studio you are using.
-If Qt was installed to a directory other than the default, and the error Specify QT_PATH properly appears, navigate to the `QT_DIR` install folder and specify the path to `msvc2015_64`. Rerun Configure.
-If Qt was installed to a directory other than the default, and the error Specify QT_PATH properly appears, navigate to the `QT_DIR` install folder and specify the path to `msvc2019_64`. Rerun Configure.
-If red lines appear in the bottom box, you can safely ignore them.
-Click Generate
-Should the CMakeLists.txt file change, such as during automatic build cleanup, there is no need to rerun CMake.
Expand Down Expand Up @@ -149,7 +146,7 @@ OpenToonz utilizes the QuickTime SDK's `mov` and associated file formats. Since

### Qt
- https://www.qt.io/download-open-source/
- Install Qt 5.9 (32-bit version) by the by [Qt Online Installer for Windows](http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe).
- Install Qt 5.x (32-bit version) by the by [Qt Online Installer for Windows](http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe).

### QuickTime SDK
1. Sign in using your Apple developer ID and download `QuickTime 7.3 SDK for Windows.zip` from the following url.
Expand All @@ -159,7 +156,7 @@ OpenToonz utilizes the QuickTime SDK's `mov` and associated file formats. Since
### Using CMake to Create a Visual Studio 32-bit Project
- Follow the same instructions as for the 64-bit version, but change the following:
- `$opentoonz/toonz/build` to `$opentoonz/toonz/build32`
- `Visual Studio 14 2015 Win64` to `Visual Studio 14 2015`
- `Visual Studio 16 2019 x64` to `Visual Studio 16 2019 Win32`
- Change `QT_PATH` to the path of your 32-bit version of Qt

### Building the 32-bit Version
Expand All @@ -170,10 +167,13 @@ OpenToonz utilizes the QuickTime SDK's `mov` and associated file formats. Since
- From `$opentoonz/toonz/build32/Release`
- t32bitsrv.exe
- image.dll
- tnzbase.dll
- tnzcore.dll
- tnzext.dll
- toonzlib.dll
- From the 32-bit version of Qt
- Qt5Core.dll
- Qt5Network.dll
- run `windeployqt` to obtain required libraries
- additionally, Qt5Gui.dll
- `$opentoonz/thirdparty/glut/3.7.6/lib/glut32.dll`

## Creating Translation Files
Expand Down
49 changes: 30 additions & 19 deletions doc/how_to_build_win_ja.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# ビルド手順(Windows)

Visual Studio 2015 と Qt 5.9 でビルドできることを確認しています。
Visual Studio 2019 (2015以降) と Qt 5.15 (5.9以降) でビルドできることを確認しています。

## 必要なソフトウェアの導入

### Visual Studio Express 2015 for Windows Desktop
- https://www.visualstudio.com/ja-jp/products/visual-studio-express-vs.aspx
- Express 版はターゲットプラットフォームごとにバージョンが分かれています。 `for Windows` ではなく `for Windows Desktop` を使用します
- Community 版や Professional 版などでも構いません
### Visual Studio Community 2019
- https://www.visualstudio.microsoft.com
- C++ によるデスクトップ開発の環境をインストールします。

### CMake
- https://cmake.org/download/
Expand All @@ -29,12 +28,22 @@ Visual Studio 2015 と Qt 5.9 でビルドできることを確認していま
### Qt
- https://www.qt.io/download-open-source/
- クロスプラットフォームの GUI フレームワークです
- 上記の URL から以下のファイルをダウンロードして Qt 5.9 (64 ビット版) を適当なフォルダにインストールします
- 上記の URL から以下のファイルをダウンロードして Qt 5.15 (64 ビット版) を適当なフォルダにインストールします
- [Qt Online Installer for Windows](http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe)

#### WinTabサポート付きカスタマイズ版 Qt5.15.2
- Qtは5.12以降Windows Ink APIをネイティブで使用しています。5.9まで使用されていたWinTab APIとはタブレットの挙動が異なり、それによる不具合が報告されています。
- そこで、公式には6.0から導入されるWinTab APIへの切り替え機能をcherry-pickしたカスタマイズ版の5.15.2を頒布しています。
- MSVC2019-x64向けのビルド済みパッケージは [こちら](https://github.com/shun-iwasawa/qt5/releases/tag/v5.15.2_wintab) から入手できます。さらにCMakeで`WITH_WINTAB`オプションを有効にすることで、WinTabAPIへの切り替えが可能になります。

### OpenCV
- v4.1.0 以降
- https://opencv.org/
- CMake上、または環境変数で`OpenCV_DIR` の値をOpenCVのインストールフォルダ内の`build`フォルダの場所に設定します。(例: `C:/opencv/build`

### boost
- http://www.boost.org/users/history/version_1_61_0.html
- 上記の URL から boost_1_61_0.zip をダウンロードして解凍し、 boost_1_61_0 を `$opentoonz/thirdparty/boost` にコピーします
- http://www.boost.org/users/history/version_1_73_0.html
- 上記の URL から boost_1_73_0.zip をダウンロードして解凍し、 boost_1_61_0 を `$opentoonz/thirdparty/boost` にコピーします

## ビルド

Expand All @@ -45,7 +54,7 @@ Visual Studio 2015 と Qt 5.9 でビルドできることを確認していま
- 他の場所でも構いません
- チェックアウトしたフォルダ内に作成する場合は、buildから開始するフォルダ名にするとgitから無視されます
- ビルド先を変更した場合は、以下の説明を適宜読み替えてください
4. Configure をクリックして、 Visual Studio 14 2015 Win64 を選択します
4. Configure をクリックして、 Visual Studio 16 2019 Win64 を選択します
5. Qt のインストール先がデフォルトではない場合、 `Specify QT_PATH properly` というエラーが表示されるので、 `QT_PATH` に Qt5 をインストールしたパスを指定します
6. Generate をクリック
- CMakeLists.txt に変更があった場合は、ビルド時に自動的に処理が走るので、以降は CMake を直接使用する必要はありません
Expand All @@ -61,16 +70,14 @@ Visual Studio 2015 と Qt 5.9 でビルドできることを確認していま
1. `$opentoonz/toonz/build/OpenToonz.sln` を開いて Release 構成を選択してビルドします
2. `$opentoonz/toonz/build/Release` にファイルが生成されます

## ストップモーション機能とキヤノン製デジタルカメラのサポートを有効にするには
## キヤノン製デジタルカメラのサポートを有効にするには

以下の3つのライブラリが追加で必要です。
- [OpenCV](https://opencv.org/) (v4.1.0以上)
- [libjpeg-turbo](https://www.libjpeg-turbo.org/)
以下のライブラリが追加で必要です。
- Canon EOS Digital SDK (EDSDK):入手方法の詳細は[キヤノンマーケティングジャパン株式会社Webサイト](https://cweb.canon.jp/eos/info/api-package/)をご参照下さい。

CMake上で、`WITH_STOPMOTION` オプションをONにします。CMake上、または環境変数で`OpenCV_DIR` の値をOpenCVのインストールフォルダ内の`build`フォルダの場所に設定します。(例: `C:/opencv/build`
CMake上で、`WITH_CANON` オプションをONにします。

実行時にはOpenCV、libjpeg-turboならびにCanon EDSDKの.dllファイルを`OpenToonz.exe` と同じフォルダにコピーします。
実行時にはCanon EDSDKの.dllファイルを`OpenToonz.exe` と同じフォルダにコピーします。

## 実行
### 実行可能ファイルなどの配置
Expand All @@ -80,6 +87,7 @@ CMake上で、`WITH_STOPMOTION` オプションをONにします。CMake上、
3. 下記のファイルを `OpenToonz.exe` と同じフォルダにコピーします
- `$opentoonz/thirdparty/glut/3.7.6/lib/glut64.dll`
- `$opentoonz/thirdparty/glew/glew-1.9.0/bin/64bit/glew32.dll`
- OpenCV、libjpeg-turboの.dllファイル
4. バイナリ版の OpenToonz のインストール先にある `srv` フォルダを `OpenToonz.exe` と同じフォルダにコピーします
- `srv` が無くても OpenToonz は動作しますが、 mov 形式などに対応できません
- `srv` 内のファイルの生成方法は後述します
Expand All @@ -101,7 +109,7 @@ OpenToonz は QuickTime SDK を用いて mov 形式などへ対応していま

### Qt
- https://www.qt.io/download-open-source/
- 64 ビット版と同じインストーラーで Qt 5.9 (32 ビット版) を適当なフォルダにインストールします
- 64 ビット版と同じインストーラーで Qt 5.x (32 ビット版) を適当なフォルダにインストールします

### QuickTime SDK
1. Apple の開発者登録をして下記のURLから `QuickTime 7.3 SDK for Windows.zip` をダウンロードします
Expand All @@ -111,7 +119,7 @@ OpenToonz は QuickTime SDK を用いて mov 形式などへ対応していま
### CMake で Visual Studio の 32 ビット版のプロジェクトを生成する
- 64 ビット版と同様の手順で、次のようにフォルダ名とターゲットを読み替えます
- `$opentoonz/toonz/build``$opentoonz/toonz/build32`
- Visual Studio 14 2015 Win64 → Visual Studio 14 2015
- Visual Studio 16 2019 x64 → Visual Studio 16 2019 Win32
- `QT_PATH` には 32 ビット版の Qt のパスを指定します

### 32 ビット版のビルド
Expand All @@ -122,10 +130,13 @@ OpenToonz は QuickTime SDK を用いて mov 形式などへ対応していま
- `$opentoonz/toonz/build32/Release` から
- t32bitsrv.exe
- image.dll
- tnzbase.dll
- tnzcore.dll
- tnzext.dll
- toonzlib.dll
- Qt の 32ビット版のインストール先から
- Qt5Core.dll
- Qt5Network.dll
- `windeployqt.exe`を実行して必要なライブラリを入手
- 追加で Qt5Gui.dll
- `$opentoonz/thirdparty/glut/3.7.6/lib/glut32.dll`

## 翻訳ファイルの生成
Expand Down
Binary file modified stuff/config/loc/Español/toonz.qm
Binary file not shown.
Binary file modified stuff/config/loc/Español/toonzqt.qm
Binary file not shown.
Binary file modified stuff/config/loc/Čeština/toonz.qm
Binary file not shown.
Binary file modified stuff/config/loc/Čeština/toonzqt.qm
Binary file not shown.
Binary file modified stuff/config/loc/Русский/colorfx.qm
Binary file not shown.
Binary file modified stuff/config/loc/Русский/tnztools.qm
Binary file not shown.
Binary file modified stuff/config/loc/Русский/toonz.qm
Binary file not shown.
Binary file modified stuff/config/loc/Русский/toonzqt.qm
Binary file not shown.
Binary file modified stuff/config/loc/中文/toonz.qm
Binary file not shown.
Binary file modified stuff/config/loc/中文/toonzqt.qm
Binary file not shown.
Binary file modified stuff/config/loc/日本語/toonz.qm
Binary file not shown.
Binary file modified stuff/config/loc/日本語/toonzqt.qm
Binary file not shown.
Binary file modified stuff/config/loc/한국어/tnztools.qm
Binary file not shown.
Binary file modified stuff/config/loc/한국어/toonz.qm
Binary file not shown.
3 changes: 3 additions & 0 deletions stuff/config/qss/Blue/Blue.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,9 @@ PaletteViewer QToolBar #keyFrameNavigator #KeyTotal {
background-color: #d57a7a;
border-color: #d57a7a;
}
#PltPageViewerScrollArea {
border-bottom: 1px solid #262728;
}
/* -----------------------------------------------------------------------------
Quick Renamer
----------------------------------------------------------------------------- */
Expand Down
3 changes: 3 additions & 0 deletions stuff/config/qss/Dark/Dark.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,9 @@ PaletteViewer QToolBar #keyFrameNavigator #KeyTotal {
background-color: #d57a7a;
border-color: #d57a7a;
}
#PltPageViewerScrollArea {
border-bottom: 1px solid #111111;
}
/* -----------------------------------------------------------------------------
Quick Renamer
----------------------------------------------------------------------------- */
Expand Down
3 changes: 3 additions & 0 deletions stuff/config/qss/Default/Default.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,9 @@ PaletteViewer QToolBar #keyFrameNavigator #KeyTotal {
background-color: #d57a7a;
border-color: #d57a7a;
}
#PltPageViewerScrollArea {
border-bottom: 1px solid #2c2c2c;
}
/* -----------------------------------------------------------------------------
Quick Renamer
----------------------------------------------------------------------------- */
Expand Down
4 changes: 4 additions & 0 deletions stuff/config/qss/Default/less/layouts/palette.less
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ PaletteViewer {
}
}

#PltPageViewerScrollArea {
border-bottom: 1px solid @accent;
}

/* -----------------------------------------------------------------------------
Quick Renamer
----------------------------------------------------------------------------- */
Expand Down
Loading

0 comments on commit caf5b6e

Please sign in to comment.