Mac build (#93)
* mac_build * Mac find ffmpeg * Fix travis and appveyor? * fix linux Co-authored-by: turtletooth <turtletooth@turtletooths-iMac.local>
This commit is contained in:
parent
1ae24e7706
commit
ba75e4d7da
41
tahoma_build.sh
Normal file
41
tahoma_build.sh
Normal file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
export QTDIR=/usr/local/Cellar/qt/5.15.0
|
||||
export TOONZDIR=toonz/build/toonz/Release
|
||||
|
||||
echo ">>> Copying stuff to $TOONZDIR/Tahoma.app/tahomastuff"
|
||||
cp -R stuff $TOONZDIR/Tahoma.app/tahomastuff
|
||||
|
||||
echo ">>> Configuring Tahoma.app for deployment"
|
||||
|
||||
$QTDIR/bin/macdeployqt $TOONZDIR/Tahoma.app -verbose=0 -always-overwrite \
|
||||
-executable=$TOONZDIR/Tahoma.app/Contents/MacOS/lzocompress \
|
||||
-executable=$TOONZDIR/Tahoma.app/Contents/MacOS/lzodecompress \
|
||||
-executable=$TOONZDIR/Tahoma.app/Contents/MacOS/tcleanup \
|
||||
-executable=$TOONZDIR/Tahoma.app/Contents/MacOS/tcomposer \
|
||||
-executable=$TOONZDIR/Tahoma.app/Contents/MacOS/tconverter \
|
||||
-executable=$TOONZDIR/Tahoma.app/Contents/MacOS/tfarmcontroller \
|
||||
-executable=$TOONZDIR/Tahoma.app/Contents/MacOS/tfarmserver
|
||||
|
||||
echo ">>> Correcting library paths"
|
||||
for X in `find $TOONZDIR/Tahoma.app/Contents -type f -name *.dylib -exec otool -l {} \; | grep -e "^toonz" -e"name \/usr\/local" | sed -e"s/://" -e"s/ (.*$//" -e"s/^ *name //"`
|
||||
do
|
||||
Z=`echo $X | cut -c 1-1`
|
||||
if [ "$Z" != "/" ]
|
||||
then
|
||||
LIBFILE=$X
|
||||
else
|
||||
Y=`basename $X`
|
||||
W=`basename $LIBFILE`
|
||||
if [ -f $TOONZDIR/Tahoma.app/Contents/Frameworks/$Y -a "$Y" != "$W" ]
|
||||
then
|
||||
echo "Fixing $X in $LIBFILE"
|
||||
install_name_tool -change $X @executable_path/../Frameworks/$Y $LIBFILE
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo ">>> Creating Tahoma-osx.dmg"
|
||||
|
||||
$QTDIR/bin/macdeployqt $TOONZDIR/Tahoma.app -dmg -verbose=0
|
||||
|
||||
mv $TOONZDIR/Tahoma.dmg $TOONZDIR/../../Tahoma-osx.dmg
|
3
thirdparty/canon/.gitignore
vendored
3
thirdparty/canon/.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
Header/*
|
||||
library/*
|
||||
library/*
|
||||
Framework/*
|
|
@ -159,6 +159,7 @@ elseif(BUILD_ENV_APPLE)
|
|||
message("PLATFORM:" ${PLATFORM})
|
||||
if(PLATFORM EQUAL 64)
|
||||
set(QT_PATH "~/Qt5.9.2/5.9.2/clang_64/lib" CACHE PATH "Qt installation directory")
|
||||
# set(QT_PATH "/usr/local/Cellar/qt/5.15.0/lib" CACHE PATH "Qt installation directory")
|
||||
set(QT_LIB_PATH "${QT_PATH}/")
|
||||
set(CMAKE_PREFIX_PATH "${QT_LIB_PATH}cmake/")
|
||||
|
||||
|
@ -284,7 +285,9 @@ if(BUILD_ENV_MSVC)
|
|||
elseif(BUILD_ENV_UNIXLIKE)
|
||||
find_package(OpenCV 3.2 REQUIRED)
|
||||
else()
|
||||
find_package(OpenCV 4.1 REQUIRED)
|
||||
find_package(OpenCV 4.1 REQUIRED
|
||||
# PATHS "/Users/turtletooth/opencv_build/"
|
||||
)
|
||||
endif()
|
||||
include_directories(
|
||||
${SDKROOT}/libjpeg-turbo64/include
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "../toonz/tapp.h"
|
||||
#include "tsystem.h"
|
||||
#include "tsound.h"
|
||||
#include "tenv.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QDir>
|
||||
|
@ -36,6 +37,14 @@ bool Ffmpeg::checkFfmpeg() {
|
|||
Preferences::instance()->setValue(ffmpegPath, QDir::currentPath());
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef MACOSX
|
||||
path = QDir::currentPath() + "/" + QString::fromStdString(TEnv::getApplicationFileName()) + ".app/ffmpeg/ffmpeg";
|
||||
if (TSystem::doesExistFileOrLevel(TFilePath(path))) {
|
||||
Preferences::instance()->setValue(ffmpegPath, QDir::currentPath() + "/" + QString::fromStdString(TEnv::getApplicationFileName()) + ".app/ffmpeg/");
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// give up
|
||||
return false;
|
||||
|
@ -58,6 +67,14 @@ bool Ffmpeg::checkFfprobe() {
|
|||
Preferences::instance()->setValue(ffmpegPath, QDir::currentPath());
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef MACOSX
|
||||
path = QDir::currentPath() + "/" + QString::fromStdString(TEnv::getApplicationFileName()) + ".app/ffmpeg/ffprobe";
|
||||
if (TSystem::doesExistFileOrLevel(TFilePath(path))) {
|
||||
Preferences::instance()->setValue(ffmpegPath, QDir::currentPath() + "/" + QString::fromStdString(TEnv::getApplicationFileName()) + ".app/ffmpeg/");
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// give up
|
||||
return false;
|
||||
|
@ -495,4 +512,4 @@ void Ffmpeg::cleanUpFiles() {
|
|||
|
||||
void Ffmpeg::disablePrecompute() {
|
||||
Preferences::instance()->setPrecompute(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -531,7 +531,7 @@ if(BUILD_ENV_APPLE)
|
|||
endforeach()
|
||||
|
||||
add_custom_command(TARGET Tahoma 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 Tahoma POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tcleanup> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tcleanup)
|
||||
add_custom_command(TARGET Tahoma POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tconverter> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tconverter)
|
||||
add_custom_command(TARGET Tahoma POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tfarmcontroller> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tfarmcontroller)
|
||||
add_custom_command(TARGET Tahoma POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tfarmserver> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tfarmserver)
|
||||
|
|
Loading…
Reference in a new issue