diff --git a/.clang-tidy b/.clang-tidy index 39acd0183..8f9c80e58 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -60,6 +60,8 @@ Checks: > -readability-uppercase-literal-suffix WarningsAsErrors: '' CheckOptions: + - key: readability-implicit-bool-conversion.AllowIntegerConditions + value: true - key: readability-implicit-bool-conversion.AllowPointerConditions value: true - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic diff --git a/.github/workflows/build-auto.yml b/.github/workflows/build-auto.yml new file mode 100644 index 000000000..01234d340 --- /dev/null +++ b/.github/workflows/build-auto.yml @@ -0,0 +1,43 @@ +name: build-auto +on: + push: + paths: + - '.github/workflows/build-auto.yml' + - 'build.sh' + - 'laf' +jobs: + build-auto: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, macos-latest, ubuntu-latest] + build_type: [RelWithDebInfo, Debug] + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Install Dependencies + if: runner.os == 'Linux' + shell: bash + run: | + sudo apt-get update -qq + sudo apt-get install -y \ + libpixman-1-dev libfreetype6-dev libharfbuzz-dev zlib1g-dev \ + libx11-dev libxcursor-dev libxi-dev libgl1-mesa-dev libfontconfig1-dev + - uses: aseprite/get-ninja@main + - uses: ilammy/msvc-dev-cmd@v1 + if: runner.os == 'Windows' + - name: Building + shell: bash + run: | + bash build.sh --auto --norun + - name: Running CLI Tests + shell: bash + run: | + if [[ "${{ runner.os }}" == "Linux" ]] ; then + export XVFB=xvfb-run + fi + export ASEPRITE=$PWD/build/bin/aseprite + cd tests + $XVFB bash run-tests.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5cd979271..19d7e214f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,16 +34,14 @@ jobs: shell: bash run: | if [[ "${{ runner.os }}" == "Windows" ]] ; then - choco install wget -y --no-progress - wget https://github.com/aseprite/skia/releases/download/m124-08a5439a6b/Skia-Windows-Release-x64.zip - unzip Skia-Windows-Release-x64.zip -d skia - elif [[ "${{ runner.os }}" == "macOS" ]] ; then - wget https://github.com/aseprite/skia/releases/download/m124-08a5439a6b/Skia-macOS-Release-arm64.zip - unzip Skia-macOS-Release-arm64.zip -d skia + this_dir=$(cygpath "${{ github.workspace }}") else - wget https://github.com/aseprite/skia/releases/download/m124-08a5439a6b/Skia-Linux-Release-x64.zip - unzip Skia-Linux-Release-x64.zip -d skia + this_dir="${{ github.workspace }}" fi + 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 - name: ccache uses: hendrikmuhs/ccache-action@v1.2.17 if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }} diff --git a/.github/workflows/clang_tidy_post.yml b/.github/workflows/clang_tidy_post.yml index 5701e336a..d48e36bbe 100644 --- a/.github/workflows/clang_tidy_post.yml +++ b/.github/workflows/clang_tidy_post.yml @@ -13,6 +13,6 @@ jobs: post-comments: runs-on: ubuntu-latest steps: - - uses: ZedThree/clang-tidy-review/post@v0.20.1 + - uses: ZedThree/clang-tidy-review/post@v0.21.0 with: token: ${{ secrets.CLANG_TIDY_TOKEN }} diff --git a/.gitignore b/.gitignore index 85a86a640..1a52ebe95 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,9 @@ *.res .DS_Store .vs +.vscode tests/_test* build .build +.deps CMakeSettings.json diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 000000000..23e00fea9 --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,98 @@ +# Credits + +Aseprite is being developed and maintained currently by [Igara Studio](https://igara.com/). +The active team of developers is: + +* [David Capello](https://github.com/dacap) +* [Gaspar Capello](https://github.com/Gasparoken) +* [Martín Capello](https://github.com/martincapello) +* [Christian Kaiser](https://github.com/ckaiser) +* [Dante Paola](https://github.com/Liebranca) + +Previous team members that contributed with code/docs/scripts/graphics: + +* [Kacper Woźniak](https://github.com/thkwznk) +* [Joshua Ogunyinka](https://github.com/iamOgunyinka) +* [David Campo](https://github.com/dncampo) + +## Translations + +The translation work of Aseprite is only possible thanks to the +contribution, help, and good will of several translators coordinated +through our Weblate project: + +* [Translation Credits](strings/README.md) + +## Graphics + +Aseprite logo was created by David Capello. Graphics used as background +of [Aseprite home page](https://www.aseprite.org), +on [Steam Store](https://store.steampowered.com/app/431730/Aseprite/), +and [social media channels](https://bsky.app/profile/aseprite.org), +were created by: + +* [Ilija Melentijevic](https://ilkke.net/) + +## Themes + +The default Aseprite font was created by David Capello, and the +default Aseprite theme was introduced in v0.8, originally created by: + +* Ilija Melentijevic + +A modified dark version of this theme was introduced in v1.3-beta1, created by: + +* [Nicolas Desilets](https://twitter.com/MapleGecko) + +These themes are now being maintained by Igara Studio and external +contributors from time to time. + +## Palettes + +Aseprite includes color palettes created by: + +* [Richard "DawnBringer" Fhager](http://pixeljoint.com/p/23821.htm), [DB16](http://pixeljoint.com/forum/forum_posts.asp?TID=12795), [DB32](http://pixeljoint.com/forum/forum_posts.asp?TID=16247) (default Aseprite color palette) +* [Arne Niklas Jansson](http://androidarts.com/), [16 colors](http://androidarts.com/palette/16pal.htm), [32 colors](http://wayofthepixel.net/index.php?topic=15824.msg144494) +* [ENDESGA Studios](https://twitter.com/ENDESGA), [EDG16 and EDG32](https://forums.tigsource.com/index.php?topic=46126.msg1279124#msg1279124), and [other palettes](https://twitter.com/ENDESGA/status/865812366931353600) +* [Hyohnoo Games](https://twitter.com/Hyohnoo), [mail24](https://twitter.com/Hyohnoo/status/797472587974639616) palette +* [Davit Masia](https://twitter.com/DavitMasia), [matriax8c](https://twitter.com/DavitMasia/status/834862452164612096) palette +* [Javier Guerrero](https://twitter.com/Xavier_Gd), [nyx8](https://twitter.com/Xavier_Gd/status/868519467864686594) palette +* [Adigun A. Polack](https://twitter.com/adigunpolack), [AAP-64](http://pixeljoint.com/pixelart/119466.htm), [AAP-Splendor128](http://pixeljoint.com/pixelart/120714.htm), [SimpleJPC-16](http://pixeljoint.com/pixelart/119844.htm), and [AAP-Micro12](http://pixeljoint.com/pixelart/121151.htm) palette +* [PineTreePizza](https://twitter.com/PineTreePizza), [Rosy-42](https://twitter.com/PineTreePizza/status/1006536191955623938) palette + +## Pixel-art Features + +Aseprite tries to replicate some pixel-art algorithms: + +* [Shading Ink](https://aseprite.org/docs/shading/): created as a simplification of GrafX2 shade mode, thanks to Ilija Melentijevic for introducing me to this feature in 2009 +* [RotSprite](http://forums.sonicretro.org/index.php?showtopic=8848&st=15&p=159754&#entry159754) by Xenowhirl. +* [Pixel perfect drawing algorithm](https://deepnight.net/blog/tools/pixel-perfect-drawing/) + by [Sébastien Bénard](https://twitter.com/deepnightfr) and + [Carduus](https://twitter.com/CarduusHimself/status/420554200737935361). + +## Community + +A special thanks to @Outlander for helping us moderating our [Discord server](https://discord.gg/Yb2CeX8). +Thanks to all the people that hung around for such a long time. + +## Contributors + +Thank you everyone who contributed to Aseprite with ideas, patches, +code, bug reports, new features, donations, tutorials, videos, +personal messages, chats, emails, tweets, posts, questions, libraries, +compilers, and any other tools that made this program possible today. + +* Thanks to all [contributors](https://github.com/aseprite/aseprite/graphs/contributors) +* Thanks to all developers and maintainers behind [other open source projects](docs/LICENSES.md) used by Aseprite +* Thanks to all early PayPal donors and donors from our Pledgie Campaign (before Aseprite was commercialized) +* Thanks to every who support our business model: this source-available / sell-binaries combo +* Thanks to schools and [educational institutions](https://aseprite.org/educational) + that are using Aseprite in their classrooms <3 +* Thanks to our family and friends who always support our work + +It's been more years than I can remember, sorry if we missed someone, +please drop me a line to [david@igara.com](mailto:david@igara.com) to +fix something or say hi. We'll try to keep this updated (for past and +future contributors). + +Sincerely, David. diff --git a/CMakeLists.txt b/CMakeLists.txt index af562f8d4..70ea11163 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,7 +243,13 @@ if(USE_SHARED_LIBPNG) add_definitions(${PNG_DEFINITIONS}) else() set(PNG_FOUND ON) - set(PNG_LIBRARY png_static) + + # Skia on Linux includes libpng symbols + if(UNIX AND NOT APPLE AND LAF_BACKEND STREQUAL "skia") + set(PNG_LIBRARY skia) + else() + set(PNG_LIBRARY png_static) + endif() set(PNG_LIBRARIES ${PNG_LIBRARY}) set(PNG_INCLUDE_DIRS ${LIBPNG_DIR} diff --git a/INSTALL.md b/INSTALL.md index 45f8501e7..645d35e99 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -6,7 +6,8 @@ * [Windows dependencies](#windows-dependencies) * [macOS dependencies](#macos-dependencies) * [Linux dependencies](#linux-dependencies) -* [Compiling](#compiling) +* [Automatic Building](#automatic-building) +* [Manual Building](#manual-building) * [Windows details](#windows-details) * [MinGW](#mingw) * [macOS details](#macos-details) @@ -17,11 +18,12 @@ # Platforms You should be able to compile Aseprite successfully on the following -platforms: +platforms (older and newer versions might work): -* Windows 11 + [Visual Studio Community 2022 + Windows 10.0 SDK (the latest version available)](https://imgur.com/a/7zs51IT) (we don't support [MinGW](#mingw)) -* macOS 13.0.1 Ventura + Xcode 14.1 + macOS 11.3 SDK (older version might work) -* Linux Ubuntu Bionic 18.04 + clang 10.0 +* Windows 11 + [Visual Studio Community 2022 + Windows 11 SDK](https://imgur.com/a/7zs51IT) + * *Important*: We don't support [MinGW](#mingw) +* macOS 15.2 Sequoia + Xcode 16.3 + macOS 15.4 SDK +* Linux Ubuntu Focal Fossa 20.04 + clang 12 # Get the source code @@ -49,7 +51,7 @@ clone the repository on Windows. To compile Aseprite you will need: -* The latest version of [CMake](https://cmake.org) (3.16 or greater) +* The latest version of [CMake](https://cmake.org) * [Ninja](https://ninja-build.org) build system * And a compiled version of the `aseprite-m124` branch of the [Skia library](https://github.com/aseprite/skia#readme). @@ -59,25 +61,24 @@ To compile Aseprite you will need: ## Windows dependencies -* Windows 10/11 (we don't support cross-compiling) +* Windows 11 (we don't support cross-compiling) * [Visual Studio Community 2022](https://visualstudio.microsoft.com/downloads/) (we don't support [MinGW](#mingw)) -* The [Desktop development with C++ item + Windows 10.0.18362.0 SDK](https://imgur.com/a/7zs51IT) - from the Visual Studio installer +* The [Desktop development with C++ item + Windows 10.0.26100.0 SDK](https://imgur.com/a/7zs51IT) + from Visual Studio installer ## macOS dependencies -On macOS you will need macOS 11.3 SDK and Xcode 13.1 (older versions -might work). +On macOS you will need macOS 15.4 SDK and Xcode 16.3 (older versions might work). ## Linux dependencies You will need the following dependencies on Ubuntu/Debian: - sudo apt-get install -y g++ clang libc++-dev libc++abi-dev cmake ninja-build libx11-dev libxcursor-dev libxi-dev libgl1-mesa-dev libfontconfig1-dev + sudo apt-get install -y g++ clang cmake ninja-build libx11-dev libxcursor-dev libxi-dev libgl1-mesa-dev libfontconfig1-dev -Or use clang-10 packages (or newer) in case that clang in your distribution is older than clang 10.0: +Or use clang-12 packages (or newer) in case that clang in your distribution is older than clang 12.0: - sudo apt-get install -y clang-10 libc++-10-dev libc++abi-10-dev + sudo apt-get install -y clang-12 On Fedora: @@ -85,13 +86,24 @@ On Fedora: On Arch: - sudo pacman -S gcc clang libc++ cmake ninja libx11 libxcursor mesa-libgl fontconfig libwebp + sudo pacman -S gcc clang cmake ninja libx11 libxcursor mesa-libgl fontconfig libwebp On SUSE: - sudo zypper install gcc-c++ clang libc++-devel libc++abi-devel cmake ninja libX11-devel libXcursor-devel libXi-devel Mesa-libGL-devel fontconfig-devel + sudo zypper install gcc-c++ clang cmake ninja libX11-devel libXcursor-devel libXi-devel Mesa-libGL-devel fontconfig-devel -# Compiling +# Automatic Building + +We offer a new [build script](build.sh) that automates and help you to +compile Aseprite following instructions on screen. This will be the +preferred method for new users and developers to compile Aseprite. + +After you get [get Aseprite code](#get-the-source-code) and install +[its dependencies](#dependencies), you can run [build.cmd](build.cmd) +file on Windows double-clicking it, or [build.sh](build.sh) on macOS or +Linux running it from the terminal from the same Aseprite folder. + +# Manual Building 1. [Get Aseprite code](#get-the-source-code), put it in a folder like `C:\aseprite`, and create a `build` directory inside to leave all @@ -223,7 +235,9 @@ If you have a Retina display, check the following issue: ## Linux details -You need to use clang and libc++ to compile Aseprite: +You can compile Aseprite with gcc or clang. In case that you are using +the [pre-compiled Skia version](https://github.com/aseprite/skia/releases/), +you must use libstdc++ to compile Aseprite: cd aseprite mkdir build @@ -232,8 +246,8 @@ You need to use clang and libc++ to compile Aseprite: export CXX=clang++ cmake \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_CXX_FLAGS:STRING=-stdlib=libc++ \ - -DCMAKE_EXE_LINKER_FLAGS:STRING=-stdlib=libc++ \ + -DCMAKE_CXX_FLAGS:STRING=-stdlib=libstdc++ \ + -DCMAKE_EXE_LINKER_FLAGS:STRING=-stdlib=libstdc++ \ -DLAF_BACKEND=skia \ -DSKIA_DIR=$HOME/deps/skia \ -DSKIA_LIBRARY_DIR=$HOME/deps/skia/out/Release-x64 \ @@ -245,13 +259,6 @@ You need to use clang and libc++ to compile Aseprite: In this case, `$HOME/deps/skia` is the directory where Skia was compiled or uncompressed. -### GCC compiler - -In case that you are using the pre-compiled Skia version, you must use -the clang compiler and libc++ to compile Aseprite. Only if you compile -Skia with GCC, you will be able to compile Aseprite with GCC, and this -is not recommended as you will have a performance penalty doing so. - # Using shared third party libraries If you don't want to use the embedded code of third party libraries diff --git a/README.md b/README.md index 7a54e1bab..724697443 100644 --- a/README.md +++ b/README.md @@ -48,45 +48,14 @@ You can ask for help in: [YouTube](https://www.youtube.com/user/aseprite), [Instagram](https://www.instagram.com/aseprite/). -## Authors - -Aseprite is being developed by [Igara Studio](https://igara.com/): - -* [David Capello](https://davidcapello.com/) -* [Gaspar Capello](https://github.com/Gasparoken) -* [Martín Capello](https://github.com/martincapello) - ## Credits -The default Aseprite theme was introduced in v0.8, created by: +Aseprite was originally created by [David Capello](https://davidcapello.com/) +and is now being developed and maintained by [Igara Studio](https://igara.com/) +and contributors. -* [Ilija Melentijevic](https://ilkke.net/) - -A modified dark version of this theme introduced in v1.3-beta1 was created by: - -* [Nicolas Desilets](https://twitter.com/MapleGecko) -* [David Capello](https://twitter.com/davidcapello) - -Aseprite includes color palettes created by: - -* [Richard "DawnBringer" Fhager](http://pixeljoint.com/p/23821.htm), [16 colors](http://pixeljoint.com/forum/forum_posts.asp?TID=12795), [32 colors](http://pixeljoint.com/forum/forum_posts.asp?TID=16247). -* [Arne Niklas Jansson](http://androidarts.com/), [16 colors](http://androidarts.com/palette/16pal.htm), [32 colors](http://wayofthepixel.net/index.php?topic=15824.msg144494). -* [ENDESGA Studios](https://twitter.com/ENDESGA), [EDG16 and EDG32](https://forums.tigsource.com/index.php?topic=46126.msg1279124#msg1279124), and [other palettes](https://twitter.com/ENDESGA/status/865812366931353600). -* [Hyohnoo Games](https://twitter.com/Hyohnoo), [mail24](https://twitter.com/Hyohnoo/status/797472587974639616) palette. -* [Davit Masia](https://twitter.com/DavitMasia), [matriax8c](https://twitter.com/DavitMasia/status/834862452164612096) palette. -* [Javier Guerrero](https://twitter.com/Xavier_Gd), [nyx8](https://twitter.com/Xavier_Gd/status/868519467864686594) palette. -* [Adigun A. Polack](https://twitter.com/adigunpolack), [AAP-64](http://pixeljoint.com/pixelart/119466.htm), [AAP-Splendor128](http://pixeljoint.com/pixelart/120714.htm), [SimpleJPC-16](http://pixeljoint.com/pixelart/119844.htm), and [AAP-Micro12](http://pixeljoint.com/pixelart/121151.htm) palette. -* [PineTreePizza](https://twitter.com/PineTreePizza), [Rosy-42](https://twitter.com/PineTreePizza/status/1006536191955623938) palette. - -It tries to replicate some pixel-art algorithms: - -* [RotSprite](http://forums.sonicretro.org/index.php?showtopic=8848&st=15&p=159754&#entry159754) by Xenowhirl. -* [Pixel perfect drawing algorithm](https://deepnight.net/blog/tools/pixel-perfect-drawing/) by [Sébastien Bénard](https://twitter.com/deepnightfr) and [Carduus](https://twitter.com/CarduusHimself/status/420554200737935361). - -Thanks to [third-party open source projects](docs/LICENSES.md), to -[contributors](https://www.aseprite.org/contributors/), and all the -people who have contributed ideas, patches, bugs report, feature -requests, donations, and help us to develop Aseprite. +Check the [AUTHORS](AUTHORS.md) file for details about the active team +of developers working on Aseprite. ## License diff --git a/build.sh b/build.sh index ff5882c8d..5aa5dc469 100755 --- a/build.sh +++ b/build.sh @@ -56,31 +56,6 @@ if [ "$1" == "--norun" ] ; then norun=1 fi -# Platform. -if [[ "$(uname)" =~ "MINGW32" ]] || [[ "$(uname)" =~ "MINGW64" ]] || [[ "$(uname)" =~ "MSYS_NT-10.0" ]] ; then - is_win=1 - cpu=x64 - - if ! 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=x64 -elif [[ "$(uname)" =~ "Darwin" ]] ; then - is_macos=1 - if [[ $(uname -m) == "arm64" ]]; then - cpu=arm64 - else - cpu=x64 - fi -fi - # Check utilities. if ! cmake --version >/dev/null ; then echo "" @@ -137,6 +112,23 @@ if [ $run_submodule_update ] ; then echo "Done" fi +# Platform. +if ! source "$pwd/laf/misc/platform.sh" ; then + exit $? +fi + +if [ $is_win ] ; then + # Check MSVC compiler. + if ! 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 +fi + # Create the directory to store the configuration. if [ ! -d "$pwd/.build" ] ; then mkdir "$pwd/.build" @@ -150,25 +142,25 @@ if [ ! -f "$pwd/.build/userkind" ] ; then echo "user" > $pwd/.build/userkind else echo "" - echo "Select what kind of user you are (press U or D keys):" + echo "Select what kind of user you are (press U or D key and then Enter):" echo "" echo " [U]ser: give a try to Aseprite" echo " [D]eveloper: develop/modify Aseprite" echo "" - read -sN 1 -p "[U/D]? " - echo "" - if [[ "$REPLY" == "d" || "$REPLY" == "D" ]] ; then + read -p "[U/D]? " + REPLY=$(echo $REPLY | tr '[:upper:]' '[:lower:]') + if [[ "$REPLY" == "d" || "$REPLY" == "dev" || "$REPLY" == "developer" ]] ; then echo "developer" > $pwd/.build/userkind - elif [[ "$REPLY" == "u" || "$REPLY" == "U" ]] ; then + elif [[ "$REPLY" == "u" || "$REPLY" == "user" ]] ; then echo "user" > $pwd/.build/userkind else - echo "Use U or D keys to select kind of user/build process" + echo "Use U or D keys (and press Enter) to select kind of user/build process" exit 1 fi fi fi -userkind=$(echo -n $(cat $pwd/.build/userkind)) +userkind=$(cat $pwd/.build/userkind) if [ "$userkind" == "developer" ] ; then echo "======================= BUILDING FOR DEVELOPER =======================" else @@ -229,7 +221,7 @@ if [ ! -f "$pwd/.build/builds_dir" ] ; then echo "$builds_dir" > "$pwd/.build/builds_dir" fi # Overwrite $builds_dir variable from the config content. -builds_dir="$(echo -n $(cat $pwd/.build/builds_dir))" +builds_dir="$(cat $pwd/.build/builds_dir)" # List all builds. builds_list="$(mktemp)" @@ -265,7 +257,8 @@ else # New build if [[ "$build_n" == "n" || "$build_n" == "N" ]] ; then read -p "Select build type [RELEASE/debug]? " - if [[ "${REPLY,,}" == "debug" ]] ; then + REPLY=$(echo $REPLY | tr '[:upper:]' '[:lower:]') + if [[ "${REPLY}" == "debug" ]] ; then build_type=Debug new_build_name=aseprite-debug else @@ -348,10 +341,7 @@ else elif git --git-dir="$source_dir/.git" branch --contains "$remote/main" | grep -q "^\* $branch_name\$" ; then base_branch_name=main else - echo "" - echo "Error: Branch $branch_name looks like doesn't belong to main or beta" - echo "" - exit 1 + base_branch_name=$branch_name fi fi @@ -366,15 +356,9 @@ else fi # Required Skia for the base branch. -if [ "$base_branch_name" == "beta" ] ; then - skia_tag=m124-08a5439a6b - file_skia_dir=beta_skia_dir - possible_skia_dir_name=skia-m124 -else - skia_tag=m102-861e4743af - file_skia_dir=main_skia_dir - possible_skia_dir_name=skia -fi +skia_tag=$(cat "$pwd/laf/misc/skia-tag.txt") +possible_skia_dir_name=skia-$(echo $skia_tag | cut -d "-" -f 1) +file_skia_dir="$base_branch_name"_skia_dir # Check Skia dependency. if [ ! -f "$pwd/.build/$file_skia_dir" ] ; then @@ -385,23 +369,33 @@ if [ ! -f "$pwd/.build/$file_skia_dir" ] ; then skia_dir="$HOME/deps/$possible_skia_dir_name" fi + # Set default location if not found if [ ! -d "$skia_dir" ] ; then - echo "" - echo "Skia directory wasn't found." - echo "" - - echo "Select Skia directory to create [$skia_dir]? " - if [ ! $auto ] ; then - read skia_dir_read - if [ "$skia_dir_read" != "" ] ; then - skia_dir="$skia_dir_read" - fi + # Use .deps directory to download Skia for users (which is a + # simple setup). In case of developers we'd prefer the shared + # directory by default. + if [ "$userkind" == "user" ] ; then + skia_dir="$pwd/.deps/$possible_skia_dir_name" + fi + + if [ ! -d "$skia_dir" ] ; then + echo "" + echo "Skia directory wasn't found." + echo "" + + echo "Select Skia directory to create [$skia_dir]? " + if [ ! $auto ] ; then + read skia_dir_read + if [ "$skia_dir_read" != "" ] ; then + skia_dir="$skia_dir_read" + fi + fi + mkdir -p $skia_dir || exit 1 fi - mkdir -p $skia_dir || exit 1 fi echo $skia_dir > "$pwd/.build/$file_skia_dir" fi -skia_dir=$(echo -n $(cat $pwd/.build/$file_skia_dir)) +skia_dir=$(cat $pwd/.build/$file_skia_dir) if [ ! -d "$skia_dir" ] ; then mkdir "$skia_dir" fi @@ -421,27 +415,30 @@ if [ ! -d "$skia_library_dir" ] ; then echo "Skia library wasn't found." echo "" if [ ! $auto ] ; then - read -sN 1 -p "Download pre-compiled Skia automatically [Y/n]? " + read -p "Download pre-compiled Skia automatically [Y/n]? " + # Convert the Enter key as the default option: an empty string + REPLY=$(echo $REPLY | tr '[:upper:]' '[:lower:]') fi - if [[ $auto || "$REPLY" == "" || "$REPLY" == "y" || "$REPLY" == "Y" ]] ; then + if [[ $auto || "$REPLY" == "" || "$REPLY" == "y" || "$REPLY" == "yes" ]] ; then if [[ $is_win && "$build_type" == "Debug" ]] ; then skia_build=Debug else skia_build=Release fi - - 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-libstdc++.zip - fi - skia_url=https://github.com/aseprite/skia/releases/download/$skia_tag/$skia_file + skia_url=$(bash laf/misc/skia-url.sh $skia_build) + skia_file=$(basename $skia_url) if [ ! -f "$skia_dir/$skia_file" ] ; then - curl -L -o "$skia_dir/$skia_file" "$skia_url" + if ! command -v curl >/dev/null 2>&1 ; then + echo "Error: 'curl' command line tool is not available in PATH" + exit 1 + fi + curl --ssl-revoke-best-effort -L -o "$skia_dir/$skia_file" "$skia_url" fi if [ ! -d "$skia_library_dir" ] ; then + if ! command -v unzip >/dev/null 2>&1 ; then + echo "Error: 'unzip' command line tool is not available in PATH" + exit 1 + fi unzip -n -d "$skia_dir" "$skia_dir/$skia_file" fi else @@ -468,7 +465,7 @@ if [ ! -f "$active_build_dir/ninja.build" ] ; then echo "This will take some minutes." echo "" if [ ! $auto ] ; then - read -sN 1 -p "Press any key to continue. " + read -p "Press Enter to continue." fi if [ $is_macos ] ; then diff --git a/data/extensions/aseprite-theme/dark/sheet.png b/data/extensions/aseprite-theme/dark/sheet.png index b35d4a8b5..5496d75ed 100644 Binary files a/data/extensions/aseprite-theme/dark/sheet.png and b/data/extensions/aseprite-theme/dark/sheet.png differ diff --git a/data/extensions/aseprite-theme/dark/theme.xml b/data/extensions/aseprite-theme/dark/theme.xml index 76bf663fc..ba0c797a6 100644 --- a/data/extensions/aseprite-theme/dark/theme.xml +++ b/data/extensions/aseprite-theme/dark/theme.xml @@ -216,7 +216,7 @@ - + @@ -374,6 +374,7 @@ + @@ -485,25 +486,25 @@ - - - - - @@ -706,10 +710,11 @@ - - - - - - @@ -699,10 +703,11 @@ -