Skip to content

Commit 91c99af

Browse files
committed
Merge branch 'main' into v1.0.0-rc.4-dev
2 parents 9623be1 + bed3464 commit 91c99af

13 files changed

Lines changed: 125 additions & 130 deletions

docs

Submodule docs updated 113 files

src/app/CMakeLists.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ endif()
411411

412412
if(UNIX AND NOT APPLE)
413413
option(INSTALL_DOCS "Install documentation on Linux/BSD" ON)
414+
#option(INSTALL_OFFLINE_DOCS "Install offline documentation on Linux/BSD" OFF)
414415
target_link_libraries(
415416
${PROJECT_NAME}
416417
PRIVATE
@@ -487,11 +488,13 @@ if(UNIX AND NOT APPLE)
487488
DESTINATION
488489
${CMAKE_INSTALL_DOCDIR}
489490
)
490-
install(
491-
DIRECTORY
492-
${CMAKE_CURRENT_SOURCE_DIR}/../../docs/offline/
493-
DESTINATION
494-
${CMAKE_INSTALL_DOCDIR}/html
495-
)
491+
#if(${INSTALL_OFFLINE_DOCS})
492+
# install(
493+
# DIRECTORY
494+
# ${CMAKE_CURRENT_SOURCE_DIR}/../../docs/offline/
495+
# DESTINATION
496+
# ${CMAKE_INSTALL_DOCDIR}/html
497+
# )
498+
#endif()
496499
endif()
497500
endif()

src/core/appsupport.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@ void AppSupport::setFont(const QString &path)
14741474

14751475
QString AppSupport::getOfflineDocs()
14761476
{
1477-
#ifdef Q_OS_LINUX
1477+
/*#ifdef Q_OS_LINUX
14781478
if (isFlatpak()) {
14791479
// we can't have offline docs in a flatpak
14801480
return QString();
@@ -1486,7 +1486,8 @@ QString AppSupport::getOfflineDocs()
14861486
for (const auto &path : paths) {
14871487
qDebug() << "Checking for docs ..." << path;
14881488
if (QFile::exists(path)) { return path; }
1489-
}
1489+
}*/
1490+
// offline docs are currently disabled
14901491
return QString();
14911492
}
14921493

src/scripts/build.sh

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
#
77
# This program is free software: you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by
9-
# the Free Software Foundation, either version 3 of the License, or
10-
# (at your option) any later version.
9+
# the Free Software Foundation, version 3.
1110
#
1211
# This program is distributed in the hope that it will be useful,
1312
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,6 +17,8 @@
1817
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1918
#
2019

20+
# This is just a run_docker.sh wrapper for GitHub Actions CI
21+
2122
set -e -x
2223

2324
CWD=`pwd`
@@ -26,29 +27,9 @@ COMMIT=${COMMIT:-`git rev-parse --short=8 HEAD`}
2627
BRANCH=${BRANCH:-`git rev-parse --abbrev-ref HEAD`}
2728
CUSTOM=${CUSTOM:-"CI"}
2829
HEAD_REPO_URL=${HEAD_REPO_URL:-""}
29-
3030
REL=${REL:-0}
31-
APPIMG=20240401
32-
SDK=1.0.0
33-
URL=https://github.com/friction2d/friction-sdk/releases/download/v${SDK}
34-
APPIMAGE_TAR=friction-appimage-tools-${APPIMG}.tar.xz
35-
SDK_TAR=friction-sdk-${SDK}r9-linux-x86_64.tar.xz
36-
37-
mkdir -p distfiles/sdk || true
38-
39-
cd distfiles
40-
if [ ! -d "linux" ]; then
41-
if [ ! -f "${APPIMAGE_TAR}" ]; then
42-
wget ${URL}/${APPIMAGE_TAR}
43-
fi
44-
tar xvf ${APPIMAGE_TAR}
45-
fi
46-
47-
cd sdk
48-
if [ ! -f "${SDK_TAR}" ]; then
49-
wget ${URL}/${SDK_TAR}
50-
fi
51-
52-
cd ${CWD}
31+
DOWNLOAD_SDK=${DOWNLOAD_SDK:-1}
32+
SDK_VERSION=${SDK_VERSION:-"1.0.0"}
33+
SDK_REV=${SDK_REV:-"r11"}
5334

54-
HEAD_REPO_URL=${HEAD_REPO_URL} LOCAL_BUILD=0 MKJOBS=${MKJOBS} REL=${REL} BRANCH=${BRANCH} COMMIT=${COMMIT} CUSTOM=${CUSTOM} ./src/scripts/run_docker.sh
35+
SDK_VERSION=${SDK_VERSION} SDK_REV=${SDK_REV} DOWNLOAD_SDK=${DOWNLOAD_SDK} HEAD_REPO_URL=${HEAD_REPO_URL} LOCAL_BUILD=0 MKJOBS=${MKJOBS} REL=${REL} BRANCH=${BRANCH} COMMIT=${COMMIT} CUSTOM=${CUSTOM} ./src/scripts/run_docker.sh

src/scripts/build_mac.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,19 @@ macdeployqt src/app/Friction.app
8484
rm -f src/app/Friction.app/Contents/Frameworks/{libQt5MultimediaWidgets.5.dylib,libQt5Svg.5.dylib}
8585
rm -rf src/app/Friction.app/Contents/PlugIns/{bearer,iconengines,imageformats,mediaservice,printsupport,styles}
8686

87-
if [ -f "${CWD}/docs/offline/index.html" ]; then
88-
cp -a ${CWD}/docs/offline src/app/Friction.app/Contents/Resources/docs
89-
fi
87+
# disable offline docs for now
88+
#if [ -f "${CWD}/docs/offline/index.html" ]; then
89+
# cp -a ${CWD}/docs/offline src/app/Friction.app/Contents/Resources/docs
90+
#fi
9091

9192
mkdir dmg
9293
mv src/app/Friction.app dmg/
9394
(cd dmg ; ln -sf /Applications Applications)
9495

95-
if [ -f "${CWD}/docs/offline/index.html" ]; then
96-
(cd dmg ; ln -sf Friction.app/Contents/Resources/docs/index.html Documentation.html)
97-
fi
96+
# disable offline docs for now
97+
#if [ -f "${CWD}/docs/offline/index.html" ]; then
98+
# (cd dmg ; ln -sf Friction.app/Contents/Resources/docs/index.html Documentation.html)
99+
#fi
98100

99101
# https://github.com/actions/runner-images/issues/7522
100102
max_tries=10

src/scripts/build_vfxplatform.sh

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
#
77
# This program is free software: you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by
9-
# the Free Software Foundation, either version 3 of the License, or
10-
# (at your option) any later version.
9+
# the Free Software Foundation, version 3.
1110
#
1211
# This program is distributed in the hope that it will be useful,
1312
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -30,29 +29,53 @@ COMMIT=${COMMIT:-""}
3029
TAG=${TAG:-""}
3130
CUSTOM=${CUSTOM:-""}
3231
MKJOBS=${MKJOBS:-4}
33-
SDK_VERSION=${SDK_VERSION:-""}
3432
ONLY_SDK=${ONLY_SDK:-0}
35-
SDK_TAR="${DISTFILES}/sdk/friction-sdk-${SDK_VERSION}r9-linux-x86_64.tar"
33+
DOWNLOAD_SDK=${DOWNLOAD_SDK:-1}
3634
TAR_VERSION=${TAR_VERSION:-""}
3735
HEAD_REPO_URL=${HEAD_REPO_URL:-""}
3836

39-
# Build SDK
37+
SDK_VERSION=${SDK_VERSION:-"1.0.0"}
38+
SDK_REV=${SDK_REV:-"r11"}
39+
SDK_URL=${SDK_URL:-"https://github.com/friction2d/friction-sdk/releases/download/v${SDK_VERSION}"}
40+
SDK_FILE=${SDK_FILE:-"friction-sdk-${SDK_VERSION}${SDK_REV}-linux-x86_64.tar"}
41+
SDK_PATH="${DISTFILES}/sdk/${SDK_FILE}"
42+
43+
APPIMAGE_TOOLS=${APPIMAGE_TOOLS:-"friction-appimage-tools-20240401.tar.xz"}
44+
APPIMAGETOOL_V=${APPIMAGETOOL_V:-"bfe6e0c"}
45+
APPIMAGERUNTIME_V=${APPIMAGERUNTIME_V:-"1bb1157"}
46+
47+
if [ ! -d "${DISTFILES}/sdk" ]; then
48+
mkdir -p ${DISTFILES}/sdk
49+
fi
50+
51+
if [ ! -d "${DISTFILES}/linux" ]; then
52+
(cd ${DISTFILES};
53+
wget ${SDK_URL}/${APPIMAGE_TOOLS}
54+
tar xvf ${APPIMAGE_TOOLS}
55+
)
56+
fi
57+
58+
# Build/Install SDK
4059
if [ ! -d "${SDK}" ]; then
4160
mkdir -p "${SDK}/lib"
4261
mkdir -p "${SDK}/bin"
4362
(cd "${SDK}"; ln -sf lib lib64)
4463
fi
45-
if [ -f "${SDK_TAR}.xz" ]; then
46-
(cd ${SDK}/.. ; tar xf ${SDK_TAR}.xz )
64+
65+
if [ -f "${SDK_PATH}.xz" ] || [ "${DOWNLOAD_SDK}" = 1 ]; then
66+
if [ ! -f "${SDK_PATH}.xz" ]; then
67+
(cd ${DISTFILES}/sdk ; wget ${SDK_URL}/${SDK_FILE}.xz )
68+
fi
69+
(cd ${SDK}/.. ; tar xf ${SDK_PATH}.xz )
4770
else
48-
SDK=${SDK} DISTFILES=${DISTFILES} MKJOBS=${MKJOBS} ${BUILD}/build_vfxplatform_sdk01.sh
49-
SDK=${SDK} DISTFILES=${DISTFILES} MKJOBS=${MKJOBS} ${BUILD}/build_vfxplatform_sdk02.sh
50-
SDK=${SDK} DISTFILES=${DISTFILES} MKJOBS=${MKJOBS} ${BUILD}/build_vfxplatform_sdk03.sh
51-
(cd ${SDK}/.. ;
52-
rm -rf friction/src
53-
tar cvvf ${SDK_TAR} friction
54-
xz -9 ${SDK_TAR}
55-
)
71+
SDK=${SDK} DISTFILES=${DISTFILES} MKJOBS=${MKJOBS} ${BUILD}/build_vfxplatform_sdk01.sh
72+
SDK=${SDK} DISTFILES=${DISTFILES} MKJOBS=${MKJOBS} ${BUILD}/build_vfxplatform_sdk02.sh
73+
SDK=${SDK} DISTFILES=${DISTFILES} MKJOBS=${MKJOBS} ${BUILD}/build_vfxplatform_sdk03.sh
74+
(cd ${SDK}/.. ;
75+
rm -rf friction/src
76+
tar cvvf ${SDK_PATH} friction
77+
xz -9 ${SDK_PATH}
78+
)
5679
fi
5780

5881
if [ "${ONLY_SDK}" = 1 ]; then
@@ -87,4 +110,6 @@ SDK=${SDK} \
87110
DISTFILES=${DISTFILES} \
88111
BUILD=${BUILD} \
89112
VERSION=${VERSION} \
113+
APPIMAGETOOL_V=${APPIMAGETOOL_V} \
114+
APPIMAGERUNTIME_V=${APPIMAGERUNTIME_V} \
90115
${BUILD}/build_vfxplatform_package.sh

src/scripts/build_vfxplatform_friction.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ cmake -G Ninja \
9494
-DCMAKE_PREFIX_PATH=${SDK} \
9595
-DCMAKE_BUILD_TYPE=Release \
9696
-DLINUX_DEPLOY=ON \
97-
-DSKIA_USE_SYSTEM_LIBS=OFF \
98-
-DSKIA_SYNC_EXTERNAL=ON \
99-
-DUSE_EGL=ON \
10097
-DFRICTION_OFFICIAL_RELEASE=${REL_STATUS} \
10198
-DQSCINTILLA_INCLUDE_DIRS=${SDK}/include \
10299
-DQSCINTILLA_LIBRARIES_DIRS=${SDK}/lib \
@@ -107,6 +104,9 @@ cmake -G Ninja \
107104
-DGIT_BRANCH=${GIT_BRANCH} \
108105
-DCUSTOM_BUILD=${CUSTOM} \
109106
-DSKIA_STATIC=ON \
107+
-DBUILD_SKIA=OFF \
108+
-DSKIA_LIB_PATH=${SDK}/lib \
109+
-DSKIA_USE_SYSTEM_LIBS=OFF \
110110
..
111111

112112
VERSION=`cat version.txt`

src/scripts/build_vfxplatform_package.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
#
77
# This program is free software: you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by
9-
# the Free Software Foundation, either version 3 of the License, or
10-
# (at your option) any later version.
9+
# the Free Software Foundation, version 3.
1110
#
1211
# This program is distributed in the hope that it will be useful,
1312
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -27,8 +26,8 @@ VERSION=${VERSION:-""}
2726
APPID="graphics.friction.Friction"
2827
FRICTION_PKG=friction-${VERSION}
2928

30-
APPIMAGETOOL=bfe6e0c
31-
APPIMAGERUNTIME=1bb1157
29+
APPIMAGETOOL_V=${APPIMAGETOOL_V:-"bfe6e0c"}
30+
APPIMAGERUNTIME_V=${APPIMAGERUNTIME_V:-"1bb1157"}
3231

3332
if [ "${VERSION}" = "" ]; then
3433
echo "Missing version"
@@ -202,8 +201,8 @@ ln -sf usr/share/applications/${APPID}.desktop .
202201
ln -sf usr/share/icons/hicolor/256x256/apps/${APPID}.png .
203202
ln -sf usr/share/icons/hicolor/256x256/apps/${APPID}.png .DirIcon
204203
)
205-
tar xf ${DISTFILES}/linux/appimagetool-${APPIMAGETOOL}.tar.bz2
206-
ARCH=x86_64 ./appimagetool/AppRun --verbose --runtime-file=${DISTFILES}/linux/runtime-x86_64-${APPIMAGERUNTIME}.bin ${FRICTION_PORTABLE}
204+
tar xf ${DISTFILES}/linux/appimagetool-${APPIMAGETOOL_V}.tar.bz2
205+
ARCH=x86_64 ./appimagetool/AppRun --verbose --runtime-file=${DISTFILES}/linux/runtime-x86_64-${APPIMAGERUNTIME_V}.bin ${FRICTION_PORTABLE}
207206

208207
cp -a *.AppImage ${DISTFILES}/builds/${VERSION}/
209208

src/scripts/build_vfxplatform_sdk01.sh

Lines changed: 39 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
#
77
# This program is free software: you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by
9-
# the Free Software Foundation, either version 3 of the License, or
10-
# (at your option) any later version.
9+
# the Free Software Foundation, version 3.
1110
#
1211
# This program is distributed in the hope that it will be useful,
1312
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,22 +25,16 @@ clang -v
2625
SDK=${SDK:-"/opt/friction"}
2726
SRC=${SDK}/src
2827
DIST=${DIST:-"/mnt"}
29-
MKJOBS=${MKJOBS:-32}
28+
MKJOBS=${MKJOBS:-4}
3029

3130
NINJA_V=1.11.1
32-
#GN_V=82d673ac
31+
CMAKE_V=3.26.3
3332
UNWIND_V=1.4.0
34-
#GPERF_V=4df0b85
35-
#SKIA_V=4c434dbee3
33+
SKIA_V=386256b297e93bbe06ee82abdcc701357d9ccd99
34+
SKIA_URL=https://github.com/friction2d/skia
3635

3736
NINJA_BIN=${SDK}/bin/ninja
38-
#GN_BIN=${SDK}/bin/gn
39-
40-
#GPERF_DIR=${SDK}/gperftools
41-
#GPERF_LIB=${GPERF_DIR}/.libs/libtcmalloc.a
42-
43-
#SKIA_DIR=${SDK}/skia
44-
#SKIA_LIB=${SKIA_DIR}/out/build/libskia.a
37+
CMAKE_BIN=${SDK}/bin/cmake
4538

4639
STATIC_CFLAGS="-fPIC"
4740
DEFAULT_CFLAGS="-I${SDK}/include"
@@ -76,30 +69,41 @@ if [ ! -f "${NINJA_BIN}" ]; then
7669
cp -a ninja ${NINJA_BIN}
7770
fi # ninja
7871

79-
# gn
80-
# if [ ! -f "${GN_BIN}" ]; then
81-
# cd ${SRC}
82-
# GN_SRC=gn-${GN_V}
83-
# rm -rf ${GN_SRC} || true
84-
# tar xf ${DIST}/${GN_SRC}.tar.xz
85-
# cd ${GN_SRC}
86-
# python build/gen.py
87-
# ${NINJA_BIN} -C out
88-
# cp -a out/gn ${GN_BIN}
89-
# fi # gn
72+
# cmake
73+
if [ ! -f "${CMAKE_BIN}" ]; then
74+
cd ${SRC}
75+
CMAKE_SRC=cmake-${CMAKE_V}
76+
rm -rf ${CMAKE_SRC} || true
77+
tar xf ${DIST}/ffmpeg/${CMAKE_SRC}.tar.gz
78+
cd ${CMAKE_SRC}
79+
./configure ${COMMON_CONFIGURE} --parallel=${MKJOBS} -- -DCMAKE_USE_OPENSSL=OFF
80+
make -j${MKJOBS}
81+
make install
82+
fi # cmake
9083

9184
# skia
92-
# if [ ! -f "${SKIA_LIB}" ]; then
93-
# cd ${SRC}
94-
# SKIA_SRC=skia-${SKIA_V}
95-
# rm -rf ${SKIA_SRC} || true
96-
# rm -rf ${SKIA_DIR} || true
97-
# tar xf ${DIST}/${SKIA_SRC}.tar.xz
98-
# mv ${SKIA_SRC} ${SKIA_DIR}
99-
# cd ${SKIA_DIR}
100-
# ${GN_BIN} gen out/build --args='is_official_build=true is_debug=false cc="clang" cxx="clang++" extra_cflags=["-Wno-error"] target_os="linux" target_cpu="x64" skia_use_system_expat=false skia_use_system_freetype2=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_system_icu=false skia_use_system_harfbuzz=false skia_use_dng_sdk=false'
101-
# ${NINJA_BIN} -C out/build -j${MKJOBS} skia
102-
# fi # skia
85+
if [ ! -f "${SDK}/lib/libskia.a" ]; then
86+
cd ${SRC}
87+
rm -rf skia-${SKIA_V} || true
88+
git clone ${SKIA_URL} skia-${SKIA_V}
89+
cd skia-${SKIA_V}
90+
git checkout ${SKIA_V}
91+
git submodule update -i --recursive
92+
mkdir build
93+
cd build
94+
cmake -G Ninja \
95+
-DCMAKE_INSTALL_PREFIX=${SDK} \
96+
-DCMAKE_CXX_COMPILER=clang++ \
97+
-DCMAKE_C_COMPILER=clang \
98+
-DSKIA_USE_SYSTEM_LIBS=OFF \
99+
-DSKIA_SYNC_EXTERNAL=ON \
100+
-DSKIA_STATIC=ON \
101+
-DSKIA_USE_EGL=ON \
102+
-DLINUX_DEPLOY=ON \
103+
..
104+
cmake --build .
105+
cp -a libskia.a ${SDK}/lib/
106+
fi # skia
103107

104108
# libunwind
105109
if [ ! -f "${SDK}/lib/pkgconfig/libunwind.pc" ]; then
@@ -113,22 +117,4 @@ if [ ! -f "${SDK}/lib/pkgconfig/libunwind.pc" ]; then
113117
make install
114118
fi # libunwind
115119

116-
# gperftools
117-
# if [ ! -f "${GPERF_LIB}" ]; then
118-
# cd ${SRC}
119-
# GPERF_SRC=gperftools-${GPERF_V}
120-
# rm -rf ${GPERF_SRC} || true
121-
# rm -rf ${GPERF_DIR} || true
122-
# tar xf ${DIST}/${GPERF_SRC}.tar.xz
123-
# mv ${GPERF_SRC} ${GPERF_DIR}
124-
# cd ${GPERF_DIR}
125-
# ./autogen.sh
126-
# CC=clang CXX=clang++ \
127-
# CFLAGS="${DEFAULT_CFLAGS}" \
128-
# CXXFLAGS="${DEFAULT_CFLAGS}" \
129-
# LDFLAGS="${DEFAULT_LDFLAGS} -lunwind" \
130-
# ./configure ${STATIC_CONFIGURE} --enable-libunwind
131-
# make -j${MKJOBS}
132-
# fi # gperftools
133-
134120
echo "SDK PART 1 DONE"

0 commit comments

Comments
 (0)