diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6305384..23f8362 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,6 +60,7 @@ jobs: - name: Build libtiff run: | + export PATH="/usr/local/opt/ccache/libexec:$PATH" cd thirdparty/tiff-4.0.3 CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-lzma make -j $(nproc) @@ -72,6 +73,24 @@ jobs: cmake ../sources -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQT_PATH='/usr/local/opt/qt/lib' ninja -w dupbuild=warn + - name: Create Artifact + run: | + cd toonz/build/toonz + cp -pr ../../../stuff OpenToonz.app/portablestuff + /usr/local/opt/qt/bin/macdeployqt OpenToonz.app -dmg -verbose=1 -always-overwrite \ + -executable=OpenToonz.app/Contents/MacOS/lzocompress \ + -executable=OpenToonz.app/Contents/MacOS/lzodecompress \ + -executable=OpenToonz.app/Contents/MacOS/tcleanup \ + -executable=OpenToonz.app/Contents/MacOS/tcomposer \ + -executable=OpenToonz.app/Contents/MacOS/tconverter \ + -executable=OpenToonz.app/Contents/MacOS/tfarmcontroller \ + -executable=OpenToonz.app/Contents/MacOS/tfarmserver + + - uses: actions/upload-artifact@v1 + with: + name: Opentoonz-${{ runner.os }}-${{ github.sha }} + path: toonz/build/toonz/OpenToonz.dmg + Windows: runs-on: windows-2019 env: diff --git a/toonz/sources/colorfx/CMakeLists.txt b/toonz/sources/colorfx/CMakeLists.txt index 17cf53c..411020d 100644 --- a/toonz/sources/colorfx/CMakeLists.txt +++ b/toonz/sources/colorfx/CMakeLists.txt @@ -26,7 +26,7 @@ add_definitions( ) if(BUILD_ENV_APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libcolorfx.dylib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libcolorfx.dylib") add_dependencies(colorfx tnzcore tnzbase) endif() diff --git a/toonz/sources/image/CMakeLists.txt b/toonz/sources/image/CMakeLists.txt index 4289090..1a42526 100644 --- a/toonz/sources/image/CMakeLists.txt +++ b/toonz/sources/image/CMakeLists.txt @@ -101,7 +101,7 @@ add_definitions( ) if(BUILD_ENV_APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libimage.dylib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libimage.dylib") add_dependencies(image tnzcore tnzbase toonzlib) endif() diff --git a/toonz/sources/sound/CMakeLists.txt b/toonz/sources/sound/CMakeLists.txt index 9201912..f2a5cec 100644 --- a/toonz/sources/sound/CMakeLists.txt +++ b/toonz/sources/sound/CMakeLists.txt @@ -22,7 +22,7 @@ add_definitions( ) if(BUILD_ENV_APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libsound.dylib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libsound.dylib") add_dependencies(sound tnzcore tnzbase toonzlib) endif() diff --git a/toonz/sources/stdfx/CMakeLists.txt b/toonz/sources/stdfx/CMakeLists.txt index 52449bd..aa7cf63 100644 --- a/toonz/sources/stdfx/CMakeLists.txt +++ b/toonz/sources/stdfx/CMakeLists.txt @@ -276,7 +276,7 @@ add_definitions( ) if(BUILD_ENV_APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libtnzstdfx.dylib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtnzstdfx.dylib") add_dependencies(tnzstdfx tnzcore tnzbase toonzlib) endif() diff --git a/toonz/sources/tnzbase/CMakeLists.txt b/toonz/sources/tnzbase/CMakeLists.txt index acfa539..23004d3 100644 --- a/toonz/sources/tnzbase/CMakeLists.txt +++ b/toonz/sources/tnzbase/CMakeLists.txt @@ -163,7 +163,7 @@ qt5_wrap_cpp(SOURCES ${MOC_HEADERS}) add_library(tnzbase SHARED ${HEADERS} ${SOURCES} ${OBJCSOURCES}) if(BUILD_ENV_APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libtnzbase.dylib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtnzbase.dylib") add_dependencies(tnzbase tnzcore) endif() diff --git a/toonz/sources/tnzcore/CMakeLists.txt b/toonz/sources/tnzcore/CMakeLists.txt index 6873c47..b8d7c5d 100644 --- a/toonz/sources/tnzcore/CMakeLists.txt +++ b/toonz/sources/tnzcore/CMakeLists.txt @@ -269,7 +269,7 @@ qt5_wrap_cpp(SOURCES ${MOC_HEADERS}) add_library(tnzcore SHARED ${HEADERS} ${SOURCES}) if(BUILD_ENV_APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libtnzcore.dylib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtnzcore.dylib") endif() add_definitions( diff --git a/toonz/sources/tnzext/CMakeLists.txt b/toonz/sources/tnzext/CMakeLists.txt index f4c8f13..bd1eede 100644 --- a/toonz/sources/tnzext/CMakeLists.txt +++ b/toonz/sources/tnzext/CMakeLists.txt @@ -80,7 +80,7 @@ endif() add_library(tnzext SHARED ${HEADERS} ${SOURCES} ${OBJCSOURCES}) if(BUILD_ENV_APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libtnzext.dylib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtnzext.dylib") add_dependencies(tnzext tnzcore tnzbase) endif() diff --git a/toonz/sources/tnztools/CMakeLists.txt b/toonz/sources/tnztools/CMakeLists.txt index 62ae7a2..1538c97 100644 --- a/toonz/sources/tnztools/CMakeLists.txt +++ b/toonz/sources/tnztools/CMakeLists.txt @@ -119,7 +119,7 @@ add_definitions( ) if(BUILD_ENV_APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libtnztools.dylib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtnztools.dylib") add_dependencies(tnztools tnzcore tnzbase tnzext toonzlib toonzqt) endif() diff --git a/toonz/sources/toonzfarm/tfarm/CMakeLists.txt b/toonz/sources/toonzfarm/tfarm/CMakeLists.txt index 833c4dc..ddcc963 100644 --- a/toonz/sources/toonzfarm/tfarm/CMakeLists.txt +++ b/toonz/sources/toonzfarm/tfarm/CMakeLists.txt @@ -28,7 +28,7 @@ add_definitions( ) if(BUILD_ENV_APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libtfarm.dylib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtfarm.dylib") endif() message("subdir: tfarm") diff --git a/toonz/sources/toonzlib/CMakeLists.txt b/toonz/sources/toonzlib/CMakeLists.txt index 56d6743..28cfc83 100644 --- a/toonz/sources/toonzlib/CMakeLists.txt +++ b/toonz/sources/toonzlib/CMakeLists.txt @@ -335,7 +335,7 @@ qt5_wrap_cpp(SOURCES ${MOC_HEADERS}) add_library(toonzlib SHARED ${HEADERS} ${SOURCES}) if(BUILD_ENV_APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libtoonzlib.dylib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtoonzlib.dylib") add_dependencies(toonzlib tnzcore tnzbase tnzext) endif() diff --git a/toonz/sources/toonzqt/CMakeLists.txt b/toonz/sources/toonzqt/CMakeLists.txt index 3c1a329..2de6f05 100644 --- a/toonz/sources/toonzqt/CMakeLists.txt +++ b/toonz/sources/toonzqt/CMakeLists.txt @@ -219,7 +219,7 @@ qt5_wrap_cpp(SOURCES ${MOC_HEADERS} OPTIONS ${incs}) add_library(toonzqt SHARED ${HEADERS} ${SOURCES} ${RESOURCES}) if(BUILD_ENV_APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libtoonzqt.dylib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtoonzqt.dylib") add_dependencies(toonzqt tnzcore tnzbase tnzext toonzlib sound) endif()