Skip to content

Instantly share code, notes, and snippets.

@alvinhochun
Last active August 16, 2016 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alvinhochun/429129650a38ecd4b3a1d88ef031bb5e to your computer and use it in GitHub Desktop.
Save alvinhochun/429129650a38ecd4b3a1d88ef031bb5e to your computer and use it in GitHub Desktop.
Krita Windows TDM-gcc mingw-w64 build
rem
rem Tentative instructions on building Krita with mingw on Windows.
rem
rem NOTE:
rem I do *not* recommend running this script directly, since it may
rem fail on random steps and it won't stop the script.
rem It's just for reference.
rem
set CMAKE_BIN=D:\Programming\tools\cmake-3.4.3-win32-x86\bin\
set MINGW_GCC_BIN=F:\dev\TDM-GCC-64\bin\
rem python for building Qt
set PYTHON_BIN=C:\Python33\
rem set BUILDROOT=%~dp0
set BUILDROOT=%CD%
set QT_ROOT=%BUILDROOT%\..\qt\qt-everywhere-opensource-src-5.6.0-krita
rem Used for getting .a libs for the prebuilt fftw3
set DLLTOOL_EXE=F:\dev\TDM-GCC-64\x86_64-w64-mingw32\bin\dlltool.exe
set MAKE_JOBS=4
set PATH=%CMAKE_BIN%;%MINGW_GCC_BIN%;%PATH%
set BUILDDIR_DOWNLOAD=%BUILDROOT%\download
set BUILDDIR_INSTALL=%BUILDROOT%\install
set BUILDDIR_QT=%BUILDROOT%\build_qt
set BUILDDIR_3RDPARTY=%BUILDROOT%\build_3rdparty
set BUILDDIR_KRITA=%BUILDROOT%\build_krita
rem replace '\' to '/', and escape whitespaces
set BUILDROOT_CMAKE=%BUILDROOT:\=/%
set BUILDROOT_CMAKE=%BUILDROOT_CMAKE: =\ %
set BUILDDIR_DOWNLOAD_CMAKE=%BUILDDIR_DOWNLOAD:\=/%
set BUILDDIR_DOWNLOAD_CMAKE=%BUILDDIR_DOWNLOAD_CMAKE: =\ %
set BUILDDIR_INSTALL_CMAKE=%BUILDDIR_INSTALL:\=/%
set BUILDDIR_INSTALL_CMAKE=%BUILDDIR_INSTALL_CMAKE: =\ %
mkdir %BUILDDIR_DOWNLOAD%
mkdir %BUILDDIR_INSTALL%
mkdir %BUILDDIR_QT%
mkdir %BUILDDIR_3RDPARTY%
mkdir %BUILDDIR_KRITA%
rem Skips building Qt...
goto build_3rdparty
:build_qt
rem NOTE: Assuming the source is already patched
set OLD_PATH=%PATH%
pushd %BUILDDIR_QT%
set PATH=%PYTHON_BIN%;%QT_ROOT%\qtbase\bin;%QT_ROOT%\gnuwin32\bin;%PATH%
set QMAKESPEC=win32-g++
rem %QT_ROOT%\configure -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtsensors -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtxmlpatterns -no-sql-sqlite -nomake examples -nomake tools -no-compile-examples -no-dbus -no-iconv -no-angle -no-ssl -no-openssl -no-wmf-backend -no-qml-debug -no-libproxy -no-system-proxies -no-nis -no-icu -no-mtdev -opensource -confirm-license -release -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -prefix %BUILDDIR_INSTALL% && ^
rem mingw32-make -j%MAKE_JOBS%
mingw32-make install -j%MAKE_JOBS%
set QT_ROOT=
set QMAKESPEC=
popd
set PATH=%OLD_PATH%
:build_3rdparty
set OLD_PATH=%PATH%
pushd %BUILDDIR_3RDPARTY%
set PATH=%BUILDDIR_INSTALL%\bin;%BUILDDIR_INSTALL%\lib;%PATH%
cmake ..\krita\3rdparty -DEXTERNALS_DOWNLOAD_DIR=%BUILDDIR_DOWNLOAD_CMAKE% -DINSTALL_ROOT=%BUILDDIR_INSTALL_CMAKE% -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo
mingw32-make ext_patch
mingw32-make ext_png2ico
rem gcc should provide pthreads
rem mingw32-make ext_pthreads
mingw32-make ext_boost
mingw32-make ext_eigen3
mingw32-make ext_exiv2
mingw32-make ext_fftw3
rem fftw3: generate .a from .def
rem TODO: Probably should fix these somewhere else?
set FFTW_LIB_DIR=%BUILDDIR_INSTALL%\lib
%DLLTOOL_EXE% -k --output-lib %FFTW_LIB_DIR%\libfftw3-3.a --input-def %FFTW_LIB_DIR%\libfftw3-3.def
%DLLTOOL_EXE% -k --output-lib %FFTW_LIB_DIR%\libfftw3f-3.a --input-def %FFTW_LIB_DIR%\libfftw3f-3.def
%DLLTOOL_EXE% -k --output-lib %FFTW_LIB_DIR%\libfftw3l-3.a --input-def %FFTW_LIB_DIR%\libfftw3l-3.def
mingw32-make ext_ilmbase
mingw32-make ext_jpeg
mingw32-make ext_lcms2
mingw32-make ext_ocio
mingw32-make ext_openexr
mingw32-make ext_png
mingw32-make ext_tiff
mingw32-make ext_gsl
mingw32-make ext_vc
mingw32-make ext_libraw
mingw32-make ext_openjpeg
mingw32-make ext_gettext
mingw32-make ext_kwindowsystem
mingw32-make ext_freetype
mingw32-make ext_poppler
popd
set PATH=%OLD_PATH%
:build_krita_for_real
rem NOTE: Haven't verified yet
set OLD_PATH=%PATH%
pushd %BUILDDIR_KRITA%
set PATH=%BUILDDIR_INSTALL%\bin;%BUILDDIR_INSTALL%\lib;%PATH%
cmake ..\krita -G "MinGW Makefiles" -DBoost_DEBUG=OFF -DBOOST_INCLUDEDIR=%BUILDDIR_INSTALL_CMAKE%/include -DBOOST_DEBUG=ON -DBOOST_ROOT=%BUILDDIR_INSTALL_CMAKE% -DBOOST_LIBRARYDIR=%BUILDDIR_INSTALL_CMAKE%/lib -DCMAKE_INSTALL_PREFIX=%BUILDDIR_INSTALL_CMAKE% -DCMAKE_PREFIX_PATH=%BUILDDIR_INSTALL_CMAKE% -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DHAVE_MEMORY_LEAK_TRACKER=OFF -DPACKAGERS_BUILD=ON -Wno-dev
mingw32-make -j%MAKE_JOBS%
mingw32-make -j%MAKE_JOBS% install
popd
set PATH=%OLD_PATH%
pause
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index 9327a5d..807ab44 100644
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -52,6 +52,10 @@ if (MSVC)
set(PATCH_COMMAND myptch)
endif()
+if (MINGW)
+ set(PATCH_COMMAND myptch)
+endif()
+
if (MSYS)
set(PATCH_COMMAND patch)
set(GLOBAL_PROFILE ${GLOBAL_PROFILE}
@@ -80,6 +84,10 @@ if (MSVC)
add_subdirectory( ext_patch )
add_subdirectory( ext_png2ico )
endif (MSVC)
+if (MINGW)
+ add_subdirectory( ext_patch )
+ add_subdirectory( ext_png2ico )
+endif (MINGW)
add_subdirectory( ext_iconv )
add_subdirectory( ext_gettext )
add_subdirectory( ext_zlib )
diff --git a/3rdparty/ext_boost/CMakeLists.txt b/3rdparty/ext_boost/CMakeLists.txt
index 277780c..0e2a880 100755
--- a/3rdparty/ext_boost/CMakeLists.txt
+++ b/3rdparty/ext_boost/CMakeLists.txt
@@ -46,6 +46,29 @@ if (MSVC)
DEPENDEES install
)
endif()
+elseif(MINGW)
+ ExternalProject_Add(
+ ext_boost
+
+ DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
+ URL http://files.kde.org/krita/build/dependencies/boost_1_55_0.zip
+ URL_MD5 8aca361a4713a1f491b0a5e33fee0f1f
+
+ CONFIGURE_COMMAND <SOURCE_DIR>/bootstrap.bat mingw --prefix=${PREFIX_ext_boost}
+ BUILD_COMMAND <SOURCE_DIR>/b2.exe --with-system --build-dir=build-dir --prefix=${PREFIX_ext_boost} toolset=gcc variant=release link=shared threading=multi architecture=x86 variant=release install
+ INSTALL_COMMAND ""
+ INSTALL_DIR ${EXTPREFIX_boost}
+
+ UPDATE_COMMAND ""
+ ALWAYS 0
+ BUILD_IN_SOURCE 1
+ )
+ ExternalProject_Add_Step(
+ ext_boost
+ post_install
+ COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_boost}/lib/libboost_system-mgw51-mt-1_55.dll ${PREFIX_ext_boost}/bin/
+ DEPENDEES install
+ )
else()
ExternalProject_Add( ext_boost
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
diff --git a/3rdparty/ext_exiv2/CMakeLists.txt b/3rdparty/ext_exiv2/CMakeLists.txt
index c9b3fdc..5c3838d 100755
--- a/3rdparty/ext_exiv2/CMakeLists.txt
+++ b/3rdparty/ext_exiv2/CMakeLists.txt
@@ -6,6 +6,7 @@ ExternalProject_Add( ext_exiv2
URL_MD5 258d4831b30f75a01e0234065c6c2806
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/tzname.patch
+ COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/patch_mingw.patch
INSTALL_DIR ${PREFIX_ext_exiv2}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_exiv2} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DEXIV2_ENABLE_BUILD_SAMPLES=OFF -DEXIV2_ENABLE_BUILD_PO=OFF -DEXIV2_ENABLE_NLS=OFF -DICONV_INCLUDE_DIR=${PREFIX_ext_exiv2}/include
diff --git a/3rdparty/ext_exiv2/patch_mingw.patch b/3rdparty/ext_exiv2/patch_mingw.patch
new file mode 100644
index 0000000..e9cf1c8
--- /dev/null
+++ b/3rdparty/ext_exiv2/patch_mingw.patch
@@ -0,0 +1,25 @@
+diff a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -291,6 +291,9 @@ IF (CYGWIN OR MINGW)
+ TARGET_LINK_LIBRARIES( exiv2lib psapi )
+ ENDIF(CYGWIN OR MINGW)
+
++IF (MINGW)
++ TARGET_LINK_LIBRARIES( exiv2lib ws2_32 )
++ENDIF(MINGW)
+
+ INSTALL( TARGETS exiv2lib ${INSTALL_TARGET_STANDARD_ARGS} )
+
+diff a/src/http.cpp b/src/http.cpp
+--- a/src/http.cpp
++++ b/src/http.cpp
+@@ -53,7 +53,7 @@
+ #include <string.h>
+ #include <windows.h>
+ #include <io.h>
+-#ifndef __MINGW__
++#if !defined(__MINGW__) && !defined(__MINGW32__) && !defined(__MINGW64__)
+ #define snprintf sprintf_s
+ #define write _write
+ #define read _read
diff --git a/3rdparty/ext_expat/CMakeLists.txt b/3rdparty/ext_expat/CMakeLists.txt
index 2a10474..e8c6785 100755
--- a/3rdparty/ext_expat/CMakeLists.txt
+++ b/3rdparty/ext_expat/CMakeLists.txt
@@ -1,6 +1,6 @@
SET(PREFIX_ext_expat "${EXTPREFIX}" )
-if (MSVC)
+if (MSVC OR MINGW)
ExternalProject_Add( ext_expat
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/expat-2.1.0.tar.gz
diff --git a/3rdparty/ext_fftw3/CMakeLists.txt b/3rdparty/ext_fftw3/CMakeLists.txt
index 4743639..76a9266 100755
--- a/3rdparty/ext_fftw3/CMakeLists.txt
+++ b/3rdparty/ext_fftw3/CMakeLists.txt
@@ -33,7 +33,23 @@ if (MSVC)
ALWAYS 0
)
endif()
-else (MSVC)
+elseif (MINGW)
+ ExternalProject_Add( ext_fftw3
+ DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
+ URL http://files.kde.org/krita/build/dependencies/fftw-3.3.4-dll64.zip
+ URL_MD5 c4ec1e6d84e7a8b1cd61121d11d44ee4
+
+ INSTALL_DIR ${PREFIX_ext_fftw3}
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ${CMAKE_COMMAND} -E echo deploying fftw3 64 binary
+ INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/bin ${PREFIX_ext_fftw3}/bin
+ COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/lib ${PREFIX_ext_fftw3}/lib
+ COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/include ${PREFIX_ext_fftw3}/include
+
+ UPDATE_COMMAND ""
+ ALWAYS 0
+ )
+else ()
ExternalProject_Add( ext_fftw3
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/fftw-3.3.4.tar.gz
@@ -47,4 +63,4 @@ ExternalProject_Add( ext_fftw3
UPDATE_COMMAND ""
ALWAYS 0
)
-endif (MSVC)
+endif ()
diff --git a/3rdparty/ext_gettext/CMakeLists.txt b/3rdparty/ext_gettext/CMakeLists.txt
index e2bd0d5..9cd83d4 100644
--- a/3rdparty/ext_gettext/CMakeLists.txt
+++ b/3rdparty/ext_gettext/CMakeLists.txt
@@ -1,5 +1,5 @@
SET(PREFIX_ext_gettext "${EXTPREFIX}" )
-if (MSVC)
+if (MSVC OR MINGW)
ExternalProject_Add(
ext_gettext
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
@@ -14,7 +14,7 @@ ExternalProject_Add(
ALWAYS 0
DEPENDS ext_patch ext_iconv
)
-else (MSVC)
+else (MSVC OR MINGW)
ExternalProject_Add( ext_gettext
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/gettext-0.19.6.tar.gz
@@ -29,4 +29,4 @@ ExternalProject_Add( ext_gettext
ALWAYS 0
DEPENDS ext_iconv
)
-endif (MSVC)
+endif (MSVC OR MINGW)
diff --git a/3rdparty/ext_gsl/CMakeLists.txt b/3rdparty/ext_gsl/CMakeLists.txt
index ff3a621..38f32ce 100644
--- a/3rdparty/ext_gsl/CMakeLists.txt
+++ b/3rdparty/ext_gsl/CMakeLists.txt
@@ -2,7 +2,7 @@
# From https://github.com/ampl/gsl. which adds CMake support to gsl
#
SET(EXTPREFIX_gsl "${EXTPREFIX}" )
-if (MSVC)
+if (MSVC OR MINGW)
ExternalProject_Add(
ext_gsl
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
diff --git a/3rdparty/ext_iconv/CMakeLists.txt b/3rdparty/ext_iconv/CMakeLists.txt
index 4fc37fa..4087a29 100755
--- a/3rdparty/ext_iconv/CMakeLists.txt
+++ b/3rdparty/ext_iconv/CMakeLists.txt
@@ -1,5 +1,5 @@
SET(PREFIX_ext_iconv "${EXTPREFIX}" )
-if (MSVC)
+if (MSVC OR MINGW)
ExternalProject_Add( ext_iconv
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/win-iconv-0.0.6.tar.bz2
diff --git a/3rdparty/ext_ilmbase/CMakeLists.txt b/3rdparty/ext_ilmbase/CMakeLists.txt
index ebf00e8..881965e 100755
--- a/3rdparty/ext_ilmbase/CMakeLists.txt
+++ b/3rdparty/ext_ilmbase/CMakeLists.txt
@@ -22,3 +22,16 @@ if (MSVC)
DEPENDEES install
)
endif()
+
+if (MINGW)
+ ExternalProject_Add_Step(
+ ext_ilmbase
+ post_install
+ COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_ilmbase}/lib/libHalf.dll ${PREFIX_ext_ilmbase}/bin/libHalf.dll
+ COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_ilmbase}/lib/libIex.dll ${PREFIX_ext_ilmbase}/bin/libIex.dll
+ COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_ilmbase}/lib/libImath.dll ${PREFIX_ext_ilmbase}/bin/libImath.dll
+ COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_ilmbase}/lib/libIlmThread.dll ${PREFIX_ext_ilmbase}/bin/libIlmThread.dll
+ COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_ilmbase}/lib/libIexMath.dll ${PREFIX_ext_ilmbase}/bin/libIexMath.dll
+ DEPENDEES install
+ )
+endif()
diff --git a/3rdparty/ext_jpeg/CMakeLists.txt b/3rdparty/ext_jpeg/CMakeLists.txt
index b33122d..b8ff081 100755
--- a/3rdparty/ext_jpeg/CMakeLists.txt
+++ b/3rdparty/ext_jpeg/CMakeLists.txt
@@ -1,5 +1,5 @@
SET(PREFIX_ext_jpeg "${EXTPREFIX}" )
-if (MSVC)
+if (MSVC OR MINGW)
ExternalProject_Add( ext_jpeg
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/libjpeg-turbo-1.4.2.tar.gz
diff --git a/3rdparty/ext_lcms2/CMakeLists.txt b/3rdparty/ext_lcms2/CMakeLists.txt
index 5945813..83eea57 100755
--- a/3rdparty/ext_lcms2/CMakeLists.txt
+++ b/3rdparty/ext_lcms2/CMakeLists.txt
@@ -1,5 +1,5 @@
SET(PREFIX_ext_lcms2 "${EXTPREFIX}" )
-if (MSVC)
+if (MSVC OR MINGW)
ExternalProject_Add( ext_lcms2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/lcms2-2.7.tar.gz
@@ -13,7 +13,7 @@ ExternalProject_Add( ext_lcms2
ALWAYS 0
DEPENDS ext_patch
)
-else (MSVC)
+else (MSVC OR MINGW)
ExternalProject_Add( ext_lcms2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/lcms2-2.7.tar.gz
@@ -26,4 +26,4 @@ ExternalProject_Add( ext_lcms2
UPDATE_COMMAND ""
ALWAYS 0
)
-endif (MSVC)
+endif (MSVC OR MINGW)
diff --git a/3rdparty/ext_libxml2/CMakeLists.txt b/3rdparty/ext_libxml2/CMakeLists.txt
index 9e05a22..b5a0844 100755
--- a/3rdparty/ext_libxml2/CMakeLists.txt
+++ b/3rdparty/ext_libxml2/CMakeLists.txt
@@ -1,5 +1,5 @@
SET(PREFIX_ext_libxml2 "${EXTPREFIX}" )
-if (MSVC)
+if (MSVC OR MINGW)
ExternalProject_Add( ext_libxml2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/libxml2-2.8.0.tar.gz
@@ -13,7 +13,7 @@ if (MSVC)
ALWAYS 0
DEPENDS ext_patch ext_iconv ext_zlib
)
-else (MSVC)
+else (MSVC OR MINGW)
ExternalProject_Add( ext_libxml2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/libxml2-2.8.0.tar.gz
@@ -28,4 +28,4 @@ else (MSVC)
ALWAYS 0
DEPENDS ext_iconv ext_zlib
)
-endif (MSVC)
+endif (MSVC OR MINGW)
diff --git a/3rdparty/ext_libxslt/CMakeLists.txt b/3rdparty/ext_libxslt/CMakeLists.txt
index 770e8b7..3b3bfa1 100755
--- a/3rdparty/ext_libxslt/CMakeLists.txt
+++ b/3rdparty/ext_libxslt/CMakeLists.txt
@@ -1,5 +1,5 @@
SET(PREFIX_ext_libxslt "${EXTPREFIX}" )
-if (MSVC)
+if (MSVC OR MINGW)
ExternalProject_Add( ext_libxslt
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/libxslt-1.1.26.tar.gz
@@ -13,7 +13,7 @@ ExternalProject_Add( ext_libxslt
ALWAYS 0
DEPENDS ext_patch ext_libxml2
)
-else (MSVC)
+else (MSVC OR MINGW)
ExternalProject_Add( ext_libxslt
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/libxslt-1.1.26.tar.gz
@@ -27,4 +27,4 @@ ExternalProject_Add( ext_libxslt
ALWAYS 0
DEPENDS ext_libxml2
)
-endif (MSVC)
+endif (MSVC OR MINGW)
diff --git a/3rdparty/ext_ocio/CMakeLists.txt b/3rdparty/ext_ocio/CMakeLists.txt
index eb72328..b2037a7 100644
--- a/3rdparty/ext_ocio/CMakeLists.txt
+++ b/3rdparty/ext_ocio/CMakeLists.txt
@@ -4,7 +4,7 @@
# ocio on Windows.
#
SET(EXTPREFIX_ocio "${EXTPREFIX}" )
-if (MSVC)
+if (MSVC OR MINGW)
ExternalProject_Add(
ext_ocio
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
@@ -12,6 +12,7 @@ ExternalProject_Add(
URL_MD5 e0bc2c7177dc02bdc82e8f38f52b1058
INSTALL_DIR ${EXTPREFIX_ocio}
+ PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/patch_mingw.patch
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_ocio} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_TRUELIGHT=OFF -DOCIO_BUILD_NUKE=OFF -DOCIO_BUILD_DOCS=OFF -DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYGLUE=OFF -DOCIO_BUILD_STATIC_JNIGLUE=OFF
UPDATE_COMMAND ""
diff --git a/3rdparty/ext_ocio/patch_mingw.patch b/3rdparty/ext_ocio/patch_mingw.patch
new file mode 100644
index 0000000..fb6147f
--- /dev/null
+++ b/3rdparty/ext_ocio/patch_mingw.patch
@@ -0,0 +1,44 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 13e2d64..47b5297 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -171,7 +171,7 @@ else(USE_EXTERNAL_TINYXML)
+ INSTALL_DIR ext/dist
+ CMAKE_ARGS ${TINYXML_CMAKE_ARGS}
+ )
+- if(WIN32)
++ if(MSVC)
+ set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/tinyxml.lib)
+ else()
+ set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libtinyxml.a)
+@@ -211,7 +211,7 @@ else(USE_EXTERNAL_YAML)
+ )
+ set(YAML_CPP_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ext/dist/include)
+ set(YAML_CPP_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib)
+- if(WIN32)
++ if(MSVC)
+ set(YAML_CPP_STATIC_DEBUG_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libyaml-cppmdd.lib)
+ set(YAML_CPP_STATIC_OPTIMIZED_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libyaml-cppmd.lib)
+ else()
+@@ -271,7 +271,7 @@ endif()
+ messageonce("SSE Optimizations: ${OCIO_USE_SSE}")
+
+ if(OCIO_USE_SSE)
+- if(WIN32)
++ if(MSVC)
+ # SSE instructions are automatically compiled into 64-bit applications so enabling the option is redundant and
+ # actually produces an unknown option warning in Visual Studio.
+ if(NOT CMAKE_CL_64)
+diff --git a/src/core/Platform.h b/src/core/Platform.h
+index d2d3f30..e3afa19 100644
+--- a/src/core/Platform.h
++++ b/src/core/Platform.h
+@@ -75,7 +75,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ #define NOMINMAX 1
+
+ // windows - defined for both Win32 and Win64
+-#include <Windows.h>
++#include <windows.h>
+ #include <malloc.h>
+ #include <io.h>
+ #include <tchar.h>
\ No newline at end of file
diff --git a/3rdparty/ext_openexr/CMakeLists.txt b/3rdparty/ext_openexr/CMakeLists.txt
index 8877773..f521905 100755
--- a/3rdparty/ext_openexr/CMakeLists.txt
+++ b/3rdparty/ext_openexr/CMakeLists.txt
@@ -5,6 +5,7 @@ ExternalProject_Add( ext_openexr
URL_MD5 b64e931c82aa3790329c21418373db4e
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/openexr.diff
+ COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/patch_mingw.patch
INSTALL_DIR ${PREFIX_ext_openexr}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_openexr} -DILMBASE_PACKAGE_PREFIX=${PREFIX_ext_openexr} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DNAMESPACE_VERSIONING=OFF
diff --git a/3rdparty/ext_openexr/patch_mingw.patch b/3rdparty/ext_openexr/patch_mingw.patch
new file mode 100644
index 0000000..fd4d8f3
--- /dev/null
+++ b/3rdparty/ext_openexr/patch_mingw.patch
@@ -0,0 +1,31 @@
+--- a/IlmImf/ImfSystemSpecific.h
++++ b/IlmImf/ImfSystemSpecific.h
+@@ -54,7 +54,7 @@
+
+ #ifdef IMF_HAVE_SSE2
+
+-#ifdef __GNUC__
++#if defined(__GNUC__) && !defined(__MINGW__) && !defined(__MINGW32__) && !defined(__MINGW64__)
+ // Causes issues on certain gcc versions
+ //#define EXR_FORCEINLINE inline __attribute__((always_inline))
+ #define EXR_FORCEINLINE inline
+@@ -73,7 +73,7 @@
+ free(ptr);
+ }
+
+-#elif defined _MSC_VER
++#elif defined(_MSC_VER) || defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
+
+ #define EXR_FORCEINLINE __forceinline
+ #define EXR_RESTRICT __restrict
+--- a/IlmImf/ImfOptimizedPixelReading.h
++++ b/IlmImf/ImfOptimizedPixelReading.h
+@@ -70,7 +70,7 @@
+ bool
+ isPointerSSEAligned (const void* EXR_RESTRICT pPointer)
+ {
+- unsigned long trailingBits = ((unsigned long)pPointer) & 15;
++ unsigned long trailingBits = ((unsigned size_t)pPointer) & 15;
+ return trailingBits == 0;
+ }
+
diff --git a/3rdparty/ext_tiff/CMakeLists.txt b/3rdparty/ext_tiff/CMakeLists.txt
index ff6a8fe..361c5f9 100755
--- a/3rdparty/ext_tiff/CMakeLists.txt
+++ b/3rdparty/ext_tiff/CMakeLists.txt
@@ -1,5 +1,5 @@
SET(EXTPREFIX_tiff "${EXTPREFIX}" )
-if (MSVC)
+if (MSVC OR MINGW)
ExternalProject_Add( ext_tiff
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/tiff-4.0.3.tar.gz
@@ -13,7 +13,7 @@ ExternalProject_Add( ext_tiff
ALWAYS 0
DEPENDS ext_patch ext_zlib ext_jpeg
)
-else (MSVC)
+else (MSVC OR MINGW)
ExternalProject_Add( ext_tiff
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/tiff-4.0.3.tar.gz
@@ -27,4 +27,4 @@ ExternalProject_Add( ext_tiff
ALWAYS 0
DEPENDS ext_zlib ext_jpeg
)
-endif (MSVC)
+endif (MSVC OR MINGW)
diff --git a/3rdparty/ext_tiff/tiff-4.0.3-20130124.diff b/3rdparty/ext_tiff/tiff-4.0.3-20130124.diff
index c03a002..e72df95 100755
--- a/3rdparty/ext_tiff/tiff-4.0.3-20130124.diff
+++ b/3rdparty/ext_tiff/tiff-4.0.3-20130124.diff
@@ -54,7 +54,7 @@ new file mode 100644
index 0000000..ee25058
--- /dev/null
+++ b/ConfigureChecks.cmake
-@@ -0,0 +1,181 @@
+@@ -0,0 +1,199 @@
+# configure checks.
+find_package(OpenGL)
+
@@ -157,6 +157,7 @@ index 0000000..ee25058
+check_symbol_exists("int8" "stdint.h" HAVE_INT8)
+check_symbol_exists("int16" "stdint.h" HAVE_INT16)
+check_symbol_exists("int32" "stdint.h" HAVE_INT32)
++check_symbol_exists("int64" "stdint.h" HAVE_INT64)
+
+
+set(PACKAGE "tiff")
@@ -196,12 +197,29 @@ index 0000000..ee25058
+ set(STRIP_SIZE_DEFAULT 8192)
+endif(STRIPCHOP_DEFAULT AND NOT WIN32)
+
-+if(WIN32)
++if(MSVC)
++ set(TIFF_INT8_T "signed char")
++ set(TIFF_UINT8_T "unsigned char")
++ set(TIFF_INT16_T "signed short")
++ set(TIFF_UINT16_T "unsigned short")
++ set(TIFF_INT32_T "signed int")
++ set(TIFF_UINT32_T "unsigned int")
+ set(TIFF_INT64_FORMAT "\"%I64d\"")
+ set(TIFF_INT64_T "signed __int64")
+ set(TIFF_UINT64_FORMAT "\"%I64u\"")
+ set(TIFF_UINT64_T "unsigned __int64")
-+endif(WIN32)
++elseif(MINGW)
++ set(TIFF_INT8_T "signed char")
++ set(TIFF_UINT8_T "unsigned char")
++ set(TIFF_INT16_T "signed short")
++ set(TIFF_UINT16_T "unsigned short")
++ set(TIFF_INT32_T "signed int")
++ set(TIFF_UINT32_T "unsigned int")
++ set(TIFF_INT64_FORMAT "\"%lld\"")
++ set(TIFF_INT64_T "signed long long")
++ set(TIFF_UINT64_FORMAT "\"%llu\"")
++ set(TIFF_UINT64_T "unsigned long long")
++endif()
+
+check_symbol_exists("tm" "sys/time.h" TM_IN_SYS_TIME)
+
@@ -231,10 +249,10 @@ index 0000000..ee25058
+#cmakedefine _LARGE_FILES
+#***************************************************************************************
+
-+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libtiff/tif_config.vc.h ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h @COPYONLY)
-+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libtiff/tiffconf.vc.h ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h @COPYONLY)
-+#configure_file(${CMAKE_SOURCE_DIR}/libtiff/tif_config.h.cmake ${CMAKE_BINARY_DIR}/tif_config.h)
-+#configure_file(${CMAKE_SOURCE_DIR}/libtiff/tiffconf.h.cmake ${CMAKE_BINARY_DIR}/tiffconf.h)
++#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libtiff/tif_config.vc.h ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h @COPYONLY)
++#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libtiff/tiffconf.vc.h ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h @COPYONLY)
++configure_file(${CMAKE_SOURCE_DIR}/libtiff/tif_config.h.cmake ${CMAKE_BINARY_DIR}/tif_config.h)
++configure_file(${CMAKE_SOURCE_DIR}/libtiff/tiffconf.h.cmake ${CMAKE_BINARY_DIR}/tiffconf.h)
+
diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt
new file mode 100644
@@ -311,7 +329,7 @@ new file mode 100644
index 0000000..d3e8f98
--- /dev/null
+++ b/libtiff/tif_config.h.cmake
-@@ -0,0 +1,320 @@
+@@ -0,0 +1,323 @@
+/* libtiff/tif_config.h.in. Generated from configure.ac by autoheader. */
+#ifndef TIF_CONFIG_H
+#define TIF_CONFIG_H
@@ -362,6 +380,9 @@ index 0000000..d3e8f98
+/* Define to 1 if the system has the type `int32'. */
+#cmakedefine HAVE_INT32
+
++/* Define to 1 if the system has the type `int64'. */
++#cmakedefine HAVE_INT64
++
+/* Define to 1 if the system has the type `int8'. */
+#cmakedefine HAVE_INT8
+
@@ -659,42 +680,12 @@ index 2cf1de9..e07ca59 100644
#endif
static void
-diff --git a/libtiff/tiff.h b/libtiff/tiff.h
-index 19b4e79..718f9e9 100644
---- a/libtiff/tiff.h
-+++ b/libtiff/tiff.h
-@@ -65,17 +65,17 @@
- * strings unsigned char*
- */
-
--typedef TIFF_INT8_T int8;
--typedef TIFF_UINT8_T uint8;
-+typedef __int8 int8;
-+typedef unsigned __int8 uint8;
-
--typedef TIFF_INT16_T int16;
--typedef TIFF_UINT16_T uint16;
-+typedef __int16 int16;
-+typedef unsigned __int16 uint16;
-
--typedef TIFF_INT32_T int32;
--typedef TIFF_UINT32_T uint32;
-+typedef __int32 int32;
-+typedef unsigned __int32 uint32;
-
--typedef TIFF_INT64_T int64;
--typedef TIFF_UINT64_T uint64;
-+typedef __int64 int64;
-+typedef unsigned __int64 uint64;
-
- /*
- * Some types as promoted in a variable argument list
diff --git a/libtiff/tiffconf.h.cmake b/libtiff/tiffconf.h.cmake
new file mode 100644
index 0000000..aef040b
--- /dev/null
+++ b/libtiff/tiffconf.h.cmake
-@@ -0,0 +1,103 @@
+@@ -0,0 +1,150 @@
+/*
+ Configuration defines for installed libtiff.
+ This file maintained for backward compatibility. Do not use definitions
@@ -710,9 +701,56 @@ index 0000000..aef040b
+/* Define to 1 if the system has the type `int32'. */
+#cmakedefine HAVE_INT32
+
++/* Define to 1 if the system has the type `int64'. */
++#cmakedefine HAVE_INT64
++
+/* Define to 1 if the system has the type `int8'. */
+#cmakedefine HAVE_INT8
+
++/* Signed 8-bit type */
++#cmakedefine TIFF_INT8_T @TIFF_INT8_T@
++
++/* Unsigned 8-bit type */
++#cmakedefine TIFF_UINT8_T @TIFF_UINT8_T@
++
++/* Signed 16-bit type */
++#cmakedefine TIFF_INT16_T @TIFF_INT16_T@
++
++/* Unsigned 16-bit type */
++#cmakedefine TIFF_UINT16_T @TIFF_UINT16_T@
++
++/* Signed 32-bit type */
++#cmakedefine TIFF_INT32_T @TIFF_INT32_T@
++
++/* Unsigned 32-bit type */
++#cmakedefine TIFF_UINT32_T @TIFF_UINT32_T@
++
++/* Signed 64-bit type formatter */
++#cmakedefine TIFF_INT64_FORMAT @TIFF_INT64_FORMAT@
++
++/* Signed 64-bit type */
++#cmakedefine TIFF_INT64_T @TIFF_INT64_T@
++
++/* Unsigned 64-bit type formatter */
++#cmakedefine TIFF_UINT64_FORMAT @TIFF_UINT64_FORMAT@
++
++/* Unsigned 64-bit type */
++#cmakedefine TIFF_UINT64_T @TIFF_UINT64_T@
++
++/* Signed size type */
++#if defined(_WIN64)
++#define TIFF_SSIZE_T TIFF_INT64_T
++#else
++#define TIFF_SSIZE_T TIFF_INT32_T
++#endif
++
++/* Signed size type formatter */
++#if defined(_WIN64)
++#define TIFF_SSIZE_FORMAT TIFF_INT64_FORMAT
++#else
++#define TIFF_SSIZE_FORMAT "%ld"
++#endif
++
+/* The size of a `int', as computed by sizeof. */
+#cmakedefine SIZEOF_INT @SIZEOF_INT@
+
diff --git a/3rdparty/ext_vc/CMakeLists.txt b/3rdparty/ext_vc/CMakeLists.txt
index d668021..23b652a 100755
--- a/3rdparty/ext_vc/CMakeLists.txt
+++ b/3rdparty/ext_vc/CMakeLists.txt
@@ -5,6 +5,7 @@ ExternalProject_Add( ext_vc
URL_MD5 f2a213ae4bad0dcf4ec6469e4dad41c1
INSTALL_DIR ${PREFIX_ext_vc}
+ PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/vc1.2_malloc_free.patch
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_vc} -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
diff --git a/3rdparty/ext_vc/vc1.2_malloc_free.patch b/3rdparty/ext_vc/vc1.2_malloc_free.patch
new file mode 100644
index 0000000..b257bd3
--- /dev/null
+++ b/3rdparty/ext_vc/vc1.2_malloc_free.patch
@@ -0,0 +1,15 @@
+--- a/common/malloc.h
++++ b/common/malloc.h
+@@ -90,6 +90,12 @@
+ {
+ #ifdef __MIC__
+ _mm_free(p);
++#elif defined(_WIN32)
++# ifdef __GNUC__
++ return __mingw_aligned_free(p);
++# else
++ return _aligned_free(p);
++# endif
+ #else
+ std::free(p);
+ #endif
diff --git a/3rdparty/ext_zlib/CMakeLists.txt b/3rdparty/ext_zlib/CMakeLists.txt
index d2bea61..cd2fa20 100755
--- a/3rdparty/ext_zlib/CMakeLists.txt
+++ b/3rdparty/ext_zlib/CMakeLists.txt
@@ -1,5 +1,5 @@
SET(PREFIX_ext_zlib "${EXTPREFIX}" )
-if (MSVC)
+if (MSVC OR MINGW)
ExternalProject_Add(
ext_zlib
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
diff --git a/plugins/impex/xcf/CMakeLists.txt b/plugins/impex/xcf/CMakeLists.txt
index 0e900ad..34cfedf 100644
--- a/plugins/impex/xcf/CMakeLists.txt
+++ b/plugins/impex/xcf/CMakeLists.txt
@@ -5,7 +5,7 @@ set(XCFTOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/xcftools")
include_directories( ${XCFTOOLS_SOURCE_DIR})
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
- add_definitions(-Wno-undef -Wno-missing-format-attribute -Wno-sign-compare)
+ list(APPEND COMPILE_FLAGS -Wno-undef -Wno-missing-format-attribute -Wno-sign-compare)
endif ()
set(kritaxcfimport_SOURCES
:: This batch script is meant to prepare a Krita package folder to be zipped or
:: to be a base for the installer.
::
:: Just drop it next to the "i" install folder where the dependencies and Krita binaries are.
::
:: TODO: Ask if the user want to make an archive and with which tool
:: TODO: Maybe ask for a custom install folder name?
set MINGW_GCC_BIN=F:\dev\TDM-GCC-64\bin\
set BUILDROOT=%CD%
set BUILDDIR_INSTALL=%BUILDROOT%\install
set PATH=%MINGW_GCC_BIN%;%PATH%
@echo off
if not exist %BUILDDIR_INSTALL% (
echo Cannot find the install folder!
pause
exit /B
)
set /P pkg_root=Insert krita package name:
if [%pkg_root%] == [] (
echo You entered an empty name!
pause
exit /B
)
:: Initial folder setup
mkdir %pkg_root%
mkdir %pkg_root%\bin
mkdir %pkg_root%\lib
mkdir %pkg_root%\share
:: Bin folder
copy %BUILDDIR_INSTALL%\bin\krita.exe %pkg_root%\bin
strip %pkg_root%\bin\krita.exe
copy %BUILDDIR_INSTALL%\bin\*.dll %pkg_root%\bin
strip %pkg_root%\bin\*.dll
copy %BUILDDIR_INSTALL%\lib\*.dll %pkg_root%\bin
strip %pkg_root%\lib\*.dll
xcopy /S /Y /I %BUILDDIR_INSTALL%\lib\plugins\imageformats %pkg_root%\bin\imageformats
strip %pkg_root%\bin\imageformats\*.dll
xcopy /S /Y /I %BUILDDIR_INSTALL%\lib\plugins\kf5 %pkg_root%\bin\kf5
strip %pkg_root%\bin\kf5\*.dll
strip %pkg_root%\bin\kf5\org.kde.kwindowsystem.platforms\*.dll
xcopy /S /Y /I %BUILDDIR_INSTALL%\plugins\platforms\qwindows.dll %pkg_root%\bin\platforms\
strip %pkg_root%\bin\platforms\*.dll
xcopy /Y %BUILDDIR_INSTALL%\plugins\iconengines\*.dll %pkg_root%\bin\iconengines\
strip %pkg_root%\bin\iconengines\*.dll
:: Translations
mkdir %pkg_root%\bin\translations
copy %BUILDDIR_INSTALL%\translations\qt_ca.qm %pkg_root%\bin\translations\qt_ca.qm
copy %BUILDDIR_INSTALL%\translations\qt_cs.qm %pkg_root%\bin\translations\qt_cs.qm
copy %BUILDDIR_INSTALL%\translations\qt_de.qm %pkg_root%\bin\translations\qt_de.qm
copy %BUILDDIR_INSTALL%\translations\qt_en.qm %pkg_root%\bin\translations\qt_en.qm
copy %BUILDDIR_INSTALL%\translations\qt_fi.qm %pkg_root%\bin\translations\qt_fi.qm
copy %BUILDDIR_INSTALL%\translations\qt_he.qm %pkg_root%\bin\translations\qt_hu.qm
copy %BUILDDIR_INSTALL%\translations\qt_it.qm %pkg_root%\bin\translations\qt_it.qm
copy %BUILDDIR_INSTALL%\translations\qt_ja.qm %pkg_root%\bin\translations\qt_ja.qm
copy %BUILDDIR_INSTALL%\translations\qt_ko.qm %pkg_root%\bin\translations\qt_ko.qm
copy %BUILDDIR_INSTALL%\translations\qt_lv.qm %pkg_root%\bin\translations\qt_lv.qm
copy %BUILDDIR_INSTALL%\translations\qt_ru.qm %pkg_root%\bin\translations\qt_ru.qm
copy %BUILDDIR_INSTALL%\translations\qt_sk.qm %pkg_root%\bin\translations\qt_sk.qm
copy %BUILDDIR_INSTALL%\translations\qt_uk.qm %pkg_root%\bin\translations\qt_uk.qm
copy %BUILDDIR_INSTALL%\translations\qt_fr.qm %pkg_root%\bin\translations\qt_fr.qm
:: Lib
xcopy /Y %BUILDDIR_INSTALL%\lib\kritaplugins\*.dll %pkg_root%\lib\kritaplugins\
strip %pkg_root%\lib\kritaplugins\*.dll
:: Share
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\appdata %pkg_root%\share\appdata
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\applications %pkg_root%\share\applications
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\color %pkg_root%\share\color
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\color-schemes %pkg_root%\share\color-schemes
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\doc %pkg_root%\share\doc
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\icons %pkg_root%\share\icons
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\kf5 %pkg_root%\share\kf5
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\krita %pkg_root%\share\krita
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\kritaplugins %pkg_root%\share\kritaplugins
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\kservices5 %pkg_root%\share\kservices5
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\locale %pkg_root%\share\locale
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\man %pkg_root%\share\man
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\mime %pkg_root%\share\mime
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\ocio %pkg_root%\share\ocio
::Link
:: requres admin rights so no
::mklink %pkg_root%\krita.exe bin\krita.exe
pause
@alvinhochun
Copy link
Author

Note: These stuff may be a bit outdated and the patch may not apply cleanly. Since I've merged the vc1.2 branch locally I cannot simply make a clean patch which applies to master cleanly without switching it to vc1.2.

@alvinhochun
Copy link
Author

Patch should now apply cleanly to master

@alvinhochun
Copy link
Author

Remember to install the openmp plugin in tdm-gcc

@alvinhochun
Copy link
Author

Also need to manually copy TDM-GCC-64\bin\libgomp_64-1.dll to install/bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment