Compare commits
233 Commits
pre0.17.6-
...
v0.17.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dece8c0daa | ||
|
|
5796d1af32 | ||
|
|
06d7a1df6b | ||
|
|
ed293ddad8 | ||
|
|
d7a92344e5 | ||
|
|
3fa020fe91 | ||
|
|
ce19af7da0 | ||
|
|
e558a9fc9d | ||
|
|
fb5544ce0f | ||
|
|
051f0d484c | ||
|
|
108cbea686 | ||
|
|
2fca95e81b | ||
|
|
4631a2f440 | ||
|
|
338f5811a1 | ||
|
|
bc634b2eeb | ||
|
|
23cbb9e261 | ||
|
|
fbfbf3c32b | ||
|
|
3073a2e90d | ||
|
|
29e4dc93ab | ||
|
|
2b16a20032 | ||
|
|
59b412899d | ||
|
|
e656ab5e1d | ||
|
|
b90c06da72 | ||
|
|
f62f3652e2 | ||
|
|
dbbec9d2bd | ||
|
|
1be8189058 | ||
|
|
b8b3160ccd | ||
|
|
54fd3995e6 | ||
|
|
e506190c7f | ||
|
|
8f418a0da9 | ||
|
|
0403ee91ea | ||
|
|
47d1856143 | ||
|
|
e521f0fea0 | ||
|
|
eb1e7fd15a | ||
|
|
c9e0a58232 | ||
|
|
9acd8b54e3 | ||
|
|
acd66b1634 | ||
|
|
3820855812 | ||
|
|
056abe7b68 | ||
|
|
bf05b1bda2 | ||
|
|
77a3c146c0 | ||
|
|
5761f7f543 | ||
|
|
5ed5b543ce | ||
|
|
98ae0f2762 | ||
|
|
963bc80439 | ||
|
|
4106dc454e | ||
|
|
0ba26aa836 | ||
|
|
a4c775174b | ||
|
|
29c40c34fe | ||
|
|
44cb889b91 | ||
|
|
915d65d2f4 | ||
|
|
8b7c270cf6 | ||
|
|
a3f07f8ce4 | ||
|
|
91d3252685 | ||
|
|
f9d9112651 | ||
|
|
477a1acc61 | ||
|
|
4770366f74 | ||
|
|
1c66b4dce1 | ||
|
|
3a19bb534a | ||
|
|
f39b3cfd4a | ||
|
|
f0410243c4 | ||
|
|
8abc40707a | ||
|
|
f91fe34a12 | ||
|
|
e9bf6c3b58 | ||
|
|
17c660b5a2 | ||
|
|
ed46f73987 | ||
|
|
e1200b5038 | ||
|
|
7f7ea6ac97 | ||
|
|
f70edaac83 | ||
|
|
d932febe89 | ||
|
|
945a63c51d | ||
|
|
da716ea5c5 | ||
|
|
c6f92a3030 | ||
|
|
267e2dc544 | ||
|
|
cb7d3afdfb | ||
|
|
b57e863c28 | ||
|
|
7aed15fd4f | ||
|
|
6d71b26595 | ||
|
|
1df5406cb3 | ||
|
|
a2b762dcbc | ||
|
|
c2d29c3d6a | ||
|
|
da602eb693 | ||
|
|
9e442a3073 | ||
|
|
bc8b7e733b | ||
|
|
94aa84e380 | ||
|
|
c462c28640 | ||
|
|
b5fbf9cade | ||
|
|
e88957296f | ||
|
|
9e61cb995a | ||
|
|
89a5a718da | ||
|
|
43649c54a3 | ||
|
|
b2b5c99425 | ||
|
|
9e882e6188 | ||
|
|
e688458cfd | ||
|
|
b7c528f5ac | ||
|
|
c743fdcffc | ||
|
|
56e19dd91e | ||
|
|
308512d36a | ||
|
|
749806e553 | ||
|
|
78223334ee | ||
|
|
7f50161ca7 | ||
|
|
dd872a72b2 | ||
|
|
0df17cb4ee | ||
|
|
27244dae04 | ||
|
|
c472d6cbd7 | ||
|
|
e4c786a5d4 | ||
|
|
e291a070f3 | ||
|
|
6b16fcd5f5 | ||
|
|
d79279d1cd | ||
|
|
03fbfaa577 | ||
|
|
8231021426 | ||
|
|
784b2074f8 | ||
|
|
93c9977c86 | ||
|
|
ad1b129dfa | ||
|
|
2d4856551b | ||
|
|
4d0e72d61e | ||
|
|
9b20ec6941 | ||
|
|
5a02265018 | ||
|
|
0dd5c46fd1 | ||
|
|
55831339dd | ||
|
|
e0ba04e579 | ||
|
|
d5f7a6ddd0 | ||
|
|
66a3354883 | ||
|
|
55218e4563 | ||
|
|
081b769ac6 | ||
|
|
8f767b3ab9 | ||
|
|
a2eb7e4a54 | ||
|
|
2de663703b | ||
|
|
40a587dcc4 | ||
|
|
f366a63c8f | ||
|
|
8c603fadee | ||
|
|
5e9ef8d3ab | ||
|
|
2e9cef3ed8 | ||
|
|
354d4f80bf | ||
|
|
a578d537cd | ||
|
|
85ff1cd1c3 | ||
|
|
0d015de359 | ||
|
|
5a0a473d4a | ||
|
|
420ff9a556 | ||
|
|
4f6e99daa2 | ||
|
|
10a57ecc18 | ||
|
|
b101d74df5 | ||
|
|
97d4e58d47 | ||
|
|
b436645ab7 | ||
|
|
af7c73f9f0 | ||
|
|
7d44396b03 | ||
|
|
bd428f355a | ||
|
|
2d6d897e2a | ||
|
|
4913deb15f | ||
|
|
0cb9d3990c | ||
|
|
388e8e1fe1 | ||
|
|
42168ddf16 | ||
|
|
134773765c | ||
|
|
74b099d58f | ||
|
|
c1936441dd | ||
|
|
dc3b7c0825 | ||
|
|
86910f2956 | ||
|
|
7b1df65e64 | ||
|
|
04559efaca | ||
|
|
b668fa4750 | ||
|
|
a4db061485 | ||
|
|
d4d97f1e7f | ||
|
|
e682202b60 | ||
|
|
2480987f10 | ||
|
|
b0acdce294 | ||
|
|
7953cf735b | ||
|
|
d074a85fbc | ||
|
|
543e85e94c | ||
|
|
23f43df737 | ||
|
|
43b6ff7697 | ||
|
|
6ecc80ac0f | ||
|
|
3ae0e80ce5 | ||
|
|
d12f8a27e7 | ||
|
|
f9bbb8fce6 | ||
|
|
80984cddf9 | ||
|
|
8fb0b2e600 | ||
|
|
9a4e8ab4ec | ||
|
|
dc1973e049 | ||
|
|
ccb05230f2 | ||
|
|
7ac6f45b9b | ||
|
|
df7ab20636 | ||
|
|
c06961c9c8 | ||
|
|
37b76a1cb4 | ||
|
|
01d02a916d | ||
|
|
8e99565a9d | ||
|
|
f8d17b23b6 | ||
|
|
06f4bb4e1a | ||
|
|
6e00ff96ec | ||
|
|
468bbc8053 | ||
|
|
f41999c019 | ||
|
|
d259e05ca7 | ||
|
|
2491a436c2 | ||
|
|
7a55e447fc | ||
|
|
f3face791f | ||
|
|
9ccc019bb9 | ||
|
|
bc9f00d09f | ||
|
|
33c470dd38 | ||
|
|
9e0e93de5d | ||
|
|
16553e13a2 | ||
|
|
d031dc3a82 | ||
|
|
7297eb8ee8 | ||
|
|
55bcdd426b | ||
|
|
139e2e14c4 | ||
|
|
339b53115a | ||
|
|
03515b4490 | ||
|
|
9690a345a3 | ||
|
|
8324f72e90 | ||
|
|
15eefc0e9f | ||
|
|
d504bd3d49 | ||
|
|
fd4b4f1882 | ||
|
|
a176ef35a0 | ||
|
|
0fc7178589 | ||
|
|
76d985cc0f | ||
|
|
aa05e8857b | ||
|
|
bb89665fff | ||
|
|
eca1f00549 | ||
|
|
ca20b93632 | ||
|
|
f3d08bae1a | ||
|
|
ad4365faab | ||
|
|
e8c69f7c03 | ||
|
|
f4267cfe2a | ||
|
|
ce178d5b2b | ||
|
|
07eb296956 | ||
|
|
3eb982d00c | ||
|
|
c52d2d0cd0 | ||
|
|
f6c00ec8fb | ||
|
|
70d5be3613 | ||
|
|
1cedf7000f | ||
|
|
0aaa5d2193 | ||
|
|
8203f882b9 | ||
|
|
e1885bdb60 | ||
|
|
21c8355340 | ||
|
|
1db65c6d03 |
4
.github/actions/get-cc/action.yml
vendored
4
.github/actions/get-cc/action.yml
vendored
@@ -19,10 +19,10 @@ runs:
|
|||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- run: |
|
||||||
echo "::set-output name=tag::"$(if [ -z "${{ inputs.tag }}" ]
|
echo "tag="$(if [ -z "${{ inputs.tag }}" ]
|
||||||
then curl -w '%{url_effective}' -I -L -s -S https://github.com/${{ inputs.repo }}/releases/latest -o /dev/null | grep -o '\<[^/]*$'
|
then curl -w '%{url_effective}' -I -L -s -S https://github.com/${{ inputs.repo }}/releases/latest -o /dev/null | grep -o '\<[^/]*$'
|
||||||
else echo ${{ inputs.tag }}
|
else echo ${{ inputs.tag }}
|
||||||
fi)
|
fi) >> $GITHUB_OUTPUT
|
||||||
id: get-tag
|
id: get-tag
|
||||||
shell: bash
|
shell: bash
|
||||||
- uses: ./.github/actions/get-unzip
|
- uses: ./.github/actions/get-unzip
|
||||||
|
|||||||
10
.github/build/linux/dev/template.desktop
vendored
10
.github/build/linux/dev/template.desktop
vendored
@@ -1,10 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Name=Techmino Development
|
|
||||||
Comment=Techmino is fun!
|
|
||||||
MimeType=application/x-love-game;
|
|
||||||
Exec=app %f
|
|
||||||
Type=Application
|
|
||||||
Categories=Game;
|
|
||||||
Terminal=false
|
|
||||||
Icon=icon
|
|
||||||
NoDisplay=false
|
|
||||||
1
.github/build/linux/release/.gitattributes
vendored
1
.github/build/linux/release/.gitattributes
vendored
@@ -1 +0,0 @@
|
|||||||
*.template text eol=lf
|
|
||||||
10
.github/build/linux/release/template.desktop
vendored
10
.github/build/linux/release/template.desktop
vendored
@@ -1,10 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Name=Techmino
|
|
||||||
Comment=Techmino is fun!
|
|
||||||
MimeType=application/x-love-game;
|
|
||||||
Exec=app %f
|
|
||||||
Type=Application
|
|
||||||
Categories=Game;
|
|
||||||
Terminal=false
|
|
||||||
Icon=icon
|
|
||||||
NoDisplay=false
|
|
||||||
7
.github/build/windows/dev/template.rc
vendored
7
.github/build/windows/dev/template.rc
vendored
@@ -8,9 +8,12 @@ FILETYPE 0x1
|
|||||||
{
|
{
|
||||||
BLOCK "040904B0"
|
BLOCK "040904B0"
|
||||||
{
|
{
|
||||||
VALUE "FileDescription", "Techmino Development"
|
|
||||||
VALUE "CompanyName", "26F Studio"
|
VALUE "CompanyName", "26F Studio"
|
||||||
VALUE "LegalCopyright", "Copyright @ 26F Studio"
|
VALUE "FileDescription", "Techmino Development"
|
||||||
|
VALUE "FileVersion", "@Version"
|
||||||
|
VALUE "InternalName", "Techmino"
|
||||||
|
VALUE "LegalCopyright", "Copyright © 2019-2023 26F-Studio. Some Rights Reserved."
|
||||||
|
VALUE "OriginalFilename", "Techmino.exe"
|
||||||
VALUE "ProductName", "Techmino"
|
VALUE "ProductName", "Techmino"
|
||||||
VALUE "ProductVersion", "@Version"
|
VALUE "ProductVersion", "@Version"
|
||||||
}
|
}
|
||||||
|
|||||||
7
.github/build/windows/release/template.rc
vendored
7
.github/build/windows/release/template.rc
vendored
@@ -8,9 +8,12 @@ FILETYPE 0x1
|
|||||||
{
|
{
|
||||||
BLOCK "040904B0"
|
BLOCK "040904B0"
|
||||||
{
|
{
|
||||||
VALUE "FileDescription", "Techmino"
|
|
||||||
VALUE "CompanyName", "26F Studio"
|
VALUE "CompanyName", "26F Studio"
|
||||||
VALUE "LegalCopyright", "Copyright @ 26F Studio"
|
VALUE "FileDescription", "Techmino"
|
||||||
|
VALUE "FileVersion", "@Version"
|
||||||
|
VALUE "InternalName", "Techmino"
|
||||||
|
VALUE "LegalCopyright", "Copyright © 2019-2023 26F-Studio. Some Rights Reserved."
|
||||||
|
VALUE "OriginalFilename", "Techmino.exe"
|
||||||
VALUE "ProductName", "Techmino"
|
VALUE "ProductName", "Techmino"
|
||||||
VALUE "ProductVersion", "@Version"
|
VALUE "ProductVersion", "@Version"
|
||||||
}
|
}
|
||||||
|
|||||||
558
.github/workflows/main.yml
vendored
558
.github/workflows/main.yml
vendored
@@ -20,6 +20,8 @@ jobs:
|
|||||||
version-name: ${{ steps.app-info.outputs.version-name }}
|
version-name: ${{ steps.app-info.outputs.version-name }}
|
||||||
version-string: ${{ steps.app-info.outputs.version-string }}
|
version-string: ${{ steps.app-info.outputs.version-string }}
|
||||||
version-code: ${{ steps.app-info.outputs.version-code }}
|
version-code: ${{ steps.app-info.outputs.version-code }}
|
||||||
|
update-title: ${{ steps.app-info.outputs.update-title }}
|
||||||
|
update-note: ${{ steps.app-info.outputs.update-note }}
|
||||||
commit-hash: ${{ steps.git-info.outputs.commit-hash }}
|
commit-hash: ${{ steps.git-info.outputs.commit-hash }}
|
||||||
base-name: ${{ steps.assemble-base-name.outputs.base-name }}
|
base-name: ${{ steps.assemble-base-name.outputs.base-name }}
|
||||||
steps:
|
steps:
|
||||||
@@ -32,92 +34,42 @@ jobs:
|
|||||||
shell: lua {0}
|
shell: lua {0}
|
||||||
run: |
|
run: |
|
||||||
local version = require "version"
|
local version = require "version"
|
||||||
print("::set-output name=app-name::Techmino")
|
os.execute('echo "app-name=Techmino" >> $GITHUB_OUTPUT')
|
||||||
print("::set-output name=version-name::"..version.name)
|
os.execute('echo "version-name=' .. version.name .. '" >> $GITHUB_OUTPUT')
|
||||||
print("::set-output name=version-string::"..version.string:gsub("%a", ""))
|
os.execute('echo "version-string=' .. version.string:gsub("%a", "") .. '" >> $GITHUB_OUTPUT')
|
||||||
print(("::set-output name=version-code::%d"):format(version.code))
|
os.execute('echo "version-code=' .. tostring(version.code) .. '" >> $GITHUB_OUTPUT')
|
||||||
|
|
||||||
|
local note = require 'parts.updateLog'
|
||||||
|
local p1 = note:find("\n%d") + 1
|
||||||
|
local p2 = note:find("\n", p1) - 1
|
||||||
|
os.execute('echo "update-title=' .. note:sub(p1, p2) .. '" >> $GITHUB_OUTPUT')
|
||||||
|
local p3 = note:find("\n", note:find("\n%d") + 1) + 1
|
||||||
|
local p4 = note:find("\n%d", p3 + 1)
|
||||||
|
updateNote = note:sub(p3, p4 - 2)
|
||||||
|
:gsub(" ", "- ")
|
||||||
|
:gsub(" ", "# ")
|
||||||
|
os.execute('echo "update-note<<EOF" >> $GITHUB_OUTPUT')
|
||||||
|
os.execute('echo "' .. updateNote .. '" >> $GITHUB_OUTPUT')
|
||||||
|
os.execute('echo "EOF" >> $GITHUB_OUTPUT')
|
||||||
- name: Get git info
|
- name: Get git info
|
||||||
id: git-info
|
id: git-info
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
COMMIT_HASH=$(git rev-parse --short ${{ GITHUB.SHA }})
|
COMMIT_HASH=$(git rev-parse --short ${{ GITHUB.SHA }})
|
||||||
echo ::set-output name=commit-hash::$COMMIT_HASH
|
echo "commit-hash=$COMMIT_HASH" >> $GITHUB_OUTPUT
|
||||||
- name: Assemble package base name
|
- name: Assemble package base name
|
||||||
id: assemble-base-name
|
id: assemble-base-name
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
BASE_NAME=Techmino_${{ steps.app-info.outputs.version-string }}_${{ steps.git-info.outputs.commit-hash }}_#${{ GITHUB.RUN_NUMBER }}
|
BASE_NAME=Techmino_${{ steps.app-info.outputs.version-string }}_${{ steps.git-info.outputs.commit-hash }}_#${{ GITHUB.RUN_NUMBER }}
|
||||||
echo ::set-output name=base-name::$BASE_NAME
|
echo "base-name=$BASE_NAME" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build-core:
|
build-core:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: get-info
|
needs: get-info
|
||||||
env:
|
|
||||||
PACKAGE_NAME: ./${{ needs.get-info.outputs.base-name }}_Core.love
|
|
||||||
outputs:
|
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- uses: ./.github/actions/update-version
|
|
||||||
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
|
||||||
with:
|
|
||||||
commit: ${{ needs.get-info.outputs.commit-hash }}
|
|
||||||
type: snapshot
|
|
||||||
- name: Build core love package
|
|
||||||
uses: 26F-Studio/love-actions-core@v1
|
|
||||||
with:
|
|
||||||
build-list: ./media/ ./parts/ ./Zframework/ ./conf.lua ./main.lua ./version.lua
|
|
||||||
package-path: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
|
||||||
- name: Upload core love package
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
|
||||||
path: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
|
||||||
- name: Rename love package
|
|
||||||
run: mv ${{ env.CORE_LOVE_PACKAGE_PATH }} ${{ env.PACKAGE_NAME }}
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_Core
|
|
||||||
path: ${{ env.PACKAGE_NAME }}
|
|
||||||
- name: Upload release
|
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
body: ${{ github.event.head_commit.message }}
|
|
||||||
files: ${{ env.PACKAGE_NAME }}
|
|
||||||
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
|
||||||
- name: Upload to WeTransfer
|
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
curl -sL https://git.io/file-transfer | sh
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ env.PACKAGE_NAME }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
- name: Show download link
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::notice title=Bare love package::${{ steps.transfer.outputs.download-url }}"
|
|
||||||
|
|
||||||
auto-test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build-core
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Love actions for testing
|
|
||||||
uses: 26F-Studio/love-actions-test@v1
|
|
||||||
with:
|
|
||||||
font-path: ./parts/fonts/proportional.otf
|
|
||||||
language-folder: ./parts/language
|
|
||||||
|
|
||||||
build-android:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [get-info, build-core, auto-test]
|
|
||||||
env:
|
env:
|
||||||
OUTPUT_FOLDER: ./build
|
OUTPUT_FOLDER: ./build
|
||||||
|
RELEASE_FOLDER: ./release
|
||||||
outputs:
|
outputs:
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
download-url: ${{ steps.transfer.outputs.download-url }}
|
||||||
steps:
|
steps:
|
||||||
@@ -130,8 +82,106 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
os.system("echo ::set-output name=bundle-id::org.f26_studio." + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}") + ".snapshot")
|
with open(os.getenv('GITHUB_OUTPUT'), 'a') as f:
|
||||||
os.system("echo ::set-output name=product-name::" + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}") + "_Snapshot")
|
f.write('product-name=' + re.sub(r'[^A-Za-z0-9]+', '_', '${{ needs.get-info.outputs.app-name }}') + '\n')
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
with:
|
||||||
|
commit: ${{ needs.get-info.outputs.commit-hash }}
|
||||||
|
type: snapshot
|
||||||
|
- name: Build core love package
|
||||||
|
uses: love-actions/love-actions-core@v1
|
||||||
|
with:
|
||||||
|
build-list: ./media/ ./parts/ ./Zframework/ ./conf.lua ./main.lua ./version.lua
|
||||||
|
package-path: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
|
- name: Upload core love package
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
||||||
|
path: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
|
- name: Add icon to love package
|
||||||
|
run: |
|
||||||
|
cp ./.github/build/linux/${{ env.BUILD_TYPE }}/icon.png media/image/icon.png
|
||||||
|
zip -u ${{ env.CORE_LOVE_PACKAGE_PATH }} media/image/icon.png
|
||||||
|
rm media/image/icon.png
|
||||||
|
- name: Rename love package
|
||||||
|
run: |
|
||||||
|
mkdir -p ${{ env.OUTPUT_FOLDER }}
|
||||||
|
mv ${{ env.CORE_LOVE_PACKAGE_PATH }} ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.love
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.base-name }}_Core_love
|
||||||
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.love
|
||||||
|
- name: Prepare for release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p ${{ env.RELEASE_FOLDER }}
|
||||||
|
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.love ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Bare.love
|
||||||
|
- name: Upload release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
allowUpdates: true
|
||||||
|
artifacts: ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Bare.love
|
||||||
|
body: ${{ needs.get-info.outputs.update-note }}
|
||||||
|
name: ${{ needs.get-info.outputs.update-title }}
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
|
- name: Get transfer
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
curl -sL --retry 5 https://raw.githubusercontent.com/Mikubill/transfer/master/install.sh | sh
|
||||||
|
- name: Upload to WeTransfer
|
||||||
|
id: transfer
|
||||||
|
uses: nick-fields/retry@v2
|
||||||
|
with:
|
||||||
|
max_attempts: 5
|
||||||
|
retry_wait_seconds: 10
|
||||||
|
timeout_minutes: 5
|
||||||
|
command: |
|
||||||
|
./transfer wet -s -p 16 --no-progress ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.love 2>&1>./wetransfer.log
|
||||||
|
echo "download-url=$(cat ./wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
auto-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-core
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Love actions for testing
|
||||||
|
uses: love-actions/love-actions-test@v1
|
||||||
|
with:
|
||||||
|
font-path: ./parts/fonts/proportional.otf
|
||||||
|
language-folder: ./parts/language
|
||||||
|
|
||||||
|
build-android:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [get-info, build-core, auto-test]
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
env:
|
||||||
|
OUTPUT_FOLDER: ./build
|
||||||
|
RELEASE_FOLDER: ./release
|
||||||
|
outputs:
|
||||||
|
download-url: ${{ steps.transfer.outputs.download-url }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Process app name
|
||||||
|
id: process-app-name
|
||||||
|
shell: python3 {0}
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
with open(os.getenv('GITHUB_OUTPUT'), 'a') as f:
|
||||||
|
if "${{ env.BUILD_TYPE }}" == "dev":
|
||||||
|
f.write('bundle-id=org.f26_studio.' + re.sub(r'[^A-Za-z0-9]+', '_', '${{ needs.get-info.outputs.app-name }}') + '.snapshot\n')
|
||||||
|
f.write('product-name=' + re.sub(r'[^A-Za-z0-9]+', '-', '${{ needs.get-info.outputs.app-name }}') + '_Snapshot\n')
|
||||||
|
else:
|
||||||
|
f.write('bundle-id=org.f26_studio.' + re.sub(r'[^A-Za-z0-9]+', '_', '${{ needs.get-info.outputs.app-name }}') + '\n')
|
||||||
|
f.write('product-name=' + re.sub(r'[^A-Za-z0-9]+', '-', '${{ needs.get-info.outputs.app-name }}') + '\n')
|
||||||
- name: Download core love package
|
- name: Download core love package
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -140,17 +190,10 @@ jobs:
|
|||||||
uses: ./.github/actions/get-cc
|
uses: ./.github/actions/get-cc
|
||||||
with:
|
with:
|
||||||
platform: Android
|
platform: Android
|
||||||
dir: ./ColdClear
|
dir: ./libAndroid
|
||||||
- name: Process ColdClear
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir -p ./libAndroid/armeabi-v7a/
|
|
||||||
mkdir -p ./libAndroid/arm64-v8a/
|
|
||||||
mv ./ColdClear/armeabi-v7a/libCCloader.so ./libAndroid/armeabi-v7a/
|
|
||||||
mv ./ColdClear/arm64-v8a/libCCloader.so ./libAndroid/arm64-v8a/
|
|
||||||
- name: Build Android packages
|
- name: Build Android packages
|
||||||
id: build-packages
|
id: build-packages
|
||||||
uses: 26F-Studio/love-actions-android@v1
|
uses: love-actions/love-actions-android@v1
|
||||||
with:
|
with:
|
||||||
app-name: ${{ needs.get-info.outputs.app-name }}
|
app-name: ${{ needs.get-info.outputs.app-name }}
|
||||||
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
||||||
@@ -161,13 +204,12 @@ jobs:
|
|||||||
keystore-store-password: ${{ secrets.ANDROID_KEYSTORE_STOREPASSWORD }}
|
keystore-store-password: ${{ secrets.ANDROID_KEYSTORE_STOREPASSWORD }}
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
resource-path: ./.github/build/android/${{ env.BUILD_TYPE }}/res
|
resource-path: ./.github/build/android/${{ env.BUILD_TYPE }}/res
|
||||||
libs-path: ./ColdClear/
|
|
||||||
extra-assets: ./libAndroid/
|
extra-assets: ./libAndroid/
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
||||||
version-string: ${{ needs.get-info.outputs.version-string }}
|
version-string: ${{ needs.get-info.outputs.version-string }}
|
||||||
version-code: ${{ needs.get-info.outputs.version-code }}
|
version-code: ${{ needs.get-info.outputs.version-code }}
|
||||||
output-folder: ${{ env.OUTPUT_FOLDER }}
|
output-folder: ${{ env.OUTPUT_FOLDER }}
|
||||||
- name: Upload release artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_Android_release
|
name: ${{ needs.get-info.outputs.base-name }}_Android_release
|
||||||
@@ -176,31 +218,39 @@ jobs:
|
|||||||
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release
|
mkdir -p ${{ env.RELEASE_FOLDER }}
|
||||||
mv ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}-release.apk release/${{ steps.process-app-name.outputs.product-name }}.apk
|
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}-release.apk ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Android.apk
|
||||||
- name: Upload release
|
- name: Upload release
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
uses: softprops/action-gh-release@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
body: ${{ github.event.head_commit.message }}
|
allowUpdates: true
|
||||||
files: release/${{ steps.process-app-name.outputs.product-name }}.apk
|
artifacts: ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Android.apk
|
||||||
|
body: ${{ needs.get-info.outputs.update-note }}
|
||||||
|
name: ${{ needs.get-info.outputs.update-title }}
|
||||||
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
- name: Upload to WeTransfer
|
- name: Get transfer
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
curl -sL https://git.io/file-transfer | sh
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
- name: Show download link
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "::notice title=Android packages::${{ steps.transfer.outputs.download-url }}"
|
curl -sL --retry 5 https://raw.githubusercontent.com/Mikubill/transfer/master/install.sh | sh
|
||||||
|
- name: Upload to WeTransfer
|
||||||
|
id: transfer
|
||||||
|
uses: nick-fields/retry@v2
|
||||||
|
with:
|
||||||
|
max_attempts: 5
|
||||||
|
retry_wait_seconds: 10
|
||||||
|
timeout_minutes: 5
|
||||||
|
command: |
|
||||||
|
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
||||||
|
echo "download-url=$(cat ./wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build-ios:
|
build-ios:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
needs: [get-info, build-core, auto-test]
|
needs: [get-info, build-core, auto-test]
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
env:
|
env:
|
||||||
OUTPUT_FOLDER: ./build
|
OUTPUT_FOLDER: ./build
|
||||||
|
RELEASE_FOLDER: ./release
|
||||||
outputs:
|
outputs:
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
download-url: ${{ steps.transfer.outputs.download-url }}
|
||||||
steps:
|
steps:
|
||||||
@@ -213,8 +263,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
os.system("echo ::set-output name=bundle-id::org.26f-studio.techmino")
|
with open(os.getenv('GITHUB_OUTPUT'), 'a') as f:
|
||||||
os.system("echo ::set-output name=product-name::" + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}"))
|
f.write('bundle-id=org.26f-studio.techmino\n')
|
||||||
|
f.write('product-name=' + re.sub(r'[^A-Za-z0-9]+', '_', '${{ needs.get-info.outputs.app-name }}') + '\n')
|
||||||
- name: Download core love package
|
- name: Download core love package
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -226,11 +277,11 @@ jobs:
|
|||||||
dir: ./ColdClear
|
dir: ./ColdClear
|
||||||
- name: Build iOS packages
|
- name: Build iOS packages
|
||||||
id: build-packages
|
id: build-packages
|
||||||
uses: 26F-Studio/love-actions-ios@v1
|
uses: love-actions/love-actions-ios@v1
|
||||||
with:
|
with:
|
||||||
app-name: ${{ needs.get-info.outputs.app-name }}
|
app-name: ${{ needs.get-info.outputs.app-name }}
|
||||||
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
||||||
copyright: "Copyright © 2019-2022 26F-Studio. Some Rights Reserved."
|
copyright: "Copyright © 2019-2023 26F-Studio. Some Rights Reserved."
|
||||||
icon-path: ./.github/build/iOS/${{ env.BUILD_TYPE }}/icon
|
icon-path: ./.github/build/iOS/${{ env.BUILD_TYPE }}/icon
|
||||||
love-patch: ./.github/build/iOS/love.patch
|
love-patch: ./.github/build/iOS/love.patch
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
@@ -260,29 +311,42 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_iOS_ipa
|
name: ${{ needs.get-info.outputs.base-name }}_iOS_ipa
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.ipa
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.ipa
|
||||||
- name: Upload release
|
- name: Prepare for release
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
body: ${{ github.event.head_commit.message }}
|
|
||||||
files: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.ipa
|
|
||||||
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
|
||||||
- name: Upload to WeTransfer
|
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
wget -qO- https://github.com/Mikubill/transfer/releases/download/v0.4.17/transfer_0.4.17_darwin_amd64.tar.gz | tar xvz
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
- name: Show download link
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "::notice title=iOS packages::${{ steps.transfer.outputs.download-url }}"
|
mkdir -p ${{ env.RELEASE_FOLDER }}
|
||||||
|
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.ipa ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_iOS.ipa
|
||||||
|
- name: Upload release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
allowUpdates: true
|
||||||
|
artifacts: ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_iOS.ipa
|
||||||
|
body: ${{ needs.get-info.outputs.update-note }}
|
||||||
|
name: ${{ needs.get-info.outputs.update-title }}
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
|
- name: Get transfer
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
wget -qO- https://github.com/Mikubill/transfer/releases/download/v0.4.17/transfer_0.4.17_darwin_amd64.tar.gz | tar xvz
|
||||||
|
- name: Upload to WeTransfer
|
||||||
|
id: transfer
|
||||||
|
uses: nick-fields/retry@v2
|
||||||
|
with:
|
||||||
|
max_attempts: 5
|
||||||
|
retry_wait_seconds: 10
|
||||||
|
timeout_minutes: 5
|
||||||
|
command: |
|
||||||
|
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
||||||
|
echo "download-url=$(cat ./wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [get-info, build-core, auto-test]
|
needs: [get-info, build-core, auto-test]
|
||||||
env:
|
env:
|
||||||
OUTPUT_FOLDER: ./build
|
OUTPUT_FOLDER: ./build
|
||||||
|
RELEASE_FOLDER: ./release
|
||||||
outputs:
|
outputs:
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
download-url: ${{ steps.transfer.outputs.download-url }}
|
||||||
steps:
|
steps:
|
||||||
@@ -295,11 +359,20 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
os.system("echo ::set-output name=product-name::" + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}"))
|
|
||||||
|
product_name = re.sub(r'[^A-Za-z0-9]+', '-', '${{ needs.get-info.outputs.app-name }}').strip('-').lower()
|
||||||
|
with open(os.getenv('GITHUB_OUTPUT'), 'a') as f:
|
||||||
|
f.write('bundle-id=org.26f-studio.' + product_name + '\n')
|
||||||
|
f.write('product-name=' + product_name + '\n')
|
||||||
- name: Download core love package
|
- name: Download core love package
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
||||||
|
- name: Add icon to love package
|
||||||
|
run: |
|
||||||
|
cp ./.github/build/linux/${{ env.BUILD_TYPE }}/icon.png media/image/icon.png
|
||||||
|
zip -u ${{ env.CORE_LOVE_PACKAGE_PATH }} media/image/icon.png
|
||||||
|
rm media/image/icon.png
|
||||||
- name: Download ColdClear
|
- name: Download ColdClear
|
||||||
uses: ./.github/actions/get-cc
|
uses: ./.github/actions/get-cc
|
||||||
with:
|
with:
|
||||||
@@ -309,50 +382,71 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd ./ColdClear
|
cd ./ColdClear
|
||||||
mkdir ./libs
|
mkdir -p ./lib/lua/5.1
|
||||||
mv ./x64/libcold_clear.so ./libs
|
mv ./x64/CCloader.so ./lib/lua/5.1
|
||||||
mkdir ./shared
|
|
||||||
mv ./x64/CCloader.so ./shared
|
|
||||||
- name: Build Linux packages
|
- name: Build Linux packages
|
||||||
id: build-packages
|
id: build-packages
|
||||||
uses: 26F-Studio/love-actions-linux@v1
|
uses: love-actions/love-actions-linux@v1
|
||||||
with:
|
with:
|
||||||
desktop-file-path: ./.github/build/linux/${{ env.BUILD_TYPE }}/template.desktop
|
app-name: ${{ needs.get-info.outputs.app-name }}
|
||||||
executable-name: app
|
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
||||||
|
description: Techmino is fun!
|
||||||
|
version-string: ${{ needs.get-info.outputs.version-string }}
|
||||||
icon-path: ./.github/build/linux/${{ env.BUILD_TYPE }}/icon.png
|
icon-path: ./.github/build/linux/${{ env.BUILD_TYPE }}/icon.png
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
libs-path: ./ColdClear/libs/
|
lib-path: ./ColdClear/lib
|
||||||
shared-path: ./ColdClear/shared/
|
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
||||||
output-folder: ${{ env.OUTPUT_FOLDER }}
|
output-folder: ${{ env.OUTPUT_FOLDER }}
|
||||||
- name: Upload AppImage artifact
|
- name: Upload AppImage artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_Linux
|
name: ${{ needs.get-info.outputs.base-name }}_Linux_AppImage
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.AppImage
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.AppImage
|
||||||
- name: Upload release
|
- name: Upload Debian artifact
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
uses: actions/upload-artifact@v3
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
with:
|
||||||
body: ${{ github.event.head_commit.message }}
|
name: ${{ needs.get-info.outputs.base-name }}_Linux_Debian
|
||||||
files: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.AppImage
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.deb
|
||||||
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
- name: Prepare for release
|
||||||
- name: Upload to WeTransfer
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
curl -sL https://git.io/file-transfer | sh
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
- name: Show download link
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "::notice title=Linux packages::${{ steps.transfer.outputs.download-url }}"
|
mkdir -p ${{ env.RELEASE_FOLDER }}
|
||||||
|
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.AppImage ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Linux.AppImage
|
||||||
|
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.deb ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Linux.deb
|
||||||
|
- name: Upload release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
allowUpdates: true
|
||||||
|
artifacts: |
|
||||||
|
${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Linux.AppImage
|
||||||
|
${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Linux.deb
|
||||||
|
body: ${{ needs.get-info.outputs.update-note }}
|
||||||
|
name: ${{ needs.get-info.outputs.update-title }}
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
|
- name: Get transfer
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
curl -sL --retry 5 https://raw.githubusercontent.com/Mikubill/transfer/master/install.sh | sh
|
||||||
|
- name: Upload to WeTransfer
|
||||||
|
id: transfer
|
||||||
|
uses: nick-fields/retry@v2
|
||||||
|
with:
|
||||||
|
max_attempts: 5
|
||||||
|
retry_wait_seconds: 10
|
||||||
|
timeout_minutes: 5
|
||||||
|
command: |
|
||||||
|
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
||||||
|
echo "download-url=$(cat ./wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build-macos-appstore:
|
build-macos-appstore:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
needs: [get-info, build-core, auto-test]
|
needs: [get-info, build-core, auto-test]
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
env:
|
env:
|
||||||
OUTPUT_FOLDER: ./build
|
OUTPUT_FOLDER: ./build
|
||||||
|
RELEASE_FOLDER: ./release
|
||||||
outputs:
|
outputs:
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
download-url: ${{ steps.transfer.outputs.download-url }}
|
||||||
steps:
|
steps:
|
||||||
@@ -365,8 +459,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
os.system("echo ::set-output name=bundle-id::org.26f-studio.techmino")
|
with open(os.getenv('GITHUB_OUTPUT'), 'a') as f:
|
||||||
os.system("echo ::set-output name=product-name::" + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}"))
|
f.write('bundle-id=org.26f-studio.techmino\n')
|
||||||
|
f.write('product-name=' + re.sub(r'[^A-Za-z0-9]+', '_', '${{ needs.get-info.outputs.app-name }}') + '\n')
|
||||||
- name: Download core love package
|
- name: Download core love package
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -382,11 +477,11 @@ jobs:
|
|||||||
rm ./ColdClear/universal/libcold_clear.a
|
rm ./ColdClear/universal/libcold_clear.a
|
||||||
- name: Build macOS packages
|
- name: Build macOS packages
|
||||||
id: build-packages
|
id: build-packages
|
||||||
uses: 26F-Studio/love-actions-macos-appstore@v1
|
uses: love-actions/love-actions-macos-appstore@v1
|
||||||
with:
|
with:
|
||||||
app-name: ${{ needs.get-info.outputs.app-name }}
|
app-name: ${{ needs.get-info.outputs.app-name }}
|
||||||
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
||||||
copyright: "Copyright © 2019-2022 26F-Studio. Some Rights Reserved."
|
copyright: "Copyright © 2019-2023 26F-Studio. Some Rights Reserved."
|
||||||
icon-path: ./.github/build/macOS/${{ env.BUILD_TYPE }}/icon.icns
|
icon-path: ./.github/build/macOS/${{ env.BUILD_TYPE }}/icon.icns
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
libs-path: ./ColdClear/universal/
|
libs-path: ./ColdClear/universal/
|
||||||
@@ -415,29 +510,43 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_macOS_appstore_pkg
|
name: ${{ needs.get-info.outputs.base-name }}_macOS_appstore_pkg
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.pkg
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.pkg
|
||||||
- name: Upload release
|
- name: Prepare for release
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
body: ${{ github.event.head_commit.message }}
|
|
||||||
files: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.pkg
|
|
||||||
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
|
||||||
- name: Upload to WeTransfer
|
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
wget -qO- https://github.com/Mikubill/transfer/releases/download/v0.4.17/transfer_0.4.17_darwin_amd64.tar.gz | tar xvz
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
- name: Show download link
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "::notice title=macOS App Store packages::${{ steps.transfer.outputs.download-url }}"
|
mkdir -p ${{ env.RELEASE_FOLDER }}
|
||||||
|
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.pkg ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_macOS_appstore.pkg
|
||||||
|
- name: Upload release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
allowUpdates: true
|
||||||
|
artifacts: ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_macOS_appstore.pkg
|
||||||
|
body: ${{ needs.get-info.outputs.update-note }}
|
||||||
|
name: ${{ needs.get-info.outputs.update-title }}
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
|
- name: Get transfer
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
wget -qO- https://github.com/Mikubill/transfer/releases/download/v0.4.17/transfer_0.4.17_darwin_amd64.tar.gz | tar xvz
|
||||||
|
- name: Upload to WeTransfer
|
||||||
|
id: transfer
|
||||||
|
uses: nick-fields/retry@v2
|
||||||
|
with:
|
||||||
|
max_attempts: 5
|
||||||
|
retry_wait_seconds: 10
|
||||||
|
timeout_minutes: 5
|
||||||
|
command: |
|
||||||
|
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
||||||
|
echo "download-url=$(cat ./wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build-macos-portable:
|
build-macos-portable:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
needs: [get-info, build-core, auto-test]
|
needs: [get-info, build-core, auto-test]
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
env:
|
env:
|
||||||
OUTPUT_FOLDER: ./build
|
OUTPUT_FOLDER: ./build
|
||||||
|
RELEASE_FOLDER: ./release
|
||||||
outputs:
|
outputs:
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
download-url: ${{ steps.transfer.outputs.download-url }}
|
||||||
steps:
|
steps:
|
||||||
@@ -450,8 +559,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
os.system("echo ::set-output name=bundle-id::org.26f-studio.techmino")
|
with open(os.getenv('GITHUB_OUTPUT'), 'a') as f:
|
||||||
os.system("echo ::set-output name=product-name::" + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}"))
|
f.write('bundle-id=org.26f-studio.techmino\n')
|
||||||
|
f.write('product-name=' + re.sub(r'[^A-Za-z0-9]+', '_', '${{ needs.get-info.outputs.app-name }}') + '\n')
|
||||||
- name: Download core love package
|
- name: Download core love package
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -467,11 +577,11 @@ jobs:
|
|||||||
rm ./ColdClear/universal/libcold_clear.a
|
rm ./ColdClear/universal/libcold_clear.a
|
||||||
- name: Build macOS packages
|
- name: Build macOS packages
|
||||||
id: build-packages
|
id: build-packages
|
||||||
uses: 26F-Studio/love-actions-macos-portable@v1
|
uses: love-actions/love-actions-macos-portable@v1
|
||||||
with:
|
with:
|
||||||
app-name: ${{ needs.get-info.outputs.app-name }}
|
app-name: ${{ needs.get-info.outputs.app-name }}
|
||||||
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
||||||
copyright: "Copyright © 2019-2022 26F-Studio. Some Rights Reserved."
|
copyright: "Copyright © 2019-2023 26F-Studio. Some Rights Reserved."
|
||||||
icon-path: ./.github/build/macOS/${{ env.BUILD_TYPE }}/icon.icns
|
icon-path: ./.github/build/macOS/${{ env.BUILD_TYPE }}/icon.icns
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
libs-path: ./ColdClear/universal/
|
libs-path: ./ColdClear/universal/
|
||||||
@@ -509,31 +619,45 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_macOS_portable_bare
|
name: ${{ needs.get-info.outputs.base-name }}_macOS_portable_bare
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.zip
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.zip
|
||||||
- name: Upload release
|
- name: Prepare for release
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
body: ${{ github.event.head_commit.message }}
|
|
||||||
files: |
|
|
||||||
${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.pkg
|
|
||||||
${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.dmg
|
|
||||||
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
|
||||||
- name: Upload to WeTransfer
|
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
wget -qO- https://github.com/Mikubill/transfer/releases/download/v0.4.17/transfer_0.4.17_darwin_amd64.tar.gz | tar xvz
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
- name: Show download link
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "::notice title=macOS portable packages::${{ steps.transfer.outputs.download-url }}"
|
mkdir -p ${{ env.RELEASE_FOLDER }}
|
||||||
|
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.pkg ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_macOS_portable.pkg
|
||||||
|
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.dmg ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_macOS_portable.dmg
|
||||||
|
- name: Upload release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
allowUpdates: true
|
||||||
|
artifacts: |
|
||||||
|
${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_macOS_portable.pkg
|
||||||
|
${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_macOS_portable.dmg
|
||||||
|
body: ${{ needs.get-info.outputs.update-note }}
|
||||||
|
name: ${{ needs.get-info.outputs.update-title }}
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
|
- name: Get transfer
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
wget -qO- https://github.com/Mikubill/transfer/releases/download/v0.4.17/transfer_0.4.17_darwin_amd64.tar.gz | tar xvz
|
||||||
|
- name: Upload to WeTransfer
|
||||||
|
id: transfer
|
||||||
|
uses: nick-fields/retry@v2
|
||||||
|
with:
|
||||||
|
max_attempts: 5
|
||||||
|
retry_wait_seconds: 10
|
||||||
|
timeout_minutes: 5
|
||||||
|
command: |
|
||||||
|
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
||||||
|
echo "download-url=$(cat ./wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: [get-info, build-core, auto-test]
|
needs: [get-info, build-core, auto-test]
|
||||||
env:
|
env:
|
||||||
OUTPUT_FOLDER: ./build
|
OUTPUT_FOLDER: ./build
|
||||||
|
RELEASE_FOLDER: ./release
|
||||||
outputs:
|
outputs:
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
download-url: ${{ steps.transfer.outputs.download-url }}
|
||||||
steps:
|
steps:
|
||||||
@@ -546,18 +670,26 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
os.system("echo ::set-output name=product-name::" + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}"))
|
with open(os.getenv('GITHUB_OUTPUT'), 'a') as f:
|
||||||
|
f.write('product-name=' + re.sub(r'[^A-Za-z0-9]+', '_', '${{ needs.get-info.outputs.app-name }}') + '\n')
|
||||||
- name: Download core love package
|
- name: Download core love package
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
||||||
|
- name: Download ColdClear
|
||||||
|
uses: ./.github/actions/get-cc
|
||||||
|
with:
|
||||||
|
platform: Windows
|
||||||
|
dir: ./ColdClear
|
||||||
- name: Build Windows packages
|
- name: Build Windows packages
|
||||||
id: build-packages
|
id: build-packages
|
||||||
uses: 26F-Studio/love-actions-windows@v1
|
uses: love-actions/love-actions-windows@v1
|
||||||
with:
|
with:
|
||||||
icon-path: ./.github/build/windows/${{ env.BUILD_TYPE }}/icon.ico
|
icon-path: ./.github/build/windows/${{ env.BUILD_TYPE }}/icon.ico
|
||||||
rc-path: ./.github/build/windows/${{ env.BUILD_TYPE }}/template.rc
|
rc-path: ./.github/build/windows/${{ env.BUILD_TYPE }}/template.rc
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
|
extra-assets-x86: ./ColdClear/x86/CCloader.dll ./ColdClear/x86/cold_clear.dll
|
||||||
|
extra-assets-x64: ./ColdClear/x64/CCloader.dll ./ColdClear/x64/cold_clear.dll
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
||||||
version-string: ${{ needs.get-info.outputs.version-string }}
|
version-string: ${{ needs.get-info.outputs.version-string }}
|
||||||
output-folder: ${{ env.OUTPUT_FOLDER }}
|
output-folder: ${{ env.OUTPUT_FOLDER }}
|
||||||
@@ -571,32 +703,43 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_Windows_x64
|
name: ${{ needs.get-info.outputs.base-name }}_Windows_x64
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x64.zip
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x64.zip
|
||||||
|
- name: Prepare for release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p ${{ env.RELEASE_FOLDER }}
|
||||||
|
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x86.zip ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Windows_x86.zip
|
||||||
|
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x64.zip ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Windows_x64.zip
|
||||||
- name: Upload release
|
- name: Upload release
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
uses: softprops/action-gh-release@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
body: ${{ github.event.head_commit.message }}
|
allowUpdates: true
|
||||||
files: |
|
artifacts: |
|
||||||
${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x86.zip
|
${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Windows_x86.zip
|
||||||
${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x64.zip
|
${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Windows_x64.zip
|
||||||
|
body: ${{ needs.get-info.outputs.update-note }}
|
||||||
|
name: ${{ needs.get-info.outputs.update-title }}
|
||||||
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
- name: Get transfer
|
- name: Get transfer
|
||||||
env:
|
env:
|
||||||
TEMP_PATH: ./temp.zip
|
TEMP_PATH: ./temp.zip
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
curl -L --retry 5 https://github.com/Mikubill/transfer/releases/download/v0.4.17/transfer_0.4.17_windows_amd64.zip -o ${{ env.TEMP_PATH }}
|
curl -sL --retry 5 https://github.com/Mikubill/transfer/releases/download/v0.4.17/transfer_0.4.17_windows_amd64.zip -o ${{ env.TEMP_PATH }}
|
||||||
7z x ${{ env.TEMP_PATH }} -o./
|
7z x ${{ env.TEMP_PATH }} -o./
|
||||||
rm ${{ env.TEMP_PATH }}
|
rm ${{ env.TEMP_PATH }}
|
||||||
- name: Upload to WeTransfer
|
- name: Upload to WeTransfer
|
||||||
id: transfer
|
id: transfer
|
||||||
run: |
|
uses: nick-fields/retry@v2
|
||||||
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
with:
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
max_attempts: 5
|
||||||
- name: Show download link
|
retry_wait_seconds: 10
|
||||||
shell: bash
|
shell: pwsh
|
||||||
run: |
|
timeout_minutes: 5
|
||||||
echo "::notice title=Windows packages::${{ steps.transfer.outputs.download-url }}"
|
command: |
|
||||||
|
./transfer.exe wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
||||||
|
"download-url=$(cat ./wetransfer.log | grep https | cut -f3 -d" ")" >> $env:GITHUB_OUTPUT
|
||||||
|
|
||||||
post-build:
|
post-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -618,11 +761,38 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
uses: geekyeggo/delete-artifact@v1
|
uses: geekyeggo/delete-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
||||||
|
- name: Display summary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "# Summary" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "## Version: ${{ needs.get-info.outputs.version-string }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "## Package Name: ${{ needs.get-info.outputs.base-name }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "## Download links: " >> $GITHUB_STEP_SUMMARY
|
||||||
|
- name: Display download links
|
||||||
|
shell: python3 {0}
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
with open(os.getenv('GITHUB_STEP_SUMMARY'), 'a') as f:
|
||||||
|
if "${{ needs.build-core.result }}" == "success":
|
||||||
|
f.write("- Bare love packages: [WeTransfer](${{ needs.build-core.outputs.download-url }})\n")
|
||||||
|
if "${{ needs.build-android.result }}" == "success":
|
||||||
|
f.write("- Android packages: [WeTransfer](${{ needs.build-android.outputs.download-url }})\n")
|
||||||
|
if "${{ needs.build-ios.result }}" == "success":
|
||||||
|
f.write("- iOS packages: [WeTransfer](${{ needs.build-ios.outputs.download-url }})\n")
|
||||||
|
if "${{ needs.build-linux.result }}" == "success":
|
||||||
|
f.write("- Linux packages: [WeTransfer](${{ needs.build-linux.outputs.download-url }})\n")
|
||||||
|
if "${{ needs.build-macos-appstore.result }}" == "success":
|
||||||
|
f.write("- macOS packages(App Store version): [WeTransfer](${{ needs.build-macos-appstore.outputs.download-url }})\n")
|
||||||
|
if "${{ needs.build-macos-portable.result }}" == "success":
|
||||||
|
f.write("- macOS packages(Portable version): [WeTransfer](${{ needs.build-macos-portable.outputs.download-url }})\n")
|
||||||
|
if "${{ needs.build-windows.result }}" == "success":
|
||||||
|
f.write("- Windows packages: [WeTransfer](${{ needs.build-windows.outputs.download-url }})\n")
|
||||||
- name: Send Discord message
|
- name: Send Discord message
|
||||||
uses: Sniddl/discord-commits@v1.3
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: Sniddl/discord-commits@v1.5
|
||||||
with:
|
with:
|
||||||
webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
message: "Github Actions for **${{ github.repository }}**."
|
message: "Github Actions for **${{ github.repository }}**."
|
||||||
|
|||||||
Submodule Zframework updated: 5130161bb1...c64bfe444b
69
conf.lua
69
conf.lua
@@ -1,28 +1,63 @@
|
|||||||
|
SYSTEM=love._os if SYSTEM=='OS X' then SYSTEM='macOS' end
|
||||||
|
MOBILE=SYSTEM=='Android' or SYSTEM=='iOS'
|
||||||
|
FNNS=SYSTEM:find'\79\83'-- What does FNSF stand for? IDK so don't ask me lol
|
||||||
|
|
||||||
function love.conf(t)
|
function love.conf(t)
|
||||||
t.identity='Techmino'--Saving folder
|
local identity='Techmino'
|
||||||
t.version="11.1"
|
local msaa=0
|
||||||
|
local portrait=false
|
||||||
|
|
||||||
|
local fs=love.filesystem
|
||||||
|
fs.setIdentity(identity)
|
||||||
|
do -- Load grapgic settings from conf/settings
|
||||||
|
local fileData=fs.read('conf/settings')
|
||||||
|
if fileData then
|
||||||
|
msaa=tonumber(fileData:match('"msaa":(%d+)')) or 0;
|
||||||
|
portrait=MOBILE and fileData:find('"portrait":true') and true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
t.identity=identity -- Saving folder
|
||||||
|
t.version="11.4"
|
||||||
t.gammacorrect=false
|
t.gammacorrect=false
|
||||||
t.appendidentity=true--Search files in source then in save directory
|
t.appendidentity=true -- Search files in source then in save directory
|
||||||
t.accelerometerjoystick=false--Accelerometer=joystick on ios/android
|
t.accelerometerjoystick=false -- Accelerometer=joystick on ios/android
|
||||||
if t.audio then
|
if t.audio then
|
||||||
t.audio.mic=false
|
t.audio.mic=false
|
||||||
t.audio.mixwithsystem=true
|
t.audio.mixwithsystem=true
|
||||||
end
|
end
|
||||||
|
|
||||||
local W=t.window
|
local W=t.window
|
||||||
W.title="Techmino "..require"version".string
|
W.title="Techmino "..require "version".string
|
||||||
W.width,W.height=1280,720
|
if portrait then
|
||||||
W.minwidth,W.minheight=640,360
|
W.width,W.height=720,1280
|
||||||
W.borderless=false
|
W.minwidth,W.minheight=360,640
|
||||||
W.resizable=true
|
else
|
||||||
W.fullscreen=false
|
W.width,W.height=1280,720
|
||||||
W.vsync=0--Unlimited FPS
|
W.minwidth,W.minheight=640,360
|
||||||
W.msaa=0--Multi-sampled antialiasing
|
end
|
||||||
W.depth=0--Bits/samp of depth buffer
|
|
||||||
W.stencil=1--Bits/samp of stencil buffer
|
W.vsync=0 -- Unlimited FPS
|
||||||
W.display=1--Monitor ID
|
W.msaa=msaa -- Multi-sampled antialiasing
|
||||||
W.highdpi=true--High-dpi mode for the window on a Retina display
|
W.depth=0 -- Bits/samp of depth buffer
|
||||||
W.x,W.y=nil
|
W.stencil=1 -- Bits/samp of stencil buffer
|
||||||
|
W.display=1 -- Monitor ID
|
||||||
|
W.highdpi=true -- High-dpi mode for the window on a Retina display
|
||||||
|
W.x,W.y=nil,nil -- Position of the window
|
||||||
|
|
||||||
|
if fs.getInfo('media/image/icon.png') then
|
||||||
|
W.icon='media/image/icon.png'
|
||||||
|
end
|
||||||
|
|
||||||
|
if MOBILE then
|
||||||
|
W.borderless=true
|
||||||
|
W.resizable=false
|
||||||
|
W.fullscreen=true
|
||||||
|
else
|
||||||
|
W.borderless=false
|
||||||
|
W.resizable=true
|
||||||
|
W.fullscreen=false
|
||||||
|
end
|
||||||
|
|
||||||
local M=t.modules
|
local M=t.modules
|
||||||
M.window,M.system,M.event,M.thread=true,true,true,true
|
M.window,M.system,M.event,M.thread=true,true,true,true
|
||||||
|
|||||||
568
main.lua
568
main.lua
@@ -15,40 +15,30 @@
|
|||||||
]]--
|
]]--
|
||||||
|
|
||||||
|
|
||||||
--Var leak check
|
-- Var leak check
|
||||||
-- setmetatable(_G,{__newindex=function(self,k,v)print('>>'..k)print(debug.traceback():match("\n.-\n\t(.-): "))rawset(self,k,v)end})
|
-- setmetatable(_G,{__newindex=function(self,k,v) print('>>'..k..string.rep(" ",26-#k),debug.traceback():match("\n.-\n\t(.-): "))rawset(self,k,v) end})
|
||||||
|
|
||||||
--System Global Vars Declaration
|
-- System Global Vars Declaration
|
||||||
local fs=love.filesystem
|
local fs=love.filesystem
|
||||||
VERSION=require"version"
|
VERSION=require"version"
|
||||||
TIME=love.timer.getTime
|
TIME=love.timer.getTime
|
||||||
YIELD=coroutine.yield
|
|
||||||
SYSTEM=love.system.getOS()if SYSTEM=='OS X'then SYSTEM='macOS'end
|
|
||||||
FNNS=SYSTEM:find'\79\83'--What does FNSF stand for? IDK so don't ask me lol
|
|
||||||
MOBILE=SYSTEM=='Android'or SYSTEM=='iOS'
|
|
||||||
SAVEDIR=fs.getSaveDirectory()
|
|
||||||
|
|
||||||
--Global Vars & Settings
|
-- Global Vars & Settings
|
||||||
SFXPACKS={'chiptune'}
|
SFXPACKS={'chiptune'}
|
||||||
VOCPACKS={'miya','mono','xiaoya','miku','rin'}
|
VOCPACKS={'miya','mono','xiaoya','miku'}
|
||||||
FIRSTLAUNCH=false
|
FIRSTLAUNCH=false
|
||||||
DAILYLAUNCH=false
|
DAILYLAUNCH=false
|
||||||
|
|
||||||
--System setting
|
-- System setting
|
||||||
math.randomseed(os.time()*626)
|
math.randomseed(os.time()*626)
|
||||||
love.setDeprecationOutput(false)
|
love.setDeprecationOutput(false)
|
||||||
love.keyboard.setKeyRepeat(true)
|
love.keyboard.setKeyRepeat(true)
|
||||||
love.keyboard.setTextInput(false)
|
love.keyboard.setTextInput(false)
|
||||||
if MOBILE then
|
|
||||||
local w,h,f=love.window.getMode()
|
|
||||||
f.resizable=false
|
|
||||||
love.window.setMode(w,h,f)
|
|
||||||
end
|
|
||||||
|
|
||||||
local _LOADTIMELIST_={}
|
local _LOADTIMELIST_={}
|
||||||
local _LOADTIME_=TIME()
|
local _LOADTIME_=TIME()
|
||||||
|
|
||||||
--Load modules
|
-- Load modules
|
||||||
Z=require'Zframework'
|
Z=require'Zframework'
|
||||||
FONT.load{
|
FONT.load{
|
||||||
norm='parts/fonts/proportional.otf',
|
norm='parts/fonts/proportional.otf',
|
||||||
@@ -57,64 +47,61 @@ FONT.load{
|
|||||||
FONT.setDefault('norm')
|
FONT.setDefault('norm')
|
||||||
FONT.setFallback('norm')
|
FONT.setFallback('norm')
|
||||||
|
|
||||||
SCR.setSize(1280,720)--Initialize Screen size
|
SCR.setSize(1280,720)-- Initialize Screen size
|
||||||
BGM.setMaxSources(5)
|
BGM.setMaxSources(5)
|
||||||
BGM.setChange(function(name)MES.new('music',text.nowPlaying..name,5)end)
|
|
||||||
VOC.setDiversion(.62)
|
VOC.setDiversion(.62)
|
||||||
|
|
||||||
WIDGET.setOnChange(function()
|
WIDGET.setOnChange(function()
|
||||||
if SCN.cur~='custom_field'then
|
if SCN.cur~='net_game' and SCN.cur~='custom_field' then
|
||||||
local colorList=THEME.getThemeColor()
|
local colorList=THEME.getThemeColor()
|
||||||
if not colorList then return end
|
if colorList then
|
||||||
local rnd=math.random
|
for _,W in next,SCN.scenes[SCN.cur].widgetList do
|
||||||
for _,W in next,SCN.scenes[SCN.cur].widgetList do
|
if W.color then
|
||||||
if W.color then
|
W.color=colorList[math.random(#colorList)]
|
||||||
W.color=colorList[rnd(#colorList)]
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
table.insert(_LOADTIMELIST_,("Load Zframework: %.3fs"):format(TIME()-_LOADTIME_))
|
-- Create shortcuts
|
||||||
|
|
||||||
--Create shortcuts
|
|
||||||
setFont=FONT.set
|
setFont=FONT.set
|
||||||
getFont=FONT.get
|
getFont=FONT.get
|
||||||
mStr=GC.mStr
|
|
||||||
mText=GC.simpX
|
mText=GC.simpX
|
||||||
mDraw=GC.draw
|
mDraw=GC.mDraw
|
||||||
Snd=SFX.playSample
|
Snd=SFX.playSample
|
||||||
string.repD=STRING.repD
|
string.repD=STRING.repD
|
||||||
string.sArg=STRING.sArg
|
string.sArg=STRING.sArg
|
||||||
string.split=STRING.split
|
string.split=STRING.split
|
||||||
|
|
||||||
--Delete all naked files (from too old version)
|
-- Delete all naked files (from ancient versions)
|
||||||
FILE.clear('')
|
FILE.clear('')
|
||||||
|
|
||||||
--Create directories
|
-- Create directories
|
||||||
for _,v in next,{'conf','record','replay','cache','lib'}do
|
for _,v in next,{'conf','record','replay','cache','lib'} do
|
||||||
local info=fs.getInfo(v)
|
local info=fs.getInfo(v)
|
||||||
if not info then
|
if not info then
|
||||||
fs.createDirectory(v)
|
fs.createDirectory(v)
|
||||||
elseif info.type~='directory'then
|
elseif info.type~='directory' then
|
||||||
fs.remove(v)
|
fs.remove(v)
|
||||||
fs.createDirectory(v)
|
fs.createDirectory(v)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CHAR=require'parts.char'
|
-- Load shader files from SOURCE ONLY
|
||||||
require'parts.gameTables'
|
|
||||||
require'parts.gameFuncs'
|
|
||||||
|
|
||||||
--Load shader files from SOURCE ONLY
|
|
||||||
SHADER={}
|
SHADER={}
|
||||||
for _,v in next,fs.getDirectoryItems('parts/shaders')do
|
for _,v in next,fs.getDirectoryItems('parts/shaders') do
|
||||||
if isSafeFile('parts/shaders/'..v)then
|
if FILE.isSafe('parts/shaders/'..v) then
|
||||||
local name=v:sub(1,-6)
|
local name=v:sub(1,-6)
|
||||||
SHADER[name]=love.graphics.newShader('parts/shaders/'..name..'.glsl')
|
SHADER[name]=love.graphics.newShader('parts/shaders/'..name..'.glsl')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Load modules
|
||||||
|
CHAR=require'parts.char'
|
||||||
|
require'parts.gameTables'
|
||||||
|
require'parts.gameFuncs'
|
||||||
|
|
||||||
THEME= require'parts.theme'
|
THEME= require'parts.theme'
|
||||||
LINE= require'parts.line'
|
LINE= require'parts.line'
|
||||||
DATA= require'parts.data'
|
DATA= require'parts.data'
|
||||||
@@ -125,7 +112,7 @@ USERS= require'parts.users'
|
|||||||
NET= require'parts.net'
|
NET= require'parts.net'
|
||||||
VK= require'parts.virtualKey'
|
VK= require'parts.virtualKey'
|
||||||
BOT= require'parts.bot'
|
BOT= require'parts.bot'
|
||||||
RSlist= require'parts.RSlist'DSCP=RSlist.TRS.centerPos
|
RSlist= require'parts.RSlist'; DSCP=RSlist.TRS.centerPos
|
||||||
PLY= require'parts.player'
|
PLY= require'parts.player'
|
||||||
NETPLY= require'parts.netPlayer'
|
NETPLY= require'parts.netPlayer'
|
||||||
MODES= require'parts.modes'
|
MODES= require'parts.modes'
|
||||||
@@ -136,10 +123,29 @@ setmetatable(TEXTURE,{__index=function(self,k)
|
|||||||
return self[k]
|
return self[k]
|
||||||
end})
|
end})
|
||||||
|
|
||||||
table.insert(_LOADTIMELIST_,("Load Parts: %.3fs"):format(TIME()-_LOADTIME_))
|
-- Load mode files
|
||||||
|
for i=1,#MODES do
|
||||||
|
local m=MODES[i]-- Mode template
|
||||||
|
if FILE.isSafe('parts/modes/'..m.name) then
|
||||||
|
TABLE.complete(require('parts.modes.'..m.name),MODES[i])
|
||||||
|
MODES[m.name],MODES[i]=MODES[i]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for _,v in next,fs.getDirectoryItems('parts/modes') do
|
||||||
|
if FILE.isSafe('parts/modes/'..v) and not MODES[v:sub(1,-5)] then
|
||||||
|
local M={name=v:sub(1,-5)}
|
||||||
|
local modeData=require('parts.modes.'..M.name)
|
||||||
|
if modeData.env then
|
||||||
|
TABLE.complete(modeData,M)
|
||||||
|
MODES[M.name]=M
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--Init Zframework
|
table.insert(_LOADTIMELIST_,("Load Modules: %.3fs"):format(TIME()-_LOADTIME_))
|
||||||
do--Z.setCursor
|
|
||||||
|
-- Initialize Zframework
|
||||||
|
do-- Z.setCursor
|
||||||
local normImg=GC.DO{16,16,
|
local normImg=GC.DO{16,16,
|
||||||
{'fCirc',8,8,4},
|
{'fCirc',8,8,4},
|
||||||
{'setCL',1,1,1,.7},
|
{'setCL',1,1,1,.7},
|
||||||
@@ -150,28 +156,26 @@ do--Z.setCursor
|
|||||||
{'dCirc',8,8,7},
|
{'dCirc',8,8,7},
|
||||||
{'fCirc',8,8,3},
|
{'fCirc',8,8,3},
|
||||||
}
|
}
|
||||||
local min,int,abs=math.min,math.floor,math.abs
|
local _
|
||||||
local gc_setColor,gc_draw=love.graphics.setColor,love.graphics.draw
|
|
||||||
local ms=love.mouse
|
|
||||||
Z.setCursor(function(time,x,y)
|
Z.setCursor(function(time,x,y)
|
||||||
if not SETTING.sysCursor then
|
if not SETTING.sysCursor then
|
||||||
local R=int((time+1)/2)%7+1
|
local R=math.floor((time+1)/2)%7+1
|
||||||
_=BLOCK_COLORS[SETTING.skin[R]]
|
_=BLOCK_COLORS[SETTING.skin[R]]
|
||||||
gc_setColor(_[1],_[2],_[3],min(abs(1-time%2),.3))
|
GC.setColor(_[1],_[2],_[3],math.min(math.abs(1-time%2),.3))
|
||||||
_=DSCP[R][0]
|
_=DSCP[R][0]
|
||||||
gc_draw(TEXTURE.miniBlock[R],x,y,time%3.14159265359*4,8,8,2*_[2]+1,2*(#BLOCKS[R][0]-_[1])-1)
|
GC.draw(TEXTURE.miniBlock[R],x,y,time%math.pi*4,8,8,2*_[2]+1,2*(#BLOCKS[R][0]-_[1])-1)
|
||||||
gc_setColor(1,1,1)
|
GC.setColor(1,1,1)
|
||||||
gc_draw(ms.isDown(1)and holdImg or normImg,x,y,nil,nil,nil,8,8)
|
GC.draw(love.mouse.isDown(1) and holdImg or normImg,x,y,nil,nil,nil,8,8)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
Z.setOnFnKeys({
|
Z.setOnFnKeys({
|
||||||
function()MES.new('check',PROFILE.switch()and"profile start!"or"profile report copied!")end,
|
function() MES.new('check',PROFILE.switch() and "profile start!" or "profile report copied!") end,
|
||||||
function()MES.new('info',("System:%s[%s]\nluaVer:%s\njitVer:%s\njitVerNum:%s"):format(SYSTEM,jit.arch,_VERSION,jit.version,jit.version_num))end,
|
function() MES.new('info',("System:%s[%s]\nluaVer:%s\njitVer:%s\njitVerNum:%s"):format(SYSTEM,jit.arch,_VERSION,jit.version,jit.version_num)) end,
|
||||||
function()MES.new('error',"挂了")end,
|
function() MES.new('error',"挂了") end,
|
||||||
function()
|
function()
|
||||||
if GAME.playing and not GAME.net then
|
if GAME.playing and not GAME.net then
|
||||||
for _=1,8 do
|
for _=1,1 do
|
||||||
if #PLY_ALIVE>1 then
|
if #PLY_ALIVE>1 then
|
||||||
local P=PLY_ALIVE[math.random(2,#PLY_ALIVE)]
|
local P=PLY_ALIVE[math.random(2,#PLY_ALIVE)]
|
||||||
P.lastRecv=PLAYERS[1]
|
P.lastRecv=PLAYERS[1]
|
||||||
@@ -180,17 +184,25 @@ Z.setOnFnKeys({
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
function()print(BG.locked)end,
|
function() print(BG.locked) end,
|
||||||
function()for k,v in next,_G do print(k,v)end end,
|
function() for k,v in next,_G do print(k,v) end end,
|
||||||
function()if love['_openConsole']then love['_openConsole']()end end,
|
function() if love['_openConsole'] then love['_openConsole']() end end,
|
||||||
})
|
})
|
||||||
|
Z.setOnGlobalKey('f11',function()
|
||||||
|
if not MOBILE then
|
||||||
|
SETTING.fullscreen=not SETTING.fullscreen
|
||||||
|
applySettings()
|
||||||
|
saveSettings()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
Z.setVersionText(VERSION.string)
|
||||||
Z.setDebugInfo{
|
Z.setDebugInfo{
|
||||||
{"Cache",gcinfo},
|
{"Cache",gcinfo},
|
||||||
{"Tasks",TASK.getCount},
|
{"Tasks",TASK.getCount},
|
||||||
{"Voices",VOC.getQueueCount},
|
{"Voices",VOC.getQueueCount},
|
||||||
{"Audios",love.audio.getSourceCount},
|
{"Audios",love.audio.getSourceCount},
|
||||||
}
|
}
|
||||||
do--Z.setOnFocus
|
do-- Z.setOnFocus
|
||||||
local function task_autoSoundOff()
|
local function task_autoSoundOff()
|
||||||
while true do
|
while true do
|
||||||
coroutine.yield()
|
coroutine.yield()
|
||||||
@@ -218,7 +230,7 @@ do--Z.setOnFocus
|
|||||||
TASK.new(task_autoSoundOn)
|
TASK.new(task_autoSoundOn)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if SCN.cur=='game'and SETTING.autoPause then
|
if SCN.cur=='game' and SETTING.autoPause then
|
||||||
pauseGame()
|
pauseGame()
|
||||||
end
|
end
|
||||||
if SETTING.autoMute and SCN.cur~='music' then
|
if SETTING.autoMute and SCN.cur~='music' then
|
||||||
@@ -228,48 +240,18 @@ do--Z.setOnFocus
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
Z.setOnQuit(destroyPlayers)
|
Z.setOnBeforeQuit(function()
|
||||||
|
NET.ws_close()
|
||||||
|
TASK.new(function()
|
||||||
|
TEST.yieldT(.26)
|
||||||
|
love.event.quit()
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
Z.setOnQuit(function()
|
||||||
|
destroyPlayers()
|
||||||
|
end)
|
||||||
|
|
||||||
--Load settings and statistics
|
-- Initialize image libs
|
||||||
if
|
|
||||||
not(
|
|
||||||
pcall(TABLE.cover, loadFile('conf/user', '-json -canSkip')or loadFile('conf/user', '-luaon -canSkip')or{},USER) and
|
|
||||||
pcall(TABLE.cover, loadFile('conf/unlock', '-json -canSkip')or loadFile('conf/unlock', '-luaon -canSkip')or{},RANKS) and
|
|
||||||
pcall(TABLE.update,loadFile('conf/settings', '-json -canSkip')or loadFile('conf/settings', '-luaon -canSkip')or{},SETTING) and
|
|
||||||
pcall(TABLE.coverR,loadFile('conf/data', '-json -canSkip')or loadFile('conf/data', '-luaon -canSkip')or{},STAT) and
|
|
||||||
pcall(TABLE.cover, loadFile('conf/key', '-json -canSkip')or loadFile('conf/key', '-luaon -canSkip')or{},KEY_MAP) and
|
|
||||||
pcall(TABLE.cover, loadFile('conf/virtualkey','-json -canSkip')or loadFile('conf/virtualkey','-luaon -canSkip')or{},VK_ORG)
|
|
||||||
)
|
|
||||||
then
|
|
||||||
MES.new('error',"Be careful, an error accured when loading saving, some data was lost")
|
|
||||||
end
|
|
||||||
|
|
||||||
--Initialize fields, sequence, missions, gameEnv for cutsom game
|
|
||||||
local fieldData=loadFile('conf/customBoards','-string -canSkip')
|
|
||||||
if fieldData then
|
|
||||||
fieldData=STRING.split(fieldData,"!")
|
|
||||||
for i=1,#fieldData do
|
|
||||||
DATA.pasteBoard(fieldData[i],i)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
FIELD[1]=DATA.newBoard()
|
|
||||||
end
|
|
||||||
local sequenceData=loadFile('conf/customSequence','-string -canSkip')
|
|
||||||
if sequenceData then
|
|
||||||
DATA.pasteSequence(sequenceData)
|
|
||||||
end
|
|
||||||
local missionData=loadFile('conf/customMissions','-string -canSkip')
|
|
||||||
if missionData then
|
|
||||||
DATA.pasteMission(missionData)
|
|
||||||
end
|
|
||||||
local customData=loadFile('conf/customEnv','-canSkip')
|
|
||||||
if customData and customData['version']==VERSION.code then
|
|
||||||
TABLE.complete(customData,CUSTOMENV)
|
|
||||||
end
|
|
||||||
TABLE.complete(require"parts.customEnv0",CUSTOMENV)
|
|
||||||
|
|
||||||
|
|
||||||
--Initialize image libs
|
|
||||||
IMG.init{
|
IMG.init{
|
||||||
lock='media/image/mess/lock.png',
|
lock='media/image/mess/lock.png',
|
||||||
dialCircle='media/image/mess/dialCircle.png',
|
dialCircle='media/image/mess/dialCircle.png',
|
||||||
@@ -277,7 +259,6 @@ IMG.init{
|
|||||||
lifeIcon='media/image/mess/life.png',
|
lifeIcon='media/image/mess/life.png',
|
||||||
badgeIcon='media/image/mess/badge.png',
|
badgeIcon='media/image/mess/badge.png',
|
||||||
ctrlSpeedLimit='media/image/mess/ctrlSpeedLimit.png',
|
ctrlSpeedLimit='media/image/mess/ctrlSpeedLimit.png',
|
||||||
speedLimit='media/image/mess/speedLimit.png',--Not used, for future C2-mode
|
|
||||||
pay1='media/image/mess/pay1.png',
|
pay1='media/image/mess/pay1.png',
|
||||||
pay2='media/image/mess/pay2.png',
|
pay2='media/image/mess/pay2.png',
|
||||||
|
|
||||||
@@ -291,7 +272,6 @@ IMG.init{
|
|||||||
xiaoyaCH='media/image/characters/xiaoya.png',
|
xiaoyaCH='media/image/characters/xiaoya.png',
|
||||||
xiaoyaOmino='media/image/characters/xiaoya_Omino.png',
|
xiaoyaOmino='media/image/characters/xiaoya_Omino.png',
|
||||||
mikuCH='media/image/characters/miku.png',
|
mikuCH='media/image/characters/miku.png',
|
||||||
rinCH='media/image/characters/rin.png',
|
|
||||||
z={
|
z={
|
||||||
character='media/image/characters/z_character.png',
|
character='media/image/characters/z_character.png',
|
||||||
screen1='media/image/characters/z_screen1.png',
|
screen1='media/image/characters/z_screen1.png',
|
||||||
@@ -349,20 +329,20 @@ SKIN.load{
|
|||||||
{name="wtf",path='media/image/skin/wtf_mrz.png'},
|
{name="wtf",path='media/image/skin/wtf_mrz.png'},
|
||||||
}
|
}
|
||||||
|
|
||||||
--Initialize sound libs
|
-- Initialize sound libs
|
||||||
SFX.init((function()--[Warning] Not loading files here, just get the list of sound needed
|
SFX.init((function()--[Warning] Not loading files here, just get the list of sound needed
|
||||||
local L={}
|
local L={}
|
||||||
for _,v in next,fs.getDirectoryItems('media/effect/chiptune/')do
|
for _,v in next,fs.getDirectoryItems('media/effect/chiptune/') do
|
||||||
if isSafeFile('media/effect/chiptune/'..v,"Dangerous file : %SAVE%/media/effect/chiptune/"..v)then
|
if FILE.isSafe('media/effect/chiptune/'..v,"Dangerous file : %SAVE%/media/effect/chiptune/"..v) then
|
||||||
table.insert(L,v:sub(1,-5))
|
table.insert(L,v:sub(1,-5))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return L
|
return L
|
||||||
end)())
|
end)())
|
||||||
BGM.load((function()
|
BGM.init((function()
|
||||||
local L={}
|
local L={}
|
||||||
for _,v in next,fs.getDirectoryItems('media/music')do
|
for _,v in next,fs.getDirectoryItems('media/music') do
|
||||||
if isSafeFile('media/music/'..v,"Dangerous file : %SAVE%/media/music/"..v)then
|
if FILE.isSafe('media/music/'..v,"Dangerous file : %SAVE%/media/music/"..v) then
|
||||||
L[v:sub(1,-5)]='media/music/'..v
|
L[v:sub(1,-5)]='media/music/'..v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -378,7 +358,138 @@ VOC.init{
|
|||||||
'welcome',
|
'welcome',
|
||||||
}
|
}
|
||||||
|
|
||||||
--Initialize language lib
|
table.insert(_LOADTIMELIST_,("Initialize Modules: %.3fs"):format(TIME()-_LOADTIME_))
|
||||||
|
|
||||||
|
-- Load settings and statistics
|
||||||
|
if
|
||||||
|
not (
|
||||||
|
pcall(TABLE.cover, loadFile('conf/user', '-json -canSkip') or loadFile('conf/user', '-luaon -canSkip') or{},USER) and
|
||||||
|
pcall(TABLE.cover, loadFile('conf/unlock', '-json -canSkip') or loadFile('conf/unlock', '-luaon -canSkip') or{},RANKS) and
|
||||||
|
pcall(TABLE.update,loadFile('conf/settings', '-json -canSkip') or loadFile('conf/settings', '-luaon -canSkip') or{},SETTING) and
|
||||||
|
pcall(TABLE.coverR,loadFile('conf/data', '-json -canSkip') or loadFile('conf/data', '-luaon -canSkip') or{},STAT) and
|
||||||
|
pcall(TABLE.cover, loadFile('conf/key', '-json -canSkip') or loadFile('conf/key', '-luaon -canSkip') or{},KEY_MAP) and
|
||||||
|
pcall(TABLE.cover, loadFile('conf/virtualkey','-json -canSkip') or loadFile('conf/virtualkey','-luaon -canSkip') or{},VK_ORG)
|
||||||
|
)
|
||||||
|
then
|
||||||
|
MES.new('error',"An error occured during loading, and some data was lost.")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Initialize fields, sequence, missions, gameEnv for cutsom game
|
||||||
|
local fieldData=loadFile('conf/customBoards','-string -canSkip')
|
||||||
|
if fieldData then
|
||||||
|
fieldData=STRING.split(fieldData,"!")
|
||||||
|
for i=1,#fieldData do
|
||||||
|
DATA.pasteBoard(fieldData[i],i)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
FIELD[1]=DATA.newBoard()
|
||||||
|
end
|
||||||
|
local sequenceData=loadFile('conf/customSequence','-string -canSkip')
|
||||||
|
if sequenceData then
|
||||||
|
DATA.pasteSequence(sequenceData)
|
||||||
|
end
|
||||||
|
local missionData=loadFile('conf/customMissions','-string -canSkip')
|
||||||
|
if missionData then
|
||||||
|
DATA.pasteMission(missionData)
|
||||||
|
end
|
||||||
|
local customData=loadFile('conf/customEnv','-canSkip')
|
||||||
|
if customData and customData['version']==VERSION.code then
|
||||||
|
TABLE.complete(customData,CUSTOMENV)
|
||||||
|
end
|
||||||
|
TABLE.complete(require"parts.customEnv0",CUSTOMENV)
|
||||||
|
|
||||||
|
-- Update data
|
||||||
|
do
|
||||||
|
if type(STAT.version)~='number' then
|
||||||
|
STAT.version=0
|
||||||
|
end
|
||||||
|
if STAT.version<1700 and SETTING.dascut<5 then
|
||||||
|
SETTING.dascut=SETTING.dascut+1
|
||||||
|
end
|
||||||
|
|
||||||
|
if RANKS.stack_e then
|
||||||
|
RANKS.stack_e=nil; fs.remove('record/stack_e.rec')
|
||||||
|
RANKS.stack_h=nil; fs.remove('record/stack_h.rec')
|
||||||
|
RANKS.stack_u=nil; fs.remove('record/stack_u.rec')
|
||||||
|
end
|
||||||
|
if RANKS.stack_20l then
|
||||||
|
RANKS.stack_20l=nil; fs.remove('record/stack_20l.rec')
|
||||||
|
RANKS.stack_40l=nil; fs.remove('record/stack_40l.rec')
|
||||||
|
RANKS.stack_100l=nil; fs.remove('record/stack_100l.rec')
|
||||||
|
end
|
||||||
|
if RANKS.rhythm_e then
|
||||||
|
RANKS.rhythm_e=nil; fs.remove('record/rhythm_e.rec')
|
||||||
|
RANKS.rhythm_h=nil; fs.remove('record/rhythm_h.rec')
|
||||||
|
RANKS.rhythm_u=nil; fs.remove('record/rhythm_u.rec')
|
||||||
|
end
|
||||||
|
if RANKS.bigbang then fs.remove('record/bigbang.rec') end
|
||||||
|
if RANKS.clearRush then fs.remove('record/clearRush.rec') end
|
||||||
|
|
||||||
|
if STAT.version~=VERSION.code then
|
||||||
|
for k,v in next,MODE_UPDATE_MAP do
|
||||||
|
if RANKS[k] then
|
||||||
|
RANKS[v]=RANKS[k]
|
||||||
|
RANKS[k]=nil
|
||||||
|
end
|
||||||
|
k='record/'..k
|
||||||
|
if fs.getInfo(k..'.dat') then
|
||||||
|
fs.write('record/'..v..'.rec',fs.read(k..'.dat'))
|
||||||
|
fs.remove(k..'.dat')
|
||||||
|
end
|
||||||
|
if fs.getInfo(k..'.rec') then
|
||||||
|
fs.write('record/'..v..'.rec',fs.read(k..'.rec'))
|
||||||
|
fs.remove(k..'.rec')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
STAT.version=VERSION.code
|
||||||
|
end
|
||||||
|
SETTING.appLock,SETTING.dataSaving,SETTING.swap,SETTING.autoLogin=nil
|
||||||
|
if not SETTING.VKSkin then SETTING.VKSkin=1 end
|
||||||
|
for _,v in next,SETTING.skin do if v<1 or v>17 then v=17 end end
|
||||||
|
if not RSlist[SETTING.RS] then SETTING.RS='TRS' end
|
||||||
|
if SETTING.ghostType=='greyCell' then SETTING.ghostType='grayCell' end
|
||||||
|
if type(SETTING.skinSet)=='number' then SETTING.skinSet='crystal_scf' end
|
||||||
|
if not TABLE.find({8,10,13,17,22,29,37,47,62,80,100},SETTING.frameMul) then SETTING.frameMul=100 end
|
||||||
|
if SETTING.cv then SETTING.vocPack,SETTING.cv=SETTING.cv end
|
||||||
|
if type(SETTING.bg)~='string' then SETTING.bg='on' end
|
||||||
|
if SETTING.skin[18]==10 then SETTING.skin[18]=4 end
|
||||||
|
if SETTING.reTime>3 or SETTING.reTime<.5 then SETTING.reTime=2 end
|
||||||
|
if SETTING.locale=='zh_full' then SETTING.locale='zh' end
|
||||||
|
if SETTING.vocPack=='rin' then SETTING.vocPack='miku' end
|
||||||
|
if RANKS.infinite then RANKS.infinite=0 end
|
||||||
|
if RANKS.infinite_dig then RANKS.infinite_dig=0 end
|
||||||
|
if not RANKS.sprint_10l then RANKS.sprint_10l=0 end
|
||||||
|
if RANKS.master_l then RANKS.master_n,RANKS.master_l=RANKS.master_l end
|
||||||
|
if RANKS.master_u then RANKS.master_h,RANKS.master_u=RANKS.master_u end
|
||||||
|
for _,v in next,VK_ORG do v.color=nil end
|
||||||
|
for name,rank in next,RANKS do
|
||||||
|
if type(name)=='number' or type(rank)~='number' then
|
||||||
|
RANKS[name]=nil
|
||||||
|
else
|
||||||
|
local M=MODES[name]
|
||||||
|
if M and M.unlock and rank>0 then
|
||||||
|
for _,unlockName in next,M.unlock do
|
||||||
|
if not RANKS[unlockName] then
|
||||||
|
RANKS[unlockName]=0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not (M and M.x) then
|
||||||
|
RANKS[name]=nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not MODES[STAT.lastPlay] then
|
||||||
|
STAT.lastPlay='sprint_10l'
|
||||||
|
end
|
||||||
|
fs.remove('conf/account')
|
||||||
|
|
||||||
|
saveStats()
|
||||||
|
saveProgress()
|
||||||
|
saveSettings()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Initialize language lib
|
||||||
LANG.init('zh',
|
LANG.init('zh',
|
||||||
{
|
{
|
||||||
zh=require'parts.language.lang_zh',
|
zh=require'parts.language.lang_zh',
|
||||||
@@ -391,219 +502,49 @@ LANG.init('zh',
|
|||||||
ja=require'parts.language.lang_ja',
|
ja=require'parts.language.lang_ja',
|
||||||
symbol=require'parts.language.lang_symbol',
|
symbol=require'parts.language.lang_symbol',
|
||||||
zh_code=require'parts.language.lang_zh_code',
|
zh_code=require'parts.language.lang_zh_code',
|
||||||
--1. Add language file to LANG folder;
|
-- 1. Add language file to LANG folder;
|
||||||
--2. Require it;
|
-- 2. Require it;
|
||||||
--3. Add a button in parts/scenes/lang.lua;
|
-- 3. Add a button in parts/scenes/lang.lua;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
block=BLOCK_NAMES
|
block=BLOCK_NAMES
|
||||||
},
|
},
|
||||||
(function()
|
(function()
|
||||||
local tipMeta={__call=function(L)return L[math.random(#L)]end}
|
local tipMeta={__call=function(L) return L[math.random(#L)] end}
|
||||||
return function(L)
|
return function(L)
|
||||||
if type(rawget(L,'getTip'))=='table'then setmetatable(L.getTip,tipMeta)end
|
if type(rawget(L,'getTip'))=='table' then setmetatable(L.getTip,tipMeta) end
|
||||||
setmetatable(L,{__index=function(self,k)
|
setmetatable(L,{__index=function(self,k)
|
||||||
local mes="No Text ("..SETTING.locale.."): "..k
|
local mes="No Text ("..SETTING.locale.."): "..k
|
||||||
LOG(mes)
|
LOG(mes)
|
||||||
MES.new('warn',mes)
|
MES.new('warn',mes)
|
||||||
self[k]=CHAR.zChan.thinking
|
self[k]="["..k.."]"
|
||||||
return self[k]
|
return self[k]
|
||||||
end})
|
end})
|
||||||
end
|
end
|
||||||
end)()
|
end)()
|
||||||
)
|
)
|
||||||
|
|
||||||
table.insert(_LOADTIMELIST_,("Initialize Parts: %.3fs"):format(TIME()-_LOADTIME_))
|
-- Load background files from SOURCE ONLY
|
||||||
|
for _,v in next,fs.getDirectoryItems('parts/backgrounds') do
|
||||||
--Load background files from SOURCE ONLY
|
if FILE.isSafe('parts/backgrounds/'..v) and v:sub(-3)=='lua' then
|
||||||
for _,v in next,fs.getDirectoryItems('parts/backgrounds')do
|
|
||||||
if isSafeFile('parts/backgrounds/'..v)and v:sub(-3)=='lua'then
|
|
||||||
local name=v:sub(1,-5)
|
local name=v:sub(1,-5)
|
||||||
BG.add(name,require('parts.backgrounds.'..name))
|
BG.add(name,require('parts.backgrounds.'..name))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
BG.remList('none')BG.remList('gray')BG.remList('custom')
|
BG.remList('none')BG.remList('gray')BG.remList('custom')
|
||||||
--Load scene files from SOURCE ONLY
|
|
||||||
for _,v in next,fs.getDirectoryItems('parts/scenes')do
|
-- Load scene files from SOURCE ONLY
|
||||||
if isSafeFile('parts/scenes/'..v)then
|
for _,v in next,fs.getDirectoryItems('parts/scenes') do
|
||||||
|
if FILE.isSafe('parts/scenes/'..v) then
|
||||||
local sceneName=v:sub(1,-5)
|
local sceneName=v:sub(1,-5)
|
||||||
SCN.add(sceneName,require('parts.scenes.'..sceneName))
|
SCN.add(sceneName,require('parts.scenes.'..sceneName))
|
||||||
LANG.addScene(sceneName)
|
LANG.addScene(sceneName)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--Load mode files
|
|
||||||
for i=1,#MODES do
|
|
||||||
local m=MODES[i]--Mode template
|
|
||||||
if isSafeFile('parts/modes/'..m.name)then
|
|
||||||
TABLE.complete(require('parts.modes.'..m.name),MODES[i])
|
|
||||||
MODES[m.name],MODES[i]=MODES[i]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
for _,v in next,fs.getDirectoryItems('parts/modes')do
|
|
||||||
if isSafeFile('parts/modes/'..v)and not MODES[v:sub(1,-5)]then
|
|
||||||
local M={name=v:sub(1,-5)}
|
|
||||||
local modeData=require('parts.modes.'..M.name)
|
|
||||||
if modeData.env then
|
|
||||||
TABLE.complete(modeData,M)
|
|
||||||
MODES[M.name]=M
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
table.insert(_LOADTIMELIST_,("Load Files: %.3fs"):format(TIME()-_LOADTIME_))
|
table.insert(_LOADTIMELIST_,("Load Files: %.3fs"):format(TIME()-_LOADTIME_))
|
||||||
|
|
||||||
--Update data
|
-- First start
|
||||||
do
|
|
||||||
local needSave
|
|
||||||
|
|
||||||
if not fs.getInfo('conf/data')then
|
|
||||||
needSave=true
|
|
||||||
end
|
|
||||||
if type(STAT.version)~='number'then
|
|
||||||
STAT.version=0
|
|
||||||
needSave=true
|
|
||||||
end
|
|
||||||
if STAT.version<1500 then
|
|
||||||
FILE.clear_s('')
|
|
||||||
end
|
|
||||||
if STAT.version<1505 then
|
|
||||||
fs.remove('record/bigbang.rec')
|
|
||||||
fs.remove('conf/replay')
|
|
||||||
end
|
|
||||||
if STAT.version==1506 then
|
|
||||||
local temp1,temp2
|
|
||||||
if fs.getInfo('record/master_l.rec')then
|
|
||||||
temp1=fs.read('record/master_l.rec')
|
|
||||||
end
|
|
||||||
if fs.getInfo('record/master_u.rec')then
|
|
||||||
temp2=fs.read('record/master_u.rec')
|
|
||||||
end
|
|
||||||
if temp1 then
|
|
||||||
fs.write('record/master_u.rec',temp1)
|
|
||||||
end
|
|
||||||
if temp2 then
|
|
||||||
fs.write('record/master_l.rec',temp2)
|
|
||||||
end
|
|
||||||
RANKS.master_l,RANKS.master_u=RANKS.master_u,RANKS.master_l
|
|
||||||
if RANKS.tsd_u then
|
|
||||||
RANKS.tsd_u=0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if STAT.version==1601 then
|
|
||||||
RANKS.round_e=nil
|
|
||||||
RANKS.round_n=nil
|
|
||||||
RANKS.round_h=nil
|
|
||||||
RANKS.round_l=nil
|
|
||||||
RANKS.round_u=nil
|
|
||||||
fs.remove('record/round_e.rec')
|
|
||||||
fs.remove('record/round_n.rec')
|
|
||||||
fs.remove('record/round_h.rec')
|
|
||||||
fs.remove('record/round_l.rec')
|
|
||||||
fs.remove('record/round_u.rec')
|
|
||||||
end
|
|
||||||
if STAT.version<1700 and SETTING.dascut<5 then
|
|
||||||
SETTING.dascut=SETTING.dascut+1
|
|
||||||
needSave=true
|
|
||||||
end
|
|
||||||
if RANKS.stack_e then
|
|
||||||
RANKS.stack_e=nil
|
|
||||||
RANKS.stack_h=nil
|
|
||||||
RANKS.stack_u=nil
|
|
||||||
fs.remove('record/stack_e.rec')
|
|
||||||
fs.remove('record/stack_h.rec')
|
|
||||||
fs.remove('record/stack_u.rec')
|
|
||||||
end
|
|
||||||
if RANKS.stack_20l then
|
|
||||||
RANKS.stack_20l=nil
|
|
||||||
RANKS.stack_40l=nil
|
|
||||||
RANKS.stack_100l=nil
|
|
||||||
fs.remove('record/stack_20l.rec')
|
|
||||||
fs.remove('record/stack_40l.rec')
|
|
||||||
fs.remove('record/stack_100l.rec')
|
|
||||||
end
|
|
||||||
if RANKS.rhythm_e then
|
|
||||||
RANKS.rhythm_e=nil
|
|
||||||
RANKS.rhythm_h=nil
|
|
||||||
RANKS.rhythm_u=nil
|
|
||||||
fs.remove('record/rhythm_e.rec')
|
|
||||||
fs.remove('record/rhythm_h.rec')
|
|
||||||
fs.remove('record/rhythm_u.rec')
|
|
||||||
end
|
|
||||||
if RANKS.bigbang or RANKS.clearRush then
|
|
||||||
fs.remove('record/clearRush.rec')
|
|
||||||
fs.remove('record/bigbang.rec')
|
|
||||||
end
|
|
||||||
if STAT.version~=VERSION.code then
|
|
||||||
for k,v in next,MODE_UPDATE_MAP do
|
|
||||||
if RANKS[k]then
|
|
||||||
RANKS[v]=RANKS[k]
|
|
||||||
RANKS[k]=nil
|
|
||||||
end
|
|
||||||
k='record/'..k
|
|
||||||
if fs.getInfo(k..'.dat')then
|
|
||||||
fs.write('record/'..v..'.rec',fs.read(k..'.dat'))
|
|
||||||
fs.remove(k..'.dat')
|
|
||||||
end
|
|
||||||
if fs.getInfo(k..'.rec')then
|
|
||||||
fs.write('record/'..v..'.rec',fs.read(k..'.rec'))
|
|
||||||
fs.remove(k..'.rec')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
STAT.version=VERSION.code
|
|
||||||
needSave=true
|
|
||||||
end
|
|
||||||
SETTING.appLock,SETTING.dataSaving,SETTING.swap=nil
|
|
||||||
if not SETTING.VKSkin then SETTING.VKSkin=1 end
|
|
||||||
for _,v in next,SETTING.skin do if v<1 or v>17 then v=17 end end
|
|
||||||
if not RSlist[SETTING.RS]then SETTING.RS='TRS'end
|
|
||||||
if SETTING.ghostType=='greyCell'then SETTING.ghostType='grayCell'end
|
|
||||||
if type(SETTING.skinSet)=='number'then SETTING.skinSet='crystal_scf'end
|
|
||||||
if not TABLE.find({8,10,13,17,22,29,37,47,62,80,100},SETTING.frameMul)then SETTING.frameMul=100 end
|
|
||||||
if SETTING.cv then SETTING.vocPack,SETTING.cv=SETTING.cv end
|
|
||||||
if type(SETTING.bg)~='string'then SETTING.bg='on'end
|
|
||||||
if SETTING.skin[18]==10 then SETTING.skin[18]=4 end
|
|
||||||
if SETTING.reTime>3 or SETTING.reTime<.5 then SETTING.reTime=2 end
|
|
||||||
if SETTING.locale=='zh_full' then SETTING.locale='zh' end
|
|
||||||
if RANKS.infinite then RANKS.infinite=0 end
|
|
||||||
if RANKS.infinite_dig then RANKS.infinite_dig=0 end
|
|
||||||
if not RANKS.sprint_10l then RANKS.sprint_10l=0 end
|
|
||||||
if RANKS.master_l then RANKS.master_n,RANKS.master_l=RANKS.master_l needSave=true end
|
|
||||||
if RANKS.master_u then RANKS.master_h,RANKS.master_u=RANKS.master_u needSave=true end
|
|
||||||
for _,v in next,VK_ORG do v.color=nil end
|
|
||||||
for name,rank in next,RANKS do
|
|
||||||
if type(name)=='number'or type(rank)~='number'then
|
|
||||||
RANKS[name]=nil
|
|
||||||
needSave=true
|
|
||||||
else
|
|
||||||
local M=MODES[name]
|
|
||||||
if M and M.unlock and rank>0 then
|
|
||||||
for _,unlockName in next,M.unlock do
|
|
||||||
if not RANKS[unlockName]then
|
|
||||||
RANKS[unlockName]=0
|
|
||||||
needSave=true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not(M and M.x)then
|
|
||||||
RANKS[name]=nil
|
|
||||||
needSave=true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not MODES[STAT.lastPlay]then
|
|
||||||
STAT.lastPlay='sprint_10l'
|
|
||||||
needSave=true
|
|
||||||
end
|
|
||||||
|
|
||||||
if needSave then
|
|
||||||
saveStats()
|
|
||||||
saveProgress()
|
|
||||||
saveSettings()
|
|
||||||
love.event.quit('restart')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--First start
|
|
||||||
FIRSTLAUNCH=STAT.run==0
|
FIRSTLAUNCH=STAT.run==0
|
||||||
if FIRSTLAUNCH and MOBILE then
|
if FIRSTLAUNCH and MOBILE then
|
||||||
SETTING.VKSwitch=true
|
SETTING.VKSwitch=true
|
||||||
@@ -611,18 +552,18 @@ if FIRSTLAUNCH and MOBILE then
|
|||||||
SETTING.cleanCanvas=true
|
SETTING.cleanCanvas=true
|
||||||
end
|
end
|
||||||
|
|
||||||
--Apply system setting
|
-- Apply system setting
|
||||||
applySettings()
|
applySettings()
|
||||||
|
|
||||||
--Load replays
|
-- Load replays
|
||||||
for _,fileName in next,fs.getDirectoryItems('replay')do
|
for _,fileName in next,fs.getDirectoryItems('replay') do
|
||||||
if fileName:sub(12,12):match("[a-zA-Z]")then
|
if fileName:sub(12,12):match("[a-zA-Z]") then
|
||||||
local date,mode,version,player,seed,setting,mod
|
local date,mode,version,player,seed,setting,mod
|
||||||
local fileData=fs.read('replay/'..fileName)
|
local fileData=fs.read('replay/'..fileName)
|
||||||
date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","")
|
date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","")
|
||||||
mode, fileData=STRING.readLine(fileData)mode=MODE_UPDATE_MAP[mode]or mode
|
mode, fileData=STRING.readLine(fileData)mode=MODE_UPDATE_MAP[mode] or mode
|
||||||
version,fileData=STRING.readLine(fileData)
|
version,fileData=STRING.readLine(fileData)
|
||||||
player, fileData=STRING.readLine(fileData)if player=="Local Player"then player="Stacker"end
|
player, fileData=STRING.readLine(fileData) if player=="Local Player" then player="Stacker" end
|
||||||
local success
|
local success
|
||||||
success,fileData=pcall(love.data.decompress,'string','zlib',fileData)
|
success,fileData=pcall(love.data.decompress,'string','zlib',fileData)
|
||||||
if not success then goto BREAK_cannotParse end
|
if not success then goto BREAK_cannotParse end
|
||||||
@@ -658,16 +599,20 @@ for _,fileName in next,fs.getDirectoryItems('replay')do
|
|||||||
local rep=DATA.parseReplay('replay/'..fileName)
|
local rep=DATA.parseReplay('replay/'..fileName)
|
||||||
table.insert(REPLAY,rep)
|
table.insert(REPLAY,rep)
|
||||||
end
|
end
|
||||||
table.sort(REPLAY,function(a,b)return a.fileName>b.fileName end)
|
table.sort(REPLAY,function(a,b) return a.fileName>b.fileName end)
|
||||||
|
|
||||||
table.insert(_LOADTIMELIST_,("Initialize Data: %.3fs"):format(TIME()-_LOADTIME_))
|
WS.switchHost('cafuuchino1.3322.org','10026','/techmino/ws/v1')
|
||||||
|
HTTP.setHost("cafuuchino1.3322.org:10026")
|
||||||
|
HTTP.setThreadCount(1)
|
||||||
|
|
||||||
for i=1,#_LOADTIMELIST_ do LOG(_LOADTIMELIST_[i])end
|
table.insert(_LOADTIMELIST_,("Load Resources: %.3fs"):format(TIME()-_LOADTIME_))
|
||||||
|
|
||||||
--Launch testing task if launch param received
|
for i=1,#_LOADTIMELIST_ do LOG(_LOADTIMELIST_[i]) end
|
||||||
if TABLE.find(arg,'--test')then
|
|
||||||
|
-- Launch testing task if launch param received
|
||||||
|
if TABLE.find(arg,'-- test') then
|
||||||
TASK.new(function()
|
TASK.new(function()
|
||||||
while not LOADED do YIELD()end
|
while not LOADED do coroutine.yield() end
|
||||||
|
|
||||||
LOG("\27[92m\27[1mAutomatic Test Started\27[0m")
|
LOG("\27[92m\27[1mAutomatic Test Started\27[0m")
|
||||||
BGM.setVol(0)SFX.setVol(0)
|
BGM.setVol(0)SFX.setVol(0)
|
||||||
@@ -675,7 +620,7 @@ if TABLE.find(arg,'--test')then
|
|||||||
TEST.yieldUntilNextScene()
|
TEST.yieldUntilNextScene()
|
||||||
|
|
||||||
for k,mode in next,MODES do
|
for k,mode in next,MODES do
|
||||||
if k~='netBattle'then
|
if k~='netBattle' then
|
||||||
LOG("Scanning mode: "..mode.name)
|
LOG("Scanning mode: "..mode.name)
|
||||||
loadGame(mode.name,true)
|
loadGame(mode.name,true)
|
||||||
TEST.yieldUntilNextScene()
|
TEST.yieldUntilNextScene()
|
||||||
@@ -689,12 +634,11 @@ if TABLE.find(arg,'--test')then
|
|||||||
end)
|
end)
|
||||||
TASK.new(function()
|
TASK.new(function()
|
||||||
while true do
|
while true do
|
||||||
YIELD()
|
coroutine.yield()
|
||||||
if Z.getErr(1)then break end
|
if Z.getErr(1) then break end
|
||||||
end
|
end
|
||||||
LOG("\27[91m\27[1mAutomatic Test Failed :(\27[0m\nThe error message is:\n"..table.concat(Z.getErr(1).mes,"\n").."\27[91m\nAborting\27[0m")
|
LOG("\27[91m\27[1mAutomatic Test Failed :(\27[0m\nThe error message is:\n"..table.concat(Z.getErr(1).mes,"\n").."\27[91m\nAborting\27[0m")
|
||||||
TEST.yieldN(60)
|
TEST.yieldN(60)
|
||||||
love.event.quit(1)
|
love.event.quit(1)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
WS.switchHost('101.43.110.22','10026','/tech/socket/v1')
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 117 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB |
BIN
media/music/antispace.ogg
Normal file
BIN
media/music/antispace.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
media/vocal/miya/angry_1.ogg
Normal file
BIN
media/vocal/miya/angry_1.ogg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
media/vocal/miya/b3b_3.ogg
Normal file
BIN
media/vocal/miya/b3b_3.ogg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
media/vocal/miya/bye_3.ogg
Normal file
BIN
media/vocal/miya/bye_3.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/bye_4.ogg
Normal file
BIN
media/vocal/miya/bye_4.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/bye_5.ogg
Normal file
BIN
media/vocal/miya/bye_5.ogg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
media/vocal/miya/doubt_3.ogg
Normal file
BIN
media/vocal/miya/doubt_3.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/doubt_4.ogg
Normal file
BIN
media/vocal/miya/doubt_4.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/espin_1.ogg
Normal file
BIN
media/vocal/miya/espin_1.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/fspin_1.ogg
Normal file
BIN
media/vocal/miya/fspin_1.ogg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
media/vocal/miya/happy_5.ogg
Normal file
BIN
media/vocal/miya/happy_5.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/happy_6.ogg
Normal file
BIN
media/vocal/miya/happy_6.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/happy_7.ogg
Normal file
BIN
media/vocal/miya/happy_7.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/hspin_1.ogg
Normal file
BIN
media/vocal/miya/hspin_1.ogg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
media/vocal/miya/lose_4.ogg
Normal file
BIN
media/vocal/miya/lose_4.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/lose_5.ogg
Normal file
BIN
media/vocal/miya/lose_5.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/lose_6.ogg
Normal file
BIN
media/vocal/miya/lose_6.ogg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
media/vocal/miya/mini_4.ogg
Normal file
BIN
media/vocal/miya/mini_4.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/mini_5.ogg
Normal file
BIN
media/vocal/miya/mini_5.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/nspin_1.ogg
Normal file
BIN
media/vocal/miya/nspin_1.ogg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
media/vocal/miya/perfect_clear_3.ogg
Normal file
BIN
media/vocal/miya/perfect_clear_3.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/perfect_clear_4.ogg
Normal file
BIN
media/vocal/miya/perfect_clear_4.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/perfect_clear_5.ogg
Normal file
BIN
media/vocal/miya/perfect_clear_5.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/pspin_1.ogg
Normal file
BIN
media/vocal/miya/pspin_1.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/qspin_1.ogg
Normal file
BIN
media/vocal/miya/qspin_1.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/rspin_1.ogg
Normal file
BIN
media/vocal/miya/rspin_1.ogg
Normal file
Binary file not shown.
BIN
media/vocal/miya/sad_1.ogg
Normal file
BIN
media/vocal/miya/sad_1.ogg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user