mirror of https://github.com/aseprite/aseprite.git
Move misc/ scripts to laf library
This commit is contained in:
parent
3c4d012210
commit
d8632b6208
|
@ -4,8 +4,7 @@ on:
|
|||
paths:
|
||||
- '.github/workflows/build-auto.yml'
|
||||
- 'build.sh'
|
||||
- 'misc/platform.sh'
|
||||
- 'misc/skia-*.*'
|
||||
- 'laf'
|
||||
jobs:
|
||||
build-auto:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
|
|
@ -38,7 +38,7 @@ jobs:
|
|||
else
|
||||
this_dir="${{ github.workspace }}"
|
||||
fi
|
||||
skia_url=$(source $this_dir/misc/skia-url.sh | xargs)
|
||||
skia_url=$(source $this_dir/laf/misc/skia-url.sh | xargs)
|
||||
skia_file=$(basename $skia_url)
|
||||
curl --ssl-revoke-best-effort -L -o "$skia_file" "$skia_url"
|
||||
unzip "$skia_file" -d skia
|
||||
|
|
6
build.sh
6
build.sh
|
@ -57,7 +57,7 @@ if [ "$1" == "--norun" ] ; then
|
|||
fi
|
||||
|
||||
# Platform.
|
||||
if ! source "$pwd/misc/platform.sh" ; then
|
||||
if ! source "$pwd/laf/misc/platform.sh" ; then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
|
@ -343,7 +343,7 @@ else
|
|||
fi
|
||||
|
||||
# Required Skia for the base branch.
|
||||
skia_tag=$(cat "$pwd/misc/skia-tag.txt" | xargs)
|
||||
skia_tag=$(cat "$pwd/laf/misc/skia-tag.txt" | xargs)
|
||||
possible_skia_dir_name=skia-$(echo $skia_tag | cut -d "-" -f 1)
|
||||
file_skia_dir="$base_branch_name"_skia_dir
|
||||
|
||||
|
@ -402,7 +402,7 @@ if [ ! -d "$skia_library_dir" ] ; then
|
|||
else
|
||||
skia_build=Release
|
||||
fi
|
||||
skia_url=$(bash misc/skia-url.sh $skia_build | xargs)
|
||||
skia_url=$(bash laf/misc/skia-url.sh $skia_build | xargs)
|
||||
skia_file=$(basename $skia_url)
|
||||
if [ ! -f "$skia_dir/$skia_file" ] ; then
|
||||
curl --ssl-revoke-best-effort -L -o "$skia_dir/$skia_file" "$skia_url"
|
||||
|
|
2
laf
2
laf
|
@ -1 +1 @@
|
|||
Subproject commit 221fe5eb36248c11535f6c05c9d906183ebb2b59
|
||||
Subproject commit 55e954313e29e4d0d237015396382ab3f5b3c368
|
|
@ -1,38 +0,0 @@
|
|||
#! /usr/bin/env bash
|
||||
#
|
||||
# Sets some environment variables to known the current platform.
|
||||
# Usage:
|
||||
#
|
||||
# ./misc/platform.sh [--nocl]
|
||||
#
|
||||
# --nocl: For Windows only, it doesn't check the existence of cl.exe compiler in the PATH
|
||||
#
|
||||
|
||||
uname="$(uname)"
|
||||
|
||||
if [[ "$uname" =~ "MINGW32" ]] || [[ "$uname" =~ "MINGW64" ]] || [[ "$uname" =~ "MSYS_NT-10.0" ]] ; then
|
||||
is_win=1
|
||||
cpu=x64
|
||||
|
||||
if [[ "$1" != "--nocl" ]] && ! cl.exe >/dev/null 2>/dev/null ; then
|
||||
echo ""
|
||||
echo "MSVC compiler (cl.exe) not found in PATH"
|
||||
echo ""
|
||||
echo " PATH=$PATH"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
elif [[ "$uname" == "Linux" ]] ; then
|
||||
is_linux=1
|
||||
cpu=$(arch | xargs)
|
||||
if [[ "$cpu" == "x86_64" ]] ; then
|
||||
cpu=x64
|
||||
fi
|
||||
elif [[ "$uname" =~ "Darwin" ]] ; then
|
||||
is_macos=1
|
||||
if [[ $(uname -m) == "arm64" ]]; then
|
||||
cpu=arm64
|
||||
else
|
||||
cpu=x64
|
||||
fi
|
||||
fi
|
|
@ -1 +0,0 @@
|
|||
m124-08a5439a6b
|
|
@ -1,52 +0,0 @@
|
|||
#! /usr/bin/env bash
|
||||
#
|
||||
# Prints the URL to download the Skia version for the given parameters.
|
||||
# Usage:
|
||||
#
|
||||
# ./.skia-url.sh [release|debug] [windows|macos|linux] [x86|x64|arm64]
|
||||
#
|
||||
# The first version will print the URL for the release version of the
|
||||
# current platform.
|
||||
#
|
||||
|
||||
script_dir=$(dirname "${BASH_SOURCE[0]}")
|
||||
skia_tag=$(cat "$script_dir/skia-tag.txt" | xargs)
|
||||
skia_build=Release
|
||||
|
||||
source "$script_dir/platform.sh" --nocl
|
||||
|
||||
while [[ "$1" != "" ]] ; do
|
||||
arg=$(echo $1 | tr '[:upper:]' '[:lower:]')
|
||||
if [[ "$arg" == "x64" ]] ; then
|
||||
cpu=x64
|
||||
elif [[ "$arg" == "x86" ]] ; then
|
||||
cpu=x86
|
||||
elif [[ "$arg" == "arm64" ]] ; then
|
||||
cpu=arm64
|
||||
elif [[ "$arg" == "win" || "$arg" == "windows" ]] ; then
|
||||
is_win=1
|
||||
is_macos=
|
||||
is_linux=
|
||||
elif [[ "$arg" == "macos" || "$arg" == "macosx" || "$arg" == "osx" ]] ; then
|
||||
is_win=
|
||||
is_macos=1
|
||||
is_linux=
|
||||
elif [[ "$arg" == "linux" || "$arg" == "unix" ]] ; then
|
||||
is_win=
|
||||
is_macos=
|
||||
is_linux=1
|
||||
elif [[ "$arg" == "debug" ]] ; then
|
||||
skia_build=Debug
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if [ $is_win ] ; then
|
||||
skia_file=Skia-Windows-$skia_build-$cpu.zip
|
||||
elif [ $is_macos ] ; then
|
||||
skia_file=Skia-macOS-$skia_build-$cpu.zip
|
||||
else
|
||||
skia_file=Skia-Linux-$skia_build-$cpu.zip
|
||||
fi
|
||||
|
||||
echo https://github.com/aseprite/skia/releases/download/$skia_tag/$skia_file
|
Loading…
Reference in New Issue