├── .github └── workflows │ ├── auto-build.yml │ └── build.yml ├── LICENSE ├── README.md └── locales └── zh-cn.md /.github/workflows/auto-build.yml: -------------------------------------------------------------------------------- 1 | name: Automatic check update and Build 2 | on: 3 | # # 取消注释以启用自动激活 4 | # # Uncomment it to make this workflow automatic 5 | # schedule: 6 | # - cron: '0 0 * * *' 7 | workflow_dispatch: 8 | 9 | jobs: 10 | 11 | check: 12 | runs-on: ubuntu-latest 13 | outputs: 14 | match: ${{ steps.check-tags.outputs.match }} 15 | tag: ${{ steps.target-tag.outputs.tag }} 16 | steps: 17 | - uses: actions/checkout@v2 18 | 19 | - name: 获取最后的tags 20 | id: target-tag 21 | run: | 22 | tag=$(curl -s https://api.github.com/repos/aseprite/aseprite/tags | jq -r '.[0].name') 23 | # echo "::set-output name=tag::$tag" 24 | echo "tag=$(echo $tag)" >> $GITHUB_OUTPUT 25 | - name: 获取本仓库最后的tags 26 | id: current-tag 27 | run: | 28 | tag=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }} " -s https://api.github.com/repos/${{ github.repository }}/tags | jq -r '.[0].name') 29 | echo "tag=$(echo $tag)" >> $GITHUB_OUTPUT 30 | - name: 比对tags 31 | id: check-tags 32 | run: | 33 | if [ "${{ steps.target-tag.outputs.tag }}" == "${{ steps.current-tag.outputs.tag }}" ] ; then 34 | echo "Tags match, skipping downstream job" 35 | echo "match=false" >> $GITHUB_OUTPUT 36 | else 37 | echo "Tags do not match, running downstream job" 38 | echo "match=true" >> $GITHUB_OUTPUT 39 | fi 40 | - name: 判断tag是否包含"beta" 41 | id: check-beta 42 | run: | 43 | tag="${{ steps.target-tag.outputs.tag }}" 44 | if [[ "$tag" == *"beta"* ]]; then 45 | echo "it's beta, skipping build" 46 | echo "is_beta=true" >> $GITHUB_OUTPUT 47 | else 48 | echo "it's not beta, proceeding with build" 49 | echo "is_beta=false" >> $GITHUB_OUTPUT 50 | fi 51 | - name: 是否执行build 52 | run: | 53 | if [ "${{ needs.check.outputs.match }}" == "true" ] && [ "${{ needs.check.outputs.is_beta }}" == "false" ]; then 54 | echo "true" 55 | else 56 | echo "false" 57 | fi 58 | 59 | build: 60 | needs: check 61 | if: needs.check.outputs.match == 'true' && needs.check.outputs.is_beta == 'false' 62 | runs-on: ${{ matrix.os }} 63 | strategy: 64 | fail-fast: false 65 | matrix: 66 | os: [windows-latest] 67 | build_type: [Release] 68 | enable_ui: [on] 69 | include: 70 | - os: windows-latest 71 | build_type: Release 72 | enable_ui: on 73 | 74 | steps: 75 | 76 | - name: 获得 Release 的 Body 与仓库名称 77 | id: get-content 78 | shell: bash 79 | run: | 80 | body=$(curl -s https://api.github.com/repos/aseprite/aseprite/releases/tags/${{ needs.check.outputs.tag }} | jq -r '.body') 81 | echo "body-content=$(echo $body)" >> $GITHUB_OUTPUT 82 | echo $body 83 | GITHUB_REPOSITORY="${{ github.repository }}" 84 | REPO_NAME="${GITHUB_REPOSITORY#${{ github.repository_owner }}/}" 85 | echo "repo-name=$(echo $REPO_NAME)" >> $GITHUB_OUTPUT 86 | echo $REPO_NAME 87 | 88 | - uses: actions/checkout@v3 89 | with: 90 | repository: 'aseprite/aseprite' 91 | submodules: 'recursive' 92 | ref: ${{ needs.check.outputs.tag }} 93 | 94 | - uses: seanmiddleditch/gha-setup-ninja@master 95 | - uses: ilammy/msvc-dev-cmd@v1 96 | 97 | - name: 获取 skia 并且生成 Makefile 98 | shell: bash 99 | run: | 100 | if [[ "${{ runner.os }}" == "Windows" ]] ; then 101 | export enable_ccache=off 102 | else 103 | export enable_ccache=on 104 | fi 105 | curl -L -o skia.zip https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-Windows-Release-x64.zip 106 | 7z x skia.zip -oskia 107 | cmake -S . -B build -G Ninja \ 108 | -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ 109 | -DENABLE_UI=${{ matrix.enable_ui }} \ 110 | -DENABLE_CCACHE=$enable_ccache \ 111 | -DLAF_BACKEND=skia \ 112 | -DSKIA_DIR=./skia \ 113 | -DSKIA_LIBRARY_DIR=./skia/out/Release-x64 \ 114 | -DSKIA_LIBRARY=./skia/out/Release-x64/skia.lib 115 | 116 | - name: 编译 117 | shell: bash 118 | run: | 119 | cd build && ninja 120 | 121 | - name: 获取 "libcrypto-1_1-x64.dll" 122 | shell: bash 123 | run: | 124 | GITHUB_REPOSITORY="${{ github.repository }}" 125 | REPO_NAME="${GITHUB_REPOSITORY#${{ github.repository_owner }}/}" 126 | 127 | curl -L -o D:/a/$REPO_NAME/$REPO_NAME/build/bin/libcrypto-1_1-x64.dll https://github.com/feenkcom/libopenssl/releases/download/v0.5.0/crypto-x86_64-pc-windows-msvc.dll 128 | 129 | # # 为了遵守 Aseprite 的 EULA, 请确保仓库为私有再启用该功能 130 | # - name: 上传文件到 artifact 131 | # uses: actions/upload-artifact@v3 132 | # with: 133 | # name: aseprite 134 | # path: | 135 | # REPO_NAME=${{ steps.get-content.outputs.repo-name }} 136 | 137 | # D:/a/$REPO_NAME/$REPO_NAME/build/bin/data 138 | # D:/a/$REPO_NAME/$REPO_NAME/build/bin/aseprite.exe 139 | # D:/a/$REPO_NAME/$REPO_NAME/build/bin/libcrypto-1_1-x64.dll 140 | 141 | - name: 打包 142 | shell: bash 143 | run: | 144 | GITHUB_REPOSITORY="${{ github.repository }}" 145 | REPO_NAME="${GITHUB_REPOSITORY#${{ github.repository_owner }}/}" 146 | 147 | cd D:/a/$REPO_NAME/$REPO_NAME/build/bin/ 148 | 7z a -tzip aseprite.${{ needs.check.outputs.tag }}.zip data aseprite.exe libcrypto-1_1-x64.dll 149 | cp aseprite.${{ needs.check.outputs.tag }}.zip D:/a/ 150 | 151 | - name: 草拟 Release 并且上传文件 152 | uses: softprops/action-gh-release@v1 153 | with: 154 | token: ${{ secrets.GITHUB_TOKEN }} 155 | tag_name: ${{ needs.check.outputs.tag }} 156 | name: Aseprite ${{ needs.check.outputs.tag }} 157 | body: ${{ steps.get-content.outputs.body-content }} 158 | draft: true # 为了遵守 Aseprite 的 EULA, 取消 draft 前请确保仓库为私有 159 | prerelease: false 160 | files: | 161 | D:/a/aseprite.${{ needs.check.outputs.tag }}.zip 162 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build a specified version 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | tag_name: 6 | description: 'the tag(version) of the Aseprite' 7 | required: true 8 | jobs: 9 | build: 10 | runs-on: ${{ matrix.os }} 11 | strategy: 12 | fail-fast: false 13 | matrix: 14 | os: [windows-latest] 15 | build_type: [Release] 16 | enable_ui: [on] 17 | include: 18 | - os: windows-latest 19 | build_type: Release 20 | enable_ui: on 21 | steps: 22 | 23 | - name: 获得 Release 的 Body 与仓库名称 24 | id: get-content 25 | shell: bash 26 | run: | 27 | body=$(curl -s https://api.github.com/repos/aseprite/aseprite/releases/tags/${{ github.event.inputs.tag_name }} | jq -r '.body') 28 | echo "body-content=$(echo $body)" >> $GITHUB_OUTPUT 29 | echo $body 30 | GITHUB_REPOSITORY="${{ github.repository }}" 31 | REPO_NAME="${GITHUB_REPOSITORY#${{ github.repository_owner }}/}" 32 | echo "repo-name=$(echo $REPO_NAME)" >> $GITHUB_OUTPUT 33 | echo $REPO_NAME 34 | 35 | - uses: actions/checkout@v3 36 | with: 37 | repository: 'aseprite/aseprite' 38 | submodules: 'recursive' 39 | ref: ${{ github.event.inputs.tag_name }} 40 | 41 | - uses: seanmiddleditch/gha-setup-ninja@master 42 | - uses: ilammy/msvc-dev-cmd@v1 43 | 44 | - name: 获取 skia 并且生成 Makefile 45 | shell: bash 46 | run: | 47 | if [[ "${{ runner.os }}" == "Windows" ]] ; then 48 | export enable_ccache=off 49 | else 50 | export enable_ccache=on 51 | fi 52 | curl -L -o skia.zip https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-Windows-Release-x64.zip 53 | 7z x skia.zip -oskia 54 | cmake -S . -B build -G Ninja \ 55 | -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ 56 | -DENABLE_UI=${{ matrix.enable_ui }} \ 57 | -DENABLE_CCACHE=$enable_ccache \ 58 | -DLAF_BACKEND=skia \ 59 | -DSKIA_DIR=./skia \ 60 | -DSKIA_LIBRARY_DIR=./skia/out/Release-x64 \ 61 | -DSKIA_LIBRARY=./skia/out/Release-x64/skia.lib 62 | 63 | - name: 编译 64 | shell: bash 65 | run: | 66 | cd build && ninja 67 | 68 | - name: 获取 "libcrypto-1_1-x64.dll" 69 | shell: bash 70 | run: | 71 | GITHUB_REPOSITORY="${{ github.repository }}" 72 | REPO_NAME="${GITHUB_REPOSITORY#${{ github.repository_owner }}/}" 73 | 74 | curl -L -o D:/a/$REPO_NAME/$REPO_NAME/build/bin/libcrypto-1_1-x64.dll https://github.com/feenkcom/libopenssl/releases/download/v0.5.0/crypto-x86_64-pc-windows-msvc.dll 75 | 76 | # # 请确保是私有仓库再启用该功能 77 | # - name: 上传文件到 artifact 78 | # uses: actions/upload-artifact@v3 79 | # with: 80 | # name: aseprite 81 | # path: | 82 | # REPO_NAME=${{ steps.get-content.outputs.repo-name }} 83 | 84 | # D:/a/$REPO_NAME/$REPO_NAME/build/bin/data 85 | # D:/a/$REPO_NAME/$REPO_NAME/build/bin/aseprite.exe 86 | # D:/a/$REPO_NAME/$REPO_NAME/build/bin/libcrypto-1_1-x64.dll 87 | 88 | - name: 打包 89 | shell: bash 90 | run: | 91 | REPO_NAME=${{ steps.get-content.outputs.repo-name }} 92 | 93 | cd D:/a/$REPO_NAME/$REPO_NAME/build/bin/ 94 | 7z a -tzip aseprite.${{ github.event.inputs.tag_name }}.zip data aseprite.exe libcrypto-1_1-x64.dll 95 | cp aseprite.${{ github.event.inputs.tag_name }}.zip D:/a/ 96 | 97 | - name: 草拟 Release 并且上传文件 98 | uses: softprops/action-gh-release@v1 99 | with: 100 | token: ${{ secrets.GITHUB_TOKEN }} 101 | tag_name: ${{ github.event.inputs.tag_name }} 102 | name: Aseprite ${{ github.event.inputs.tag_name }} 103 | body: ${{ steps.get-content.outputs.body-content }} 104 | draft: true # 为了遵守 Aseprite 的 EULA, 取消 draft 前请确保仓库为私有 105 | prerelease: false 106 | files: | 107 | D:/a/aseprite.${{ github.event.inputs.tag_name }}.zip 108 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 FBIK. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # aseprite-window-x64-builder 2 | 3 | Language: English | [中文](./locales/zh-cn.md) 4 | 5 | > [!WARNING] 6 | > Building the latest beta version of Aseprite (e.g., `v1.3.11-beta2`) will fail because it uses a new pre-built binaries of Skia, which is still work in progress. 7 | 8 | These are 2 GitHub Workflow that builds Aseprite for Windows x64 bit, either building a specified version or automatically building of the lastest version. By using GitHub Actions, there is no need for manual compilation, and it does not include any malicious software. 9 | 10 | Please review the [Aseprite EULA](https://github.com/aseprite/aseprite/blob/main/EULA.txt) before using it. 11 | 12 | To comply with the Aseprite EULA, this workflow will not upload the compiled binary files to a publicly accessible space. The compiled binary files will be stored in the Releases as draft and only visible to the repository owner. 13 | 14 | The compiled binary files cannot run without `libcrypto-1_1-x64.dll`, and currently, I don't know how to resolve this during compilation. The workflow will retrieve this missing DLL from https://github.com/feenkcom/libopenssl/releases and package it together. If you don't need it, you can replace, delete, or modify it according to your needs. 15 | 16 | Star this repository if you think it is useful! 17 | 18 | ![](https://moe-counter.glitch.me/get/@FBIK.aseprite-window-x64-builder) 19 | 20 | # Usage 21 | 22 | Fork this repository and go to the Settings-Actions-General page of the forked repository. 23 | 24 | Ensure these GitHub repository settings are configured correctly: 25 | 26 | - `Workflow permissions` is set to `Read and write permissions` 27 | - Allow all actions and reusable workflows 28 | 29 | ## Build a specified version 30 | 31 | Visit https://github.com/aseprite/aseprite/releases to get the `tag`, whose release is your need. Then, open the Actions page of the forked repository, select `Build a specified version` on the left side, click Run workflow, and fill in the tags under the `the tag(version) of the Aseprite`. After clicking Run workflow, wait for the workflow to complete. Go to the Code-Releases of the forked repository and download the attachment under the newly generated draft. 32 | 33 | ## Automatic check update and Build 34 | 35 | This workflow will check the lastest tag from local repository and Aseprite Offical repository. If the current version of the forked repository is different from the latest Aseprite Releases, it will automatically retrieve the latest tags and perform the compilation. It will generate a draft in the Code-Releases of the forked repository. 36 | 37 | This workflow will automatically execute at Beijing time (UTC+8) 8:00. To enable it, edit .github/workflows/auto-build.yml and uncomment lines 3 to 5: 38 | 39 | ``` 40 | on: 41 | schedule: 42 | - cron: '0 0 * * *' 43 | ``` 44 | -------------------------------------------------------------------------------- /locales/zh-cn.md: -------------------------------------------------------------------------------- 1 | # aseprite-window-x64-builder 2 | 3 | Language: [English](../README.md) | 中文 4 | 5 | 这是两个 GitHub Actions 的自动化 workflow, 自动或半自动为 Windows 构建 x64 位的 Aseprite. 6 | 通过使用 GitHub 操作, 无需手动编译, 并且不包含恶意软件. 7 | 8 | 请在使用前查看 [Aseprite 的 EULA](https://github.com/aseprite/aseprite/blob/main/EULA.txt). 9 | 10 | 为了遵守 Aseprite 的 EULA, 此 workflow 不会将编译后的二进制文件上传到公共可访问空间. 编译后的二进制文件将存储于`Releases`的`draft`仅供仓库所有者可见. 11 | 12 | 编译后的二进制文件因为缺失`libcrypto-1_1-x64.dll`无法正常运行, 目前以个人能力不知道如何在编译时解决. workflow 将会从获取缺少的 dll 并且一并打包, 如果不需要可根据情况自行替换, 删除它或者修改 workflow. 13 | 14 | 如果你觉得有用的话点个 Star 吧! 15 | 16 | ![](https://moe-counter.glitch.me/get/@FBIK.aseprite-window-x64-builder) 17 | 18 | # 使用方法 19 | 20 | Fork 本仓库, 打开 Fork 仓库的`Setting-Actions-General`页面, 确保`Workflow permissions`选择了`Read and write permissions`. 21 | 22 | ## 手动构建 (building a specified version) 23 | 24 | 访问, 获得欲构建的`Release`对应`tags`. 接着打开 Fork 仓库的`Actions`页面, 左侧选择`手动构建`workflow, 点击`Run workflow`然后将刚刚获得的`tags`填写在`Release对应的tags`提示下方, 点击`Run workflow`后等待`workflow`执行完毕. 打开 Fork 仓库的`Code-Releases`, 在刚刚生成的`draft`下方的附件处下载. 25 | 26 | ## 自动检查更新与构建 (Automatic check update and Build) 27 | 28 | 如果 Fork 仓库当前版本与 Aseprite 的最新 Releases 不同, 则自动获取最新 tags 然后执行编译并且在 Fork 仓库的`Code-Releases`生成`draft`. 29 | 30 | `自动检查更新与构建`workflow 会在 UTC(协调世界时)`0:00`, 及北京时间(UTC+8)`8:00`时自动执行, 如需启用请编辑`.github/workflows/auto-build.yml`, 将第三行到第五行的注释取消: 31 | 32 | ``` 33 | on: 34 | schedule: 35 | - cron: '0 0 * * *' 36 | ``` 37 | --------------------------------------------------------------------------------