Skip to content

Commit

Permalink
Merge branch 'master' into parallaxe_movement
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlamhauge committed Feb 14, 2024
2 parents c864a83 + 4eb1643 commit 1894169
Show file tree
Hide file tree
Showing 397 changed files with 2,536 additions and 2,759 deletions.
4 changes: 4 additions & 0 deletions .github/actions/create-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ inputs:
arch:
description: Architecture
required: true
qt:
description: Qt Version
required: true
outputs:
output-basename:
description: Output basename
Expand All @@ -17,4 +20,5 @@ runs:
env:
RUNNER_OS: ${{runner.os}}
INPUT_ARCH: ${{inputs.arch}}
INPUT_QT: ${{inputs.qt}}
IS_RELEASE: ${{ github.ref == 'refs/heads/release' }}
40 changes: 25 additions & 15 deletions .github/actions/create-package/create-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,21 @@ platforms/libqwayland-xcomposite-egl.so,platforms/libqwayland-xcomposite-glx.so,
wayland-decoration-client,wayland-graphics-integration-client,wayland-shell-integration \
${update_info} \
-appimage
local output_name="pencil2d-linux-$1-$(date +%F)"
local qtsuffix="-qt${INPUT_QT}"
local output_name="pencil2d${qtsuffix/-qt5/}-linux-$1-$(date +%F)"
mv Pencil2D*.AppImage "$output_name.AppImage"
mv Pencil2D*.AppImage.zsync "$output_name.AppImage.zsync" \
&& sed -i '1,/^$/s/^\(Filename\|URL\): .*$/\1: '"$output_name.AppImage/" "$output_name.AppImage.zsync" \
|| true
echo "::set-output name=output-basename::$output_name"
echo "output-basename=$output_name" >> "${GITHUB_OUTPUT}"
echo "::endgroup::"
}

create_package_macos() {
echo "::group::Clean"
make clean
mv bin Pencil2D
mkdir Pencil2D
mv app/Pencil2D.app Pencil2D/
pushd Pencil2D >/dev/null
echo "::endgroup::"

Expand All @@ -67,46 +69,54 @@ create_package_macos() {
rm ffmpeg.7z ffmpeg.7z.sig
echo "::endgroup::"

echo "Deploy Qt libraries"
echo "::group::Deploy Qt libraries"
macdeployqt Pencil2D.app
echo "::endgroup::"
echo "::group::Apply macdeployqt fix"
curl -fsSLO https://github.com/aurelien-rainone/macdeployqtfix/archive/master.zip
bsdtar xf master.zip
python macdeployqtfix-master/macdeployqtfix.py \
/Library/Frameworks/Python.framework/Versions/2.7/bin/python macdeployqtfix-master/macdeployqtfix.py \
Pencil2D.app/Contents/MacOS/Pencil2D \
/usr/local/Cellar/qt/5.9.1/
echo "::endgroup::"
echo "Remove files"
rm -rf macdeployqtfix-master master.zip
popd >/dev/null
echo "Create ZIP"
bsdtar caf "pencil2d-mac-$1-$(date +%F).zip" Pencil2D
echo "::set-output name=output-basename::pencil2d-mac-$1-$(date +%F)"
local qtsuffix="-qt${INPUT_QT}"
bsdtar caf "pencil2d${qtsuffix/-qt5/}-mac-$1-$(date +%F).zip" Pencil2D
echo "output-basename=pencil2d${qtsuffix/-qt5/}-mac-$1-$(date +%F)" > "${GITHUB_OUTPUT}"
}

create_package_windows() {
echo "::group::Set up application files"
nmake install INSTALL_ROOT="$(cygpath -w "${PWD}/Pencil2D")"
echo "::endgroup::"

echo "Copy FFmpeg plugin"
local platform="${INPUT_ARCH%%_*}"
local ffmpeg="ffmpeg-${platform}.zip"
curl -fsSLO "https://github.com/pencil2d/pencil2d-deps/releases/download/ffmpge-v4.1.1/$ffmpeg"
"${WINDIR}\\System32\\tar" xf "${ffmpeg}"
mkdir bin/plugins
mv "ffmpeg.exe" bin/plugins/
mkdir Pencil2D/plugins
mv "ffmpeg.exe" Pencil2D/plugins/
rm -rf "${ffmpeg}"

mv bin Pencil2D
echo "Remove files"
find \( -name '*.pdb' -o -name '*.ilk' \) -delete
echo "::group::Deploy Qt libraries"
windeployqt Pencil2D/pencil2d.exe
echo "::endgroup::"
echo "Copy OpenSSL DLLs"
local xbits="-x${platform#win}"
local _xbits="_x${platform#win}"
cp "${IQTA_TOOLS}\\OpenSSL\\Win${_xbits/32/86}\\bin\\lib"{ssl,crypto}"-1_1${xbits/-x32/}.dll" Pencil2D/
curl -fsSLO https://download.firedaemon.com/FireDaemon-OpenSSL/openssl-1.1.1w.zip
"${WINDIR}\\System32\\tar" xf openssl-1.1.1w.zip
local xbits="x${platform#win}"
local _xbits="-${xbits}"
cp "openssl-1.1\\${xbits/32/86}\\bin\\lib"{ssl,crypto}"-1_1${_xbits/-x32/}.dll" Pencil2D/
echo "Create ZIP"
"${WINDIR}\\System32\\tar" caf "pencil2d-${platform}-$1-$(date +%F).zip" Pencil2D
echo "::set-output name=output-basename::pencil2d-${platform}-$1-$(date +%F)"
local qtsuffix="-qt${INPUT_QT}"
"${WINDIR}\\System32\\tar" caf "pencil2d${qtsuffix/-qt5/}-${platform}-$1-$(date +%F).zip" Pencil2D
echo "output-basename=pencil2d${qtsuffix/-qt5/}-${platform}-$1-$(date +%F)" > "${GITHUB_OUTPUT}"
}

"create_package_$(echo $RUNNER_OS | tr '[A-Z]' '[a-z]')" "${GITHUB_RUN_NUMBER}"
7 changes: 6 additions & 1 deletion .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ inputs:
arch:
description: Architecture
required: true
qt:
description: Qt Version
required: true
runs:
using: composite
steps:
Expand All @@ -11,8 +14,10 @@ runs:
env:
RUNNER_OS: ${{runner.os}}
INPUT_ARCH: ${{inputs.arch}}
INPUT_QT: ${{inputs.qt}}
- if: runner.os == 'Windows'
uses: jurplel/install-qt-action@v3
with:
arch: ${{inputs.arch}}
tools: tools_openssl_x${{endsWith(inputs.arch, '_64') && '64' || '86'}}
version: ${{matrix.qt == 6 && '6.4.2' || '5.15.2'}}
modules: ${{matrix.qt == 6 && 'qtmultimedia' || ''}}
30 changes: 21 additions & 9 deletions .github/actions/install-dependencies/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,34 @@ setup_linux() {

echo "::group::Add APT sources"
for ppa in ppa:ubuntu-toolchain-r/test ppa:ubuntu-sdk-team/ppa \
ppa:git-core/ppa ppa:beineri/opt-qt-5.15.2-xenial; do
ppa:git-core/ppa; do
apt-add-repository -y "${ppa}"
done
if [ "${INPUT_QT}" -eq 5 ]; then
apt-add-repository -y ppa:beineri/opt-qt-5.15.2-xenial
fi
echo "::endgroup::"

echo "::group::Fetch APT updates"
apt-get update -yq
echo "::endgroup::"

echo "::group::Install APT packages"
apt-get install -yq --no-install-suggests --no-install-recommends \
build-essential qt515tools qt515base qt515multimedia qt515svg \
qt515xmlpatterns qt515wayland libgl1-mesa-dev bsdtar ffmpeg \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-alsa \
gstreamer1.0-pulseaudio git curl libfuse2
if [ "${INPUT_QT}" -eq 5 ]; then
apt-get install -yq --no-install-suggests --no-install-recommends \
build-essential qt515tools qt515base qt515multimedia qt515svg \
qt515wayland libgl1-mesa-dev bsdtar ffmpeg gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly gstreamer1.0-alsa gstreamer1.0-pulseaudio git \
curl libfuse2
else
apt-get install -yq --no-install-suggests --no-install-recommends \
build-essential qt6-l10n-tools qt6-base-dev qt6-multimedia-dev \
libqt6svg6-dev qt6-wayland-dev libgl1-mesa-dev libarchive-tools ffmpeg \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-alsa \
gstreamer1.0-pulseaudio git curl libfuse2
fi
echo "::endgroup::"
}

Expand All @@ -32,8 +44,8 @@ setup_macos() {
brew update
echo "::endgroup::"
echo "::group::Install Homebrew packages"
brew install libarchive qt@5
brew link qt@5 --force
brew install libarchive qt@${INPUT_QT}
brew link qt@${INPUT_QT} --force
echo "/usr/local/opt/libarchive/bin" >> "${GITHUB_PATH}"
echo "::endgroup::"
}
Expand Down
4 changes: 3 additions & 1 deletion .github/actions/setup-environment/setup-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ setup_linux() {
# Our container image uses the non-Unicode C locale by default
echo "LANG=C.UTF-8" >> "${GITHUB_ENV}"
# Set up Qt environment variables and export them to the GitHub Actions workflow
(printenv; (. /opt/qt515/bin/qt515-env.sh; printenv)) | sort -st= -k1,1 | uniq -u >> "${GITHUB_ENV}"
if [ -f /opt/qt515/bin/qt515-env.sh ]; then
(printenv; (. /opt/qt515/bin/qt515-env.sh; printenv)) | sort -st= -k1,1 | uniq -u >> "${GITHUB_ENV}"
fi
}

setup_macos() {
Expand Down
38 changes: 32 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,43 @@ jobs:
fail-fast: false
matrix:
include:
- name: Linux x86_64
- name: Qt 5 / Linux x86_64
os: ubuntu-latest
# XXX: --privileged is sort of a brute-force solution to get FUSE
# working inside Docker, however so far I haven’t been able to
# figure out precisely *which* privileges are needed.
container: { image: "ubuntu:16.04", options: --privileged }
- name: macOS x86_64
qt: 5
- name: Qt 5 / macOS x86_64
os: macos-latest
container:
- name: Windows x86
qt: 5
- name: Qt 5 / Windows x86
os: windows-2019
arch: win32_msvc2019
container:
- name: Windows x86_64
qt: 5
- name: Qt 5 / Windows x86_64
os: windows-2019
arch: win64_msvc2019_64
container:
qt: 5
- name: Qt 6 / Linux x86_64
os: ubuntu-latest
# XXX: --privileged is sort of a brute-force solution to get FUSE
# working inside Docker, however so far I haven’t been able to
# figure out precisely *which* privileges are needed.
container: { image: "ubuntu:22.04", options: --privileged }
qt: 6
- name: Qt 6 / macOS x86_64
os: macos-latest
container:
qt: 6
- name: Qt 6 / Windows x86_64
os: windows-2019
arch: win64_msvc2019_64
container:
qt: 6

name: ${{matrix.name}}
runs-on: ${{matrix.os}}
Expand All @@ -63,31 +83,37 @@ jobs:
uses: ./.github/actions/install-dependencies
with:
arch: ${{matrix.arch}}
qt: ${{matrix.qt}}

- name: Set up environment
uses: ./.github/actions/setup-environment
with:
arch: ${{matrix.arch}}

- name: Configure build
run: mkdir build; qmake -o build PREFIX=/usr CONFIG+=release CONFIG+=GIT
run: mkdir build; ${{runner.os == 'Linux' && matrix.qt == 6 && 'qmake6' || 'qmake'}}
-o build PREFIX=/usr CONFIG-=debug_and_release CONFIG+=release CONFIG+=GIT
CONFIG+=PENCIL2D_${{github.ref == 'refs/heads/release' && 'RELEASE' || 'NIGHTLY'}}
${{matrix.qt == 6 && 'CONFIG+=c++17 QMAKE_CXX_FLAGS+=-std=c++17' || ''}}

- name: Build Pencil2D
working-directory: build
run: ${{runner.os != 'Windows' && 'make' || 'nmake'}}

- name: Run tests
env: { QT_QPA_PLATFORM: minimal }
run: build/tests/bin/tests
run: build/tests/tests

- name: Create package
id: package
if: runner.os != 'Linux' || matrix.qt == 5
uses: ./.github/actions/create-package
with:
arch: ${{matrix.arch}}
qt: ${{matrix.qt}}

- name: Upload package
if: runner.os != 'Linux' || matrix.qt == 5
uses: actions/upload-artifact@v3
with:
name: ${{steps.package.outputs.output-basename}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Retrieve Qt tagfiles
working-directory: util/docs
run: |
for i in core gui network svg testlib widgets xml xmlpatterns; do
for i in core gui network svg testlib widgets xml; do
curl -fsSLO "https://doc.qt.io/qt-5/qt${i}.tags"
done
Expand Down
3 changes: 0 additions & 3 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -2373,23 +2373,20 @@ TAGFILES = util/docs/qtcore.tags=https://doc.qt.io/qt-5/ \
util/docs/qttestlib.tags=https://doc.qt.io/qt-5/ \
util/docs/qtwidgets.tags=https://doc.qt.io/qt-5/ \
util/docs/qtxml.tags=https://doc.qt.io/qt-5/ \
util/docs/qtxmlpatterns.tags=https://doc.qt.io/qt-5/ \
/usr/share/qt5/doc/qtcore/qtcore.tags=/usr/share/qt5/doc/qtcore/ \
/usr/share/qt5/doc/qtgui/qtgui.tags=/usr/share/qt5/doc/qtgui/ \
/usr/share/qt5/doc/qtnetwork/qtnetwork.tags=/usr/share/qt5/doc/qtnetwork/ \
/usr/share/qt5/doc/qtsvg/qtsvg.tags=/usr/share/qt5/doc/qtsvg/ \
/usr/share/qt5/doc/qttestlib/qttestlib.tags=/usr/share/qt5/doc/qttestlib/ \
/usr/share/qt5/doc/qtwidgets/qtwidgets.tags=/usr/share/qt5/doc/qtwidgets/ \
/usr/share/qt5/doc/qtxml/qtxml.tags=/usr/share/qt5/doc/qtxml/ \
/usr/share/qt5/doc/qtxmlpatterns/qtxmlpatterns.tags=/usr/share/qt5/doc/qtxmlpatterns/ \
/usr/share/doc/qt/qtcore/qtcore.tags=/usr/share/doc/qt/qtcore/ \
/usr/share/doc/qt/qtgui/qtgui.tags=/usr/share/doc/qt/qtgui/ \
/usr/share/doc/qt/qtnetwork/qtnetwork.tags=/usr/share/doc/qt/qtnetwork/ \
/usr/share/doc/qt/qtsvg/qtsvg.tags=/usr/share/doc/qt/qtsvg/ \
/usr/share/doc/qt/qttestlib/qttestlib.tags=/usr/share/doc/qt/qttestlib/ \
/usr/share/doc/qt/qtwidgets/qtwidgets.tags=/usr/share/doc/qt/qtwidgets/ \
/usr/share/doc/qt/qtxml/qtxml.tags=/usr/share/doc/qt/qtxml/ \
/usr/share/doc/qt/qtxmlpatterns/qtxmlpatterns.tags=/usr/share/doc/qt/qtxmlpatterns/
# Currently Qt Multimedia isn't configured to generate a tagfile, see
# https://github.com/qt/qtmultimedia/blob/5.9/src/multimedia/doc/qtmultimedia.qdocconf

Expand Down
42 changes: 24 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,60 @@

# Pencil2D Animation

**Pencil2D** is an animation/drawing software for Windows, macOS, Linux, and FreeBSD. It lets you create traditional hand-drawn animation (cartoon) using both bitmap and vector graphics. Pencil2D is free and open source.
**Pencil2D** is a free and open source animation/drawing software for Windows, macOS, Linux, and FreeBSD. It lets you create traditional hand-drawn animation (cartoon) using both bitmap and vector graphics.

Here is a video demonstrating the project: <https://www.youtube.com/watch?v=ma52j9B1kEM>
Pencil2D is a community-driven project developed entirely by volunteers and we are always looking for more helping hands! There are many different ways to contribute, so anyone can help regardless of their background. For more information, please see the [Contributing](#contributing) section below.

Pencil2D Website: <https://www.pencil2d.org/>
Don’t forget to check out our official website: <https://www.pencil2d.org/>

### User Showcase

[![2022 User Showcase](http://img.youtube.com/vi/ma52j9B1kEM/hqdefault.jpg)](https://www.youtube.com/watch?v=ma52j9B1kEM)

_User Showcase Reel 2022_

### Using Pencil2D
Note that the following guides and documentation are outdated.

* [Quick Reference](https://www.pencil2d.org/doc/quick-reference.html) - Web version of the PDF guide included with Pencil2D
* [User Manual](https://www.pencil2d.org/doc/user-manual.html) - End user documentation how-to
* [FAQ](https://www.pencil2d.org/doc/faq.html) - Frequently Asked Questions

## Download

### Pencil2D 0.6.6 (17 Feb 2021)

You can download Pencil2D from the [Official Website][p2d-download] or [Github releases][gh-release]
You can download Pencil2D from the [Official Website][p2d-download] or [Github releases][gh-release].

[p2d-download]: https://www.pencil2d.org/download/
[gh-release]: https://github.com/pencil2d/pencil/releases

For first time users refer to the [User Manual][user-man]
### Nightly Builds

[user-man]: https://www.pencil2d.org/doc/user-manual.html
Nightly builds are the bleeding edge versions of Pencil2D, which contains the most recent fixes and features. We currently do not offer legacy mac or 32-bit linux nightly builds. If you have one of these systems, you will have to wait for official releases or build the program from source.

If you run into any issues, make sure to check out the [FAQ][p2d-faq]
[Download Nightly Buildls](https://www.pencil2d.org/download/nightly/)

[p2d-faq]: https://www.pencil2d.org/doc/faq.html
## Using Pencil2D

Note that the following guides and documentation are outdated.

### Nightly Builds
Pencil2D comes with a Quick Reference that you can use to familiarize yourself with the tools and functions at your disposal. After opening Pencil2D, you can access it through the main menu: Help > Quick Reference Guide.

Nightly builds are the bleeding edge versions of Pencil2D, which contains the most recent fixes and features. We currently do not offer legacy mac or 32-bit linux nightly builds. If you have one of these systems, you will have to wait for official releases or build the program from source.
We encourage you to visit our [User Manual][user-man] for a quick guide for novice users, then play around with the program – it's fun!

[Download Nightly Buildls](https://www.pencil2d.org/download/nightly/)
[user-man]: https://www.pencil2d.org/doc/user-manual.html

After you feel a little more comfortable with the basics, check out these [tutorials][pencil-tutorials] provided by Pencil developers and users. While some of these resources might reference previous versions of Pencil2D, the underlying concepts are still the same.

[pencil-tutorials]: https://www.pencil2d.org/doc/tutorials.html

If you encounter difficulty or have additional questions, we have a large community of users who are glad to help out. View the [FAQ][p2d-faq] on our website or visit our [discussion forums][p2d-discussion] to post a new question.

[p2d-faq]: https://www.pencil2d.org/doc/faq.html
[p2d-discussion]: https://discuss.pencil2d.org/c/support/5

## Contributing

Interested in contributing to Pencil? There are many ways to help. Take a look at our issues and see what you can help out with, check out the developer guide, or help out with making Pencil2D available to more people by contributing to translation.

* [Issue Tracker](https://github.com/pencil2d/pencil/issues) - Report bugs or request features.
* [Developer Guide](https://dev.pencil2d.org/) - Learn how to compile Pencil2D yourself.
* [Transifex](https://www.transifex.com/pencil2d/) - You can help translate Pencil2D, too.
* [Documentation contributions](https://www.pencil2d.org/doc/CONTRIBUTING) - Guidelines for contributing to documentation.

## Source Code

Expand Down
Loading

0 comments on commit 1894169

Please sign in to comment.