diff --git a/doc/how_to_build_win.md b/doc/how_to_build_win.md index f77bace..d6befdf 100644 --- a/doc/how_to_build_win.md +++ b/doc/how_to_build_win.md @@ -1,22 +1,22 @@ # Building on Windows -This software can be built using Visual Studio 2013 and Qt 5.6 +This software can be built using Visual Studio 2015 and Qt 5.6 ## Required Software -### Visual Studio Express 2013 for Windows Desktop -- https://www.microsoft.com/en-us/download/details.aspx?id=44914 +### Visual Studio Express 2015 for Windows Desktop +- https://www.visualstudio.com/ja-jp/products/visual-studio-express-vs.aspx - Make sure that the target platform is "for Windows Desktop" not "for Windows". -- Community and Professional versions of Visual Studio 2013 for Windows Desktop also work. +- Community and Professional versions of Visual Studio 2015 for Windows Desktop also work. ### CMake - https://cmake.org/download/ -- This will be used to create the VS2013 project file. +- This will be used to create the `MSVC 2015` project file. ## Acquiring the Source Code - Clone the base repository. - Throughout the explanation `$opentoonz` will represent the root for the base repository. -- Visual Studio 2013 cannot recognize UTF-8 without BOM source code properly. Furthermore, since the endline character is represented with only the LF character, one line comments in Japanese will often cause the following line to be treated as a comment by VS2013 as well. +- Visual Studio cannot recognize UTF-8 without BOM source code properly. Furthermore, since the endline character is represented with only the LF character, one line comments in Japanese will often cause the following line to be treated as a comment by `MSVS` as well. - In order to prevent this, please change the following setting in git so that it will preserve the proper endline characters: - `git config core.safecrlf true` @@ -24,17 +24,20 @@ This software can be built using Visual Studio 2013 and Qt 5.6 Because of the size of these libraries, they are not maintained in the git repository. They will have to be installed seperately as follows. +### `lib` and `dll` +- `lib` and `dll` files are tracked by [Git Large File Storage](https://git-lfs.github.com/). +- Execute `git lfs pull` after `git clone` by using the `lfs` client. + ### Qt -- http://download.qt.io/official_releases/qt/5.6/5.6.0/ +- https://www.qt.io/download-open-source/ - Qt is a cross-platform GUI framework. -- Select the following file from the above link: - - qt-opensource-windows-x86-msvc2013_64-5.6.0.exe +- Install Qt 5.6 (64-bit version) by [Qt Online Installer for Windows](http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe). ### boost -- boost 1.55.0 or later is required (tested up to 1.60.0), but the support build is using 1.55.0 exactly. -- http://www.boost.org/users/history/version_1_55_0.html -- Download boost_1_55_0.zip from the above link. Extract all contents to the '$opentoonz/thirdparty/boost' directory. -- Install the following patch for Visual Studio 2013 (Make the changes listed in the patch file). +- Boost 1.55.0 or later is required (tested up to 1.60.0). +- http://www.boost.org/users/history/version_1_61_0.html +- Download boost_1_61_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 @@ -47,17 +50,17 @@ They will have to be installed seperately as follows. - Or to wherever you usually build to. - 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. -4. Click on Configure and select Visual Studio 12 2013 Win64. -5. 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 `msvc2013_64`. Rerun Configure. +4. Click on Configure and select Visual Studio 14 2015 Win64. +5. 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. 6. Click Generate - Should the CMakeLists.txt file change, such as during automatic build cleanup, there is no need to rerun CMake. ## Setting Up Libraries Rename the following files: - - `$opentoonz/thirdparty/LibJPEG/jpeg-9/jconfig.vc` → `$opentoonz/thirdparty/LibJPEG/jpeg-9/jconfig.h` - - `$opentoonz/thirdparty/tiff-4.0.3/libtiff/tif_config.vc.h` → `$opentoonz/thirdparty/tiff-4.0.3/libtiff/tif_config.h` - - `$opentoonz/thirdparty/tiff-4.0.3/libtiff/tiffconf.vc.h` → `$opentoonz/thirdparty/tiff-4.0.3/libtiff/tiffconf.h` - - `$opentoonz/thirdparty/libpng-1.6.21/scripts/pnglibconf.h.prebuilt` → `$opentoonz/thirdparty/libpng-1.6.21/pnglibconf.h` + - `$opentoonz/thirdparty/LibJPEG/jpeg-9/jconfig.vc` to `$opentoonz/thirdparty/LibJPEG/jpeg-9/jconfig.h` + - `$opentoonz/thirdparty/tiff-4.0.3/libtiff/tif_config.vc.h` to `$opentoonz/thirdparty/tiff-4.0.3/libtiff/tif_config.h` + - `$opentoonz/thirdparty/tiff-4.0.3/libtiff/tiffconf.vc.h` to `$opentoonz/thirdparty/tiff-4.0.3/libtiff/tiffconf.h` + - `$opentoonz/thirdparty/libpng-1.6.21/scripts/pnglibconf.h.prebuilt` to `$opentoonz/thirdparty/libpng-1.6.21/pnglibconf.h` - Note that the destination is a different folder for the last file. Add a guard for snprintf at tif_config.h(50): @@ -122,13 +125,12 @@ If a previous binary of OpenToonz was already installed, this step and the follo ### Running `OpenToonz_1.0.exe` can now be run. Congratulations! -## Creating the Files for the srv Folder +## Creating the Files for the `srv` Folder OpenToonz utilizes the QuickTime SDK's `mov` and associated file formats. Since the QuickTime SDK only comes in 32-bit versions, the 32-bit file `t32bitsrv.exe` from the QuickTime SDK is used in both the 64-bit and 32-bit versions of OpenToonz. As a result, the following instructions apply to both the 32 and 64-bit versions of OpenToonz. ### Qt -- http://download.qt.io/official_releases/qt/5.6/5.6.0/ -- Find the following file from the above link and install in the appropriate folder. - - qt-opensource-windows-x86-msvc2013-5.6.0.exe +- https://www.qt.io/download-open-source/ +- Install Qt 5.6 (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. @@ -137,14 +139,14 @@ 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` → `$opentoonz/toonz/build32` - - Visual Studio 12 2013 Win64 → Visual Studio 12 2013 -- Change `QT_DIR` to the path of your 32-bit version of Qt + - `$opentoonz/toonz/build` to `$opentoonz/toonz/build32` + - `Visual Studio 14 2015 Win64` to `Visual Studio 14 2015` +- Change `QT_PATH` to the path of your 32-bit version of Qt ### Building the 32-bit Version 1. Open `$opentoonz/toonz/build32/OpenToonz.sln` -### Layout of the srv Folder +### Layout of the `srv` Folder - For the 64-bit version, copy the following files to the `srv` folder: - From `$opentoonz/toonz/build32/Release` - t32bitsrv.exe diff --git a/doc/how_to_build_win_ja.md b/doc/how_to_build_win_ja.md index eaf4a8f..493e1f4 100644 --- a/doc/how_to_build_win_ja.md +++ b/doc/how_to_build_win_ja.md @@ -1,53 +1,54 @@ # ビルド手順(Windows) -Visual Studio 2013とQt 5.6でビルドできることを確認しています。 +Visual Studio 2015 と Qt 5.6 でビルドできることを確認しています。 ## 必要なソフトウェアの導入 -### Visual Studio Express 2013 for Windows Desktop -- https://www.microsoft.com/ja-jp/download/details.aspx?id=44914 -- Express版はターゲットプラットフォームごとにバージョンが分かれています。「for Windows」ではなく「for Windows Desktop」を使用します -- Community版やProfessional版などでも構いません +### 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 版などでも構いません ### CMake - https://cmake.org/download/ -- Visual Studio用のプロジェクトファイルの生成に使用します +- Visual Studio 用のプロジェクトファイルの生成に使用します ## ソースコードの取得 -- 本リポジトリをcloneします -- 以下の説明中の`$opentoonz`は、本リポジトリのrootを表します -- Visual Studio 2013はBOMの無いUTF-8のソースコードを正しく認識できず、改行コードがLFで、1行コメントの末尾が日本語の場合に、改行が無視されて次の行もコメントとして扱われる問題があるため、Gitに下記の設定をして改行コードをCRLFに変換すると良いでしょう +- 本リポジトリを `git clone` します +- 以下の説明中の `$opentoonz` は、本リポジトリの root を表します +- Visual Studio は BOM の無い UTF-8 のソースコードを正しく認識できず、改行コードが LF で、1行コメントの末尾が日本語の場合に、改行が無視されて次の行もコメントとして扱われる問題があるため、Git に下記の設定をして改行コードを CRLF に変換すると良いでしょう - `git config core.safecrlf true` ## 必要なライブラリのインストール サイズの大きいライブラリはこのリポジトリには含めていないので、別途インストールする必要があります。 +### `lib` と `dll` +- `lib` と `dll` ファイルは [Git Large File Storage](https://git-lfs.github.com/) で管理しています。 +- `lfs` のクライアントを導入して、上記 `git clone` のあとに `git lfs pull` を実行してください。 + ### Qt -- http://download.qt.io/official_releases/qt/5.6/5.6.0/ -- クロスプラットフォームのGUIフレームワークです -- 現在はQt 5.6には対応していません -- 上記のURLから以下のファイルをダウンロードして適当なフォルダにインストールします - - qt-opensource-windows-x86-msvc2013_64-5.6.0.exe +- https://www.qt.io/download-open-source/ +- クロスプラットフォームの GUI フレームワークです +- 上記の URL から以下のファイルをダウンロードして Qt 5.6 (64 ビット版) を適当なフォルダにインストールします + - [Qt Online Installer for Windows](http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe) ### boost -- http://www.boost.org/users/history/version_1_55_0.html -- 上記のURLからboost_1_55_0.zipをダウンロードして解凍し、boost_1_55_0を`$opentoonz/thirdparty/boost`にコピーします -- Visual Studio 2013用の下記のパッチを当てます - - https://svn.boost.org/trac/boost/attachment/ticket/9369/vc12_fix_has_member_function_callable_with.patch +- http://www.boost.org/users/history/version_1_61_0.html +- 上記の URL から boost_1_61_0.zip をダウンロードして解凍し、 boost_1_61_0 を `$opentoonz/thirdparty/boost` にコピーします ## ビルド -### CMakeでVisual Studioのプロジェクトを生成する -1. CMakeを立ち上げる -2. Where is the source codeに`$opentoonz/toonz/sources`を指定する -3. Where to build the binariesに`$opentoonz/toonz/build`を指定する +### CMake で Visual Studio のプロジェクトを生成する +1. CMake を立ち上げる +2. Where is the source code に `$opentoonz/toonz/sources` を指定する +3. Where to build the binaries に `$opentoonz/toonz/build` を指定する - 他の場所でも構いません - チェックアウトしたフォルダ内に作成する場合は、buildから開始するフォルダ名にするとgitから無視されます - ビルド先を変更した場合は、以下の説明を適宜読み替えてください -4. Configureをクリックして、Visual Studio 12 2013 Win64を選択します -5. Qtのインストール先がデフォルトではない場合、`Specify QT_PATH properly`というエラーが表示されるので、`QT_DIR`にQt5をインストールしたフォルダ内の`msvc2013_64`のパスを指定します -6. Generateをクリック - - CMakeLists.txtに変更があった場合は、ビルド時に自動的に処理が走るので、以降はCMakeを直接使用する必要はありません +4. Configure をクリックして、 Visual Studio 14 2015 Win64 を選択します +5. Qt のインストール先がデフォルトではない場合、 `Specify QT_PATH properly` というエラーが表示されるので、 `QT_PATH` に Qt5 をインストールしたパスを指定します +6. Generate をクリック + - CMakeLists.txt に変更があった場合は、ビルド時に自動的に処理が走るので、以降は CMake を直接使用する必要はありません ## ライブラリの設定 下記のファイルをコピーします @@ -64,65 +65,64 @@ Visual Studio 2013とQt 5.6でビルドできることを確認しています� ``` ## ビルド -1. `$opentoonz/toonz/build/OpenToonz.sln`を開いてRelease構成を選択してビルドします -2. `$opentoonz/toonz/build/Release`にファイルが生成されます +1. `$opentoonz/toonz/build/OpenToonz.sln` を開いて Release 構成を選択してビルドします +2. `$opentoonz/toonz/build/Release` にファイルが生成されます ## 実行 ### 実行可能ファイルなどの配置 -1. `$oepntoonz/toonz/build/Release`の中身を適当なフォルダにコピーします -2. `OpenToonz_1.0.exe`のパスを引数にしてQtに付属の`windeployqt.exe`を実行します - - 必要なQtのライブラリなどが`OpenToonz_1.0.exe`と同じフォルダに集められます -3. 下記のファイルを`OpenToonz_1.0.exe`と同じフォルダにコピーします +1. `$oepntoonz/toonz/build/Release` の中身を適当なフォルダにコピーします +2. `OpenToonz_1.0.exe` のパスを引数にして Qt に付属の `windeployqt.exe` を実行します + - 必要な Qt のライブラリなどが `OpenToonz_1.0.exe` と同じフォルダに集められます +3. 下記のファイルを `OpenToonz_1.0.exe` と同じフォルダにコピーします - `$opentoonz/thirdparty/glut/3.7.6/lib/glut64.dll` - `$opentoonz/thirdparty/glew/glew-1.9.0/bin/64bit/glew32.dll` -4. バイナリ版のOpenToonzのインストール先にある`srv`フォルダを`OpenToonz_1.0.exe`と同じフォルダにコピーします - - `srv`が無くてもOpenToonzは動作しますが、mov形式などに対応できません - - `srv`内のファイルの生成方法は後述します +4. バイナリ版の OpenToonz のインストール先にある `srv` フォルダを `OpenToonz_1.0.exe` と同じフォルダにコピーします + - `srv` が無くても OpenToonz は動作しますが、 mov 形式などに対応できません + - `srv` 内のファイルの生成方法は後述します ### Stuffフォルダの作成 -既にバイナリ版のOpenToonzをインストールしている場合、この手順とレジストリキーの作成と同様の処理が行われているため、これらの手順は不要です。 +既にバイナリ版の OpenToonz をインストールしている場合、この手順とレジストリキーの作成と同様の処理が行われているため、これらの手順は不要です。 -1. `$opentoonz/stuff`を適当なフォルダにコピーします +1. `$opentoonz/stuff` を適当なフォルダにコピーします ### レジストリキーの作成 -1. レジストリエディタで下記のキーを作成し、Stuffフォルダの作成でコピーしたstuffフォルダのパスを記載します +1. レジストリエディタで下記のキーを作成し、 Stuff フォルダの作成でコピーした stuff フォルダのパスを記載します - HKEY_LOCAL_MACHINE\SOFTWARE\OpenToonz\OpenToonz\1.0\TOONZROOT ### 実行 -OpenToonz_1.0.exeを実行して動作すれば成功です。おめでとうございます。 +OpenToonz_1.0.exe を実行して動作すれば成功です。おめでとうございます。 -## srvフォルダ内のファイルの生成 -OpenToonzはQuickTime SDKを用いてmov形式などへ対応しています。QuickTime SDKは32ビット版しかないため、`t32bitsrv.exe`という32ビット版の実行可能ファイルにQuickTime SDKを組み込み、64ビット版のOpenToonzは`t32bitsrv.exe`を経由してQuickTime SDKの機能を使用しています。以下の手順では`t32bitsrv.exe`などと合わせて、32ビット版のOpenToonzも生成されます。 +## `srv` フォルダ内のファイルの生成 +OpenToonz は QuickTime SDK を用いて mov 形式などへ対応しています。 QuickTime SDK は 32 ビット版しかないため、 `t32bitsrv.exe` という 32 ビット版の実行可能ファイルにQuickTime SDKを組み込み、64ビット版の OpenToonz は `t32bitsrv.exe` を経由して QuickTime SDK の機能を使用しています。以下の手順では `t32bitsrv.exe` などと合わせて、 32 ビット版の OpenToonz も生成されます。 ### Qt -- http://download.qt.io/official_releases/qt/5.6/5.6.0/ -- 上記のURLから以下のファイルをダウンロードして適当なフォルダにインストールします - - qt-opensource-windows-x86-msvc2013-5.6.0.exe +- https://www.qt.io/download-open-source/ +- 64 ビット版と同じインストーラーで Qt 5.6 (32 ビット版) を適当なフォルダにインストールします ### QuickTime SDK -1. Appleの開発者登録をして下記のURLから`QuickTime 7.3 SDK for Windows.zip`をダウンロードします +1. Apple の開発者登録をして下記のURLから `QuickTime 7.3 SDK for Windows.zip` をダウンロードします - https://developer.apple.com/downloads/?q=quicktime -2. QuickTime SDKをインストールして、`C:\Program Files (x86)\QuickTime SDK`の中身を`thirdparty/quicktime/QT73SDK`の中にコピーします +2. QuickTime SDK をインストールして、 `C:\Program Files (x86)\QuickTime SDK` の中身を `thirdparty/quicktime/QT73SDK` の中にコピーします -### CMakeでVisual Studioの32ビット版のプロジェクトを生成する -- 64ビット版と同様の手順で、次のようにフォルダ名とターゲットを読み替えます +### CMake で Visual Studio の 32 ビット版のプロジェクトを生成する +- 64 ビット版と同様の手順で、次のようにフォルダ名とターゲットを読み替えます - `$opentoonz/toonz/build` → `$opentoonz/toonz/build32` - - Visual Studio 12 2013 Win64 → Visual Studio 12 2013 -- `QT_DIR`には32ビット版のQtのパスを指定します + - Visual Studio 14 2015 Win64 → Visual Studio 14 2015 +- `QT_PATH` には 32 ビット版の Qt のパスを指定します -### 32ビット版のビルド +### 32 ビット版のビルド 1. `$opentoonz/toonz/build32/OpenToonz.sln`を開いてビルドします -### srvフォルダの配置 -- 64ビット版のsrvフォルダの中に下記のファイルをコピーします - - `$opentoonz/toonz/build32/Release`から +### `srv` フォルダの配置 +- 64 ビット版の `srv` フォルダの中に下記のファイルをコピーします + - `$opentoonz/toonz/build32/Release` から - t32bitsrv.exe - image.dll - tnzcore.dll - - Qtの32ビット版のインストール先から + - Qt の 32ビット版のインストール先から - Qt5Core.dll - Qt5Network.dll - `$opentoonz/thirdparty/glut/3.7.6/lib/glut32.dll` ## 翻訳ファイルの生成 -Qtの翻訳ファイルは、ソースコードから.tsファイルを生成して、.tsファイルに対して翻訳作業を行い、.tsファイルから.qmファイルを生成します。Visual Studioソリューション中の`translation_`から始まるプロジェクトに対して「`translation_???`のみをビルド」を実行すると、.tsファイルと.qmファイルの生成が行われます。これらのプロジェクトはソリューションのビルドではビルドされないようになっています。 +Qt の翻訳ファイルは、ソースコードから `.ts` ファイルを生成して、 `.ts` ファイルに対して翻訳作業を行い、 `.ts` ファイルから `.qm` ファイルを生成します。Visual Studioソリューション中の`translation_`から始まるプロジェクトに対して「 `translation_???` のみをビルド」を実行すると、 `.ts` ファイルと `.qm` ファイルの生成が行われます。これらのプロジェクトはソリューションのビルドではビルドされないようになっています。