Setup Windows Github Action Builds

This commit is contained in:
manongjohn 2021-04-17 21:45:55 -04:00
parent 63874b4309
commit 3659d3b773
6 changed files with 183 additions and 1 deletions

29
.github/workflows/windows_build.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: Tahoma2D Windows Build
on: [push, pull_request]
jobs:
Windows:
runs-on: windows-2016
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Install Dependencies
run: |
ci-scripts\windows\tahoma-install.bat
- name: Get 3rd Party Apps
run: |
ci-scripts\windows\tahoma-get3rdpartyapps.bat
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Build Tahoma2D
run: |
ci-scripts\windows\tahoma-build.bat
- name: Create Package
run: |
ci-scripts\windows\tahoma-buildpkg.bat
- uses: actions/upload-artifact@v1
with:
name: Tahoma2D-win.zip
path: toonz\build\Tahoma2D-win.zip

View file

@ -0,0 +1,37 @@
cd thirdparty
copy /Y LibJPEG\jpeg-9\jconfig.vc LibJPEG\jpeg-9\jconfig.h
copy /Y tiff-4.0.3\libtiff\tif_config.vc.h tiff-4.0.3\libtiff\tif_config.h
copy /Y tiff-4.0.3\libtiff\tiffconf.vc.h tiff-4.0.3\libtiff\tiffconf.h
copy /Y libpng-1.6.21\scripts\pnglibconf.h.prebuilt libpng-1.6.21\pnglibconf.h
cd ../toonz
IF NOT EXIST build mkdir build
cd build
REM Setup for local builds
set MSVCVERSION="Visual Studio 14 2015"
set BOOST_ROOT=C:\boost\boost_1_61_0
set OPENCV_DIR=C:\opencv\451\build
set QT_PATH=C:\Qt\5.9.7\msvc2015_64
REM These are effective when running from Actions
IF EXIST C:\local\boost_1_74_0 set BOOST_ROOT=C:\local\boost_1_74_0
IF EXIST C:\tools\opencv set OPENCV_DIR=C:\tools\opencv\build
IF EXIST D:\a\tahoma2d\tahoma2d\thirdparty\qt\5.9\msvc2017_64 (
set MSVCVERSION="Visual Studio 15 2017"
set QT_PATH=D:\a\tahoma2d\tahoma2d\thirdparty\qt\5.9\msvc2017_64
)
set WITH_CANON=N
IF EXIST ..\..\thirdparty\canon\Header set WITH_CANON=Y
set WITH_CRASHRPT=N
IF EXIST ..\..\thirdparty\crashrpt\include set WITH_CRASHRPT=Y
cmake ..\sources -G %MSVCVERSION% -Ax64 -DQT_PATH=%QT_PATH% -DBOOST_ROOT=%BOOST_ROOT% -DOpenCV_DIR=%OPENCV_DIR% -DWITH_CANON=%WITH_CANON% -DWITH_CRASHRPT=%WITH_CRASHRPT%
msbuild /property:Configuration=RelWithDebInfo /m /verbosity:minimal ALL_BUILD.vcxproj
cd ../..

View file

@ -0,0 +1,73 @@
cd toonz\build
echo ">>> Creating Tahoma2D directory"
IF EXIST Tahoma2D rmdir /S /Q Tahoma2D
mkdir Tahoma2D
echo ">>> Copy and configure Tahoma2D installation"
copy /y RelWithDebInfo\*.* Tahoma2D
copy /Y ..\..\thirdparty\freeglut\bin\x64\freeglut.dll Tahoma2D
copy /Y ..\..\thirdparty\glew\glew-1.9.0\bin\64bit\glew32.dll Tahoma2D
copy /Y ..\..\thirdparty\libmypaint\dist\64\libiconv-2.dll Tahoma2D
copy /Y ..\..\thirdparty\libmypaint\dist\64\libintl-8.dll Tahoma2D
copy /Y ..\..\thirdparty\libmypaint\dist\64\libjson-c-2.dll Tahoma2D
copy /Y ..\..\thirdparty\libmypaint\dist\64\libmypaint-1-4-0.dll Tahoma2D
copy /Y ..\..\thirdparty\libjpeg-turbo64\dist\turbojpeg.dll Tahoma2D
IF EXIST C:\tools\opencv (
copy /Y "C:\tools\opencv\build\x64\vc14\bin\opencv_world451.dll" Tahoma2D
) ELSE (
copy /Y "C:\opencv\451\build\x64\vc14\bin\opencv_world451.dll" Tahoma2D
)
IF EXIST ..\..\thirdparty\canon\Header (
copy /Y ..\..\thirdparty\canon\Dll\EDSDK.dll Tahoma2D
)
IF EXIST ..\..\thirdparty\crashrpt\include (
copy /Y ..\..\thirdparty\apps\crashrpt\CrashRpt1500.dll Tahoma2D
copy /Y ..\..\thirdparty\apps\crashrpt\CrashSender1500.exe Tahoma2D
copy /Y ..\..\thirdparty\apps\crashrpt\crashrpt_lang.ini Tahoma2D
)
echo ">>> Copying stuff to Tahoma2D\tahomastuff"
mkdir Tahoma2D\tahomastuff
xcopy /Y /E ..\..\stuff Tahoma2D\tahomastuff
IF EXIST ..\..\thirdparty\apps\ffmpeg\bin (
echo ">>> Copying FFmpeg to Tahoma2D\ffmpeg"
IF EXIST Tahoma2D\ffmpeg rmdir /S /Q Tahoma2D\ffmpeg
mkdir Tahoma2D\ffmpeg
copy /Y ..\..\thirdparty\apps\ffmpeg\bin\ffmpeg.exe Tahoma2D\ffmpeg
copy /Y ..\..\thirdparty\apps\ffmpeg\bin\ffprobe.exe Tahoma2D\ffmpeg
)
IF EXIST ..\..\thirdparty\apps\rhubarb (
echo ">>> Copying Rhubarb Lip Sync to Tahoma2D\rhubarb"
IF EXIST Tahoma2D\rhubarb rmdir /S /Q Tahoma2D\rhubarb
mkdir Tahoma2D\rhubarb
copy /Y ..\..\thirdparty\apps\rhubarb\rhubarb.exe Tahoma2D\rhubarb
xcopy /Y /E /I ..\..\thirdparty\apps\rhubarb\res "Tahoma2D\rhubarb\res"
)
echo ">>> Configuring Tahoma2D.exe for deployment"
REM Setup for local builds
set QT_PATH=C:\Qt\5.9.7\msvc2015_64
REM These are effective when running from Actions/Appveyor
IF EXIST D:\a\tahoma2d\tahoma2d\thirdparty\qt\5.9\msvc2017_64 set QT_PATH=D:\a\tahoma2d\tahoma2d\thirdparty\qt\5.9\msvc2017_64
%QT_PATH%\bin\windeployqt.exe Tahoma2D\Tahoma2D.exe
echo ">>> Creating Tahoma2D Windows package"
IF EXIST Tahoma2D-win.zip del Tahoma2D-win.zip
7z a Tahoma2D-win.zip Tahoma2D
cd ../..

View file

@ -0,0 +1,33 @@
cd thirdparty
IF NOT EXIST apps mkdir apps
cd apps
echo * > .gitignore
echo ">>> Getting CrashRpt"
IF EXIST crashrpt rmdir /S /Q crashrpt
curl -fsSL -o crashrpt-tahoma2d-win.zip https://github.com/tahoma2d/crashrpt2/releases/download/v1.5.0.0/crashrpt-tahoma2d-win.zip
7z x crashrpt-tahoma2d-win.zip
rename crashrpt-tahoma2d-win crashrpt
IF EXIST ..\crashrpt\include rmdir /S /Q ..\crashrpt\include
IF EXIST ..\crashrpt\CrashRpt1500.lib del ..\crashrpt\CrashRpt1500.lib
move crashrpt\include ..\crashrpt
move crashrpt\CrashRpt1500.lib ..\crashrpt
echo ">>> Getting FFmpeg"
IF EXIST ffmpeg rmdir /S /Q ffmpeg
curl -fsSL -o ffmpeg-4.3.1-win64-static-lgpl.zip https://github.com/tahoma2d/FFmpeg/releases/download/v4.3.1/ffmpeg-4.3.1-win64-static-lgpl.zip
7z x ffmpeg-4.3.1-win64-static-lgpl.zip
rename ffmpeg-4.3.1-win64-static-lgpl ffmpeg
echo ">>> Getting Rhubarb Lip Sync"
IF EXIST rhubarb rmdir /S /Q rhubarb
curl -fsSL -o rhubarb-lip-sync-tahoma2d-win.zip https://github.com/tahoma2d/rhubarb-lip-sync/releases/download/v1.10.2/rhubarb-lip-sync-tahoma2d-win.zip
7z x rhubarb-lip-sync-tahoma2d-win.zip
rename rhubarb-lip-sync-tahoma2d-win rhubarb
cd ../..

View file

@ -0,0 +1,9 @@
choco install opencv --version=4.5.1
choco install boost-msvc-14.1
REM Install Qt 5.9
curl -fsSL -o Qt5.9.7_msvc2017_64.zip https://github.com/tahoma2d/qt5/releases/download/v5.9.7/Qt5.9.7_msvc2017_64.zip
7z x Qt5.9.7_msvc2017_64.zip
rename Qt5.9.7_msvc2017_64 5.9
mkdir thirdparty\qt
move 5.9 thirdparty\qt

View file

@ -1,3 +1,4 @@
Header/*
library/*
Framework/*
Framework/*
Dll/*