build/windows: Cosmetic changes to crossroad scripts

This commit is contained in:
Bruno
2024-10-27 12:05:12 -03:00
parent c229e43744
commit 752dd40592
2 changed files with 15 additions and 15 deletions

View File

@ -8,13 +8,15 @@ if [ -z "$CROSSROAD_PLATFORM" ]; then
if [ -z "$GITLAB_CI" ]; then if [ -z "$GITLAB_CI" ]; then
# Make the script work locally # Make the script work locally
if [ "$0" != 'build/windows/1_build-deps-crossroad.sh' ] && [ ${PWD/*\//} != 'windows' ]; then if [ "$0" != 'build/windows/1_build-deps-crossroad.sh' ] && [ ${PWD/*\//} != 'windows' ]; then
echo -e '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, read: https://developer.gimp.org/core/setup/build/windows/' echo -e '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, read: https://developer.gimp.org/core/setup/build/windows/'
exit 1 exit 1
elif [ ${PWD/*\//} = 'windows' ]; then elif [ ${PWD/*\//} = 'windows' ]; then
cd ../.. cd ../..
fi fi
export GIT_DEPTH=1 export GIT_DEPTH=1
export GIMP_DIR=$(echo "${PWD##*/}/") export GIMP_DIR=$(echo "${PWD##*/}/")
cd $(dirname $PWD) cd $(dirname $PWD)
fi fi
@ -31,11 +33,11 @@ if [ "$GITLAB_CI" ]; then
git \ git \
ccache \ ccache \
cpio \ cpio \
g++-mingw-w64-x86-64-posix \
gcc-mingw-w64-x86-64-posix \ gcc-mingw-w64-x86-64-posix \
g++-mingw-w64-x86-64-posix \
meson \ meson \
pkg-config \ pkg-config \
python3-distutils \ python3-distutils \
python3-docutils \ python3-docutils \
python3-zstandard \ python3-zstandard \
rpm \ rpm \
@ -82,16 +84,14 @@ self_build ()
# Clone source only if not already cloned or downloaded # Clone source only if not already cloned or downloaded
if [ ! -d "$1" ]; then if [ ! -d "$1" ]; then
git clone --depth $GIT_DEPTH https://gitlab.gnome.org/gnome/$1 git clone --depth $GIT_DEPTH https://gitlab.gnome.org/gnome/$1
else
cd $1 && git pull && cd ..
fi fi
cd $1
git pull
if [ ! -f "$1/_build$ARTIFACTS_SUFFIX/build.ninja" ]; then if [ ! -f "_build$ARTIFACTS_SUFFIX/build.ninja" ]; then
mkdir -p $1/_build$ARTIFACTS_SUFFIX && cd $1/_build$ARTIFACTS_SUFFIX crossroad meson setup _build$ARTIFACTS_SUFFIX $2
crossroad meson setup .. $2
else
cd $1/_build$ARTIFACTS_SUFFIX
fi fi
cd _build$ARTIFACTS_SUFFIX
ninja ninja
ninja install ninja install
ccache --show-stats ccache --show-stats

View File

@ -14,7 +14,9 @@ if [ -z "$GITLAB_CI" ]; then
elif [ ${PWD/*\//} = 'windows' ]; then elif [ ${PWD/*\//} = 'windows' ]; then
cd ../.. cd ../..
fi fi
git submodule update --init git submodule update --init
PARENT_DIR='../' PARENT_DIR='../'
fi fi
@ -65,12 +67,10 @@ export ARTIFACTS_SUFFIX="-cross"
## Build GIMP ## Build GIMP
if [ ! -f "_build$ARTIFACTS_SUFFIX/build.ninja" ]; then if [ ! -f "_build$ARTIFACTS_SUFFIX/build.ninja" ]; then
mkdir -p _build$ARTIFACTS_SUFFIX && cd _build$ARTIFACTS_SUFFIX crossroad meson setup _build$ARTIFACTS_SUFFIX -Dgi-docgen=disabled \
crossroad meson setup .. -Dgi-docgen=disabled \ -Djavascript=disabled -Dvala=disabled
-Djavascript=disabled -Dvala=disabled
else
cd _build$ARTIFACTS_SUFFIX
fi fi
cd _build$ARTIFACTS_SUFFIX
ninja ninja
ninja install ninja install
ccache --show-stats ccache --show-stats