Skip to content

Commit d4d5cd8

Browse files
committed
build stuff
1 parent 19ef6fe commit d4d5cd8

File tree

7 files changed

+27
-26
lines changed

7 files changed

+27
-26
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ before_install:
1717
script:
1818
- sudo chmod 777 /opt
1919
- mkdir -p /opt/deploy
20-
- MKJOBS=2 WIN32=0 WIN64=0 QDEPTH=16 HDRI="HDRI" bash share/scripts/travis.sh
20+
- MKJOBS=2 LINUX=1 APT=1 WIN32=0 WIN64=1 QDEPTH=16 HDRI="HDRI" bash share/scripts/travis.sh
2121
- sudo rm -rf build-*
22-
- MKJOBS=2 APT=0 WIN32=0 WIN64=0 QDEPTH=32 bash share/scripts/travis.sh
22+
- MKJOBS=2 LINUX=1 APT=0 WIN32=0 WIN64=0 QDEPTH=32 bash share/scripts/travis.sh
2323
- sudo rm -rf build-*
24-
- MKJOBS=2 APT=0 WIN32=0 WIN64=0 QDEPTH=8 bash share/scripts/travis.sh
24+
- MKJOBS=2 LINUX=1 APT=0 WIN32=1 WIN64=0 QDEPTH=8 bash share/scripts/travis.sh
2525

2626
deploy:
2727
provider: releases

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,16 @@ else()
211211
${RESOURCES})
212212
endif()
213213

214-
target_compile_options(${PROJECT_NAME} PRIVATE ${MAGICK_CFLAGS})
214+
target_compile_options(${PROJECT_NAME} PRIVATE ${MAGICK_STATIC_CFLAGS})
215215
target_link_libraries(
216216
${PROJECT_NAME}
217217
Qt5::Core
218218
Qt5::Gui
219219
Qt5::Widgets
220220
Qt5::Concurrent
221-
${MAGICK_LIBRARIES}
221+
${MAGICK_STATIC_LIBRARIES}
222222
${LCMS2_LIBRARIES}
223-
${MAGICK_LDFLAGS}
223+
${MAGICK_STATIC_LDFLAGS}
224224
${LCMS2_LDFLAGS}
225225
${FONTCONF_LDFLAGS}
226226
)

app/editor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ void Editor::loadSettings()
293293
settings.beginGroup("engine");
294294
CyanCommon::setDiskResource(settings
295295
.value("disk_limit", 0).toInt());
296-
int maxMem = settings.value("memory_limit", 4).toInt();
296+
int maxMem = settings.value("memory_limit", 2).toInt();
297297
CyanCommon::setMemoryResource(maxMem);
298298
settings.endGroup();
299299

app/main.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,19 @@ int main(int argc, char *argv[])
9999
QApplication::setOrganizationDomain(QString("fxarena.net"));
100100
QApplication::setApplicationVersion(QString(CYAN_VERSION));
101101

102+
QString fontconfig;
102103
#ifdef Q_OS_MAC
103-
// setup fontconfig on mac
104-
QString fontconfig = QString("%1/../Resources/etc/fonts").arg(QApplication::applicationDirPath());
105-
if (QFile::exists(fontconfig)) { qputenv("FONTCONFIG_PATH", fontconfig.toUtf8()); }
104+
fontconfig = QString("%1/../Resources/etc/fonts").arg(QApplication::applicationDirPath());
105+
#elif defined (Q_OS_WIN)
106+
fontconfig = QString("%1/etc/fonts").arg(QApplication::applicationDirPath());
107+
#elif defined (Q_OS_LINUX)
108+
fontconfig = QString("%1/../etc/fonts").arg(QApplication::applicationDirPath());
106109
#endif
107-
#ifdef Q_OS_LINUX
108-
// setup fontconfig on linux
109-
QString fontconfig = QString("%1/../etc/fonts").arg(QApplication::applicationDirPath());
110110
if (QFile::exists(fontconfig)) { qputenv("FONTCONFIG_PATH", fontconfig.toUtf8()); }
111-
#endif
112111

113112
#ifndef Q_OS_LINUX
114113
// splash
115-
QSplashScreen splash(QIcon(":/icons/splash.png").pixmap(512,512),
114+
QSplashScreen splash(QIcon(":/icons/hicolor/512x512/apps/Cyan.png").pixmap(512,512),
116115
Qt::SplashScreen);
117116
splash.show();
118117
#endif

share/icons.qrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108
<file>icons/hicolor/16x16/actions/process-stop.png</file>
109109
<file>icons/hicolor/16x16/actions/transform_move.png</file>
110110
<file>icons/hicolor/48x48/apps/Cyan.png</file>
111-
<file>icons/splash.png</file>
112111
<file>icons/paypal.png</file>
113112
<file>icons/GitHub-Mark-Light-32px.png</file>
114113
</qresource>

share/icons/splash.png

-129 KB
Binary file not shown.

share/scripts/travis.sh

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ DATE=`date "+%Y%m%d"`
1515
DISTRO=`cat /etc/os-release | sed '/UBUNTU_CODENAME/!d;s/UBUNTU_CODENAME=//'`
1616
WIN32=${WIN32:-0}
1717
WIN64=${WIN64:-0}
18+
LINUX=${LINUX:-1}
1819
HEIC="no"
1920
QDEPTH=${QDEPTH:-16}
2021
#HDRI=${HDRI:-"HDRI"}
2122
PATH_ORIG=$PATH
22-
SDK_TAR=cyan-mxe-usr-focal-20200810-1.tar.xz
23+
SDK_TAR=cyan-mxe-focal-20200816.tar.xz
2324
SDK_URL=https://github.com/rodlie/cyan/releases/download/1.2.2
24-
SDK_LEGAL=cyan-mxe-legal-20200810.tar.xz
2525
MXE=/opt/cyan-mxe
2626
MAGICK_RELEASE=7.0.10-27
2727
MAGICK_SAFE=7.0.8-34
@@ -34,6 +34,7 @@ PELF="$PKG_DIR/$PREFIX/bin/patchelf"
3434
LIBDEPS="dpkg-shlibdeps --ignore-missing-info"
3535
LIBDIR="lib/x86_64-linux-gnu"
3636
LD_LIBRARY_PATH_ORIG="${LD_LIBRARY_PATH}"
37+
VERSION=`cat ${CWD}/CMakeLists.txt | sed '/Cyan VERSION/!d;s/)//' | awk '{print $3}'`
3738

3839
if [ "${DISTRO}" != "focal" ]; then
3940
WIN32=0
@@ -42,7 +43,7 @@ else
4243
HEIC="yes"
4344
fi
4445

45-
if [ "${LOCAL_BUILD}" = 1 ]; then
46+
if [ "${LOCAL_BUILD}" = 1 ] || [ "${LINUX}" = 0 ]; then
4647
APT=0
4748
fi
4849
if [ "${APT}" = 1 ]; then
@@ -79,7 +80,7 @@ mkdir -p "${PKG_DIR}"
7980
if [ "${DISTRO}" = "xenial" ]; then
8081
MAGICK_RELEASE=$MAGICK_SAFE
8182
fi
82-
if [ ! -d ImageMagick ]; then
83+
if [ ! -d ImageMagick ] && [ "${LINUX}" = 1 ]; then
8384
git clone https://github.com/ImageMagick/ImageMagick
8485
( cd ImageMagick ; git checkout $MAGICK_RELEASE )
8586
fi
@@ -99,6 +100,8 @@ fi
99100
#../patchelf/configure --prefix=${PKG_DIR}/${PREFIX}
100101
#make && make install
101102

103+
if [ "${LINUX}" = 1 ]; then
104+
102105
cd $CWD
103106
if [ "${CLEAN}" = 1 ]; then
104107
ENABLE_HDRI="disable"
@@ -171,7 +174,6 @@ export PKG_CONFIG_PATH=${PKG_DIR}/$PREFIX/lib/x86_64-linux-gnu/pkgconfig
171174
cd $CWD
172175
rm -rf build-cyan || true
173176
mkdir build-cyan && cd build-cyan
174-
VERSION=`cat ../CMakeLists.txt | sed '/Cyan VERSION/!d;s/)//' | awk '{print $3}'`
175177
cmake \
176178
-DCMAKE_BUILD_TYPE=Release \
177179
-DMAGICK_PKG_CONFIG=$MAGICK_TYPE \
@@ -229,6 +231,8 @@ if [ "${PKG_DEB}" = 1 ]; then
229231
fi
230232
fi
231233

234+
fi # if LINUX=1
235+
232236
cd $CWD
233237
# CROSSBUILD FOR WINDOWS
234238

@@ -240,7 +244,6 @@ if [ "${WIN32}" = 1 ] || [ "${WIN64}" = 1 ]; then
240244
tar xf $SDK_TAR -C /opt/cyan-mxe
241245
fi
242246
cd $CWD
243-
wget $SDK_URL/$SDK_LEGAL
244247
fi
245248
if [ "${WIN32}" = 1 ]; then
246249
MXE_TC=i686-w64-mingw32.static
@@ -254,12 +257,12 @@ if [ "${WIN32}" = 1 ]; then
254257
cd $CWD
255258
rm -rf $WIN_BUILD || true
256259
mkdir $WIN_BUILD && cd $WIN_BUILD
257-
$CMAKE -DCMAKE_BUILD_TYPE=Release -DENABLE_FONTCONFIG=ON -DMAGICK_PKG_CONFIG=$MAGICK_TYPE -DCMAKE_INSTALL_PREFIX=/ ..
260+
$CMAKE -DCMAKE_BUILD_TYPE=Release -DMAGICK_PKG_CONFIG=$MAGICK_TYPE -DCMAKE_INSTALL_PREFIX=/ ..
258261
make -j${MKJOBS}
259262
$STRIP -s Cyan.exe
260263
cd $CWD
261264
mkdir -p $WIN_PKG/platforms $WIN_PKG/profiles
262-
tar xf $SDK_LEGAL -C $WIN_PKG
265+
cp -a $MXE/usr/legal $WIN_PKG/
263266
cp $WIN_BUILD/Cyan.exe $WIN_PKG/
264267
cp -a $WIN_BUILD/etc $WIN_PKG/
265268
cp $MXE/usr/$MXE_TC/qt5/plugins/platforms/qwindows.dll $WIN_PKG/platforms/
@@ -284,12 +287,12 @@ if [ "${WIN64}" = 1 ]; then
284287
cd $CWD
285288
rm -rf $WIN_BUILD || true
286289
mkdir $WIN_BUILD && cd $WIN_BUILD
287-
$CMAKE -DCMAKE_BUILD_TYPE=Release -DENABLE_FONTCONFIG=ON -DMAGICK_PKG_CONFIG=$MAGICK_TYPE -DCMAKE_INSTALL_PREFIX=/ ..
290+
$CMAKE -DCMAKE_BUILD_TYPE=Release -DMAGICK_PKG_CONFIG=$MAGICK_TYPE -DCMAKE_INSTALL_PREFIX=/ ..
288291
make -j${MKJOBS}
289292
$STRIP -s Cyan.exe
290293
cd $CWD
291294
mkdir -p $WIN_PKG/platforms $WIN_PKG/profiles
292-
tar xf $SDK_LEGAL -C $WIN_PKG
295+
cp -a $MXE/usr/legal $WIN_PKG/
293296
cp $WIN_BUILD/Cyan.exe $WIN_PKG/
294297
cp -a $WIN_BUILD/etc $WIN_PKG/
295298
cp $MXE/usr/$MXE_TC/qt5/plugins/platforms/qwindows.dll $WIN_PKG/platforms/

0 commit comments

Comments
 (0)