Compare commits
244 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63da1b5585 | ||
|
|
929be4faf0 | ||
|
|
59a5b52993 | ||
|
|
c412e07153 | ||
|
|
252f19c6df | ||
|
|
8264fdd4bf | ||
|
|
dfd28f2f10 | ||
|
|
5fc1257e58 | ||
|
|
5c39765f71 | ||
|
|
ca92622d5d | ||
|
|
e28902bc97 | ||
|
|
d228809a53 | ||
|
|
60f8a22dd5 | ||
|
|
db4ae56990 | ||
|
|
e95288b171 | ||
|
|
2511555eb0 | ||
|
|
4c4f01cb95 | ||
|
|
7177118f34 | ||
|
|
a6d5c4a1bf | ||
|
|
73a828d73a | ||
|
|
a7df4d6aa7 | ||
|
|
7fe4802887 | ||
|
|
7eac341b9a | ||
|
|
1fa02a18b2 | ||
|
|
b15cb64681 | ||
|
|
bf345c8655 | ||
|
|
cbdb15d658 | ||
|
|
8b4504bfa0 | ||
|
|
111790fdab | ||
|
|
bec03de7b8 | ||
|
|
f5dfae3a6c | ||
|
|
d3dec2b5f1 | ||
|
|
f083136998 | ||
|
|
cd3d0b370c | ||
|
|
f4c6632941 | ||
|
|
750cb9a669 | ||
|
|
62a198a017 | ||
|
|
5780ba0f3e | ||
|
|
86edeb1e0c | ||
|
|
53b1852f28 | ||
|
|
e3c385693b | ||
|
|
572c0fbfa1 | ||
|
|
bbdf71167a | ||
|
|
2136ccd9a2 | ||
|
|
2131aea575 | ||
|
|
32b21c7d29 | ||
|
|
8f6f6f316f | ||
|
|
66f9ac2791 | ||
|
|
ac0ba90438 | ||
|
|
990659ce91 | ||
|
|
00c602c844 | ||
|
|
9db62ffc39 | ||
|
|
e7c777e502 | ||
|
|
4991e8cea2 | ||
|
|
111d4e991f | ||
|
|
bedfa74a32 | ||
|
|
f6944dc223 | ||
|
|
a34a3051a3 | ||
|
|
0e13883faf | ||
|
|
e8860eda1b | ||
|
|
33ba4820b3 | ||
|
|
5ed0dda8ab | ||
|
|
bd260b2c6f | ||
|
|
aa01ab07f7 | ||
|
|
684cb90a7d | ||
|
|
172101ed55 | ||
|
|
98b5914726 | ||
|
|
d1518e7ba4 | ||
|
|
72d4faa52a | ||
|
|
862dcbf806 | ||
|
|
3db28f5136 | ||
|
|
f9e37f3c6a | ||
|
|
457681e6ec | ||
|
|
904bcf6852 | ||
|
|
e21e57ff84 | ||
|
|
562a69831a | ||
|
|
706a683540 | ||
|
|
8e2aee5e84 | ||
|
|
c009893377 | ||
|
|
3ae128d4c3 | ||
|
|
cb2164c21d | ||
|
|
951b7407fc | ||
|
|
f68facbe0e | ||
|
|
5535366bb1 | ||
|
|
d75b709f23 | ||
|
|
5a1fd0ca4d | ||
|
|
f4b85e0dbb | ||
|
|
c38bceb87e | ||
|
|
2569e8844e | ||
|
|
e42fa8351e | ||
|
|
9582a625ff | ||
|
|
81abb06f7b | ||
|
|
7cfea0eebe | ||
|
|
01c2bfe955 | ||
|
|
70242e6a07 | ||
|
|
c1edba974f | ||
|
|
546b3f230d | ||
|
|
14593eb487 | ||
|
|
838621a3ae | ||
|
|
283d4a5fce | ||
|
|
490cf44132 | ||
|
|
9dcbd86fc3 | ||
|
|
0a15011ec7 | ||
|
|
f7dfe1d869 | ||
|
|
5e9c9cb5fa | ||
|
|
c485c26c93 | ||
|
|
137d9296cd | ||
|
|
11b144da74 | ||
|
|
25ef9d9886 | ||
|
|
0e1e279209 | ||
|
|
a960897a83 | ||
|
|
69ab7849c5 | ||
|
|
bc55c3d892 | ||
|
|
cee1c41c35 | ||
|
|
6c5fe2463e | ||
|
|
880ce376b3 | ||
|
|
5a8b573bb7 | ||
|
|
ab1e750fa4 | ||
|
|
f6f4e1cd1a | ||
|
|
2a9549b106 | ||
|
|
1ed7ee3952 | ||
|
|
a69fc35f5a | ||
|
|
28e83dcf02 | ||
|
|
8c6df74237 | ||
|
|
d86cd6a8c6 | ||
|
|
c40d411d63 | ||
|
|
aca63abf49 | ||
|
|
4733615c4b | ||
|
|
80e5469653 | ||
|
|
4ea2cb18c7 | ||
|
|
840be65198 | ||
|
|
5a568df6cd | ||
|
|
cf57161174 | ||
|
|
7847e72f63 | ||
|
|
00999426b9 | ||
|
|
188da8b6ff | ||
|
|
59182b0ec8 | ||
|
|
6ced935c22 | ||
|
|
ad50475bb6 | ||
|
|
9c40f4918c | ||
|
|
62c802d2c3 | ||
|
|
3294760f6d | ||
|
|
85d72a1ee5 | ||
|
|
e02bb0f23c | ||
|
|
b0465775dc | ||
|
|
bd4b28e052 | ||
|
|
c6c5c849b4 | ||
|
|
cc5c3db1c1 | ||
|
|
f60236f06e | ||
|
|
bd63584207 | ||
|
|
e5fd3f6c9f | ||
|
|
423173413f | ||
|
|
a136d01da5 | ||
|
|
8ab675baf0 | ||
|
|
8d8e537cd4 | ||
|
|
d3b117a23f | ||
|
|
007982c481 | ||
|
|
ff9b0abfc7 | ||
|
|
275e983f55 | ||
|
|
bccb0b9976 | ||
|
|
d5f01537f8 | ||
|
|
6029363af8 | ||
|
|
cde61a57b8 | ||
|
|
2fc1768a7a | ||
|
|
50d73bcc1e | ||
|
|
0f570be7e5 | ||
|
|
658e6f7fdd | ||
|
|
d651932d9a | ||
|
|
6167c9f317 | ||
|
|
33acf06a71 | ||
|
|
9833e759cc | ||
|
|
918bb09d54 | ||
|
|
9a0a396872 | ||
|
|
6c6dc654e6 | ||
|
|
00c0cc3d9e | ||
|
|
0eb0fd3311 | ||
|
|
4e3823616d | ||
|
|
7450bae6d2 | ||
|
|
a2ddaf5341 | ||
|
|
b266a0ae57 | ||
|
|
ac9e649e02 | ||
|
|
506e1a4c1d | ||
|
|
c9d74a4cdf | ||
|
|
0ff2e6e273 | ||
|
|
c4c6ab3130 | ||
|
|
bc5b7638db | ||
|
|
2db147461c | ||
|
|
716c44746b | ||
|
|
0278a3ad47 | ||
|
|
3601047ffb | ||
|
|
8013319c14 | ||
|
|
b4f14bcb5b | ||
|
|
406beab9d6 | ||
|
|
58a8828503 | ||
|
|
fd563b732c | ||
|
|
30093f9db5 | ||
|
|
2f16c54cde | ||
|
|
bca7f2e19b | ||
|
|
2696106f96 | ||
|
|
9f7692f91c | ||
|
|
48b2ff5416 | ||
|
|
81104d7004 | ||
|
|
b56103f247 | ||
|
|
0923cf3acf | ||
|
|
fffb7d0188 | ||
|
|
f02124de0c | ||
|
|
a1a77f291b | ||
|
|
31bb7f62c6 | ||
|
|
bfb5fc3f5e | ||
|
|
ac2e53adc7 | ||
|
|
46e8e161d0 | ||
|
|
68e2255e1b | ||
|
|
222c1b5bba | ||
|
|
59c63da36f | ||
|
|
89fb7a7659 | ||
|
|
ea02bc470a | ||
|
|
361dc576f3 | ||
|
|
395ad907b8 | ||
|
|
bf5cdb1b99 | ||
|
|
45f9c80888 | ||
|
|
b80a72785b | ||
|
|
20ab916f9c | ||
|
|
76bfaa870e | ||
|
|
10ed702c2e | ||
|
|
e236be7a62 | ||
|
|
2fbd183322 | ||
|
|
14df29ce21 | ||
|
|
cb3d9e4862 | ||
|
|
d9a82878bf | ||
|
|
e484bef6df | ||
|
|
c8d358cc64 | ||
|
|
013765d5d2 | ||
|
|
ed2b07d5cf | ||
|
|
8d0780cef4 | ||
|
|
2ba25014c6 | ||
|
|
033a770759 | ||
|
|
b7832c133a | ||
|
|
93af618fa0 | ||
|
|
d4539c3a23 | ||
|
|
3d70a5ac79 | ||
|
|
f40b2f75bd | ||
|
|
46a49050b9 | ||
|
|
fb4fd15687 | ||
|
|
f3e18de45f |
24
.github/actions/automatic-test/action.yml
vendored
Normal file
24
.github/actions/automatic-test/action.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: 'Automatic Test'
|
||||
description: 'Check for obvious errors.'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/build-love
|
||||
with:
|
||||
file-path: Techmino.love
|
||||
- name: Download love
|
||||
shell: bash
|
||||
run: |
|
||||
curl -L https://github.com/love2d/love/releases/download/11.3/love-11.3-linux-x86_64.tar.gz | tar xz
|
||||
- name: Prepare PulseAudio
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install pulseaudio pulseaudio-utils pavucontrol alsa-oss alsa-utils -y
|
||||
- name: Run automated test
|
||||
uses: GabrielBB/xvfb-action@v1
|
||||
with:
|
||||
run: |
|
||||
./dest/love Techmino.love --test
|
||||
34
.github/actions/build-android/action.yml
vendored
34
.github/actions/build-android/action.yml
vendored
@@ -3,7 +3,7 @@ description: 'build Android package'
|
||||
inputs:
|
||||
type:
|
||||
required: true
|
||||
code:
|
||||
apkCode:
|
||||
required: true
|
||||
name:
|
||||
required: true
|
||||
@@ -59,11 +59,41 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
7z a -tzip love-android/app/src/main/assets/game.love libAndroid
|
||||
- name: update Android information
|
||||
shell: python
|
||||
run: |
|
||||
if '${{ inputs.type }}' == 'Release':
|
||||
appName = 'Techmino'
|
||||
packageName = 'org.love2d.MrZ.Techmino'
|
||||
edition = 'release'
|
||||
elif '${{ inputs.type }}' == 'Snapshot':
|
||||
appName = 'Techmino_Snapshot'
|
||||
packageName = 'org.love2d.MrZ.Techmino.Snapshot'
|
||||
edition = 'snapshot'
|
||||
with open('./love-android/app/src/main/AndroidManifest.xml', "r+", encoding='utf-8') as file:
|
||||
data = file.read()
|
||||
data = data\
|
||||
.replace('@appName', appName)\
|
||||
.replace('@edition', edition)
|
||||
file.seek(0)
|
||||
file.truncate()
|
||||
file.write(data)
|
||||
with open("./love-android/app/build.gradle", "r+", encoding='utf-8') as file:
|
||||
data = file.read()
|
||||
data = data\
|
||||
.replace('@packageName', packageName)\
|
||||
.replace('@versionCode', '${{ inputs.apkCode }}')\
|
||||
.replace('@versionName', '${{ inputs.name }}')\
|
||||
.replace('@storePassword', '${{ inputs.KEY_STORE_PASSWORD }}')\
|
||||
.replace('@keyAlias', '${{ inputs.ALIAS }}')\
|
||||
.replace('@keyPassword', '${{ inputs.KEY_PASSWORD }}')
|
||||
file.seek(0)
|
||||
file.truncate()
|
||||
file.write(data)
|
||||
- name: Build Techmino
|
||||
shell: bash
|
||||
run: |
|
||||
echo "${{ inputs.SIGNING_KEY }}" | base64 -d > love-android/app/android.keystore
|
||||
python3 .github/workflows/updateVersion.py -T Android${{ inputs.type }} -C ${{ inputs.code }} -N ${{ inputs.name }} -S ${{ inputs.KEY_STORE_PASSWORD }} -A ${{ inputs.ALIAS }} -K ${{ inputs.KEY_PASSWORD }}
|
||||
chmod 777 love-android/gradlew
|
||||
cd love-android/
|
||||
./gradlew assembleRelease
|
||||
|
||||
96
.github/actions/build-ios/action.yml
vendored
Normal file
96
.github/actions/build-ios/action.yml
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
name: 'build iOS'
|
||||
description: 'build iOS package'
|
||||
inputs:
|
||||
name:
|
||||
required: true
|
||||
description: "Version name"
|
||||
type:
|
||||
required: true
|
||||
description: "Build type"
|
||||
APPLE_API_ID:
|
||||
required: true
|
||||
description: "API key ID"
|
||||
APPLE_API_ISSUER:
|
||||
required: true
|
||||
description: "API issuer ID"
|
||||
APPLE_API_KEY:
|
||||
required: true
|
||||
description: "API key content"
|
||||
APPLE_APP_BUILD:
|
||||
required: true
|
||||
description: "Build number"
|
||||
APPLE_APP_CHANGELOG:
|
||||
required: true
|
||||
description: "Changelog"
|
||||
APPLE_APP_ID:
|
||||
required: true
|
||||
description: "AppStore Apple ID"
|
||||
APPLE_APP_IDENTIFIER:
|
||||
required: true
|
||||
description: "Bundle ID"
|
||||
APPLE_APP_PROFILE:
|
||||
required: true
|
||||
description: "Provisioning Profile specifer"
|
||||
APPLE_KEYCHAIN_NAME:
|
||||
required: true
|
||||
description: "Temporary keychain name"
|
||||
APPLE_KEYCHAIN_PWD:
|
||||
required: true
|
||||
description: "Temporary keychain password"
|
||||
FASTLANE_DISCORD_WEBHOOK:
|
||||
required: true
|
||||
description: "Fastlane Discord webhook"
|
||||
FASTLANE_ACTION_ID:
|
||||
required: true
|
||||
description: "Fastlane Action ID"
|
||||
FASTLANE_MATCH_PWD:
|
||||
required: true
|
||||
description: "Fastlane Match description password"
|
||||
FASTLANE_MATCH_TOKEN:
|
||||
required: true
|
||||
description: "Fastlane Match Github token"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: ./.github/actions/build-love
|
||||
- name: Checkout source codes
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: '26F-Studio/Techmino-iOS'
|
||||
path: 'Techmino-iOS'
|
||||
- name: Download CCloader
|
||||
uses: ./.github/actions/get-cc
|
||||
with:
|
||||
arch: iOS
|
||||
- name: Update source codes
|
||||
shell: bash
|
||||
run: |
|
||||
mv Techmino.love Techmino-iOS/platform/xcode
|
||||
mv libcold_clear.a Techmino-iOS/platform/xcode
|
||||
mv libCCloader.a Techmino-iOS/platform/xcode
|
||||
- name: Run fastlane
|
||||
uses: maierj/fastlane-action@v2.0.1
|
||||
with:
|
||||
lane: '${{ inputs.type }}'
|
||||
subdirectory: 'Techmino-iOS/platform/xcode'
|
||||
env:
|
||||
ACTION_ID: '${{ inputs.FASTLANE_ACTION_ID }}'
|
||||
API_ID: '${{ inputs.APPLE_API_ID }}'
|
||||
API_ISSUER: '${{ inputs.APPLE_API_ISSUER }}'
|
||||
API_KEY: '${{ inputs.APPLE_API_KEY }}'
|
||||
APP_BUILD: '${{ inputs.APPLE_APP_BUILD }}'
|
||||
APP_CHANGELOG: '${{ inputs.APPLE_APP_CHANGELOG }}'
|
||||
APP_ID: '${{ inputs.APPLE_APP_ID }}'
|
||||
APP_IDENTIFIER: '${{ inputs.APPLE_APP_IDENTIFIER }}'
|
||||
APP_PROFILE: '${{ inputs.APPLE_APP_PROFILE }}'
|
||||
APP_VERSION: '${{ inputs.name }}'
|
||||
DISCORD_WEBHOOK: '${{ inputs.FASTLANE_DISCORD_WEBHOOK }}'
|
||||
KEYCHAIN_NAME: '${{ inputs.APPLE_KEYCHAIN_NAME }}'
|
||||
KEYCHAIN_PWD: '${{ inputs.APPLE_KEYCHAIN_PWD }}'
|
||||
MATCH_PASSWORD: '${{ inputs.FASTLANE_MATCH_PWD }}'
|
||||
MATCH_TOKEN: '${{ inputs.FASTLANE_MATCH_TOKEN }}'
|
||||
- name: Move ipa
|
||||
shell: bash
|
||||
run: |
|
||||
mv Techmino-iOS/platform/xcode/Techmino.ipa Techmino.ipa
|
||||
|
||||
2
.github/actions/build-linux/action.yml
vendored
2
.github/actions/build-linux/action.yml
vendored
@@ -33,7 +33,7 @@ runs:
|
||||
cp squashfs-root/icon.png squashfs-root/.DirIcon
|
||||
chmod 777 squashfs-root/love
|
||||
mkdir -p squashfs-root/usr/share/Techmino
|
||||
mv document media parts Zframework conf.lua main.lua version.lua squashfs-root/usr/share/Techmino
|
||||
mv media parts Zframework conf.lua main.lua version.lua legals.md license.txt squashfs-root/usr/share/Techmino
|
||||
mv CCloader.so squashfs-root/usr/share/Techmino
|
||||
mv libcold_clear.so squashfs-root/usr/lib
|
||||
chmod 777 appimagetool-x86_64.AppImage
|
||||
|
||||
2
.github/actions/build-love/action.yml
vendored
2
.github/actions/build-love/action.yml
vendored
@@ -7,5 +7,5 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: 7z a -tzip ${{ inputs.file-path }} document media parts Zframework conf.lua main.lua version.lua
|
||||
- run: 7z a -tzip ${{ inputs.file-path }} media parts Zframework conf.lua main.lua version.lua legals.md license.txt
|
||||
shell: bash
|
||||
|
||||
147
.github/actions/build-macos/action.yml
vendored
147
.github/actions/build-macos/action.yml
vendored
@@ -3,43 +3,150 @@ description: 'build Mac OS package'
|
||||
inputs:
|
||||
name:
|
||||
required: true
|
||||
description: "Version name"
|
||||
icon:
|
||||
required: true
|
||||
MACOS_CERTIFICATE:
|
||||
description: "App icons (.icns)"
|
||||
APPLE_API_ID:
|
||||
required: true
|
||||
MACOS_CERTIFICATE_ID:
|
||||
description: "API key ID"
|
||||
APPLE_API_ISSUER:
|
||||
required: true
|
||||
MACOS_CERTIFICATE_PWD:
|
||||
description: "API issuer ID"
|
||||
APPLE_API_KEY:
|
||||
required: true
|
||||
description: "API key content"
|
||||
APPLE_APP_IDENTIFIER:
|
||||
required: true
|
||||
description: "Bundle ID"
|
||||
APPLE_KEYCHAIN_NAME:
|
||||
required: true
|
||||
description: "Temporary keychain name"
|
||||
APPLE_KEYCHAIN_PWD:
|
||||
required: true
|
||||
description: "Temporary keychain password"
|
||||
FASTLANE_MATCH_PWD:
|
||||
required: true
|
||||
description: "Fastlane Match description password"
|
||||
FASTLANE_MATCH_TOKEN:
|
||||
required: true
|
||||
description: "Fastlane Match Github token"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: ./.github/actions/build-love
|
||||
- name: Download template
|
||||
uses: ./.github/actions/get-unzip
|
||||
- name: Checkout template
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
url: https://github.com/26F-Studio/Techmino/releases/download/v0.15.1/Techmino.app.zip
|
||||
repository: '26F-Studio/Techmino-macOS'
|
||||
path: 'Techmino-macOS'
|
||||
- name: Download ColdClear
|
||||
uses: ./.github/actions/get-cc
|
||||
with:
|
||||
arch: macOS
|
||||
- name: Fastlane match
|
||||
uses: maierj/fastlane-action@v2.0.1
|
||||
with:
|
||||
lane: 'get_cert'
|
||||
subdirectory: 'Techmino-macOS'
|
||||
env:
|
||||
API_ID: '${{ inputs.APPLE_API_ID }}'
|
||||
API_ISSUER: '${{ inputs.APPLE_API_ISSUER }}'
|
||||
API_KEY: '${{ inputs.APPLE_API_KEY }}'
|
||||
APP_IDENTIFIER: '${{ inputs.APPLE_APP_IDENTIFIER }}'
|
||||
KEYCHAIN_NAME: '${{ inputs.APPLE_KEYCHAIN_NAME }}'
|
||||
KEYCHAIN_PWD: '${{ inputs.APPLE_KEYCHAIN_PWD }}'
|
||||
MATCH_PASSWORD: '${{ inputs.FASTLANE_MATCH_PWD }}'
|
||||
MATCH_TOKEN: '${{ inputs.FASTLANE_MATCH_TOKEN }}'
|
||||
- name: Modify template
|
||||
shell: python
|
||||
run: |
|
||||
import datetime
|
||||
from io import open
|
||||
thisYear = str(datetime.datetime.today().year)
|
||||
with open('./.github/build/macOS/info.plist.template', 'r', encoding='utf-8') as file:
|
||||
data = file.read()
|
||||
data = data\
|
||||
.replace('@versionName', '${{ inputs.name }}'[1:])\
|
||||
.replace('@thisYear', thisYear)\
|
||||
.replace('@bundleId', '${{ inputs.APPLE_APP_IDENTIFIER }}')
|
||||
with open('./Techmino-macOS/Techmino.app/Contents/info.plist', 'w+', encoding='utf-8') as file:
|
||||
file.write(data)
|
||||
- name: Pack
|
||||
shell: bash
|
||||
run: |
|
||||
python3 .github/workflows/updateVersion.py -T macOS -N ${{ inputs.name }}
|
||||
mv Techmino.love Techmino.app/Contents/Resources
|
||||
mv CCloader.dylib Techmino.app/Contents/Frameworks
|
||||
mv ${{ inputs.icon }} Techmino.app/Contents/Resources/iconfile.icns
|
||||
mv Techmino.love Techmino-macOS/Techmino.app/Contents/Resources
|
||||
mv CCloader.dylib Techmino-macOS/Techmino.app/Contents/Frameworks
|
||||
mv ${{ inputs.icon }} Techmino-macOS/Techmino.app/Contents/Resources/iconfile.icns
|
||||
|
||||
chmod +x Techmino-macOS/Techmino.app/Contents/Frameworks/CCloader.dylib
|
||||
chmod +x Techmino-macOS/Techmino.app/Contents/MacOS/love
|
||||
- name: Codesign executable
|
||||
# In secrets:
|
||||
# - MACOS_CERTIFICATE: the *.p12 Developer ID Certificate, encoded in base64
|
||||
# - MACOS_CERTIFICATE_PWD: The password
|
||||
shell: bash
|
||||
run: |
|
||||
echo ${{ inputs.MACOS_CERTIFICATE }} | base64 --decode > certificate.p12
|
||||
security create-keychain -p Techminohaowan build.keychain
|
||||
security default-keychain -s build.keychain
|
||||
security unlock-keychain -p Techminohaowan build.keychain
|
||||
security import certificate.p12 -k build.keychain -P ${{ inputs.MACOS_CERTIFICATE_PWD }} -T /usr/bin/codesign
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k Techminohaowan build.keychain
|
||||
/usr/bin/codesign --force --deep -s ${{ inputs.MACOS_CERTIFICATE_ID }} Techmino.app -v
|
||||
security unlock-keychain -p ${{ inputs.TEMP_KEYCHAIN_PASSWORD }} \
|
||||
~/Library/Keychains/${{ inputs.TEMP_KEYCHAIN_USER }}-db
|
||||
|
||||
[[ $(security find-identity) =~ ([0-9A-F]{40}) ]]
|
||||
|
||||
codesign --timestamp --force --strict --deep -v \
|
||||
--options runtime \
|
||||
-s ${BASH_REMATCH[1]} \
|
||||
--entitlements Techmino-macOS/love.entitlements \
|
||||
Techmino-macOS/Techmino.app
|
||||
- name: Fastlane notarize
|
||||
uses: maierj/fastlane-action@v2.0.1
|
||||
with:
|
||||
lane: 'make_safe'
|
||||
subdirectory: 'Techmino-macOS'
|
||||
env:
|
||||
API_ID: '${{ inputs.APPLE_API_ID }}'
|
||||
API_ISSUER: '${{ inputs.APPLE_API_ISSUER }}'
|
||||
API_KEY: '${{ inputs.APPLE_API_KEY }}'
|
||||
APP_IDENTIFIER: '${{ inputs.APPLE_APP_IDENTIFIER }}'
|
||||
NOTARIZE_OBJECT: 'Techmino.app'
|
||||
- name: Create DMG file
|
||||
shell: bash
|
||||
run: |
|
||||
brew install create-dmg
|
||||
create-dmg \
|
||||
--volname "Techmino for MacOS" \
|
||||
--volicon "./.github/build/macOS/Techminodisk.icns" \
|
||||
--window-pos 200 120 \
|
||||
--window-size 800 500 \
|
||||
--icon-size 100 \
|
||||
--icon "Techmino.app" 239 203 \
|
||||
--background ".github/build/macOS/backgroundImage.tiff" \
|
||||
--hide-extension "Techmino.app" \
|
||||
--app-drop-link 565 203 \
|
||||
"Techmino-macOS/Techmino-macOS.dmg" \
|
||||
"Techmino-macOS/Techmino.app/"
|
||||
- name: Codesign DMG
|
||||
shell: bash
|
||||
run: |
|
||||
security unlock-keychain -p ${{ inputs.TEMP_KEYCHAIN_PASSWORD }} \
|
||||
~/Library/Keychains/${{ inputs.TEMP_KEYCHAIN_USER }}-db
|
||||
|
||||
[[ $(security find-identity) =~ ([0-9A-F]{40}) ]]
|
||||
|
||||
codesign --timestamp --force --strict --deep -v \
|
||||
--options runtime \
|
||||
-s ${BASH_REMATCH[1]} \
|
||||
--entitlements Techmino-macOS/love.entitlements \
|
||||
Techmino-macOS/Techmino-macOS.dmg
|
||||
- name: Fastlane notarize
|
||||
uses: maierj/fastlane-action@v2.0.1
|
||||
with:
|
||||
lane: 'make_safe'
|
||||
subdirectory: 'Techmino-macOS'
|
||||
env:
|
||||
API_ID: '${{ inputs.APPLE_API_ID }}'
|
||||
API_ISSUER: '${{ inputs.APPLE_API_ISSUER }}'
|
||||
API_KEY: '${{ inputs.APPLE_API_KEY }}'
|
||||
APP_IDENTIFIER: '${{ inputs.APPLE_APP_IDENTIFIER }}'
|
||||
NOTARIZE_OBJECT: 'Techmino-macOS.dmg'
|
||||
- name: Finalize
|
||||
shell: bash
|
||||
run: |
|
||||
mv Techmino-macOS/Techmino-macOS.dmg Techmino.dmg
|
||||
spctl -a -t open --context context:primary-signature -vv Techmino.dmg
|
||||
|
||||
13
.github/actions/build-windows/action.yml
vendored
13
.github/actions/build-windows/action.yml
vendored
@@ -30,6 +30,18 @@ runs:
|
||||
with:
|
||||
url: http://www.angusj.com/resourcehacker/resource_hacker.zip
|
||||
- uses: ./.github/actions/build-love
|
||||
- name: update Windows template
|
||||
shell: python
|
||||
run: |
|
||||
Version = '${{ inputs.version }}'.replace('V', '')
|
||||
FileVersion = (f"{Version.replace('.', ',')},0")
|
||||
with open('./.github/build/Windows/Techmino.rc.template', 'r', encoding='utf8') as file:
|
||||
data = file.read()
|
||||
data = data\
|
||||
.replace('@FileVersion', FileVersion)\
|
||||
.replace('@Version', Version)
|
||||
with open('Techmino.rc', 'w+', encoding='utf8') as file:
|
||||
file.write(data)
|
||||
- name: Pack Techmino
|
||||
shell: pwsh
|
||||
run: |
|
||||
@@ -42,7 +54,6 @@ runs:
|
||||
del .\love\readme.txt
|
||||
move .\cold_clear.dll .\love
|
||||
move .\CCloader.dll .\love
|
||||
python .\.github\workflows\updateVersion.py -T Windows -N ${{ inputs.version }}
|
||||
cmd /c '.\ResourceHacker.exe -open .\love\Techmino.exe -save .\love\Techmino.exe -action delete -mask ICONGROUP,,'
|
||||
cmd /c '.\ResourceHacker.exe -open .\Techmino.rc -save .\Techmino.res -action compile'
|
||||
cmd /c '.\ResourceHacker.exe -open .\love\Techmino.exe -save .\love\Techmino.exe -action addoverwrite -res "${{ inputs.icon }}" -mask ICONGROUP,1,'
|
||||
|
||||
12
.github/actions/snapshot-update/action.yml
vendored
12
.github/actions/snapshot-update/action.yml
vendored
@@ -1,12 +0,0 @@
|
||||
name: 'update for a snapshot'
|
||||
description: 'common update logic for snapshot'
|
||||
inputs:
|
||||
commit:
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- shell: bash
|
||||
run: |
|
||||
python3 .github/workflows/updateVersion.py -T Conf
|
||||
python3 .github/workflows/updateVersion.py -T Version -H ${{ inputs.commit }}
|
||||
37
.github/actions/update-version/action.yml
vendored
Normal file
37
.github/actions/update-version/action.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: 'update version'
|
||||
description: 'common update logic for snapshot and release'
|
||||
inputs:
|
||||
commit:
|
||||
required: false
|
||||
type:
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- shell: python
|
||||
name: update snapshot saving folder
|
||||
run: |
|
||||
from io import open
|
||||
if '${{ inputs.type }}'.lower() != 'snapshot':
|
||||
exit(0)
|
||||
with open('conf.lua', 'r+', encoding='utf-8') as file:
|
||||
data = file.read()
|
||||
data = data.replace("t.identity='Techmino'--Saving folder", "t.identity='Techmino_Snapshot'--Saving folder")
|
||||
file.seek(0)
|
||||
file.truncate()
|
||||
file.flush()
|
||||
file.write(data)
|
||||
- shell: python
|
||||
run: |
|
||||
from io import open
|
||||
import re
|
||||
with open('version.lua', 'r+', encoding='utf-8') as file:
|
||||
commitHash = '${{ inputs.commit }}'
|
||||
if commitHash != '':
|
||||
commitHash = '@' + commitHash[0:4]
|
||||
data = file.read()
|
||||
data = re.sub('(\d)"', r'\1' + commitHash + '"', data, 1)
|
||||
file.seek(0)
|
||||
file.truncate()
|
||||
file.flush()
|
||||
file.write(data)
|
||||
51
.github/actions/upload-artifact/action.yml
vendored
Normal file
51
.github/actions/upload-artifact/action.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: "upload artifact"
|
||||
description: "upload file with webdav"
|
||||
inputs:
|
||||
WEBDAV_USERNAME:
|
||||
required: true
|
||||
description: "webdav username"
|
||||
WEBDAV_PASSWORD:
|
||||
required: true
|
||||
description: "webdav password"
|
||||
ARTIFACT_TYPE:
|
||||
required: true
|
||||
description: "file build type"
|
||||
ARTIFACT_PLATFORM:
|
||||
required: true
|
||||
description: "file platform"
|
||||
ARTIFACT_NAME:
|
||||
required: true
|
||||
description: "file name"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install Webdav 4
|
||||
shell: bash
|
||||
run: |
|
||||
pip install webdav4
|
||||
- name: Update release
|
||||
shell: python
|
||||
run: |
|
||||
import re
|
||||
from webdav4.client import Client
|
||||
|
||||
client = Client(
|
||||
"http://mc.yuhao7370.top:5212/dav",
|
||||
auth=("${{ inputs.WEBDAV_USERNAME }}", "${{ inputs.WEBDAV_PASSWORD }}"),
|
||||
timeout=None,
|
||||
)
|
||||
if '${{ inputs.ARTIFACT_TYPE }}' == 'release'
|
||||
print('Removing previous ${{ inputs.ARTIFACT_PLATFORM }} release file...')
|
||||
for file in client.ls('Techmino distribution'):
|
||||
if re.search(r'(Techmino_a[0-9]+\.[0-9]+\.[0-9]_${{ inputs.ARTIFACT_PLATFORM }}.*)', file['name']):
|
||||
client.remove(file['name'])
|
||||
print('Uploading new ${{ inputs.ARTIFACT_PLATFORM }} release file...')
|
||||
client.upload_file("${{ inputs.ARTIFACT_NAME }}", 'Techmino distribution/${{ inputs.ARTIFACT_NAME }}')
|
||||
|
||||
if '${{ inputs.ARTIFACT_TYPE }}' == 'test':
|
||||
print('Removing previous ${{ inputs.ARTIFACT_PLATFORM }} test file...')
|
||||
for file in client.ls('Techmino Snapshot'):
|
||||
if re.search(r'(Techmino_pre[0-9]+\.[0-9]+\.[0-9]_[0-9a-z]{7}_${{ inputs.ARTIFACT_PLATFORM }}.*)', file['name']):
|
||||
client.remove(file['name'])
|
||||
print('Uploading new ${{ inputs.ARTIFACT_PLATFORM }} test file...')
|
||||
client.upload_file("${{ inputs.ARTIFACT_NAME }}", 'Techmino Snapshot/${{ inputs.ARTIFACT_NAME }}')
|
||||
BIN
.github/build/macOS/Techminodisk.icns
vendored
Normal file
BIN
.github/build/macOS/Techminodisk.icns
vendored
Normal file
Binary file not shown.
BIN
.github/build/macOS/backgroundImage.tiff
vendored
Normal file
BIN
.github/build/macOS/backgroundImage.tiff
vendored
Normal file
Binary file not shown.
2
.github/build/macOS/info.plist.template
vendored
2
.github/build/macOS/info.plist.template
vendored
@@ -11,7 +11,7 @@
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>iconfile</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.love2d.MrZ.Techmino</string>
|
||||
<string>@bundleId</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
||||
BIN
.github/build/macOS/打不开?Can’t open the App?.pdf
vendored
BIN
.github/build/macOS/打不开?Can’t open the App?.pdf
vendored
Binary file not shown.
112
.github/workflows/build.yml
vendored
112
.github/workflows/build.yml
vendored
@@ -1,112 +0,0 @@
|
||||
name: Techmino CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, ci* ]
|
||||
pull_request:
|
||||
branches: [ main, ci* ]
|
||||
|
||||
jobs:
|
||||
get-info:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
name: ${{ steps.actual-get-info.outputs.name }}
|
||||
code: ${{ steps.actual-get-info.outputs.code }}
|
||||
commit: ${{ steps.actual-get-info.outputs.commit }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install lua
|
||||
run: |
|
||||
sudo apt-get install lua5.3 -y
|
||||
- name: Get Version
|
||||
id: actual-get-info
|
||||
run: |
|
||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/snapshot-update
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
- uses: ./.github/actions/build-windows
|
||||
with:
|
||||
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
||||
love-dir: love-11.3-win64
|
||||
arch: win64
|
||||
version: ${{ needs.get-info.outputs.name }}
|
||||
icon: .\.github\build\Windows\icon_snapshot.ico
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Windows
|
||||
path: love
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/snapshot-update
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
- uses: ./.github/actions/build-linux
|
||||
with:
|
||||
icon: .github/build/Linux/icon_snapshot.png
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Linux
|
||||
path: Techmino.AppImage
|
||||
|
||||
build-android:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/snapshot-update
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
- uses: ./.github/actions/build-android
|
||||
with:
|
||||
type: Snapshot
|
||||
code: ${{ needs.get-info.outputs.code }}
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
file-path: Techmino_Snapshot.apk
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
ALIAS: ${{ secrets.ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Android
|
||||
path: Techmino_Snapshot.apk
|
||||
|
||||
build-macOS:
|
||||
runs-on: macos-10.15
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/snapshot-update
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
- uses: ./.github/actions/build-macos
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
icon: .github/build/macOS/icon_snapshot.icns
|
||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||
MACOS_CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }}
|
||||
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
|
||||
- name: Pack Techmino
|
||||
run: |
|
||||
zip -r -y Techmino.zip Techmino.app
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_macOS
|
||||
path: Techmino.zip
|
||||
203
.github/workflows/dev.yml
vendored
Normal file
203
.github/workflows/dev.yml
vendored
Normal file
@@ -0,0 +1,203 @@
|
||||
name: Techmino Develop CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, ci* ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
get-info:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
name: ${{ steps.actual-get-info.outputs.name }}
|
||||
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
|
||||
code: ${{ steps.actual-get-info.outputs.code }}
|
||||
commit: ${{ steps.actual-get-info.outputs.commit }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install lua
|
||||
run: |
|
||||
sudo apt-get install lua5.3 -y
|
||||
- name: Get Version
|
||||
id: actual-get-info
|
||||
run: |
|
||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
|
||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||
|
||||
automatic-test:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/automatic-test
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
type: snapshot
|
||||
- uses: ./.github/actions/build-windows
|
||||
with:
|
||||
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
||||
love-dir: love-11.3-win64
|
||||
arch: win64
|
||||
version: ${{ needs.get-info.outputs.name }}
|
||||
icon: .\.github\build\Windows\icon_snapshot.ico
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Windows
|
||||
path: love
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
type: snapshot
|
||||
- uses: ./.github/actions/build-linux
|
||||
with:
|
||||
icon: .github/build/Linux/icon_snapshot.png
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Linux
|
||||
path: Techmino.AppImage
|
||||
|
||||
build-android:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
type: snapshot
|
||||
- uses: ./.github/actions/build-android
|
||||
with:
|
||||
type: Snapshot
|
||||
apkCode: ${{ needs.get-info.outputs.apkCode }}
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
file-path: Techmino_Snapshot.apk
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
ALIAS: ${{ secrets.ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Android
|
||||
path: Techmino_Snapshot.apk
|
||||
|
||||
build-android-mini:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
type: snapshot
|
||||
- name: remove media
|
||||
run: |
|
||||
rm -rf media/music media/effect media/vocal
|
||||
- uses: ./.github/actions/build-android
|
||||
with:
|
||||
type: Snapshot
|
||||
apkCode: ${{ needs.get-info.outputs.apkCode }}
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
file-path: Techmino_Snapshot_Mini.apk
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
ALIAS: ${{ secrets.ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Android_Mini
|
||||
path: Techmino_Snapshot_Mini.apk
|
||||
|
||||
build-macOS:
|
||||
runs-on: macos-10.15
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
type: snapshot
|
||||
- uses: ./.github/actions/build-macos
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
icon: .github/build/macOS/icon_snapshot.icns
|
||||
APPLE_API_ID: '${{ secrets.APPLE_API_ID }}'
|
||||
APPLE_API_ISSUER: '${{ secrets.APPLE_API_ISSUER }}'
|
||||
APPLE_API_KEY: '${{ secrets.APPLE_API_KEY }}'
|
||||
APPLE_APP_IDENTIFIER: '${{ secrets.APPLE_APP_IDENTIFIER }}'
|
||||
APPLE_KEYCHAIN_NAME: '${{ secrets.APPLE_KEYCHAIN_NAME }}'
|
||||
APPLE_KEYCHAIN_PWD: '${{ secrets.APPLE_KEYCHAIN_PWD }}'
|
||||
FASTLANE_MATCH_PWD: '${{ secrets.FASTLANE_MATCH_PWD }}'
|
||||
FASTLANE_MATCH_TOKEN: '${{ secrets.FASTLANE_MATCH_TOKEN }}'
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_macOS
|
||||
path: Techmino.dmg
|
||||
|
||||
build-iOS:
|
||||
runs-on: macos-latest
|
||||
if: (!startsWith( github.ref , 'refs/heads/ci-')) || startsWith( github.ref , 'refs/heads/ci-ios-')
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
type: snapshot
|
||||
- uses: ./.github/actions/build-ios
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
type: 'dev'
|
||||
APPLE_API_ID: '${{ secrets.APPLE_API_ID }}'
|
||||
APPLE_API_ISSUER: '${{ secrets.APPLE_API_ISSUER }}'
|
||||
APPLE_API_KEY: '${{ secrets.APPLE_API_KEY }}'
|
||||
APPLE_APP_BUILD: '${{ needs.get-info.outputs.code }}.2.${{ github.run_number }}.${{ github.run_attempt }}'
|
||||
APPLE_APP_CHANGELOG: '${{ github.event.commits[0].message }}'
|
||||
APPLE_APP_ID: '${{ secrets.APPLE_APP_ID }}'
|
||||
APPLE_APP_IDENTIFIER: '${{ secrets.APPLE_APP_IDENTIFIER }}'
|
||||
APPLE_APP_PROFILE: '${{ secrets.APPLE_APP_PROFILE }}'
|
||||
APPLE_KEYCHAIN_NAME: '${{ secrets.APPLE_KEYCHAIN_NAME }}'
|
||||
APPLE_KEYCHAIN_PWD: '${{ secrets.APPLE_KEYCHAIN_PWD }}'
|
||||
FASTLANE_ACTION_ID: '${{ github.run_id }}'
|
||||
FASTLANE_DISCORD_WEBHOOK: '${{ secrets.FASTLANE_DISCORD_WEBHOOK }}'
|
||||
FASTLANE_MATCH_PWD: '${{ secrets.FASTLANE_MATCH_PWD }}'
|
||||
FASTLANE_MATCH_TOKEN: '${{ secrets.FASTLANE_MATCH_TOKEN }}'
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_iOS
|
||||
path: Techmino.ipa
|
||||
|
||||
build-love:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
- uses: ./.github/actions/build-love
|
||||
with:
|
||||
file-path: Techmino.love
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Love
|
||||
path: Techmino.love
|
||||
26
.github/workflows/getVersion.lua
vendored
26
.github/workflows/getVersion.lua
vendored
@@ -1,28 +1,28 @@
|
||||
if arg[1]=="-code"then
|
||||
local arg=arg[1]
|
||||
if arg=="-apkCode"then
|
||||
local code=require"version".apkCode
|
||||
print(code)
|
||||
elseif arg[1]=="-name"then
|
||||
local str=require"version".string:gsub("@DEV","")
|
||||
elseif arg=="-code"then
|
||||
local str=require"version".code
|
||||
print(str)
|
||||
elseif arg[1]=="-release"then
|
||||
local str=require"version".string:gsub("V","",1):gsub("@DEV","")
|
||||
elseif arg=="-name"then
|
||||
local str=require"version".string
|
||||
print(str)
|
||||
elseif arg[1]=="-updateTitle"then
|
||||
elseif arg=="-release"then
|
||||
local str=require"version".string:gsub("V","",1)
|
||||
print(str)
|
||||
elseif arg=="-updateTitle"then
|
||||
local note=require"parts.updateLog"
|
||||
local p1=note:find("\n%d")+1
|
||||
local p2=note:find("\n",p1)-1
|
||||
note=note:sub(p1,p2)
|
||||
print(note)
|
||||
elseif arg[1]=="-updateNote"then
|
||||
elseif arg=="-updateNote"then
|
||||
local note=require"parts.updateLog"
|
||||
local p1=note:find("\n",note:find("\n%d")+1)+1
|
||||
local p2=note:find("\n%d",p1+1)
|
||||
note=note:sub(p1,p2-2)
|
||||
note=note
|
||||
:gsub(" ","_")
|
||||
:gsub(" ","")
|
||||
:gsub("\n([^_])","\n\n%1")
|
||||
:gsub("\n_","\n")
|
||||
:gsub("\n\n","\n",1)
|
||||
:gsub(" ","- ")
|
||||
:gsub(" ","# ")
|
||||
print(note)
|
||||
end
|
||||
|
||||
343
.github/workflows/release.yml
vendored
343
.github/workflows/release.yml
vendored
@@ -3,202 +3,235 @@ name: Techmino Release CI
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
get-info:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
name: ${{ steps.actual-get-info.outputs.name }}
|
||||
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
|
||||
code: ${{ steps.actual-get-info.outputs.code }}
|
||||
release: ${{ steps.actual-get-info.outputs.release }}
|
||||
updateTitle: ${{ steps.actual-get-info.outputs.updateTitle }}
|
||||
updateNote: ${{ steps.actual-get-info.outputs.updateNote }}
|
||||
commit: ${{ steps.actual-get-info.outputs.commit }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install lua
|
||||
run: |
|
||||
sudo apt-get install lua5.3 -y
|
||||
- name: Get Version
|
||||
id: actual-get-info
|
||||
run: |
|
||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||
echo "::set-output name=release::$(lua .github/workflows/getVersion.lua -release)"
|
||||
echo "::set-output name=updateTitle::$(lua .github/workflows/getVersion.lua -updateTitle)"
|
||||
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install lua
|
||||
run: |
|
||||
sudo apt-get install lua5.3 -y
|
||||
- name: Get Version
|
||||
id: actual-get-info
|
||||
run: |
|
||||
UPDATE_NOTE=$(lua .github/workflows/getVersion.lua -updateNote)
|
||||
UPDATE_NOTE="${UPDATE_NOTE//'%'/'%25'}"
|
||||
UPDATE_NOTE="${UPDATE_NOTE//$'\n'/'%0A'}"
|
||||
UPDATE_NOTE="${UPDATE_NOTE//$'\r'/'%0D'}"
|
||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
|
||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||
echo "::set-output name=release::$(lua .github/workflows/getVersion.lua -release)"
|
||||
echo "::set-output name=updateTitle::$(lua .github/workflows/getVersion.lua -updateTitle)"
|
||||
echo "::set-output name=updateNote::$UPDATE_NOTE"
|
||||
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||
|
||||
build-windows-x64:
|
||||
runs-on: windows-latest
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Update Version
|
||||
run: |
|
||||
python .\.github\workflows\updateVersion.py -T Version
|
||||
- uses: ./.github/actions/build-windows
|
||||
with:
|
||||
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
||||
love-dir: love-11.3-win64
|
||||
arch: win64
|
||||
version: ${{ needs.get-info.outputs.release }}
|
||||
icon: .\.github\build\Windows\icon.ico
|
||||
- name: Pack Techmino
|
||||
run: 7z a -tzip .\Techmino.a${{ needs.get-info.outputs.release }}.Win64.zip .\love
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino.a${{ needs.get-info.outputs.release }}.Win64.zip
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
- uses: ./.github/actions/build-windows
|
||||
with:
|
||||
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
||||
love-dir: love-11.3-win64
|
||||
arch: win64
|
||||
version: ${{ needs.get-info.outputs.release }}
|
||||
icon: .\.github\build\Windows\icon.ico
|
||||
- name: Pack Techmino
|
||||
run: 7z a -tzip .\Techmino_a${{ needs.get-info.outputs.release }}_Win64.zip .\love
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino_a${{ needs.get-info.outputs.release }}_Win64.zip
|
||||
- name: Upload artifact to server
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
||||
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
||||
ARTIFACT_TYPE: release
|
||||
ARTIFACT_PLATFORM: Win64
|
||||
ARTIFACT_NAME: Techmino_a${{ needs.get-info.outputs.release }}_Win64.zip
|
||||
|
||||
build-windows-x86:
|
||||
runs-on: windows-latest
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Update Version
|
||||
run: |
|
||||
python .\.github\workflows\updateVersion.py -T Version
|
||||
- uses: ./.github/actions/build-windows
|
||||
with:
|
||||
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win32.zip
|
||||
love-dir: love-11.3-win32
|
||||
arch: win32
|
||||
version: ${{ needs.get-info.outputs.release }}
|
||||
icon: .\.github\build\Windows\icon.ico
|
||||
- name: Pack Techmino
|
||||
run: 7z a -tzip .\Techmino.a${{ needs.get-info.outputs.release }}.Win32.zip .\love
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino.a${{ needs.get-info.outputs.release }}.Win32.zip
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
- uses: ./.github/actions/build-windows
|
||||
with:
|
||||
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win32.zip
|
||||
love-dir: love-11.3-win32
|
||||
arch: win32
|
||||
version: ${{ needs.get-info.outputs.release }}
|
||||
icon: .\.github\build\Windows\icon.ico
|
||||
- name: Pack Techmino
|
||||
run: 7z a -tzip .\Techmino_a${{ needs.get-info.outputs.release }}_Win32.zip .\love
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino_a${{ needs.get-info.outputs.release }}_Win32.zip
|
||||
- name: Upload artifact to server
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
||||
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
||||
ARTIFACT_TYPE: release
|
||||
ARTIFACT_PLATFORM: Win32
|
||||
ARTIFACT_NAME: Techmino_a${{ needs.get-info.outputs.release }}_Win32.zip
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Update Version
|
||||
run: |
|
||||
python3 .github/workflows/updateVersion.py -T Version
|
||||
- uses: ./.github/actions/build-linux
|
||||
with:
|
||||
file-path: Techmino.a${{ needs.get-info.outputs.release }}.AppImage
|
||||
icon: .github/build/Linux/icon.png
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino.a${{ needs.get-info.outputs.release }}.AppImage
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
- uses: ./.github/actions/build-linux
|
||||
with:
|
||||
file-path: Techmino_a${{ needs.get-info.outputs.release }}_Linux.AppImage
|
||||
icon: .github/build/Linux/icon.png
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino_a${{ needs.get-info.outputs.release }}_Linux.AppImage
|
||||
- name: Upload artifact to server
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
||||
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
||||
ARTIFACT_TYPE: release
|
||||
ARTIFACT_PLATFORM: Linux
|
||||
ARTIFACT_NAME: Techmino_a${{ needs.get-info.outputs.release }}_Linux.AppImage
|
||||
|
||||
build-android:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Update Version
|
||||
run: |
|
||||
python3 .github/workflows/updateVersion.py -T Version
|
||||
- uses: ./.github/actions/build-android
|
||||
with:
|
||||
type: Release
|
||||
code: ${{ needs.get-info.outputs.code }}
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
file-path: Techmino.a${{ needs.get-info.outputs.Version }}.apk
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
ALIAS: ${{ secrets.ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino.a${{ needs.get-info.outputs.Version }}.apk
|
||||
|
||||
build-android-mini:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Update Version
|
||||
run: |
|
||||
python3 .github/workflows/updateVersion.py -T Version
|
||||
- name: remove media
|
||||
run: |
|
||||
rm -rf media/music media/effect media/vocal
|
||||
- uses: ./.github/actions/build-android
|
||||
with:
|
||||
type: Release
|
||||
code: ${{ needs.get-info.outputs.code }}
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
file-path: Techmino.a${{ needs.get-info.outputs.Version }}.mini.apk
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
ALIAS: ${{ secrets.ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino.a${{ needs.get-info.outputs.Version }}.mini.apk
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
- uses: ./.github/actions/build-android
|
||||
with:
|
||||
type: Release
|
||||
apkCode: ${{ needs.get-info.outputs.apkCode }}
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
file-path: Techmino_a${{ needs.get-info.outputs.release }}_Android.apk
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
ALIAS: ${{ secrets.ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino_a${{ needs.get-info.outputs.release }}_Android.apk
|
||||
- name: Upload artifact to server
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
||||
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
||||
ARTIFACT_TYPE: release
|
||||
ARTIFACT_PLATFORM: Android
|
||||
ARTIFACT_NAME: Techmino_a${{ needs.get-info.outputs.release }}_Android.apk
|
||||
|
||||
build-macOS:
|
||||
runs-on: macos-10.15
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Update Version
|
||||
run: |
|
||||
python3 .github/workflows/updateVersion.py -T Version
|
||||
- uses: ./.github/actions/build-macos
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
icon: .github/build/macOS/icon.icns
|
||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||
MACOS_CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }}
|
||||
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
|
||||
- name: Pack Techmino
|
||||
run: |
|
||||
zip -r -y Techmino.a${{ needs.get-info.outputs.Version }}.macOS.zip Techmino.app ".github/build/macOS/打不开?Can’t open the App?.pdf"
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino.a${{ needs.get-info.outputs.Version }}.macOS.zip
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
- uses: ./.github/actions/build-macos
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
icon: .github/build/macOS/icon.icns
|
||||
APPLE_API_ID: "${{ secrets.APPLE_API_ID }}"
|
||||
APPLE_API_ISSUER: "${{ secrets.APPLE_API_ISSUER }}"
|
||||
APPLE_API_KEY: "${{ secrets.APPLE_API_KEY }}"
|
||||
APPLE_APP_IDENTIFIER: "${{ secrets.APPLE_APP_IDENTIFIER }}"
|
||||
APPLE_KEYCHAIN_NAME: "${{ secrets.APPLE_KEYCHAIN_NAME }}"
|
||||
APPLE_KEYCHAIN_PWD: "${{ secrets.APPLE_KEYCHAIN_PWD }}"
|
||||
FASTLANE_MATCH_PWD: "${{ secrets.FASTLANE_MATCH_PWD }}"
|
||||
FASTLANE_MATCH_TOKEN: "${{ secrets.FASTLANE_MATCH_TOKEN }}"
|
||||
- name: Pack Techmino
|
||||
run: |
|
||||
mv Techmino.dmg Techmino_a${{ needs.get-info.outputs.release }}_MacOS.dmg
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino_a${{ needs.get-info.outputs.release }}_MacOS.dmg
|
||||
- name: Upload artifact to server
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
||||
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
||||
ARTIFACT_TYPE: release
|
||||
ARTIFACT_PLATFORM: MacOS
|
||||
ARTIFACT_NAME: Techmino_a${{ needs.get-info.outputs.release }}_MacOS.dmg
|
||||
|
||||
build-love:
|
||||
runs-on: ubuntu-20.04
|
||||
build-iOS:
|
||||
runs-on: macos-latest
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Update Version
|
||||
run: |
|
||||
python3 .github/workflows/updateVersion.py -T Version
|
||||
- uses: ./.github/actions/build-love
|
||||
with:
|
||||
file-path: Techmino.a${{ needs.get-info.outputs.release }}.love
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino.a${{ needs.get-info.outputs.release }}.love
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
- uses: ./.github/actions/build-ios
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
type: "release"
|
||||
APPLE_API_ID: "${{ secrets.APPLE_API_ID }}"
|
||||
APPLE_API_ISSUER: "${{ secrets.APPLE_API_ISSUER }}"
|
||||
APPLE_API_KEY: "${{ secrets.APPLE_API_KEY }}"
|
||||
APPLE_APP_BUILD: "${{ needs.get-info.outputs.code }}.0.${{ github.run_number }}.${{ github.run_attempt }}"
|
||||
APPLE_APP_CHANGELOG: "${{ needs.get-info.outputs.updateNote }}"
|
||||
APPLE_APP_ID: "${{ secrets.APPLE_APP_ID }}"
|
||||
APPLE_APP_IDENTIFIER: "${{ secrets.APPLE_APP_IDENTIFIER }}"
|
||||
APPLE_APP_PROFILE: "${{ secrets.APPLE_APP_PROFILE }}"
|
||||
APPLE_KEYCHAIN_NAME: "${{ secrets.APPLE_KEYCHAIN_NAME }}"
|
||||
APPLE_KEYCHAIN_PWD: "${{ secrets.APPLE_KEYCHAIN_PWD }}"
|
||||
FASTLANE_ACTION_ID: "${{ github.run_id }}"
|
||||
FASTLANE_DISCORD_WEBHOOK: "${{ secrets.FASTLANE_DISCORD_WEBHOOK }}"
|
||||
FASTLANE_MATCH_PWD: "${{ secrets.FASTLANE_MATCH_PWD }}"
|
||||
FASTLANE_MATCH_TOKEN: "${{ secrets.FASTLANE_MATCH_TOKEN }}"
|
||||
- name: Rename ipa
|
||||
shell: bash
|
||||
run: |
|
||||
mv Techmino.ipa Techmino_a${{ needs.get-info.outputs.release }}_iOS.ipa
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
files: Techmino_a${{ needs.get-info.outputs.release }}_iOS.ipa
|
||||
- name: Upload artifact to server
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
||||
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
||||
ARTIFACT_TYPE: release
|
||||
ARTIFACT_PLATFORM: iOS
|
||||
ARTIFACT_NAME: Techmino_a${{ needs.get-info.outputs.release }}_iOS.ipa
|
||||
|
||||
Add-Release-note:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install lua
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get upgrade -y
|
||||
sudo apt-get install lua5.3 -y
|
||||
- name: Get ReleaseNote
|
||||
run: |
|
||||
lua .github/workflows/getVersion.lua -updateNote > updateNote.txt
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
body_path: updateNote.txt
|
||||
- uses: actions/checkout@v2
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||
body: ${{ needs.get-info.outputs.updateNote }}
|
||||
|
||||
207
.github/workflows/test.yml
vendored
Normal file
207
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,207 @@
|
||||
name: Techmino Test CI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'pre*'
|
||||
|
||||
jobs:
|
||||
get-info:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
name: ${{ steps.actual-get-info.outputs.name }}
|
||||
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
|
||||
code: ${{ steps.actual-get-info.outputs.code }}
|
||||
release: ${{ steps.actual-get-info.outputs.release }}
|
||||
commit: ${{ steps.actual-get-info.outputs.commit }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install lua
|
||||
run: |
|
||||
sudo apt-get install lua5.3 -y
|
||||
- name: Get Version
|
||||
id: actual-get-info
|
||||
run: |
|
||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
|
||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||
echo "::set-output name=release::$(lua .github/workflows/getVersion.lua -release)"
|
||||
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
type: snapshot
|
||||
- uses: ./.github/actions/build-windows
|
||||
with:
|
||||
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
||||
love-dir: love-11.3-win64
|
||||
arch: win64
|
||||
version: ${{ needs.get-info.outputs.name }}
|
||||
icon: .\.github\build\Windows\icon_snapshot.ico
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows
|
||||
path: love
|
||||
- name: Pack Techmino
|
||||
run: 7z a -tzip .\Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows.zip .\love
|
||||
- name: Upload artifact to server
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
||||
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
||||
ARTIFACT_TYPE: test
|
||||
ARTIFACT_PLATFORM: Windows
|
||||
ARTIFACT_NAME: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows.zip
|
||||
# - name: Upload artifact to server
|
||||
# run: |
|
||||
# curl --user "${{ secrets.WEBDAV_USERNAME }}:${{ secrets.WEBDAV_PASSWORD }}" -T Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows.zip http://mc.yuhao7370.top:5212/dav/Techmino%20Snapshots/ -v
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
type: snapshot
|
||||
- uses: ./.github/actions/build-linux
|
||||
with:
|
||||
icon: .github/build/Linux/icon_snapshot.png
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Linux
|
||||
path: Techmino.AppImage
|
||||
- name: Pack Techmino
|
||||
run: mv Techmino.AppImage Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Linux.AppImage
|
||||
- name: Upload artifact to server
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
||||
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
||||
ARTIFACT_TYPE: test
|
||||
ARTIFACT_PLATFORM: Linux
|
||||
ARTIFACT_NAME: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Linux.AppImage
|
||||
|
||||
build-android:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
type: snapshot
|
||||
- uses: ./.github/actions/build-android
|
||||
with:
|
||||
type: Snapshot
|
||||
apkCode: ${{ needs.get-info.outputs.apkCode }}
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
file-path: Techmino_Snapshot.apk
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
ALIAS: ${{ secrets.ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Android
|
||||
path: Techmino_Snapshot.apk
|
||||
- name: Pack Techmino
|
||||
run: mv Techmino_Snapshot.apk Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Android.apk
|
||||
- name: Upload artifact to server
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
||||
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
||||
ARTIFACT_TYPE: test
|
||||
ARTIFACT_PLATFORM: Android
|
||||
ARTIFACT_NAME: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Android.apk
|
||||
|
||||
build-macOS:
|
||||
runs-on: macos-10.15
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
type: snapshot
|
||||
- uses: ./.github/actions/build-macos
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
icon: .github/build/macOS/icon_snapshot.icns
|
||||
APPLE_API_ID: '${{ secrets.APPLE_API_ID }}'
|
||||
APPLE_API_ISSUER: '${{ secrets.APPLE_API_ISSUER }}'
|
||||
APPLE_API_KEY: '${{ secrets.APPLE_API_KEY }}'
|
||||
APPLE_APP_IDENTIFIER: '${{ secrets.APPLE_APP_IDENTIFIER }}'
|
||||
APPLE_KEYCHAIN_NAME: '${{ secrets.APPLE_KEYCHAIN_NAME }}'
|
||||
APPLE_KEYCHAIN_PWD: '${{ secrets.APPLE_KEYCHAIN_PWD }}'
|
||||
FASTLANE_MATCH_PWD: '${{ secrets.FASTLANE_MATCH_PWD }}'
|
||||
FASTLANE_MATCH_TOKEN: '${{ secrets.FASTLANE_MATCH_TOKEN }}'
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_MacOS
|
||||
path: Techmino.dmg
|
||||
- name: Pack Techmino
|
||||
run: mv Techmino.dmg Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_MacOS.dmg
|
||||
- name: Upload artifact to server
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
||||
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
||||
ARTIFACT_TYPE: test
|
||||
ARTIFACT_PLATFORM: MacOS
|
||||
ARTIFACT_NAME: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_MacOS.dmg
|
||||
|
||||
build-iOS:
|
||||
runs-on: macos-latest
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/update-version
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
type: snapshot
|
||||
- uses: ./.github/actions/build-ios
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
type: 'test'
|
||||
APPLE_API_ID: '${{ secrets.APPLE_API_ID }}'
|
||||
APPLE_API_ISSUER: '${{ secrets.APPLE_API_ISSUER }}'
|
||||
APPLE_API_KEY: '${{ secrets.APPLE_API_KEY }}'
|
||||
APPLE_APP_BUILD: '${{ needs.get-info.outputs.code }}.1.${{ github.run_number }}.${{ github.run_attempt }}'
|
||||
APPLE_APP_CHANGELOG: '${{ github.event.commits[0].message }}'
|
||||
APPLE_APP_ID: '${{ secrets.APPLE_APP_ID }}'
|
||||
APPLE_APP_IDENTIFIER: '${{ secrets.APPLE_APP_IDENTIFIER }}'
|
||||
APPLE_APP_PROFILE: '${{ secrets.APPLE_APP_PROFILE }}'
|
||||
APPLE_KEYCHAIN_NAME: '${{ secrets.APPLE_KEYCHAIN_NAME }}'
|
||||
APPLE_KEYCHAIN_PWD: '${{ secrets.APPLE_KEYCHAIN_PWD }}'
|
||||
FASTLANE_ACTION_ID: '${{ github.run_id }}'
|
||||
FASTLANE_DISCORD_WEBHOOK: '${{ secrets.FASTLANE_DISCORD_WEBHOOK }}'
|
||||
FASTLANE_MATCH_PWD: '${{ secrets.FASTLANE_MATCH_PWD }}'
|
||||
FASTLANE_MATCH_TOKEN: '${{ secrets.FASTLANE_MATCH_TOKEN }}'
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_iOS
|
||||
path: Techmino.ipa
|
||||
- name: Pack Techmino
|
||||
run: mv Techmino.ipa Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_iOS.ipa
|
||||
- name: Upload artifact to server
|
||||
uses: ./.github/actions/upload-artifacts
|
||||
with:
|
||||
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
||||
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
||||
ARTIFACT_TYPE: test
|
||||
ARTIFACT_PLATFORM: iOS
|
||||
ARTIFACT_NAME: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_iOS.ipa
|
||||
97
.github/workflows/updateVersion.py
vendored
97
.github/workflows/updateVersion.py
vendored
@@ -1,97 +0,0 @@
|
||||
import argparse
|
||||
|
||||
def updateConf(): #更新存档位置
|
||||
with open('conf.lua', 'r+', encoding='utf-8') as file:
|
||||
data = file.read()
|
||||
data = data.replace("t.identity='Techmino'--Saving folder", "t.identity='Techmino_Snapshot'--Saving folder")
|
||||
file.seek(0)
|
||||
file.truncate()
|
||||
file.flush()
|
||||
file.write(data)
|
||||
|
||||
def updateVersion(args): #更新版本号
|
||||
with open('version.lua', 'r+', encoding='utf-8') as file:
|
||||
data = file.read()
|
||||
if args.Hash != False:
|
||||
data = data.replace('@DEV', f'@{args.Hash[0:4]}')
|
||||
else:
|
||||
data = data.replace('@DEV', '')
|
||||
file.seek(0)
|
||||
file.truncate()
|
||||
file.flush()
|
||||
file.write(data)
|
||||
|
||||
def updateMacOS(args): #更新macOS打包信息
|
||||
import datetime
|
||||
thisYear = str(datetime.datetime.today().year)
|
||||
with open('./.github/build/macOS/info.plist.template', 'r', encoding='utf-8') as file:
|
||||
data = file.read()
|
||||
data = data\
|
||||
.replace('@versionName', args.Name)\
|
||||
.replace('@thisYear', thisYear)
|
||||
with open('./Techmino.app/Contents/info.plist', 'w+', encoding='utf-8') as file:
|
||||
file.write(data)
|
||||
|
||||
def updateWindows(args): #更新Windows打包信息
|
||||
Version = (args.Name).replace('V', '')
|
||||
FileVersion = (f"{Version.replace('.', ',')},0")
|
||||
with open('./.github/build/Windows/Techmino.rc.template', 'r', encoding='utf8') as file:
|
||||
data = file.read()
|
||||
data = data\
|
||||
.replace('@FileVersion', FileVersion)\
|
||||
.replace('@Version', Version)
|
||||
with open('Techmino.rc', 'w+', encoding='utf8') as file:
|
||||
file.write(data)
|
||||
|
||||
def updateAndroid(args, edition): #更新Android打包信息
|
||||
if edition == 'Release':
|
||||
appName = 'Techmino'
|
||||
packageName = 'org.love2d.MrZ.Techmino'
|
||||
edition = 'release'
|
||||
elif edition == 'Snapshot':
|
||||
appName = 'Techmino_Snapshot'
|
||||
packageName = 'org.love2d.MrZ.Techmino.Snapshot'
|
||||
edition = 'snapshot'
|
||||
with open('./love-android/app/src/main/AndroidManifest.xml', "r+", encoding='utf-8') as file:
|
||||
data = file.read()
|
||||
data = data\
|
||||
.replace('@appName', appName)\
|
||||
.replace('@edition', edition)
|
||||
file.seek(0)
|
||||
file.truncate()
|
||||
file.write(data)
|
||||
with open("./love-android/app/build.gradle", "r+", encoding='utf-8') as file:
|
||||
data = file.read()
|
||||
data = data\
|
||||
.replace('@packageName', packageName)\
|
||||
.replace('@versionCode', args.Code)\
|
||||
.replace('@versionName', args.Name)\
|
||||
.replace('@storePassword', args.Store)\
|
||||
.replace('@keyAlias', args.Alias)\
|
||||
.replace('@keyPassword', args.Key)
|
||||
file.seek(0)
|
||||
file.truncate()
|
||||
file.write(data)
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description='用于CI更新程序各类信息')
|
||||
parser.add_argument('-T', '--Type', type=str, help = '更新的种类')
|
||||
parser.add_argument('-H', '--Hash', type=str, default = False, help = 'Github提交Hash')
|
||||
parser.add_argument('-C', '--Code', type=str, default = False, help = 'versionCode')
|
||||
parser.add_argument('-N', '--Name', type=str, default = False, help = 'versionName')
|
||||
parser.add_argument('-S', '--Store', type=str, default = False, help = 'storePassword')
|
||||
parser.add_argument('-A', '--Alias', type=str, default = False, help = 'keyAlias')
|
||||
parser.add_argument('-K', '--Key', type=str, default = False, help = 'keyPassword')
|
||||
args = parser.parse_args()
|
||||
if args.Type == 'Conf':
|
||||
updateConf()
|
||||
elif args.Type == 'Version':
|
||||
updateVersion(args)
|
||||
elif args.Type == 'Windows':
|
||||
updateWindows(args)
|
||||
elif args.Type == 'macOS':
|
||||
updateMacOS(args)
|
||||
elif args.Type == 'AndroidRelease':
|
||||
updateAndroid(args, 'Release')
|
||||
elif args.Type == 'AndroidSnapshot':
|
||||
updateAndroid(args, 'Snapshot')
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,3 +1,8 @@
|
||||
.vscode
|
||||
libAndroid
|
||||
*.ini
|
||||
*.ini
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
Icon?
|
||||
.Trash
|
||||
.file
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
local Sources={}
|
||||
local volume=1
|
||||
|
||||
local BGM={
|
||||
vol=1,
|
||||
default=false,
|
||||
getList=function()error("Cannot getList before initialize!")end,
|
||||
getCount=function()return 0 end,
|
||||
@@ -13,7 +15,7 @@ local BGM={
|
||||
local function task_fadeOut(src)
|
||||
while true do
|
||||
coroutine.yield()
|
||||
local v=src:getVolume()-.025*BGM.vol
|
||||
local v=src:getVolume()-.025*volume
|
||||
src:setVolume(v>0 and v or 0)
|
||||
if v<=0 then
|
||||
src:pause()
|
||||
@@ -24,10 +26,10 @@ end
|
||||
local function task_fadeIn(src)
|
||||
while true do
|
||||
coroutine.yield()
|
||||
local v=BGM.vol
|
||||
local v=volume
|
||||
v=math.min(v,src:getVolume()+.025*v)
|
||||
src:setVolume(v)
|
||||
if v>=BGM.vol then
|
||||
if v>=volume then
|
||||
return true
|
||||
end
|
||||
end
|
||||
@@ -43,11 +45,10 @@ function BGM.setChange(func)
|
||||
end
|
||||
function BGM.setVol(v)
|
||||
assert(type(v)=='number'and v>=0 and v<=1)
|
||||
BGM.vol=v
|
||||
volume=v
|
||||
end
|
||||
function BGM.init(list)
|
||||
BGM.init=nil
|
||||
local Sources={}
|
||||
|
||||
local simpList={}
|
||||
for _,v in next,list do
|
||||
@@ -57,6 +58,7 @@ function BGM.init(list)
|
||||
table.sort(simpList)
|
||||
function BGM.getList()return simpList end
|
||||
local count=#simpList
|
||||
LOG(count.." BGM files added")
|
||||
function BGM.getCount()return count end
|
||||
|
||||
local function _load(name)
|
||||
@@ -77,10 +79,10 @@ function BGM.init(list)
|
||||
end
|
||||
function BGM.setVol(v)
|
||||
assert(type(v)=='number'and v>=0 and v<=1)
|
||||
BGM.vol=v
|
||||
volume=v
|
||||
if BGM.playing then
|
||||
if BGM.vol>0 then
|
||||
BGM.playing:setVolume(BGM.vol)
|
||||
if volume>0 then
|
||||
BGM.playing:setVolume(volume)
|
||||
BGM.playing:play()
|
||||
elseif BGM.nowPlay then
|
||||
BGM.playing:pause()
|
||||
@@ -95,7 +97,7 @@ function BGM.init(list)
|
||||
function BGM.play(name)
|
||||
name=name or BGM.default
|
||||
if not _load(name)then return end
|
||||
if BGM.vol==0 then
|
||||
if volume==0 then
|
||||
BGM.nowPlay=name
|
||||
BGM.playing=Sources[name]
|
||||
return true
|
||||
|
||||
@@ -1,63 +1,80 @@
|
||||
local abs=math.abs
|
||||
local function hsv(h,s,v,a)
|
||||
if s<=0 then return v,v,v end
|
||||
h=h*6
|
||||
local c=v*s
|
||||
local x=abs((h-1)%2-1)*c
|
||||
if h<1 then return v,x+v-c,v-c,a
|
||||
elseif h<2 then return x+v-c,v,v-c,a
|
||||
elseif h<3 then return v-c,v,x+v-c,a
|
||||
elseif h<4 then return v-c,x+v-c,v,a
|
||||
elseif h<5 then return x+v-c,v-c,v,a
|
||||
else return v,v-c,x+v-c,a
|
||||
end
|
||||
end
|
||||
|
||||
local COLOR={
|
||||
red= {.92, .12, .12},
|
||||
fire= {.92, 0.4, .12},
|
||||
orange= {.92, 0.6, .12},
|
||||
yellow= {.92, .92, .12},
|
||||
lime= {0.7, .92, .12},
|
||||
jade= {0.5, .92, .12},
|
||||
green= {.12, .92, .12},
|
||||
aqua= {.12, .92, 0.6},
|
||||
cyan= {.12, .92, .92},
|
||||
navy= {.12, 0.7, .92},
|
||||
sea= {.12, 0.4, .92},
|
||||
blue= {0.2, 0.2, .92},
|
||||
violet= {0.4, .12, .92},
|
||||
purple= {0.7, .12, .92},
|
||||
magenta= {.92, .12, .92},
|
||||
wine= {.92, .12, 0.5},
|
||||
hsv=hsv,
|
||||
|
||||
lRed= {.95, 0.5, 0.5},
|
||||
lFire= {.95, 0.7, 0.5},
|
||||
lOrange= {.95, 0.8, 0.3},
|
||||
lYellow= {.95, .95, 0.5},
|
||||
lLime= {0.8, .95, 0.4},
|
||||
lJade= {0.6, .95, 0.4},
|
||||
lGreen= {0.5, .95, 0.5},
|
||||
lAqua= {0.4, .95, 0.7},
|
||||
lCyan= {0.5, .95, .95},
|
||||
lNavy= {0.4, .85, .95},
|
||||
lSea= {0.5, 0.7, .95},
|
||||
lBlue= {0.7, 0.7, .95},
|
||||
lViolet= {0.7, 0.4, .95},
|
||||
lPurple= {0.8, 0.4, .95},
|
||||
lMagenta={.95, 0.5, .95},
|
||||
lWine= {.95, 0.4, 0.7},
|
||||
red= {hsv(0, .85,.85)},
|
||||
fire= {hsv(0.0625,.85,.85)},
|
||||
orange= {hsv(0.125, .85,.85)},
|
||||
yellow= {hsv(0.1875,.85,.85)},
|
||||
lime= {hsv(0.25, .85,.85)},
|
||||
jade= {hsv(0.3125,.85,.85)},
|
||||
green= {hsv(0.375, .85,.85)},
|
||||
aqua= {hsv(0.4375,.85,.85)},
|
||||
cyan= {hsv(0.5, .85,.85)},
|
||||
navy= {hsv(0.5625,.85,.85)},
|
||||
sea= {hsv(0.625, .85,.85)},
|
||||
blue= {hsv(0.6875,.85,.85)},
|
||||
violet= {hsv(0.75, .85,.85)},
|
||||
purple= {hsv(0.8125,.85,.85)},
|
||||
magenta= {hsv(0.875, .85,.85)},
|
||||
wine= {hsv(0.9375,.85,.85)},
|
||||
|
||||
dRed= {0.6, .08, .08},
|
||||
dFire= {0.6, 0.3, .08},
|
||||
dOrange= {0.6, 0.4, .08},
|
||||
dYellow= {0.6, 0.6, .08},
|
||||
dLime= {0.5, 0.6, .08},
|
||||
dJade= {0.3, 0.6, .08},
|
||||
dGreen= {.08, 0.6, .08},
|
||||
dAqua= {.08, 0.6, 0.4},
|
||||
dCyan= {.08, 0.6, 0.6},
|
||||
dNavy= {.08, 0.4, 0.6},
|
||||
dSea= {.08, 0.2, 0.6},
|
||||
dBlue= {0.1, 0.1, 0.6},
|
||||
dViolet= {0.2, .08, 0.6},
|
||||
dPurple= {0.4, .08, 0.6},
|
||||
dMagenta={0.6, .08, 0.6},
|
||||
dWine= {0.6, .08, 0.3},
|
||||
lRed= {hsv(0, .5,.95)},
|
||||
lFire= {hsv(0.0625,.5,.95)},
|
||||
lOrange= {hsv(0.125, .5,.95)},
|
||||
lYellow= {hsv(0.1875,.5,.95)},
|
||||
lLime= {hsv(0.25, .5,.95)},
|
||||
lJade= {hsv(0.3125,.5,.95)},
|
||||
lGreen= {hsv(0.375, .5,.95)},
|
||||
lAqua= {hsv(0.4375,.5,.95)},
|
||||
lCyan= {hsv(0.5, .5,.95)},
|
||||
lNavy= {hsv(0.5625,.5,.95)},
|
||||
lSea= {hsv(0.625, .5,.95)},
|
||||
lBlue= {hsv(0.6875,.5,.95)},
|
||||
lViolet= {hsv(0.75, .5,.95)},
|
||||
lPurple= {hsv(0.8125,.5,.95)},
|
||||
lMagenta={hsv(0.875, .5,.95)},
|
||||
lWine= {hsv(0.9375,.5,.95)},
|
||||
|
||||
black= {.05, .05, .05},
|
||||
dGray= {0.3, 0.3, 0.3},
|
||||
gray= {0.6, 0.6, 0.6},
|
||||
lGray= {0.8, 0.8, 0.8},
|
||||
white= {.97, .97, .97},
|
||||
dRed= {hsv(0, .9,.5)},
|
||||
dFire= {hsv(0.0625,.9,.5)},
|
||||
dOrange= {hsv(0.125, .9,.5)},
|
||||
dYellow= {hsv(0.1875,.9,.5)},
|
||||
dLime= {hsv(0.25, .9,.5)},
|
||||
dJade= {hsv(0.3125,.9,.5)},
|
||||
dGreen= {hsv(0.375, .9,.5)},
|
||||
dAqua= {hsv(0.4375,.9,.5)},
|
||||
dCyan= {hsv(0.5, .9,.5)},
|
||||
dNavy= {hsv(0.5625,.9,.5)},
|
||||
dSea= {hsv(0.625, .9,.5)},
|
||||
dBlue= {hsv(0.6875,.9,.5)},
|
||||
dViolet= {hsv(0.75, .9,.5)},
|
||||
dPurple= {hsv(0.8125,.9,.5)},
|
||||
dMagenta={hsv(0.875, .9,.5)},
|
||||
dWine= {hsv(0.9375,.9,.5)},
|
||||
|
||||
black= {hsv(0,0,.05)},
|
||||
dGray= {hsv(0,0,0.3)},
|
||||
gray= {hsv(0,0,0.6)},
|
||||
lGray= {hsv(0,0,0.8)},
|
||||
white= {hsv(0,0,.97)},
|
||||
}
|
||||
for k,v in next,{
|
||||
R='red', F='fire', O='orange', Y='yellow', L='lime', J='jade', G='green', A='aqua', C='cyan', N='navy', S='sea', B='blue', V='violet', P='purple', M='magenta', W='wine',
|
||||
R='red', F='fire', O='orange', Y='yellow', L='lime', J='jade', G='green', A='aqua', C='cyan', N='navy', S='sea', B='blue', V='violet', P='purple', M='magenta', W='wine',
|
||||
lR='lRed',lF='lFire',lO='lOrange',lY='lYellow',lL='lLime',lJ='lJade',lG='lGreen',lA='lAqua',lC='lCyan',lN='lNavy',lS='lSea',lB='lBlue',lV='lViolet',lP='lPurple',lM='lMagenta',lW='lWine',
|
||||
dR='dRed',dF='dFire',dO='dOrange',dY='dYellow',dL='dLime',dJ='dJade',dG='dGreen',dA='dAqua',dC='dCyan',dN='dNavy',dS='dSea',dB='dBlue',dV='dViolet',dP='dPurple',dM='dMagenta',dW='dWine',
|
||||
D='black',dH='dGray',H='gray',lH='lGray',Z='white',
|
||||
|
||||
@@ -25,8 +25,8 @@ function FONT.reset()
|
||||
end
|
||||
end
|
||||
|
||||
function FONT.init(mainFont,secFont)
|
||||
assert(love.filesystem.getInfo(mainFont))
|
||||
function FONT.load(mainFont,secFont)
|
||||
assert(love.filesystem.getInfo(mainFont),"Font file '"..mainFont.."' not exist!")
|
||||
mainFont=love.filesystem.newFile(mainFont)
|
||||
if secFont and love.filesystem.getInfo(secFont)then
|
||||
secFont=love.filesystem.newFile(secFont)
|
||||
|
||||
@@ -9,6 +9,8 @@ TABLE= require'Zframework.tableExtend'
|
||||
STRING= require'Zframework.stringExtend'
|
||||
PROFILE= require'Zframework.profile'
|
||||
JSON= require'Zframework.json'
|
||||
TEST= require'Zframework.test'
|
||||
|
||||
do--Add pcall & MES for JSON lib
|
||||
local encode,decode=JSON.encode,JSON.decode
|
||||
JSON.encode=function(val)
|
||||
@@ -71,7 +73,6 @@ local xOy=SCR.xOy
|
||||
local ITP=xOy.inverseTransformPoint
|
||||
|
||||
local mx,my,mouseShow=-20,-20,false
|
||||
local touching--First touching ID(userdata)
|
||||
joysticks={}
|
||||
|
||||
local devMode
|
||||
@@ -181,8 +182,8 @@ end
|
||||
function love.touchpressed(id,x,y)
|
||||
mouseShow=false
|
||||
if SCN.swapping then return end
|
||||
if not touching then
|
||||
touching=id
|
||||
if not SCN.mainTouchID then
|
||||
SCN.mainTouchID=id
|
||||
WIDGET.unFocus(true)
|
||||
love.touchmoved(id,x,y,0,0)
|
||||
end
|
||||
@@ -201,12 +202,12 @@ end
|
||||
function love.touchreleased(id,x,y)
|
||||
if SCN.swapping then return end
|
||||
x,y=ITP(xOy,x,y)
|
||||
if id==touching then
|
||||
if id==SCN.mainTouchID then
|
||||
WIDGET.press(x,y,1)
|
||||
WIDGET.release(x,y)
|
||||
WIDGET.cursorMove(x,y)
|
||||
WIDGET.unFocus()
|
||||
touching=false
|
||||
SCN.mainTouchID=false
|
||||
end
|
||||
if SCN.touchUp then SCN.touchUp(x,y)end
|
||||
if(x-lastX)^2+(y-lastY)^2<62 then
|
||||
@@ -259,7 +260,8 @@ function love.keypressed(key,_,isRep)
|
||||
devMode=1
|
||||
MES.new('info',"DEBUG ON",.2)
|
||||
elseif key=="f11"then
|
||||
switchFullscreen()
|
||||
SETTING.fullscreen=not SETTING.fullscreen
|
||||
applyFullscreen()
|
||||
saveSettings()
|
||||
elseif not SCN.swapping then
|
||||
if SCN.keyDown then
|
||||
@@ -349,9 +351,9 @@ function love.directorydropped(dir)
|
||||
end
|
||||
local lastGCtime=0
|
||||
function love.lowmemory()
|
||||
if TIME()-lastGCtime>6.26 then
|
||||
if love.timer.getTime()-lastGCtime>6.26 then
|
||||
collectgarbage()
|
||||
lastGCtime=TIME()
|
||||
lastGCtime=love.timer.getTime()
|
||||
MES.new('check',"[auto GC] low MEM 设备内存过低")
|
||||
end
|
||||
end
|
||||
@@ -374,7 +376,11 @@ local function secondLoopThread()
|
||||
repeat yield()until mainLoop()
|
||||
end
|
||||
function love.errorhandler(msg)
|
||||
if not msg then msg="Unknown error" end
|
||||
if type(msg)~='string'then
|
||||
msg="Unknown error"
|
||||
elseif msg:find("Invaild UTF-8")and text then
|
||||
msg=text.tryAnotherBuild
|
||||
end
|
||||
|
||||
--Generate error message
|
||||
local err={"Error:"..msg}
|
||||
@@ -404,7 +410,7 @@ function love.errorhandler(msg)
|
||||
--Write messages to log file
|
||||
love.filesystem.append('conf/error.log',
|
||||
os.date("%Y/%m/%d %A %H:%M:%S\n")..
|
||||
#ERRDATA.." crash(es) "..SYSTEM.."-"..VERSION.string.." scene: "..scn.."\n"..
|
||||
#ERRDATA.." crash(es) "..love.system.getOS().."-"..VERSION.string.." scene: "..scn.."\n"..
|
||||
table.concat(err,"\n",1,c-2).."\n\n"
|
||||
)
|
||||
|
||||
@@ -445,7 +451,7 @@ function love.errorhandler(msg)
|
||||
FONT.set(100)gc_print(":(",100,0,0,1.2)
|
||||
FONT.set(40)gc.printf(errorMsg,100,160,SCR.w0-100)
|
||||
FONT.set(20)
|
||||
gc_print(SYSTEM.."-"..VERSION.string.." scene:"..(SCN and SCN.cur or"NULL"),100,660)
|
||||
gc_print(love.system.getOS().."-"..VERSION.string.." scene:"..(SCN and SCN.cur or"NULL"),100,660)
|
||||
gc.printf(err[1],100,360,1260-100)
|
||||
gc_print("TRACEBACK",100,450)
|
||||
for i=4,#err-2 do
|
||||
@@ -520,10 +526,10 @@ function love.run()
|
||||
local FPS,MINI=love.timer.getFPS,love.window.isMinimized
|
||||
local PUMP,POLL=love.event.pump,love.event.poll
|
||||
|
||||
local TIME,SETTING,VERSION=TIME,SETTING,VERSION
|
||||
local timer,SETTING,VERSION=love.timer.getTime,SETTING,VERSION
|
||||
|
||||
local frameTimeList={}
|
||||
local lastFrame=TIME()
|
||||
local lastFrame=timer()
|
||||
local lastFreshPow=lastFrame
|
||||
local FCT=0--Framedraw counter, from 0~99
|
||||
|
||||
@@ -537,7 +543,7 @@ function love.run()
|
||||
return function()
|
||||
local _
|
||||
|
||||
local time=TIME()
|
||||
local time=timer()
|
||||
local dt=time-lastFrame
|
||||
lastFrame=time
|
||||
|
||||
@@ -689,9 +695,9 @@ function love.run()
|
||||
end
|
||||
|
||||
--Keep 60fps
|
||||
_=TIME()-lastFrame
|
||||
_=timer()-lastFrame
|
||||
if _<.0162 then WAIT(.0162-_)end
|
||||
while TIME()-lastFrame<1/60 do end
|
||||
while timer()-lastFrame<1/60 do end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -699,7 +705,7 @@ local Z={}
|
||||
|
||||
function Z.setIfPowerInfo(func)showPowerInfo=func end
|
||||
|
||||
--Warning: color and line width is uncertain value, set it in the function.
|
||||
--[Warning] Color and line width is uncertain value, set it in the function.
|
||||
function Z.setCursor(func)drawCursor=func end
|
||||
|
||||
--Change F1~F7 events of devmode (F8 mode)
|
||||
|
||||
@@ -47,7 +47,7 @@ function LANG.init(defaultLang,langList,publicText,pretreatFunc)
|
||||
function LANG.addScene(name)
|
||||
for _,L in next,langList do
|
||||
if L.WidgetText and not L.WidgetText[name]then
|
||||
L.WidgetText[name]={back=L.back}
|
||||
L.WidgetText[name]={}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@ local ins=table.insert
|
||||
local logs={os.date("Techmino logs %Y/%m/%d %A")}
|
||||
|
||||
local function log(message)
|
||||
ins(logs,os.date("%H:%M:%S")..message)
|
||||
ins(logs,os.date("[%H:%M:%S] ")..message)
|
||||
end
|
||||
|
||||
local LOG=setmetatable({logs=logs},{
|
||||
|
||||
@@ -2,10 +2,10 @@ package.cpath=package.cpath..';'..SAVEDIR..'/lib/lib?.so;'..'?.dylib'
|
||||
local loaded={}
|
||||
return function(libName)
|
||||
local require=require
|
||||
if SYSTEM=='OS X'then
|
||||
if love.system.getOS()=='OS X'then
|
||||
require=package.loadlib(libName..'.dylib','luaopen_'..libName)
|
||||
libname=nil
|
||||
elseif SYSTEM=='Android'then
|
||||
elseif love.system.getOS()=='Android'then
|
||||
if not loaded[libName]then
|
||||
local platform=(function()
|
||||
local p=io.popen('uname -m')
|
||||
|
||||
@@ -4,6 +4,7 @@ local abs=math.abs
|
||||
local scenes={}
|
||||
|
||||
local SCN={
|
||||
mainTouchID=nil, --First touching ID(userdata)
|
||||
cur='NULL', --Current scene name
|
||||
swapping=false, --If Swapping
|
||||
stat={
|
||||
@@ -52,6 +53,7 @@ function SCN.swapUpdate(dt)
|
||||
if S.time<S.changeTime and S.time+dt>=S.changeTime then
|
||||
--Scene swapped this frame
|
||||
SCN.init(S.tar,SCN.cur)
|
||||
SCN.mainTouchID=nil
|
||||
end
|
||||
if S.time<0 then
|
||||
SCN.swapping=false
|
||||
|
||||
@@ -1,97 +1,158 @@
|
||||
local SFX={
|
||||
vol=1,
|
||||
stereo=1,
|
||||
getCount=function()return 0 end,
|
||||
load=function()error("Cannot load before init!")end,
|
||||
fieldPlay=NULL,
|
||||
play=NULL,
|
||||
fplay=NULL,
|
||||
reset=NULL,
|
||||
local type,rem=type,table.remove
|
||||
|
||||
local sfxList={}
|
||||
local packSetting={}
|
||||
local Sources={}
|
||||
local volume=1
|
||||
local stereo=1
|
||||
|
||||
local noteName={
|
||||
C=1,c=1,
|
||||
D=3,d=3,
|
||||
E=5,e=5,
|
||||
F=6,f=6,
|
||||
G=8,g=8,
|
||||
A=10,a=10,
|
||||
B=12,b=12,
|
||||
}
|
||||
local function _getTuneHeight(tune)
|
||||
local octave=tonumber(tune:sub(-1,-1))
|
||||
if octave then
|
||||
local tuneHeight=noteName[tune:sub(1,1)]
|
||||
if tuneHeight then
|
||||
tuneHeight=tuneHeight+(octave-1)*12
|
||||
local s=tune:sub(2,2)
|
||||
if s=='s'or s=='#'then
|
||||
tuneHeight=tuneHeight+1
|
||||
elseif s=='f'or s=='b'then
|
||||
tuneHeight=tuneHeight-1
|
||||
end
|
||||
return tuneHeight
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local SFX={}
|
||||
|
||||
function SFX.init(list)
|
||||
assert(type(list)=='table',"Initialize SFX lib with a list of filenames!")
|
||||
for i=1,#list do table.insert(sfxList,list[i])end
|
||||
end
|
||||
function SFX.load(path)
|
||||
local c=0
|
||||
for i=1,#sfxList do
|
||||
local fullPath=path..sfxList[i]..'.ogg'
|
||||
if love.filesystem.getInfo(fullPath)then
|
||||
Sources[sfxList[i]]={love.audio.newSource(fullPath,'static')}
|
||||
c=c+1
|
||||
else
|
||||
LOG("No SFX: "..sfxList[i]..'.ogg',.1)
|
||||
end
|
||||
end
|
||||
LOG(c.."/"..#sfxList.." SFX files loaded")
|
||||
end
|
||||
function SFX.loadSample(pack)
|
||||
assert(type(pack)=='table',"Usage: SFX.loadsample([table])")
|
||||
assert(pack.name,"No field: name")
|
||||
assert(pack.path,"No field: path")
|
||||
packSetting[pack.name]={
|
||||
base=(_getTuneHeight(pack.base)or 37)-1,
|
||||
}
|
||||
local num=1
|
||||
while love.filesystem.getInfo(pack.path..'/'..num..'.ogg')do
|
||||
Sources[pack.name..num]={love.audio.newSource(pack.path..'/'..num..'.ogg','static')}
|
||||
num=num+1
|
||||
end
|
||||
LOG((num-1).." "..pack.name.." samples loaded")
|
||||
end
|
||||
|
||||
function SFX.getCount()
|
||||
return #sfxList
|
||||
end
|
||||
function SFX.setVol(v)
|
||||
assert(type(v)=='number'and v>=0 and v<=1)
|
||||
SFX.vol=v
|
||||
volume=v
|
||||
end
|
||||
function SFX.setStereo(v)
|
||||
assert(type(v)=='number'and v>=0 and v<=1)
|
||||
SFX.stereo=v
|
||||
stereo=v
|
||||
end
|
||||
function SFX.init(list)
|
||||
SFX.init=nil
|
||||
local rem=table.remove
|
||||
local Sources={}
|
||||
|
||||
local count=#list function SFX.getCount()return count end
|
||||
function SFX.load(path)
|
||||
for i=1,count do
|
||||
local fullPath=path..list[i]..'.ogg'
|
||||
if love.filesystem.getInfo(fullPath)then
|
||||
Sources[list[i]]={love.audio.newSource(fullPath,'static')}
|
||||
function SFX.playSample(pack,...)--vol-2, sampSet1, vol-3, sampSet2, vol-1
|
||||
if ... then
|
||||
local arg={...}
|
||||
local vol
|
||||
if type(arg[#arg])=='number'then vol=rem(arg)end
|
||||
for i=1,#arg do
|
||||
if type(arg[i])=='number'then
|
||||
vol=arg[i]
|
||||
else
|
||||
LOG("No SFX: "..list[i]..'.ogg',.1)
|
||||
local tune=arg[i]
|
||||
tune=_getTuneHeight(tune)-packSetting[pack].base
|
||||
SFX.play(pack..tune,vol)
|
||||
end
|
||||
end
|
||||
|
||||
function SFX.play(s,vol,pos)
|
||||
if SFX.vol==0 or vol==0 then return end
|
||||
local S=Sources[s]--Source list
|
||||
if not S then return end
|
||||
local n=1
|
||||
while S[n]:isPlaying()do
|
||||
n=n+1
|
||||
if not S[n]then
|
||||
S[n]=S[1]:clone()
|
||||
S[n]:seek(0)
|
||||
break
|
||||
end
|
||||
end
|
||||
S=S[n]--AU_SRC
|
||||
if S:getChannelCount()==1 then
|
||||
if pos then
|
||||
pos=pos*SFX.stereo
|
||||
S:setPosition(pos,1-pos^2,0)
|
||||
else
|
||||
S:setPosition(0,0,0)
|
||||
end
|
||||
end
|
||||
S:setVolume(((vol or 1)*SFX.vol)^1.626)
|
||||
S:play()
|
||||
end
|
||||
end
|
||||
function SFX.play(name,vol,pos)
|
||||
if volume==0 or vol==0 then return end
|
||||
local S=Sources[name]--Source list
|
||||
if not S then return end
|
||||
local n=1
|
||||
while S[n]:isPlaying()do
|
||||
n=n+1
|
||||
if not S[n]then
|
||||
S[n]=S[1]:clone()
|
||||
S[n]:seek(0)
|
||||
break
|
||||
end
|
||||
function SFX.fplay(s,vol,pos)
|
||||
local S=Sources[s]--Source list
|
||||
if not S then return end
|
||||
local n=1
|
||||
while S[n]:isPlaying()do
|
||||
n=n+1
|
||||
if not S[n]then
|
||||
S[n]=S[1]:clone()
|
||||
S[n]:seek(0)
|
||||
break
|
||||
end
|
||||
end
|
||||
S=S[n]--AU_SRC
|
||||
if S:getChannelCount()==1 then
|
||||
if pos then
|
||||
pos=pos*SFX.stereo
|
||||
S:setPosition(pos,1-pos^2,0)
|
||||
else
|
||||
S:setPosition(0,0,0)
|
||||
end
|
||||
end
|
||||
S:setVolume(vol^1.626)
|
||||
S:play()
|
||||
end
|
||||
S=S[n]--AU_SRC
|
||||
if S:getChannelCount()==1 then
|
||||
if pos then
|
||||
pos=pos*stereo
|
||||
S:setPosition(pos,1-pos^2,0)
|
||||
else
|
||||
S:setPosition(0,0,0)
|
||||
end
|
||||
function SFX.reset()
|
||||
for _,L in next,Sources do
|
||||
if type(L)=='table'then
|
||||
for i=#L,1,-1 do
|
||||
if not L[i]:isPlaying()then
|
||||
rem(L,i)
|
||||
end
|
||||
end
|
||||
end
|
||||
S:setVolume(((vol or 1)*volume)^1.626)
|
||||
S:play()
|
||||
end
|
||||
function SFX.fplay(name,vol,pos)
|
||||
local S=Sources[name]--Source list
|
||||
if not S then return end
|
||||
local n=1
|
||||
while S[n]:isPlaying()do
|
||||
n=n+1
|
||||
if not S[n]then
|
||||
S[n]=S[1]:clone()
|
||||
S[n]:seek(0)
|
||||
break
|
||||
end
|
||||
end
|
||||
S=S[n]--AU_SRC
|
||||
if S:getChannelCount()==1 then
|
||||
if pos then
|
||||
pos=pos*stereo
|
||||
S:setPosition(pos,1-pos^2,0)
|
||||
else
|
||||
S:setPosition(0,0,0)
|
||||
end
|
||||
end
|
||||
S:setVolume(vol^1.626)
|
||||
S:play()
|
||||
end
|
||||
function SFX.reset()
|
||||
for _,L in next,Sources do
|
||||
if type(L)=='table'then
|
||||
for i=#L,1,-1 do
|
||||
if not L[i]:isPlaying()then
|
||||
rem(L,i)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return SFX
|
||||
|
||||
@@ -23,7 +23,7 @@ function TASK.update(dt)
|
||||
end
|
||||
function TASK.new(code,...)
|
||||
local thread=coroutine.create(code)
|
||||
resume(thread,...)
|
||||
assert(resume(thread,...))
|
||||
if status(thread)~='dead'then
|
||||
tasks[#tasks+1]={
|
||||
thread=thread,
|
||||
|
||||
12
Zframework/test.lua
Normal file
12
Zframework/test.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
local TEST={}
|
||||
|
||||
--Wait for the scene swapping animation to finish
|
||||
function TEST.yieldUntilNextScene()
|
||||
while SCN.swapping do YIELD()end
|
||||
end
|
||||
|
||||
function TEST.yieldN(frames)
|
||||
for _=1,frames do YIELD()end
|
||||
end
|
||||
|
||||
return TEST
|
||||
@@ -1,6 +1,12 @@
|
||||
local level={0,0,.01,.016,.023,.03,.04,.05,.06,.07,.08,.09,.12,.15}
|
||||
local vib=love.system.vibrate
|
||||
return function(t)
|
||||
t=level[t]
|
||||
if t then vib(t)end
|
||||
end
|
||||
return love.system.getOS()=='iOS'and
|
||||
function(t)
|
||||
t=level[t]
|
||||
if t then vib(t<=.03 and 1 or t<=.09 and 2 or 3)end
|
||||
end
|
||||
or
|
||||
function(t)
|
||||
t=level[t]
|
||||
if t then vib(t)end
|
||||
end
|
||||
@@ -151,7 +151,7 @@ local readThread=coroutine.wrap(function()
|
||||
if op==8 then--8=close
|
||||
CHN_push(readCHN,8)--close
|
||||
if type(res)=='string'then
|
||||
CHN_push(readCHN,res:sub(3))--Warning: 2 bytes close code at start so :sub(3)
|
||||
CHN_push(readCHN,res:sub(3))--[Warning] 2 bytes close code at start so :sub(3)
|
||||
else
|
||||
CHN_push(readCHN,"WS closed")
|
||||
end
|
||||
|
||||
@@ -10,6 +10,7 @@ local gc_rectangle=gc.rectangle
|
||||
local gc_print,gc_printf=gc.print,gc.printf
|
||||
|
||||
local kb=love.keyboard
|
||||
local timer=love.timer.getTime
|
||||
|
||||
local next=next
|
||||
local int,ceil,abs=math.floor,math.ceil,math.abs
|
||||
@@ -434,7 +435,7 @@ end
|
||||
function switch:press()
|
||||
self.code()
|
||||
if self.sound then
|
||||
SFX.play('move')
|
||||
SFX.play('touch')
|
||||
end
|
||||
end
|
||||
function WIDGET.newSwitch(D)--name,x,y[,lim][,fText][,color][,font=30][,sound=true][,disp],code[,hideF][,hide]
|
||||
@@ -571,8 +572,8 @@ function slider:drag(x)
|
||||
if p~=P then
|
||||
self.code(P)
|
||||
end
|
||||
if self.change and TIME()-self.lastTime>.5 then
|
||||
self.lastTime=TIME()
|
||||
if self.change and timer()-self.lastTime>.5 then
|
||||
self.lastTime=timer()
|
||||
self.change()
|
||||
end
|
||||
end
|
||||
@@ -586,8 +587,8 @@ function slider:scroll(n)
|
||||
local P=n==-1 and max(p-u,0)or min(p+u,self.unit)
|
||||
if p==P or not P then return end
|
||||
self.code(P)
|
||||
if self.change and TIME()-self.lastTime>.18 then
|
||||
self.lastTime=TIME()
|
||||
if self.change and timer()-self.lastTime>.18 then
|
||||
self.lastTime=timer()
|
||||
self.change()
|
||||
end
|
||||
end
|
||||
@@ -656,15 +657,16 @@ local selector={
|
||||
function selector:reset()
|
||||
self.ATV=0
|
||||
local V,L=self.disp(),self.list
|
||||
local i=TABLE.find(L,V)
|
||||
if i then
|
||||
self.select=i
|
||||
self.selText=self.list[i]
|
||||
else
|
||||
self.select=0
|
||||
self.selText=""
|
||||
MES.new('error',"Selector "..self.name.." dead, disp= "..tostring(V))
|
||||
for i=1,#L do
|
||||
if L[i]==V then
|
||||
self.select=i
|
||||
self.selText=self.list[i]
|
||||
return
|
||||
end
|
||||
end
|
||||
self.select=0
|
||||
self.selText=""
|
||||
MES.new('error',"Selector "..self.name.." dead, disp= "..tostring(V))
|
||||
end
|
||||
function selector:isAbove(x,y)
|
||||
return
|
||||
@@ -696,7 +698,7 @@ function selector:draw()
|
||||
|
||||
--Arrow
|
||||
gc_setColor(1,1,1,.2+ATV*.1)
|
||||
local t=(TIME()%.5)^.5
|
||||
local t=(timer()%.5)^.5
|
||||
if self.select>1 then
|
||||
gc_draw(smallerThen,x+6,y+33)
|
||||
if ATV>0 then
|
||||
@@ -1429,7 +1431,7 @@ function WIDGET.textinput(texts)
|
||||
if W and W.type=='inputBox'then
|
||||
if(not W.regex or texts:match(W.regex))and(not W.limit or #(WIDGET.sel.value..texts)<=W.limit)then
|
||||
WIDGET.sel.value=WIDGET.sel.value..texts
|
||||
SFX.play('move')
|
||||
SFX.play('touch')
|
||||
else
|
||||
SFX.play('finesseError',.3)
|
||||
end
|
||||
@@ -1456,8 +1458,8 @@ function WIDGET.gamepadPressed(i)
|
||||
local P=i=="left"and(p>0 and p-1)or p<W.unit and p+1
|
||||
if p==P or not P then return end
|
||||
W.code(P)
|
||||
if W.change and TIME()-W.lastTime>.18 then
|
||||
W.lastTime=TIME()
|
||||
if W.change and timer()-W.lastTime>.18 then
|
||||
W.lastTime=timer()
|
||||
W.change()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
# 代码规范
|
||||
注:小程序和外部库等部分代码可以不遵守
|
||||
## 缩进
|
||||
全部使用四个空格
|
||||
## 文件尾
|
||||
文件尾要有空行
|
||||
## 变量名
|
||||
库 全大写
|
||||
库方法和全局变量 小驼峰
|
||||
局部函数 下划线开头小驼峰
|
||||
简单的局部变量 多个单词首字母或大写单字母
|
||||
需要阅读的局部变量 小驼峰
|
||||
## 常用语句块格式
|
||||
```lua
|
||||
f() -- 语句末不需要加分号
|
||||
|
||||
if c1 then
|
||||
s1
|
||||
elseif c2 then
|
||||
s2
|
||||
else
|
||||
s3
|
||||
end
|
||||
|
||||
while c do
|
||||
s
|
||||
end
|
||||
|
||||
for i=1,#l do
|
||||
s
|
||||
end
|
||||
|
||||
for k,v in next,table do -- pairs(table)最好换成next,table
|
||||
s
|
||||
end
|
||||
|
||||
repeat
|
||||
s
|
||||
until c
|
||||
|
||||
do
|
||||
s
|
||||
end
|
||||
```
|
||||
## 单行/多行注释
|
||||
```lua
|
||||
单行代码--注释1
|
||||
|
||||
--注释2
|
||||
函数或者代码块
|
||||
|
||||
--[[这里最好带上几个字的概述,方便折叠的时候预览,方括号间等号能不带就不带
|
||||
注释内容
|
||||
]]
|
||||
函数或者代码块
|
||||
```
|
||||
## 字符串
|
||||
可能输出到外部给玩家或者看的(或给开发者看的debug信息)用双引号
|
||||
只存在于代码中不对外展示的字符串用单引号
|
||||
双方括号(等号能不带就不带)用于大段文本
|
||||
## 代码紧凑
|
||||
### 少空格(这几种地方不要用空格)
|
||||
逗号后
|
||||
运算符两边
|
||||
左括号前
|
||||
右括号后
|
||||
### 省小括号
|
||||
如果一个函数只能接受一个输入
|
||||
并且输入的值是table或者string
|
||||
那么小括号要省略,例如
|
||||
GC.DO{100,40
|
||||
{'print',"Hello",0,0},
|
||||
{'print',"World",0,20},
|
||||
}
|
||||
### 少空格紧凑方法
|
||||
用正则查找替换,把
|
||||
\s?([+\-*/=()\[\]{}"']|==|>=|<=|~=|\.\.)\s?
|
||||
全部替换成
|
||||
$1
|
||||
注意,需要缩进模式为制表符,可以先切到制表符然后替换再切回去
|
||||
注意,字符串常量内部首尾空格会被替换
|
||||
## goto
|
||||
### 所有标签必须使用下列前缀的一个
|
||||
BREAK_ 类似一般的break,用于跳出任意层,可能跳过循环后一部分代码
|
||||
CONTINUE_ 类似一般的continue,用于快速跳到循环的末尾执行下一次循环
|
||||
THROW_ 类似一般的catch,用于捕获错误或跳出一个块并执行统一操作
|
||||
REPEAT_ 返回到前面一个点,用于重新执行某个操作
|
||||
@@ -1,149 +0,0 @@
|
||||
模式文件应当是一个合(语)法的lua程序文件,其必须返回一个table,里面的内容包括:
|
||||
color:
|
||||
必选
|
||||
模式的颜色,用于点击地图图标后显示的提示文本
|
||||
env:
|
||||
必选
|
||||
模式环境变量,决定了关卡的各项属性
|
||||
*属性名* *默认值* *说明*
|
||||
drop 60 下落延迟(帧,支持正整数,1/2^n,和0(20G))
|
||||
lock 60 锁定延迟(帧)
|
||||
wait 0 出块延迟(帧)
|
||||
fall 0 消行延迟(帧)
|
||||
bone false 是否开启骨块模式
|
||||
fieldH 20 场地高度
|
||||
heightLimit 1e99 允许的最大场地高度
|
||||
nextCount 6 显示next个数
|
||||
nextStartPos 1 next从第几个开始显示
|
||||
holdCount 1 hold个数
|
||||
infHold false 是否能无限hold
|
||||
phyHold false 是否开启物理hold
|
||||
ospin true 是否能O-spin
|
||||
deepDrop false 是否开启深降
|
||||
RS 'TRS' 旋转系统名
|
||||
|
||||
das 10 DAS
|
||||
arr 2 ARR
|
||||
sddas 2 软降DAS
|
||||
sdarr 2 软降ARR
|
||||
mindas 0 允许的最小DAS
|
||||
minarr 0 允许的最小ARR
|
||||
minsdarr 0 允许的最小软降ARR
|
||||
ihs true 提前Hold
|
||||
irs true 提前旋转
|
||||
ims true 提前移动
|
||||
|
||||
skinSet [设置] 方块贴图,只能填写内置皮肤的名字
|
||||
skin [设置] 方块颜色,包含25个整数(1~16)的table
|
||||
face [设置] 方块朝向,包含25个整数(0~3)的table
|
||||
|
||||
block true 是否显示方块
|
||||
ghost 0.3 影子透明度(0~1)
|
||||
center 1 旋转中心透明度(0~1)
|
||||
smooth false 是否平滑下落
|
||||
grid 0.16 网格透明度(0~1)
|
||||
bagLine true 是否显示包分界线(如果存在)
|
||||
lockFX 2 锁定特效等级(0~5整数)
|
||||
dropFX 2 瞬间下落特效等级(0~5整数)
|
||||
moveFX 2 移动特效等级(0~5整数)
|
||||
clearFX 2 消除特效等级(0~5整数)
|
||||
splashFX 2 溅射特效等级(0~5整数)
|
||||
shakeFX 2 晃动特效等级(0~5整数)
|
||||
atkFX 2 攻击特效等级(0~5整数)
|
||||
|
||||
text true 是否显示消行文本
|
||||
score true 是否显示落块分数
|
||||
highCam false 是否开启超屏视野
|
||||
nextPos false 是否开启生成预览
|
||||
showSpike false 是否开启spike计数器
|
||||
|
||||
hideBoard false 场地隐藏模式("down"|"up"|"all")
|
||||
flipBoard false 场地翻转模式("U-D"|"L-R"|"180")
|
||||
|
||||
sequence bag' 序列模式,是放一块后对next序列的刷新函数,可以使用默认的几个函数用字符串表示。也可以自己写一个,注意:使用协程技术
|
||||
seqData {1,2,3,4,5,6,7}序列模式使用的"包"数据(本质是生成序列用的数据,会作为参数传进上面那个叫sequence的序列生成函数,不一定是包)
|
||||
mission false 包含任务的table,说明暂时略
|
||||
|
||||
life 0 生命数(复活次数)
|
||||
garbageSpeed 1 垃圾行释放速度
|
||||
pushSpeed 3 垃圾行上涨速度
|
||||
noTele false 是否禁止10个高级按键
|
||||
visible 'show' 方块可见性,填写固定的几个字符串
|
||||
freshLimit 1e99 锁延刷新次数限制
|
||||
easyFresh true 是否使用简单锁延刷新规则
|
||||
bufferLimit 1e99 攻击缓冲行数上限
|
||||
|
||||
fkey1 false 按下功能键1后执行的函数
|
||||
fkey2 false 按下功能键2后执行的函数
|
||||
keyCancel {} 包含禁止使用的按键的id,例如{1,2}就是禁止左移和右移
|
||||
fine [设置] 是否开启非极简提示音
|
||||
fineKill false 是否开启非极简即死
|
||||
b2bKill false 是否开启断b2b即死
|
||||
missionKill false 是否开启强制任务
|
||||
noInitSZO false 是否禁止SZO块开局,如果禁止,开局序列会自动跳过最多连续五个SZO
|
||||
|
||||
mesDisp NULL 需要在玩家侧边栏显示的信息(或函数列表,依次执行,可以显示在外面但是强烈不建议),输入玩家对象
|
||||
dropPiece NULL 放一块后要执行的函数(或函数列表,依次执行),输入玩家对象
|
||||
task NULL 每帧会*继续执行*的函数(或函数列表,依次执行,返回true会把自身从队列里清除)(初始化时会执行一次,可以用来设置场地等),输入玩家对象,注意:使用协程技术
|
||||
eventSet false 使用预设事件套件名称(字符串),和上面三个套件会叠加,使用时请小心,尽量不要同时指定太多组件
|
||||
|
||||
bg 'none' 背景,只能填写内置背景的名字
|
||||
bgm 'race' 背景音乐名(或者列表随机,例如{'race','push'}),只能用内置音乐库的音乐名
|
||||
allowMod true 是否允许mod
|
||||
load:
|
||||
必选
|
||||
模式初始化函数,一般创建一个玩家即可
|
||||
无输入
|
||||
无输出
|
||||
|
||||
score:
|
||||
可选(不填就没有分数保存和计算)
|
||||
一局打完后要存储的数据
|
||||
输入玩家对象
|
||||
输出游戏结束瞬间返回一个包含直接决定该模式成绩的数据table(会被强制加上date标签)
|
||||
|
||||
scoreDisp:
|
||||
可选(模式不出现在地图上的时候不用写)
|
||||
是把score()存起来的table转换为字符串显示出来的函数
|
||||
输入一个成绩table
|
||||
输出一个字符串
|
||||
|
||||
comp:
|
||||
可选(没有score函数的时候不用写)
|
||||
是成绩table之间对比并排序的规则
|
||||
输入两个成绩table
|
||||
输出[第一个是不是排在第二个前面]的布尔值(可以类比"小于"运算)
|
||||
|
||||
getRank:
|
||||
可选,模式评级函数
|
||||
是用于评价玩家表现的函数
|
||||
输入玩家对象
|
||||
输出0~5,0表示除了记录到排行榜外什么都不做;1/2/3/4/5表示D/C/B/A/S级,能解锁连接的模式,还会让模式图标在地图上显示不同的颜色
|
||||
|
||||
以下是40行的模式文件内容:
|
||||
//sprint_40l.lua
|
||||
return{--返回一个table,你也可以在之前定义一些常量或者函数什么的
|
||||
color=COLOR.green,--颜色
|
||||
env={--模式环境变量
|
||||
drop=60,lock=60,
|
||||
eventSet='checkLine_40',--这个预设eventSet包含了dropPiece和mesDisp,就是40行需要的东西
|
||||
bg='bg2',bgm='race',
|
||||
},
|
||||
load=function()--模式加载函数,这里只生成了一个玩家,常用的单人模式可以不写,默认使用这个函数
|
||||
PLY.newPlayer(1)--1是玩家编号,默认用户控制1号玩家
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,--游戏结束时需要保存的本局关键信息
|
||||
scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end,--把score返回的数据显示出来的方法
|
||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,--按照时间排序,时间一样就看块数
|
||||
getRank=function(P)--计算评级
|
||||
if P.stat.row<40 then return end--你总得打完40行对吧,否则直接return空掉,成绩都不记录
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=26 and 5 or--时间小于等于26秒就是S级要求
|
||||
T<=32.6 and 4 or--A级要求
|
||||
T<=52.6 and 3 or--B级要求
|
||||
T<=92.9 and 2 or--C级要求
|
||||
T<=183 and 1 or--D级要求,解锁别的模式的最低标准
|
||||
0--记录成绩的最低标准
|
||||
end,
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
Techmino配音说明文档
|
||||
|
||||
每一个都可以录任意多条,用的时候会随机取一个,听起来更自然
|
||||
每一个都可以录任意多条,用的时候会随机取一个,听起来更自然
|
||||
每一个都可以录任意多条,用的时候会随机取一个,听起来更自然
|
||||
|
||||
多条语音说明:
|
||||
录了多条的在播放时会随机挑选一个播放,所以组合性的语音大概率不能随意发挥,不然和其他组合起来可能就会出现奇怪的现象
|
||||
例:多条mini语音文件名应为 mini_1.ogg,mini_2.ogg,...
|
||||
如果只有一个,"_1"可以省略,一个mini.ogg就行,但是多个文件的数字不能跳开,必须从1开始一个个写
|
||||
|
||||
投稿语音包请使用wav格式,方便我留源文件,未来有需要的时候重新转格式;
|
||||
打算自己导入游戏的话需要降噪+裁剪+调整音量后再转为ogg格式 (不支持别的,因为ogg体积小)
|
||||
|
||||
目前游戏内正在使用的音频:
|
||||
【尖括号里是念的,方括号里是文件名,没写就跟尖括号里一样】
|
||||
【尖括号里是念的,方括号里是文件名,没写就跟尖括号里一样】
|
||||
【尖括号里是念的,方括号里是文件名,没写就跟尖括号里一样】
|
||||
|
||||
<single>
|
||||
<double>
|
||||
<triple>
|
||||
<techrash> 读作\'tekrʌʃ\
|
||||
<pentacrash> 读作\'ˈpæntəkrʌʃ\
|
||||
<hexacrash> 读作\'heksəkrʌʃ\
|
||||
用于消行
|
||||
|
||||
<mini>
|
||||
<b2b> 读作back to back,有点长,可以读快一点
|
||||
<b2b2b> 读作back to back to back,有点长,可以读快一点
|
||||
用于加在 *-spin 前面,注意结束时语气要上扬,后面要接东西
|
||||
|
||||
<z spin>[zspin0] 用于不消行,注意结束时语气要下降,注意这个文件名就是自带0,后面还要接_1 _2等
|
||||
<z spin>[zspin] 用于消行,注意结束时语气要上扬,后面要接东西
|
||||
这两条要有所有方块的版本,文件名就替换第一个字母,包括:
|
||||
Z S L J T O I(四连块)
|
||||
P Q F E U V W X R Y N H(五连块)
|
||||
C(三连块)
|
||||
|
||||
<all clear>[all_clear] 全消语音,建议也录几个perfect clear
|
||||
<clear> 半全消语音,建议也录几个half clear
|
||||
|
||||
<win> 胜利语音,自由发挥
|
||||
<lose> 失败语音,自由发挥
|
||||
<welcome> 开游戏语音,自由发挥
|
||||
<bye> 关游戏语音,自由发挥
|
||||
这几个长度不要太长,最多最多最多2秒,建议多录几种不同的
|
||||
|
||||
<test> 测试音量用语音,要非常短,比如“啊”“喵”“呜”
|
||||
<happy> 彩蛋语音,建议用短的笑声
|
||||
<doubt> 彩蛋语音,建议“嗯?”声
|
||||
|
||||
目前没有用到但是将要加入的,可能会修改导致用不上,条件方便的话可以顺便带上:
|
||||
<split> 隔断消除
|
||||
<air> 架空消除
|
||||
<mix> 混合消除
|
||||
<color> 彩色消除
|
||||
<deep> 穿透消除
|
||||
注意这些结束时语气全都要上扬,后面要接东西
|
||||
@@ -1,29 +1,54 @@
|
||||
TECHMINO © 2019-2021 26F Studio. Some rights reserved.
|
||||
**TECHMINO © 2019-2021 26F Studio. Some rights reserved.**
|
||||
TECHMINO and "26F Studio" are trademarks of 26F Studio.
|
||||
The TECHMINO game and source code are under a GNU Lesser General Public License Version 3.
|
||||
|
||||
TECHMINO is not a fan game. TECHMINO and 26F Studio are not affiliated with Tetris Holding, LLC or The Tetris Company, Inc. in any way.
|
||||
|
||||
TECHMINO is not a fan game of Tetris. TECHMINO and 26F Studio are not affiliated with Tetris Holding, LLC or The Tetris Company, Inc. in any way.
|
||||
|
||||
|
||||
"Tetris" is the registered trademark of The Tetris Holding, LLC, licensed to The Tetris Company, Inc.
|
||||
|
||||
|
||||
Powered by LÖVE, © 2006-2021 LÖVE Development Team.
|
||||
|
||||
|
||||
Lua is free software distributed under the terms of the MIT license. Copyright © 1994~2021 by Lua.org, PUC-Rio.
|
||||
|
||||
|
||||
The Apple logo, "Apple Inc.," iOS, iPadOS, macOS, iPhone, and Mac are registered trademarks of Apple Inc. in the United States of America and other countries or regions.
|
||||
|
||||
|
||||
"Windows", the Windows logo, "Xbox", Xbox logo, and "Microsoft" are registered trademarks of Microsoft Corporation in the United States of America and other countries or regions.
|
||||
|
||||
|
||||
Alibaba Sans is copyrighted by Alibaba Group Holding Limited. Alibaba is a trademark of Alibaba Group Holding Limited in the People’s Republic of China and other countries or regions.
|
||||
|
||||
|
||||
IBM Plex is copyrighted by the International Business Machines Corporation. IBM and IBM Plex are trademarks of IBM Corp, registered in many jurisdictions worldwide. IBM Plex is licensed under the SIL Open Font License.
|
||||
|
||||
|
||||
JetBrains Mono is copyrighted by the JetBrains Mono Project authors. JetBrains Mono is a trademark of JetBrains s.r.o. JetBrains Mono is licensed under the SIL Open Font License, Version 1.1.
|
||||
|
||||
|
||||
"PlayStation", "PS", "PlayStation Family Mark", "PS logo", "DualSense" and "Play Has No Limits" are registered trademarks or trademarks of Sony Interactive Entertainment Inc. "SONY" is a registered trademark of Sony Corporation. © 2021 Sony Interactive Entertainment LLC.
|
||||
|
||||
|
||||
N3TWORK is a registered trademark of N3TWORK Inc. © 2021 N3TWORK Inc.
|
||||
|
||||
|
||||
"EA" and "Electronic Arts" are registered trademarks of Electronic Arts Inc. © 2021 Electronic Arts Inc.
|
||||
|
||||
|
||||
Oculus Quest is a registered trademark of Facebook Technologies, LLC. © Facebook, Inc.
|
||||
|
||||
|
||||
GoldWave is a registered trademark of GoldWave, Inc.
|
||||
|
||||
|
||||
Linux is a registered trademark of Linus Torvalds.
|
||||
|
||||
|
||||
Touhou Project © Team Shanghai Alice 2002-2021.
|
||||
|
||||
All other trademarks are the property of their respective owners.
|
||||
|
||||
All other trademarks are the properties of their respective owners.
|
||||
186
main.lua
186
main.lua
@@ -28,6 +28,8 @@ MOBILE=SYSTEM=='Android'or SYSTEM=='iOS'
|
||||
SAVEDIR=fs.getSaveDirectory()
|
||||
|
||||
--Global Vars & Settings
|
||||
SFXPACKS={'chiptune'}
|
||||
VOCPACKS={'miya','mono','xiaoya','miku'}
|
||||
FIRSTLAUNCH=false
|
||||
DAILYLAUNCH=false
|
||||
|
||||
@@ -42,18 +44,24 @@ if MOBILE then
|
||||
love.window.setMode(w,h,f)
|
||||
end
|
||||
|
||||
local _LOADTIMELIST_={}
|
||||
local _LOADTIME_=TIME()
|
||||
|
||||
--Load modules
|
||||
Z=require'Zframework'
|
||||
FONT.init('parts/fonts/proportional.ttf')
|
||||
FONT.load('parts/fonts/proportional.ttf')
|
||||
SCR.setSize(1280,720)--Initialize Screen size
|
||||
BGM.setChange(function(name)MES.new('music',text.nowPlaying..name,5)end)
|
||||
|
||||
table.insert(_LOADTIMELIST_,("Load Zframework: %.3fs"):format(TIME()-_LOADTIME_))
|
||||
|
||||
--Create shortcuts
|
||||
setFont=FONT.set
|
||||
getFont=FONT.get
|
||||
mStr=GC.mStr
|
||||
mText=GC.simpX
|
||||
mDraw=GC.draw
|
||||
Snd=SFX.playSample
|
||||
|
||||
--Delete all naked files (from too old version)
|
||||
FILE.clear('')
|
||||
@@ -69,19 +77,19 @@ for _,v in next,{'conf','record','replay','cache','lib'}do
|
||||
end
|
||||
end
|
||||
|
||||
CHAR=require'parts.char'
|
||||
require'parts.gameTables'
|
||||
require'parts.gameFuncs'
|
||||
|
||||
--Load shader files from SOURCE ONLY
|
||||
SHADER={}
|
||||
for _,v in next,fs.getDirectoryItems('parts/shaders')do
|
||||
if fs.getRealDirectory('parts/shaders/'..v)~=SAVEDIR then
|
||||
if isSafeFile('parts/shaders/'..v)then
|
||||
local name=v:sub(1,-6)
|
||||
SHADER[name]=love.graphics.newShader('parts/shaders/'..name..'.glsl')
|
||||
end
|
||||
end
|
||||
|
||||
CHAR=require'parts.char'
|
||||
require'parts.gameTables'
|
||||
require'parts.gameFuncs'
|
||||
|
||||
FREEROW= require'parts.freeRow'
|
||||
DATA= require'parts.data'
|
||||
|
||||
@@ -93,9 +101,11 @@ VK= require'parts.virtualKey'
|
||||
BOT= require'parts.bot'
|
||||
RSlist= require'parts.RSlist'DSCP=RSlist.TRS.centerPos
|
||||
PLY= require'parts.player'
|
||||
netPLY= require'parts.netPlayer'
|
||||
NETPLY= require'parts.netPlayer'
|
||||
MODES= require'parts.modes'
|
||||
|
||||
table.insert(_LOADTIMELIST_,("Load Parts: %.3fs"):format(TIME()-_LOADTIME_))
|
||||
|
||||
--Init Zframework
|
||||
Z.setIfPowerInfo(function()
|
||||
return SETTING.powerInfo and LOADED
|
||||
@@ -117,7 +127,7 @@ do--Z.setCursor
|
||||
Z.setCursor(function(time,x,y)
|
||||
if not SETTING.sysCursor then
|
||||
local R=int((time+1)/2)%7+1
|
||||
_=minoColor[SETTING.skin[R]]
|
||||
_=BLOCK_COLORS[SETTING.skin[R]]
|
||||
gc_setColor(_[1],_[2],_[3],min(abs(1-time%2),.3))
|
||||
_=DSCP[R][0]
|
||||
gc_draw(TEXTURE.miniBlock[R],x,y,time%3.14159265359*4,16,16,_[2]+.5,#BLOCKS[R][0]-_[1]-.5)
|
||||
@@ -133,8 +143,8 @@ Z.setOnFnKeys({
|
||||
function()
|
||||
if GAME.playing and not GAME.net then
|
||||
for _=1,8 do
|
||||
local P=PLY_ALIVE[math.random(#PLY_ALIVE)]
|
||||
if P and P~=PLAYERS[1]then
|
||||
if #PLY_ALIVE>1 then
|
||||
local P=PLY_ALIVE[math.random(2,#PLY_ALIVE)]
|
||||
P.lastRecv=PLAYERS[1]
|
||||
P:lose()
|
||||
end
|
||||
@@ -143,7 +153,7 @@ Z.setOnFnKeys({
|
||||
end,
|
||||
function()print(WIDGET.getSelected()or"no widget selected")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,
|
||||
})
|
||||
do--Z.setOnFocus
|
||||
local function task_autoSoundOff()
|
||||
@@ -190,8 +200,8 @@ TABLE.cover (FILE.load('conf/user')or{},USER)
|
||||
TABLE.cover (FILE.load('conf/unlock')or{},RANKS)
|
||||
TABLE.update(FILE.load('conf/settings')or{},SETTING)
|
||||
TABLE.update(FILE.load('conf/data')or{},STAT)
|
||||
TABLE.cover (FILE.load('conf/key')or{},keyMap)
|
||||
TABLE.cover (FILE.load('conf/virtualkey')or{},VK_org)
|
||||
TABLE.cover (FILE.load('conf/key')or{},KEY_MAP)
|
||||
TABLE.cover (FILE.load('conf/virtualkey')or{},VK_ORG)
|
||||
|
||||
--Initialize fields, sequence, missions, gameEnv for cutsom game
|
||||
local fieldData=FILE.load('conf/customBoards','string')
|
||||
@@ -212,7 +222,7 @@ if missionData then
|
||||
DATA.pasteMission(missionData)
|
||||
end
|
||||
local customData=FILE.load('conf/customEnv')
|
||||
if customData and customData.version==VERSION.code then
|
||||
if customData and customData['version']==VERSION.code then
|
||||
TABLE.complete(customData,CUSTOMENV)
|
||||
end
|
||||
TABLE.complete(require"parts.customEnv0",CUSTOMENV)
|
||||
@@ -250,7 +260,7 @@ IMG.init{
|
||||
'media/image/lanterns/6.png',
|
||||
},
|
||||
}
|
||||
SKIN.init{
|
||||
SKIN.load{
|
||||
{name="crystal_scf",path='media/image/skin/crystal_scf.png'},
|
||||
{name="matte_mrz",path='media/image/skin/matte_mrz.png'},
|
||||
{name="shiny_cho",path='media/image/skin/shiny_cho.png'},
|
||||
@@ -282,13 +292,11 @@ SKIN.init{
|
||||
}
|
||||
|
||||
--Initialize sound libs
|
||||
SFX.init((function()
|
||||
SFX.init((function()--[Warning] Not loading files here, just get the list of sound needed
|
||||
local L={}
|
||||
for _,v in next,fs.getDirectoryItems('media/effect/chiptune/')do
|
||||
if fs.getRealDirectory('media/effect/chiptune/'..v)~=SAVEDIR then
|
||||
if isSafeFile('media/effect/chiptune/'..v,"Dangerous file : %SAVE%/media/effect/chiptune/"..v)then
|
||||
table.insert(L,v:sub(1,-5))
|
||||
else
|
||||
MES.new('warn',"Dangerous file : %SAVE%/media/effect/chiptune/"..v)
|
||||
end
|
||||
end
|
||||
return L
|
||||
@@ -296,10 +304,8 @@ end)())
|
||||
BGM.init((function()
|
||||
local L={}
|
||||
for _,v in next,fs.getDirectoryItems('media/music')do
|
||||
if fs.getRealDirectory('media/music/'..v)~=SAVEDIR then
|
||||
if isSafeFile('media/music/'..v,"Dangerous file : %SAVE%/media/music/"..v)then
|
||||
table.insert(L,{name=v:sub(1,-5),path='media/music/'..v})
|
||||
else
|
||||
MES.new('warn',"Dangerous file : %SAVE%/media/music/"..v)
|
||||
end
|
||||
end
|
||||
return L
|
||||
@@ -318,40 +324,49 @@ VOC.init{
|
||||
LANG.init('zh',
|
||||
{
|
||||
zh=require'parts.language.lang_zh',
|
||||
zh2=require'parts.language.lang_zh2',
|
||||
zh_full=require'parts.language.lang_zh_full',
|
||||
zh_trad=require'parts.language.lang_zh_trad',
|
||||
en=require'parts.language.lang_en',
|
||||
fr=require'parts.language.lang_fr',
|
||||
es=require'parts.language.lang_es',
|
||||
pt=require'parts.language.lang_pt',
|
||||
grass=require'parts.language.lang_zh3',
|
||||
yygq=require'parts.language.lang_yygq',
|
||||
zh_grass=require'parts.language.lang_zh_grass',
|
||||
zh_yygq=require'parts.language.lang_yygq',
|
||||
symbol=require'parts.language.lang_symbol',
|
||||
--1. Add language file to LANG folder;
|
||||
--2. Require it;
|
||||
--3. Add a button in parts/scenes/setting_lang.lua;
|
||||
--3. Add a button in parts/scenes/lang.lua;
|
||||
},
|
||||
{
|
||||
block=BLOCKNAMES
|
||||
block=BLOCK_NAMES
|
||||
},
|
||||
(function()
|
||||
local tipMeta={__call=function(L)return L[math.random(#L)]end}
|
||||
return function(L)
|
||||
if type(rawget(L,'getTip'))=='table'then setmetatable(L.getTip,tipMeta)end
|
||||
setmetatable(L,{__index=function(self,k)
|
||||
local mes="No Text ("..SETTING.locale.."): "..k
|
||||
LOG(mes)
|
||||
MES.new('warn',mes)
|
||||
self[k]=CHAR.zChan.thinking
|
||||
return self[k]
|
||||
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
|
||||
if fs.getRealDirectory('parts/backgrounds/'..v)~=SAVEDIR then
|
||||
if v:sub(-3)=='lua'then
|
||||
local name=v:sub(1,-5)
|
||||
BG.add(name,require('parts.backgrounds.'..name))
|
||||
end
|
||||
if isSafeFile('parts/backgrounds/'..v)and v:sub(-3)=='lua'then
|
||||
local name=v:sub(1,-5)
|
||||
BG.add(name,require('parts.backgrounds.'..name))
|
||||
end
|
||||
end
|
||||
--Load scene files from SOURCE ONLY
|
||||
for _,v in next,fs.getDirectoryItems('parts/scenes')do
|
||||
if fs.getRealDirectory('parts/scenes/'..v)~=SAVEDIR then
|
||||
if isSafeFile('parts/scenes/'..v)then
|
||||
local sceneName=v:sub(1,-5)
|
||||
SCN.add(sceneName,require('parts.scenes.'..sceneName))
|
||||
LANG.addScene(sceneName)
|
||||
@@ -360,11 +375,23 @@ end
|
||||
--Load mode files
|
||||
for i=1,#MODES do
|
||||
local m=MODES[i]--Mode template
|
||||
if fs.getRealDirectory('parts/modes/'..m.name)~=SAVEDIR then
|
||||
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_))
|
||||
|
||||
--Update data
|
||||
do
|
||||
@@ -417,6 +444,14 @@ do
|
||||
fs.remove('record/round_l.rec')
|
||||
fs.remove('record/round_u.rec')
|
||||
end
|
||||
if STAT.version<1604 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
|
||||
@@ -426,15 +461,28 @@ do
|
||||
fs.remove('record/stack_100l.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
|
||||
love.event.quit('restart')
|
||||
end
|
||||
SETTING.appLock=nil
|
||||
SETTING.dataSaving=nil
|
||||
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 SETTING.RS=='ZRS'or SETTING.RS=='BRS'or SETTING.RS=='ASCplus'or SETTING.RS=='C2sym'then SETTING.RS='TRS'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
|
||||
@@ -444,7 +492,7 @@ do
|
||||
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 _,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
|
||||
@@ -470,39 +518,23 @@ do
|
||||
needSave=true
|
||||
end
|
||||
|
||||
for k,v in next,oldModeNameTable 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
|
||||
|
||||
if needSave then
|
||||
saveStats()
|
||||
saveProgress()
|
||||
saveSettings()
|
||||
love.event.quit('restart')
|
||||
end
|
||||
end
|
||||
|
||||
--First start for phones
|
||||
if FIRSTLAUNCH and MOBILE then
|
||||
SETTING.VKSwitch=true
|
||||
SETTING.swap=false
|
||||
SETTING.powerInfo=true
|
||||
SETTING.cleanCanvas=true
|
||||
end
|
||||
|
||||
--Apply system setting
|
||||
applySettings()
|
||||
applyAllSettings()
|
||||
|
||||
--Load replays
|
||||
for _,fileName in next,fs.getDirectoryItems('replay')do
|
||||
@@ -510,7 +542,7 @@ for _,fileName in next,fs.getDirectoryItems('replay')do
|
||||
local date,mode,version,player,seed,setting,mod
|
||||
local fileData=fs.read('replay/'..fileName)
|
||||
date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","")
|
||||
mode, fileData=STRING.readLine(fileData)mode=oldModeNameTable[mode]or mode
|
||||
mode, fileData=STRING.readLine(fileData)mode=MODE_UPDATE_MAP[mode]or mode
|
||||
version,fileData=STRING.readLine(fileData)
|
||||
player, fileData=STRING.readLine(fileData)if player=="Local Player"then player="Stacker"end
|
||||
local success
|
||||
@@ -549,3 +581,41 @@ for _,fileName in next,fs.getDirectoryItems('replay')do
|
||||
table.insert(REPLAY,rep)
|
||||
end
|
||||
table.sort(REPLAY,function(a,b)return a.fileName>b.fileName end)
|
||||
|
||||
table.insert(_LOADTIMELIST_,("Initialize Data: %.3fs"):format(TIME()-_LOADTIME_))
|
||||
|
||||
for i=1,#_LOADTIMELIST_ do LOG(_LOADTIMELIST_[i])end
|
||||
|
||||
--Launch testing task if launch param received
|
||||
if TABLE.find(arg,'--test')then
|
||||
TASK.new(function()
|
||||
while not LOADED do YIELD()end
|
||||
|
||||
LOG("\27[92m\27[1mAutomatic Test Started\27[0m")
|
||||
BGM.setVol(0)SFX.setVol(0)
|
||||
love.keypressed('space')
|
||||
TEST.yieldUntilNextScene()
|
||||
|
||||
for k,mode in next,MODES do
|
||||
if k~='netBattle'then
|
||||
LOG("Scanning mode: "..mode.name)
|
||||
loadGame(mode.name,true)
|
||||
TEST.yieldUntilNextScene()
|
||||
SCN.back()
|
||||
TEST.yieldUntilNextScene()
|
||||
end
|
||||
end
|
||||
LOG("\27[92m\27[1mAutomatic Test Passed :)\27[0m")
|
||||
TEST.yieldN(60)
|
||||
love.event.quit(0)
|
||||
end)
|
||||
TASK.new(function()
|
||||
while true do
|
||||
YIELD()
|
||||
if ERRDATA[1]then break end
|
||||
end
|
||||
LOG("\27[91m\27[1mAutomatic Test Failed :(\27[0m\nThe error message is:\n"..table.concat(ERRDATA[1].mes,"\n").."\27[91m\nAborting\27[0m")
|
||||
TEST.yieldN(60)
|
||||
love.event.quit(1)
|
||||
end)
|
||||
end
|
||||
|
||||
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.
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/music/1989.ogg
Normal file
BIN
media/music/1989.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/1.ogg
Normal file
BIN
media/sample/bass/1.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/10.ogg
Normal file
BIN
media/sample/bass/10.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/11.ogg
Normal file
BIN
media/sample/bass/11.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/12.ogg
Normal file
BIN
media/sample/bass/12.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/13.ogg
Normal file
BIN
media/sample/bass/13.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/14.ogg
Normal file
BIN
media/sample/bass/14.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/15.ogg
Normal file
BIN
media/sample/bass/15.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/16.ogg
Normal file
BIN
media/sample/bass/16.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/17.ogg
Normal file
BIN
media/sample/bass/17.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/18.ogg
Normal file
BIN
media/sample/bass/18.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/19.ogg
Normal file
BIN
media/sample/bass/19.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/2.ogg
Normal file
BIN
media/sample/bass/2.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/20.ogg
Normal file
BIN
media/sample/bass/20.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/21.ogg
Normal file
BIN
media/sample/bass/21.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/22.ogg
Normal file
BIN
media/sample/bass/22.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/23.ogg
Normal file
BIN
media/sample/bass/23.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/24.ogg
Normal file
BIN
media/sample/bass/24.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/25.ogg
Normal file
BIN
media/sample/bass/25.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/26.ogg
Normal file
BIN
media/sample/bass/26.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/27.ogg
Normal file
BIN
media/sample/bass/27.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/28.ogg
Normal file
BIN
media/sample/bass/28.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/3.ogg
Normal file
BIN
media/sample/bass/3.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/4.ogg
Normal file
BIN
media/sample/bass/4.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/5.ogg
Normal file
BIN
media/sample/bass/5.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/6.ogg
Normal file
BIN
media/sample/bass/6.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/7.ogg
Normal file
BIN
media/sample/bass/7.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/8.ogg
Normal file
BIN
media/sample/bass/8.ogg
Normal file
Binary file not shown.
BIN
media/sample/bass/9.ogg
Normal file
BIN
media/sample/bass/9.ogg
Normal file
Binary file not shown.
BIN
media/sample/bell/1.ogg
Normal file
BIN
media/sample/bell/1.ogg
Normal file
Binary file not shown.
BIN
media/sample/bell/10.ogg
Normal file
BIN
media/sample/bell/10.ogg
Normal file
Binary file not shown.
BIN
media/sample/bell/11.ogg
Normal file
BIN
media/sample/bell/11.ogg
Normal file
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