OpenToonz - An open-source full-featured 2D animation creation software
C
Remove Version Numbers from File Names (#2410)
shun-iwasawaf39ea05cace4
diff --git a/appveyor.yml b/appveyor.ymlindex 2b03c64a8..395c875e4 100644--- a/appveyor.yml+++ b/appveyor.yml@@ -1,4 +1,4 @@-version: 1.2.0.{build}+version: 1.2.1.{build}pull_requests:do_not_increment_build_number: trueskip_tags: true@@ -33,7 +33,7 @@ build:verbosity: minimalafter_build:- cmd: >-- C:\Qt\5.9\msvc2015_64\bin\windeployqt.exe %CONFIGURATION%\OpenToonz_1.2.exe+ C:\Qt\5.9\msvc2015_64\bin\windeployqt.exe %CONFIGURATION%\OpenToonz.execopy /Y ..\..\thirdparty\glut\3.7.6\lib\glut64.dll %CONFIGURATION%@@ -48,5 +48,5 @@ after_build:copy /Y ..\..\thirdparty\libmypaint\dist\64\libmypaint-1-4-0.dll %CONFIGURATION%artifacts:- path: toonz\$(PLATFORM)\$(CONFIGURATION)- name: OpenToonz_1.2+ name: OpenToonzdiff --git a/doc/how_to_build_linux.md b/doc/how_to_build_linux.mdindex 5b004eaee..3875b229f 100644--- a/doc/how_to_build_linux.md+++ b/doc/how_to_build_linux.md@@ -171,7 +171,7 @@ If you need to debug the application, you should be able to use `cmake -DCMAKE_BYou can now run the application:```-$ LD_LIBRARY_PATH=./lib/opentoonz:$LD_LIBRARY_PATH ./bin/OpenToonz_1.2+$ LD_LIBRARY_PATH=./lib/opentoonz:$LD_LIBRARY_PATH ./bin/OpenToonz```### Performing a System Installationdiff --git a/doc/how_to_build_macosx.md b/doc/how_to_build_macosx.mdindex 1f443eb87..591d4c8eb 100644--- a/doc/how_to_build_macosx.md+++ b/doc/how_to_build_macosx.md@@ -39,10 +39,10 @@ git lfs pull### (Optional) Create the stuff Directory-If the directory `/Applications/OpenToonz/OpenToonz_1.2_stuff` does not exist, enter the following command:+If the directory `/Applications/OpenToonz/OpenToonz_stuff` does not exist, enter the following command:```-$ sudo cp -r stuff /Applications/OpenToonz/OpenToonz_1.2_stuff+$ sudo cp -r stuff /Applications/OpenToonz/OpenToonz_stuff```### 3. Build tiff in thirdparty@@ -86,5 +86,5 @@ Please be patient as the install will take a while.### After Building```-$ open ./toonz/OpenToonz_1.2.app+$ open ./toonz/OpenToonz.app```diff --git a/doc/how_to_build_macosx_ja.md b/doc/how_to_build_macosx_ja.mdindex f0f1ad61a..3df0f22a4 100644--- a/doc/how_to_build_macosx_ja.md+++ b/doc/how_to_build_macosx_ja.md@@ -29,10 +29,10 @@ $ git clone https://github.com/opentoonz/opentoonz### stuff ディレクトリの設置 (任意)-`/Applications/OpenToonz/OpenToonz_1.2_stuff` というディレクトリが存在していない場合は以下のコマンド等でリポジトリのひな形を設置する必要があります。+`/Applications/OpenToonz/OpenToonz_stuff` というディレクトリが存在していない場合は以下のコマンド等でリポジトリのひな形を設置する必要があります。```-$ sudo cp -r opentoonz/stuff /Applications/OpenToonz/OpenToonz_1.2_stuff+$ sudo cp -r opentoonz/stuff /Applications/OpenToonz/OpenToonz_stuff```### thirdparty 下の tiff をビルド@@ -67,5 +67,5 @@ $ make### 完成```-$ open ./toonz/OpenToonz_1.2.app+$ open ./toonz/OpenToonz.app```diff --git a/doc/how_to_build_win.md b/doc/how_to_build_win.mdindex fa00eb0b4..fd2950592 100644--- a/doc/how_to_build_win.md+++ b/doc/how_to_build_win.md@@ -74,8 +74,8 @@ Rename the following files:### Setting Up the Program's Path1. Copy the entire contents of `$opentoonz/toonz/build/Release` to an appropriate folder.-2. Open a Command Prompt and navigate to `QT_DIR/msvc2015_64/bin`. Run the Qt program `windeployqt.exe` with the path for `OpenToonz_1.2.exe` as an argument.- - The necessary Qt library files should be in the same folder as `OpenToonz_1.2.exe`+2. Open a Command Prompt and navigate to `QT_DIR/msvc2015_64/bin`. Run the Qt program `windeployqt.exe` with the path for `OpenToonz.exe` as an argument.+ - The necessary Qt library files should be in the same folder as `OpenToonz.exe`- These include:- `Qt5Core.dll`- `Qt5Gui.dll`@@ -86,7 +86,7 @@ Rename the following files:- `Qt5Svg.dll`- `Qt5Widgets.dll`- `Qt5Multimedia.dll`- - These files should be in the corresponding folders in the same folder `OpenToonz_1.2.exe`+ - These files should be in the corresponding folders in the same folder `OpenToonz.exe`- `/bearer/qgenericbearer.dll`- `/bearer/qnativewifibearer.dll`- `/iconengines/qsvgicon.dll`@@ -102,11 +102,11 @@ Rename the following files:- `/imageformats/qwebp.dll`- `/platforms/qwindows.dll`-3. Copy the following files to the same folder as `OpenToonz_1.2.exe`+3. Copy the following files to the same folder as `OpenToonz.exe`- `$opentoonz/thirdparty/glut/3.7.6/lib/glut64.dll`- `$opentoonz/thirdparty/glew/glew-1.9.0/bin/64bit/glew32.dll`-4. Copy the `srv` folder from the previous OpenToonz installation to the same folder as `OpenToonz_1.2.exe`+4. Copy the `srv` folder from the previous OpenToonz installation to the same folder as `OpenToonz.exe`- If there is no `srv` folder, OpenToonz can still be used. However, various file formats such as `mov` cannot be used.- Creating the files for `srv` is discussed later.@@ -117,13 +117,13 @@ If a previous binary of OpenToonz was already installed, this step and the follo### Creating Registry Keys1. Using the registry editor, create the following key and copy the path of the `$opentoonz/stuff` folder from above to it.- - HKEY_LOCAL_MACHINE\SOFTWARE\OpenToonz\OpenToonz\1.2\TOONZROOT+ - HKEY_LOCAL_MACHINE\SOFTWARE\OpenToonz\OpenToonz\TOONZROOT### Running-`OpenToonz_1.2.exe` can now be run. Congratulations!+`OpenToonz.exe` can now be run. Congratulations!## Debugging-1. In the Solution Explorer, select the OpenToonz_1.2 project within the OpenToonz solution.+1. In the Solution Explorer, select the OpenToonz project within the OpenToonz solution.2. In the Project menu, choose Set as StartUp Project.## Creating the Files for the `srv` Folderdiff --git a/doc/how_to_build_win_ja.md b/doc/how_to_build_win_ja.mdindex 0214fd43b..698543840 100644--- a/doc/how_to_build_win_ja.md+++ b/doc/how_to_build_win_ja.md@@ -64,12 +64,12 @@ Visual Studio 2015 と Qt 5.9 でビルドできることを確認していま## 実行### 実行可能ファイルなどの配置1. `$oepntoonz/toonz/build/Release` の中身を適当なフォルダにコピーします-2. `OpenToonz_1.2.exe` のパスを引数にして Qt に付属の `windeployqt.exe` を実行します- - 必要な Qt のライブラリなどが `OpenToonz_1.2.exe` と同じフォルダに集められます-3. 下記のファイルを `OpenToonz_1.2.exe` と同じフォルダにコピーします+2. `OpenToonz.exe` のパスを引数にして Qt に付属の `windeployqt.exe` を実行します+ - 必要な Qt のライブラリなどが `OpenToonz.exe` と同じフォルダに集められます+3. 下記のファイルを `OpenToonz.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.2.exe` と同じフォルダにコピーします+4. バイナリ版の OpenToonz のインストール先にある `srv` フォルダを `OpenToonz.exe` と同じフォルダにコピーします- `srv` が無くても OpenToonz は動作しますが、 mov 形式などに対応できません- `srv` 内のファイルの生成方法は後述します@@ -80,10 +80,10 @@ Visual Studio 2015 と Qt 5.9 でビルドできることを確認していま### レジストリキーの作成1. レジストリエディタで下記のキーを作成し、 Stuff フォルダの作成でコピーした stuff フォルダのパスを記載します- - HKEY_LOCAL_MACHINE\SOFTWARE\OpenToonz\OpenToonz\1.2\TOONZROOT+ - HKEY_LOCAL_MACHINE\SOFTWARE\OpenToonz\OpenToonz\TOONZROOT### 実行-OpenToonz_1.2.exe を実行して動作すれば成功です。おめでとうございます。+OpenToonz.exe を実行して動作すれば成功です。おめでとうございます。## `srv` フォルダ内のファイルの生成OpenToonz は QuickTime SDK を用いて mov 形式などへ対応しています。 QuickTime SDK は 32 ビット版しかないため、 `t32bitsrv.exe` という 32 ビット版の実行可能ファイルにQuickTime SDKを組み込み、64ビット版の OpenToonz は `t32bitsrv.exe` を経由して QuickTime SDK の機能を使用しています。以下の手順では `t32bitsrv.exe` などと合わせて、 32 ビット版の OpenToonz も生成されます。diff --git a/toonz/cmake/BundleInfo.plist.in b/toonz/cmake/BundleInfo.plist.inindex f4bb670d9..59a438800 100644--- a/toonz/cmake/BundleInfo.plist.in+++ b/toonz/cmake/BundleInfo.plist.in@@ -5,7 +5,7 @@<key>CFBundleDevelopmentRegion</key><string>English</string><key>CFBundleExecutable</key>- <string>OpenToonz_1.2</string>+ <string>OpenToonz</string><key>CFBundleGetInfoString</key><string></string><key>CFBundleIconFile</key>diff --git a/toonz/install/SystemVar.ini b/toonz/install/SystemVar.iniindex f21022ef5..0301d50ba 100644--- a/toonz/install/SystemVar.ini+++ b/toonz/install/SystemVar.ini@@ -1,11 +1,11 @@[General]-TOONZCACHEROOT="/Applications/OpenToonz/OpenToonz_1.2_stuff/cache"-TOONZCONFIG="/Applications/OpenToonz/OpenToonz_1.2_stuff/config"-TOONZFXPRESETS="/Applications/OpenToonz/OpenToonz_1.2_stuff/fxs"-TOONZLIBRARY="/Applications/OpenToonz/OpenToonz_1.2_stuff/library"-TOONZPROFILES="/Applications/OpenToonz/OpenToonz_1.2_stuff/profiles"-OpenToonzPROFILES="/Applications/OpenToonz/OpenToonz_1.2_stuff/profiles"-TOONZPROJECTS="/Applications/OpenToonz/OpenToonz_1.2_stuff/projects"-TOONZROOT="/Applications/OpenToonz/OpenToonz_1.2_stuff"-OPENTOONZROOT="/Applications/OpenToonz/OpenToonz_1.2_stuff"-TOONZSTUDIOPALETTE="/Applications/OpenToonz/OpenToonz_1.2_stuff/studiopalette"+TOONZCACHEROOT="/Applications/OpenToonz/OpenToonz_stuff/cache"+TOONZCONFIG="/Applications/OpenToonz/OpenToonz_stuff/config"+TOONZFXPRESETS="/Applications/OpenToonz/OpenToonz_stuff/fxs"+TOONZLIBRARY="/Applications/OpenToonz/OpenToonz_stuff/library"+TOONZPROFILES="/Applications/OpenToonz/OpenToonz_stuff/profiles"+OpenToonzPROFILES="/Applications/OpenToonz/OpenToonz_stuff/profiles"+TOONZPROJECTS="/Applications/OpenToonz/OpenToonz_stuff/projects"+TOONZROOT="/Applications/OpenToonz/OpenToonz_stuff"+OPENTOONZROOT="/Applications/OpenToonz/OpenToonz_stuff"+TOONZSTUDIOPALETTE="/Applications/OpenToonz/OpenToonz_stuff/studiopalette"diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txtindex e7c0f0838..662afbd11 100644--- a/toonz/sources/CMakeLists.txt+++ b/toonz/sources/CMakeLists.txt@@ -599,7 +599,7 @@ if(BUILD_ENV_APPLE)$<TARGET_FILE:executable>)# add capability for retina displays- set_target_properties(OpenToonz_1.2 PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/../cmake/BundleInfo.plist.in)+ set_target_properties(OpenToonz PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/../cmake/BundleInfo.plist.in)endif()if(BUILD_ENV_UNIXLIKE)diff --git a/toonz/sources/common/tapptools/tenv.cpp b/toonz/sources/common/tapptools/tenv.cppindex 47bb8afb2..05528cbd0 100644--- a/toonz/sources/common/tapptools/tenv.cpp+++ b/toonz/sources/common/tapptools/tenv.cpp@@ -1,9 +1,8 @@--#include "tenv.h"#include "tsystem.h"#include "tconvert.h"#include "tfilepath_io.h"+#include "tversion.h"#include <QDir>#include <QSettings>@@ -24,6 +23,7 @@ TOfflineGL::Imp *MacOfflineGenerator1(const TDimension &dim) {#include <sstream>using namespace TEnv;+using namespace TVER;//=========================================================//@@ -40,9 +40,8 @@ const std::map<std::string, std::string> systemPathMap{class EnvGlobals { // singleton- std::string m_applicationName;+ ToonzVersion m_version;std::string m_applicationVersion;- std::string m_applicationVersionWithoutRevision;std::string m_applicationFullName;std::string m_moduleName;std::string m_rootVarName;@@ -57,7 +56,10 @@ class EnvGlobals { // singleton// path values specified with command line argumentsstd::map<std::string, std::string> m_argPathValues;- EnvGlobals() : m_stuffDir(0) { setWorkingDirectory(); }+ EnvGlobals() : m_stuffDir(0) {+ setWorkingDirectory();+ init();+ }public:~EnvGlobals() { delete m_stuffDir; }@@ -74,10 +76,9 @@ public:QString settingsPath;#ifdef MACOSX- settingsPath =- QString::fromStdString(getApplicationName()) + QString("_") +- QString::fromStdString(getApplicationVersionWithoutRevision()) +- QString(".app") + QString("/Contents/Resources/SystemVar.ini");+ settingsPath = QString::fromStdString(getApplicationName()) ++ QString(".app") ++ QString("/Contents/Resources/SystemVar.ini");#else /* Generic Unix */// TODO: use QStandardPaths::ConfigLocation when we drop Qt4settingsPath = QDir::homePath();@@ -132,6 +133,13 @@ public:#endif}+ TFilePath getSystemVarPathValue(std::string varName) {+ // return if the path is registered by command line argument+ std::string argVar = getArgPathValue(varName);+ if (argVar != "") return TFilePath(argVar);+ return TFilePath(getSystemVarValue(varName));+ }+TFilePath getStuffDir() {if (m_stuffDir) return *m_stuffDir;if (m_isPortable)@@ -153,31 +161,30 @@ public:profilesDir + "env" + (TSystem::getUserName().toStdString() + ".env");}- void setApplication(std::string applicationName,- std::string applicationVersion, std::string revision) {- m_applicationName = applicationName;- m_applicationVersionWithoutRevision = applicationVersion;- if (!revision.empty()) {- m_applicationVersion =- m_applicationVersionWithoutRevision + "." + revision;+ void init() {+ if (m_version.getAppRevision() != 0) {+ m_applicationVersion = m_version.getAppVersionString() + "." ++ m_version.getAppRevisionString();} else {- m_applicationVersion = m_applicationVersionWithoutRevision;+ m_applicationVersion = m_version.getAppVersionString();}- m_applicationFullName = m_applicationName + " " + m_applicationVersion;- m_moduleName = m_applicationName;- m_rootVarName = toUpper(m_applicationName) + "ROOT";++ m_applicationFullName = m_version.getAppName() + " " + m_applicationVersion;+ m_moduleName = m_version.getAppName();+ m_rootVarName = toUpper(m_version.getAppName()) + "ROOT";#ifdef _WIN32- m_registryRoot = TFilePath("SOFTWARE\\OpenToonz\\") + m_applicationName +- applicationVersion;+ // from v1.3, registry root is moved to SOFTWARE\\OpenToonz\\OpenToonz+ m_registryRoot =+ TFilePath("SOFTWARE\\OpenToonz\\") + m_version.getAppName();#endif- m_systemVarPrefix = m_applicationName;+ m_systemVarPrefix = m_version.getAppName();updateEnvFile();}- std::string getApplicationName() { return m_applicationName; }+ std::string getApplicationName() { return m_version.getAppName(); }std::string getApplicationVersion() { return m_applicationVersion; }std::string getApplicationVersionWithoutRevision() {- return m_applicationVersionWithoutRevision;+ return m_version.getAppVersionString();}TFilePath getEnvFile() { return m_envFile; }@@ -469,17 +476,6 @@ void Variable::assignValue(std::string value) {//===================================================================-void TEnv::setApplication(std::string applicationName,- std::string applicationVersion,- std::string revision) {- EnvGlobals::instance()->setApplication(applicationName, applicationVersion,- revision);--#ifdef LEVO_MACOSX- TOfflineGL::defineImpGenerator(MacOfflineGenerator1);-#endif-}-std::string TEnv::getApplicationName() {return EnvGlobals::instance()->getApplicationName();}@@ -521,11 +517,7 @@ std::string TEnv::getSystemVarStringValue(std::string varName) {}TFilePath TEnv::getSystemVarPathValue(std::string varName) {- EnvGlobals *eg = EnvGlobals::instance();- // return if the path is registered by command line argument- std::string argVar = eg->getArgPathValue(varName);- if (argVar != "") return TFilePath(argVar);- return TFilePath(eg->getSystemVarValue(varName));+ return EnvGlobals::instance()->getSystemVarPathValue(varName);}TFilePathSet TEnv::getSystemVarPathSetValue(std::string varName) {@@ -583,14 +575,6 @@ void TEnv::setStuffDir(const TFilePath &stuffDir) {EnvGlobals::instance()->setStuffDir(stuffDir);}-TFilePath TEnv::getDllRelativeDir() {- return EnvGlobals::instance()->getDllRelativeDir();-}--void TEnv::setDllRelativeDir(const TFilePath &dllRelativeDir) {- EnvGlobals::instance()->setDllRelativeDir(dllRelativeDir);-}-void TEnv::saveAllEnvVariables() { VariableSet::instance()->save(); }bool TEnv::setArgPathValue(std::string key, std::string value) {diff --git a/toonz/sources/include/tenv.h b/toonz/sources/include/tenv.hindex 155044c44..dc793e138 100644--- a/toonz/sources/include/tenv.h+++ b/toonz/sources/include/tenv.h@@ -89,8 +89,6 @@ public://// es.: TEnv::setApplication("Toonz","5.0");//-DVAPI void setApplication(std::string applicationName, std::string version,- std::string revision = std::string());DVAPI std::string getApplicationName();DVAPI std::string getApplicationVersion();@@ -137,9 +135,6 @@ DVAPI TFilePath getConfigDir();// bisogna chiamare TEnv::setStuffDir(stuffdir) prima di ogni altra operazioneDVAPI void setStuffDir(const TFilePath &stuffDir);-DVAPI TFilePath getDllRelativeDir();-DVAPI void setDllRelativeDir(const TFilePath &dllRelativeDir);-DVAPI void saveAllEnvVariables();// register command line argument paths.diff --git a/toonz/sources/tcleanupper/tcleanupper.cpp b/toonz/sources/tcleanupper/tcleanupper.cppindex a8f41fa77..852163edf 100644--- a/toonz/sources/tcleanupper/tcleanupper.cpp+++ b/toonz/sources/tcleanupper/tcleanupper.cpp@@ -62,11 +62,8 @@ inline ostream &operator<<(ostream &out, const TFilePath &fp) {//------------------------------------------------------------------------namespace {-const char *applicationName = "OpenToonz";-const char *applicationVersion = "1.2";-const char *applicationFullName = "OpenToonz 1.2";-const char *rootVarName = "TOONZROOT";-const char *systemVarPrefix = "TOONZ";+const char *rootVarName = "TOONZROOT";+const char *systemVarPrefix = "TOONZ";namespace {@@ -492,8 +489,6 @@ int main(int argc, char *argv[]) {QApplication app(argc, argv);// questo definisce la registry root e inizializza TEnv- TEnv::setApplication(applicationName, applicationVersion);- TEnv::setApplicationFullName(applicationFullName);TEnv::setRootVarName(rootVarName);TEnv::setSystemVarPrefix(systemVarPrefix);TSystem::hasMainLoop(false);diff --git a/toonz/sources/tcomposer/tcomposer.cpp b/toonz/sources/tcomposer/tcomposer.cppindex be64744aa..f7fc944c7 100644--- a/toonz/sources/tcomposer/tcomposer.cpp+++ b/toonz/sources/tcomposer/tcomposer.cpp@@ -103,11 +103,8 @@ namespace {// (es <systemVarPrefix>PROJECTS etc.)//-const char *applicationName = "OpenToonz";-const char *applicationVersion = "1.2";-const char *applicationFullName = "OpenToonz 1.2";-const char *rootVarName = "TOONZROOT";-const char *systemVarPrefix = "TOONZ";+const char *rootVarName = "TOONZROOT";+const char *systemVarPrefix = "TOONZ";// TODO: forse anche questo andrebbe in tnzbase// ci possono essere altri programmi offline oltre al tcomposer@@ -603,8 +600,6 @@ int main(int argc, char *argv[]) {TThread::init();// questo definisce la registry root e inizializza TEnv- TEnv::setApplication(applicationName, applicationVersion);- TEnv::setApplicationFullName(applicationFullName);TEnv::setRootVarName(rootVarName);TEnv::setSystemVarPrefix(systemVarPrefix);TSystem::hasMainLoop(true);diff --git a/toonz/sources/tconverter/tconverter.cpp b/toonz/sources/tconverter/tconverter.cppindex 8a71275a2..ede0a425d 100644--- a/toonz/sources/tconverter/tconverter.cpp+++ b/toonz/sources/tconverter/tconverter.cpp@@ -37,10 +37,8 @@ typedef QualifierT<TFilePath> FilePathQualifier;#define RENDER_LICENSE_NOT_FOUND 888-const char *applicationVersion = "1.2";-const char *applicationName = "OpenToonz";-const char *rootVarName = "TOONZROOT";-const char *systemVarPrefix = "TOONZ";+const char *rootVarName = "TOONZROOT";+const char *systemVarPrefix = "TOONZ";namespace {@@ -357,7 +355,6 @@ void convert(const TFilePath &source, const TFilePath &dest,//------------------------------------------------------------------------int main(int argc, char *argv[]) {- TEnv::setApplication(applicationName, applicationVersion);TEnv::setRootVarName(rootVarName);TEnv::setSystemVarPrefix(systemVarPrefix);TFilePath fp = TEnv::getStuffDir();diff --git a/toonz/sources/toonz/CMakeLists.txt b/toonz/sources/toonz/CMakeLists.txtindex 13eec76fa..e7fcba192 100644--- a/toonz/sources/toonz/CMakeLists.txt+++ b/toonz/sources/toonz/CMakeLists.txt@@ -365,11 +365,11 @@ endif()qt5_wrap_cpp(SOURCES ${MOC_HEADERS})if(BUILD_ENV_MSVC)- add_executable(OpenToonz_${VERSION} WIN32 ${HEADERS} ${SOURCES} ${OBJCSOURCES} ${RESOURCES} ${RC_FILE})+ add_executable(OpenToonz WIN32 ${HEADERS} ${SOURCES} ${OBJCSOURCES} ${RESOURCES} ${RC_FILE})else()set(MACOSX_BUNDLE_ICON_FILE "OpenToonz.icns")set_source_files_properties(OpenToonz.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")- add_executable(OpenToonz_${VERSION} MACOSX_BUNDLE OpenToonz.icns ${HEADERS} ${SOURCES} ${OBJCSOURCES} ${RESOURCES})+ add_executable(OpenToonz MACOSX_BUNDLE OpenToonz.icns ${HEADERS} ${SOURCES} ${OBJCSOURCES} ${RESOURCES})#add_definitions(# -DTNZBASE_EXPORTS# -DTPARAM_EXPORTS@@ -414,7 +414,7 @@ if(BUILD_TARGET_WIN)endif()if(BUILD_ENV_MSVC)- target_link_libraries(OpenToonz_${VERSION}+ target_link_libraries(OpenToonzQt5::WinMain Qt5::Core Qt5::Gui Qt5::Network Qt5::OpenGL Qt5::Svg Qt5::XmlQt5::Script Qt5::Widgets Qt5::PrintSupport Qt5::Multimedia${GL_LIB} ${GLUT_LIB} strmiids@@ -428,9 +428,9 @@ elseif(BUILD_ENV_APPLE)# 変なところにライブラリ生成するカスどもset(EXTRA_LIBS ${EXTRA_LIBS} "$<TARGET_FILE:tnzstdfx>" "$<TARGET_FILE:tfarm>")- add_dependencies(OpenToonz_${VERSION} tnzcore tnzbase toonzlib colorfx tnzext image sound toonzqt tnztools tnzstdfx tfarm)+ add_dependencies(OpenToonz tnzcore tnzbase toonzlib colorfx tnzext image sound toonzqt tnztools tnzstdfx tfarm)- target_link_libraries(OpenToonz_${VERSION}+ target_link_libraries(OpenToonzQt5::Core Qt5::Gui Qt5::Network Qt5::OpenGL Qt5::Svg Qt5::XmlQt5::Script Qt5::Widgets Qt5::PrintSupport Qt5::Multimedia Qt5::MultimediaWidgets${GL_LIB} ${GLUT_LIB}@@ -450,7 +450,7 @@ elseif(BUILD_ENV_UNIXLIKE)endif()target_link_libraries(- OpenToonz_${VERSION} Qt5::Core Qt5::Gui Qt5::Network Qt5::OpenGL Qt5::Svg Qt5::Xml+ OpenToonz Qt5::Core Qt5::Gui Qt5::Network Qt5::OpenGL Qt5::Svg Qt5::XmlQt5::Script Qt5::Widgets Qt5::PrintSupport Qt5::Multimedia${GL_LIB} ${GLUT_LIB} ${GLU_LIB}${EXTRA_LIBS}@@ -460,7 +460,7 @@ endif()if(BUILD_ENV_APPLE)# CMAKE_RUNTIME_OUTPUT_DIRECTORY should be equivalent to usage on windows despite empty# OSX だと CMAKE_RUNTIME_OUTPUT_DIRECTORY が空だが Windows 版と同じ使い方ができるようにしておく- get_target_property(bin OpenToonz_${VERSION} LOCATION)+ get_target_property(bin OpenToonz LOCATION)get_filename_component(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${bin} DIRECTORY)# show CMAKE_RUNTIME_OUTPUT_DIRECTORYmessage("CMAKE_RUNTIME_OUTPUT_DIRECTORY:" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})@@ -468,44 +468,44 @@ endif()# copy utilty executables onto the directory after buildif(LZODRIVER_FOUND)- add_custom_command(TARGET OpenToonz_${VERSION} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:lzocompress> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS lzocompress)- add_custom_command(TARGET OpenToonz_${VERSION} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:lzodecompress> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS lzodecompress)+ add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:lzocompress> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS lzocompress)+ add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:lzodecompress> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS lzodecompress)endif()if(BUILD_ENV_APPLE)- get_target_property(loc OpenToonz_${VERSION} MACOSX_BUNDLE_NAME)+ get_target_property(loc OpenToonz MACOSX_BUNDLE_NAME)message(" ==> App Bundle: " ${loc})message(" ==> Mach-o: " ${bin})foreach(lib ${EXTRA_LIBS})- message(" copy:" ${lib} "==>" ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz_${VERSION}.app/Contents/MacOS/)- add_custom_command(TARGET OpenToonz_${VERSION} POST_BUILD COMMAND cp ${lib} ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz_${VERSION}.app/Contents/MacOS/)+ message(" copy:" ${lib} "==>" ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz.app/Contents/MacOS/)+ add_custom_command(TARGET OpenToonz POST_BUILD COMMAND cp ${lib} ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz.app/Contents/MacOS/)endforeach()- add_custom_command(TARGET OpenToonz_${VERSION}+ add_custom_command(TARGET OpenToonzPOST_BUILD COMMAND${CMAKE_INSTALL_NAME_TOOL} -add_rpath @executable_path/. ${bin})- add_custom_command(TARGET OpenToonz_${VERSION}+ add_custom_command(TARGET OpenToonzPOST_BUILD COMMAND${CMAKE_INSTALL_NAME_TOOL} -add_rpath ${CMAKE_INSTALL_RPATH} ${bin})- add_custom_command(TARGET OpenToonz_${VERSION} POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz_${VERSION}.app/Contents/Resources)+ add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz.app/Contents/Resources)- add_custom_command(TARGET OpenToonz_${VERSION} POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz_${VERSION}.app/Contents/Resources)- add_custom_command(TARGET OpenToonz_${VERSION} POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/qss)- add_custom_command(TARGET OpenToonz_${VERSION} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../install/SystemVar.ini ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz_${VERSION}.app/Contents/Resources)+ add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz.app/Contents/Resources)+ add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/qss)+ add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../install/SystemVar.ini ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz.app/Contents/Resources)- add_custom_command(TARGET OpenToonz_${VERSION} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tcomposer> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tcomposer)- add_custom_command(TARGET OpenToonz_${VERSION} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tcleanup> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tcleanup)- add_custom_command(TARGET OpenToonz_${VERSION} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tconverter> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tconverter)- add_custom_command(TARGET OpenToonz_${VERSION} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tfarmcontroller> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tfarmcontroller)- add_custom_command(TARGET OpenToonz_${VERSION} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tfarmserver> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tfarmserver)+ add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tcomposer> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tcomposer)+ add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tcleanup> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tcleanup)+ add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tconverter> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tconverter)+ add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tfarmcontroller> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tfarmcontroller)+ add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tfarmserver> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tfarmserver)elseif(BUILD_ENV_UNIXLIKE AND BUILD_TARGET_WIN)# Setup files on Windows platform while cross compilation.install(TARGETS- OpenToonz_${VERSION}+ OpenToonzDESTINATION bin)@@ -559,7 +559,7 @@ elseif(BUILD_ENV_UNIXLIKE AND NOT BUILD_TARGET_WIN)# - /usrinstall(TARGETS- OpenToonz_${VERSION}+ OpenToonzDESTINATION bin)@@ -603,7 +603,7 @@ fiexport LD_LIBRARY_PATH=\${OPENTOONZ_BASE}/lib/opentoonz:\${LD_LIBRARY_PATH}-exec \$OPENTOONZ_BASE/bin/OpenToonz_${VERSION} \"\$@\"+exec \$OPENTOONZ_BASE/bin/OpenToonz \"\$@\"")# only needed for executing without installingexecute_process(COMMAND chmod +x ${CMAKE_BINARY_DIR}/bin/opentoonz)diff --git a/toonz/sources/toonz/main.cpp b/toonz/sources/toonz/main.cppindex 35f7291e4..8fb85fe8f 100644--- a/toonz/sources/toonz/main.cpp+++ b/toonz/sources/toonz/main.cpp@@ -92,17 +92,10 @@ TEnv::IntVar EnvSoftwareCurrentFontSize("SoftwareCurrentFontSize", 12);const char *applicationFullName = "LineTest 6.4 Beta";const char *rootVarName = "LINETESTROOT";const char *systemVarPrefix = "LINETEST";-#else-const char *applicationName = "OpenToonz";-const char *applicationVersion = "1.2";-const char *applicationRevision = "1";-const char *dllRelativePath = "./toonz6.app/Contents/Frameworks";#endifTEnv::IntVar EnvSoftwareCurrentFontSize("SoftwareCurrentFontSize", 12);-const char *applicationFullName =- "OpenToonz 1.2.1"; // next will be 1.3 (not 1.3.0)const char *rootVarName = "TOONZROOT";const char *systemVarPrefix = "TOONZ";@@ -118,9 +111,10 @@ void qt_mac_set_menubar_merge(bool enable);static void fatalError(QString msg) {DVGui::MsgBoxInPopup(- CRITICAL, msg + "\n" +- QObject::tr("Installing %1 again could fix the problem.")- .arg(applicationFullName));+ CRITICAL,+ msg + "\n" ++ QObject::tr("Installing %1 again could fix the problem.")+ .arg(QString::fromStdString(TEnv::getApplicationFullName())));exit(0);}//-----------------------------------------------------------------------------@@ -157,12 +151,8 @@ DV_IMPORT_API void initColorFx();*/static void initToonzEnv(QHash<QString, QString> &argPathValues) {StudioPalette::enable(true);-- TEnv::setApplication(applicationName, applicationVersion,- applicationRevision);TEnv::setRootVarName(rootVarName);TEnv::setSystemVarPrefix(systemVarPrefix);- TEnv::setDllRelativeDir(TFilePath(dllRelativePath));QHash<QString, QString>::const_iterator i = argPathValues.constBegin();while (i != argPathValues.constEnd()) {@@ -175,9 +165,8 @@ static void initToonzEnv(QHash<QString, QString> &argPathValues) {QCoreApplication::setOrganizationName("OpenToonz");QCoreApplication::setOrganizationDomain("");- QString fullApplicationNameQStr =- QString(applicationName) + " " + applicationVersion;- QCoreApplication::setApplicationName(fullApplicationNameQStr);+ QCoreApplication::setApplicationName(+ QString::fromStdString(TEnv::getApplicationFullName()));/*-- TOONZROOTのPathの確認 --*/// controllo se la xxxroot e' definita e corrisponde ad un folder esistente@@ -634,7 +623,7 @@ int main(int argc, char *argv[]) {QString currentStyle = Preferences::instance()->getCurrentStyleSheetPath();a.setStyleSheet(currentStyle);- w.setWindowTitle(applicationFullName);+ w.setWindowTitle(QString::fromStdString(TEnv::getApplicationFullName()));if (TEnv::getIsPortable()) {splash.showMessage(offsetStr + "Starting OpenToonz Portable ...",Qt::AlignCenter, Qt::white);diff --git a/toonz/sources/toonz/mainwindow.cpp b/toonz/sources/toonz/mainwindow.cppindex c20cc77ba..289f81aa8 100644--- a/toonz/sources/toonz/mainwindow.cpp+++ b/toonz/sources/toonz/mainwindow.cpp@@ -57,8 +57,6 @@#include <QPushButton>#include <QLabel>-extern const char *applicationFullName;-TEnv::IntVar ViewCameraToggleAction("ViewCameraToggleAction", 1);TEnv::IntVar ViewTableToggleAction("ViewTableToggleAction", 1);TEnv::IntVar FieldGuideToggleAction("FieldGuideToggleAction", 0);@@ -493,7 +491,7 @@ void MainWindow::changeWindowTitle() {if (name.isEmpty()) name = tr("Untitled");- name += " : " + QString::fromLatin1(applicationFullName);+ name += " : " + QString::fromStdString(TEnv::getApplicationFullName());setWindowTitle(name);}