Compare commits

..

28 Commits

Author SHA1 Message Date
ParticleG
63da1b5585 - Add logs to upload-artifact 2021-11-08 04:37:22 +08:00
ParticleG
929be4faf0 - Test Windows with curl 2021-11-08 04:11:04 +08:00
MrZ626
59a5b52993 整理代码 2021-11-08 03:08:42 +08:00
ParticleG
c412e07153 - Add Upload Action 2021-11-08 02:48:38 +08:00
MrZ626
252f19c6df 进入newRoom菜单时不会试图修改背景和bgm 2021-11-07 22:09:22 +08:00
MrZ626
8264fdd4bf 修改更新历史和build号 2021-11-07 21:27:39 +08:00
MrZ626
dfd28f2f10 只在更新后触发自动转换以旧版本模式名存储的数据文件 2021-11-07 21:19:49 +08:00
MrZ626
5fc1257e58 颜色表改用hsv生成 2021-11-07 17:44:17 +08:00
MrZ626
5c39765f71 微调词典
微调两个小程序
整理代码
2021-11-07 17:44:13 +08:00
MrZ626
ca92622d5d 微调中文词典两个词条 2021-11-07 12:28:26 +08:00
MrZ626
e28902bc97 无尽马拉松的are每300行减小一次,line are每100行减小一次 2021-11-07 05:42:03 +08:00
MrZ626
d228809a53 无尽马拉松添加1700行的终点 2021-11-07 05:28:08 +08:00
MrZ626
60f8a22dd5 微调排行榜字体大小 2021-11-07 05:20:58 +08:00
MrZ626
db4ae56990 无尽马拉松添加排行榜 2021-11-07 05:19:12 +08:00
MrZ626
e95288b171 修改更新历史
整理代码
2021-11-07 05:00:41 +08:00
MrZ626
2511555eb0 调整无尽马拉松的难度曲线 2021-11-07 04:58:37 +08:00
Not-A-Normal-Robot
4c4f01cb95 Decrease lock delay when level up above lvl20 2021-11-07 04:55:02 +08:00
Not-A-Normal-Robot
7177118f34 Added Infinite Marathon 2021-11-07 04:55:02 +08:00
MrZ626
a6d5c4a1bf 修改更新历史 2021-11-07 04:02:40 +08:00
MrZ626
73a828d73a 修改mph模式的bgm 2021-11-07 04:02:22 +08:00
MrZ626
a7df4d6aa7 新模式:竞速-效率 2021-11-07 04:02:12 +08:00
MrZ626
7fe4802887 修复超级消除结算时分数计算变量写错导致报错 2021-11-07 01:49:19 +08:00
MrZ626
7eac341b9a move音效在方块因重力或旋转触地时也会播放,而不只是移动后
move音效名改为touch
2021-11-07 01:41:29 +08:00
MrZ626
1fa02a18b2 修改更新历史 2021-11-06 20:57:30 +08:00
MrZ626
b15cb64681 修正pr的一个符号错误 2021-11-06 20:53:45 +08:00
C₂₉H₂₅N₃O₅
bf345c8655 Changed the font and CN tips (#433)
* 补全英文词典翻译

* 大改字体

- 西文部分采用IBM Plex
- 全角标点样式采用西文样式
- 添加类Plex的IPA符号

* 微调中文tips

* 更新 Legals

* 修正一个语法错误
2021-11-06 19:10:44 +08:00
C₂₉H₂₅N₃O₅
cbdb15d658 补全英文词典翻译 (#431) 2021-11-06 04:21:44 +08:00
MrZ626
8b4504bfa0 新BGM:1989(用于几个经典模式)
重新安排一些模式的BGM
2021-11-06 04:05:08 +08:00
1206 changed files with 17520 additions and 39776 deletions

View File

@@ -1,31 +0,0 @@
# EmmyLuaCodeStyle
[*.lua]
max_line_length = 26000
indent_style = space
insert_final_newline = true
space_around_table_field_list = false
space_before_attribute = false
space_before_function_call_open_parenthesis = false
space_before_closure_open_parenthesis = false
space_before_function_call_single_arg = false
space_before_open_square_bracket = false
space_inside_function_call_parentheses = false
space_inside_function_param_list_parentheses = false
space_inside_square_brackets = false
space_around_table_append_operator = false
space_before_inline_comment = false
space_around_math_operator = false
space_around_logical_operator = false
space_around_assign_operator = false
space_after_comma = false
space_after_comma_in_for_statement = false
space_around_concat_operator = false
align_call_args = false
align_function_params = false
align_continuous_assign_statement = true
align_continuous_rect_table_field = true
align_if_branch = false
align_array_table = true
ignore_spaces_inside_function_call = true
line_space_after_function_statement = keep
trailing_table_separator = smart

1
.gitattributes vendored
View File

@@ -1 +0,0 @@
* text=auto

View File

@@ -1,2 +0,0 @@
actions/**/*.yml text eol=lf
workflows/*.yml text eol=lf

View File

@@ -1,16 +0,0 @@
# Techmino - 500-star Banner
Created by NOT_A_ROBOT
13 September, 2024
**Don't forget to attribute me when using this.**
The image already includes sufficient attribution, so if you just don't crop that out, you shouldn't need to explicitly mention them.
## Attribution
Created by NOT_A_ROBOT
GitHub logo (on Z-character's screen) by GitHub
Background (space stars) originally by MrZ, ported to JS by NOT_A_ROBOT for rendering
Block skin (featured in the background) by Scf, slightly modified to make it darker
Z-character drawn by 葉枭, designed by MrZ
Techmino by MrZ and many contributors
Techmino is fun! https://github.com/26F-Studio/Techmino

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

View File

@@ -1,8 +1,9 @@
---
name: Bug report (bluescreen crash) Bug报告 (蓝屏报错)
about: Create a bug report which causes a bluescreen crash
about: Create a report of problems which made the crash with a bluescreen
---
Screenshot with crash information (*Image(s) Here*):
Screenshot with crash information: (delete this line before submitting)
*Image Here*
If you can reproduce it, write the steps here. If you can't, try to describe what causes the game to crash, like pressing a key/button (*Details Here*)
If you can reproduce it, write the steps here. If you can't, try to describe the exactly time the game crash, like pressing which key or which button: (delete this line before submitting)
*Details Here*

View File

@@ -1,8 +1,9 @@
---
name: Bug report (unintended behaviors) Bug报告 (奇怪的现象)
about: Create bug report that causes unintended behaviors
about: Create a report of unintended behaviors
---
Screenshot with unintended behaviors (*Image(s) Here*):
Screenshot with unintended behaviors: (delete this line before submitting)
*Image(s) Here*
If you can reproduce it, write the steps here. If you can't, try to describe what causes the unintended behavior, like pressing a key/button (*Details Here*):
If you can reproduce it, write the steps here. If you can't, try to describe the exactly time the game crash, like pressing which key or which button: (delete this line before submitting)
*Details Here*

View File

@@ -2,7 +2,3 @@
name: Feature Request 添加新功能
about: Suggest an idea that may improve Techmino 提一些有意思的新想法,让Techmino越来越好!
---
### What feature do you want to suggest to the game?

View 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

102
.github/actions/build-android/action.yml vendored Normal file
View File

@@ -0,0 +1,102 @@
name: 'build Android'
description: 'build Android package'
inputs:
type:
required: true
apkCode:
required: true
name:
required: true
file-path:
required: true
SIGNING_KEY:
required: true
KEY_STORE_PASSWORD:
required: true
ALIAS:
required: true
KEY_PASSWORD:
required: true
runs:
using: "composite"
steps:
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Clone love-android
shell: bash
run: |
git clone --recurse-submodules https://github.com/26F-Studio/love-android -b CI --depth 1 --shallow-submodules
- uses: ./.github/actions/build-love
with:
file-path: love-android/app/src/main/assets/game.love
- name: Download ColdClear arm64-v8a
uses: ./.github/actions/get-cc
with:
arch: android_aarch64
dir: ColdClear/arm64-v8a
- name: Process ColdClear arm64-v8a
shell: bash
run: |
mkdir -p love-android/app/libs/arm64-v8a
mv ColdClear/arm64-v8a/love-11.3-android/lib/arm64-v8a/libcold_clear.so love-android/app/libs/arm64-v8a
mkdir -p libAndroid/arm64-v8a
mv ColdClear/arm64-v8a/libs/arm64-v8a/libCCloader.so libAndroid/arm64-v8a
- name: Download ColdClear armeabi-v7a
uses: ./.github/actions/get-cc
with:
arch: android_armv7
dir: ColdClear/armeabi-v7a
- name: Process ColdClear armeabi-v7a
shell: bash
run: |
mkdir -p love-android/app/libs/armeabi-v7a
mv ColdClear/armeabi-v7a/love-11.3-android/lib/armeabi-v7a/libcold_clear.so love-android/app/libs/armeabi-v7a
mkdir -p libAndroid/armeabi-v7a
mv ColdClear/armeabi-v7a/libs/armeabi-v7a/libCCloader.so libAndroid/armeabi-v7a
- name: Pack ColdClear
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
chmod 777 love-android/gradlew
cd love-android/
./gradlew assembleRelease
- name: rename apk
shell: bash
run: mv love-android/app/build/outputs/apk/release/app-release.apk ${{ inputs.file-path }}

96
.github/actions/build-ios/action.yml vendored Normal file
View 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

40
.github/actions/build-linux/action.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: 'build Linux'
description: 'build Linux package'
inputs:
file-path:
required: false
default: Techmino.AppImage
icon:
required: true
runs:
using: "composite"
steps:
- name: Download AppImageKit
shell: bash
run: |
curl -OL https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
- name: Download love
shell: bash
run: |
curl -OL https://github.com/love2d/love/releases/download/11.3/love-11.3-x86_64.AppImage
chmod 777 love-11.3-x86_64.AppImage
./love-11.3-x86_64.AppImage --appimage-extract
- name: Download ColdClear
uses: ./.github/actions/get-cc
with:
arch: linux
- name: Pack Techmino
shell: bash
run: |
rm -rf squashfs-root/love squashfs-root/love.desktop squashfs-root/love.svg squashfs-root/.DirIcon
mv .github/build/Linux/love.template squashfs-root/love
mv .github/build/Linux/Techmino.desktop.template squashfs-root/Techmino.desktop
mv ${{ inputs.icon }} squashfs-root/icon.png
cp squashfs-root/icon.png squashfs-root/.DirIcon
chmod 777 squashfs-root/love
mkdir -p 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
./appimagetool-x86_64.AppImage squashfs-root ${{ inputs.file-path }}

11
.github/actions/build-love/action.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
name: 'build love'
description: 'build love file'
inputs:
file-path:
required: true
default: Techmino.love
runs:
using: "composite"
steps:
- run: 7z a -tzip ${{ inputs.file-path }} media parts Zframework conf.lua main.lua version.lua legals.md license.txt
shell: bash

152
.github/actions/build-macos/action.yml vendored Normal file
View File

@@ -0,0 +1,152 @@
name: 'build Mac OS'
description: 'build Mac OS package'
inputs:
name:
required: true
description: "Version name"
icon:
required: true
description: "App icons (.icns)"
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_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: Checkout template
uses: actions/checkout@v2
with:
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: |
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
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.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

View File

@@ -0,0 +1,60 @@
name: 'build Windows'
description: 'build Windows package'
inputs:
love-url:
required: true
love-dir:
required: true
arch:
required: true
version:
required: true
icon:
required: true
runs:
using: "composite"
steps:
- name: Download love
uses: ./.github/actions/get-unzip
with:
url: ${{ inputs.love-url }}
- name: move love
shell: bash
run: mv ${{ inputs.love-dir }} love
- name: Download ColdClear
uses: ./.github/actions/get-cc
with:
arch: ${{ inputs.arch }}
- name: Download ResourceHacker
uses: ./.github/actions/get-unzip
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: |
cmd /c copy /b .\love\love.exe + .\Techmino.love .\love\Techmino.exe
del .\love\love.exe
del .\love\lovec.exe
del .\love\game.ico
del .\love\love.ico
del .\love\changes.txt
del .\love\readme.txt
move .\cold_clear.dll .\love
move .\CCloader.dll .\love
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,'
cmd /c '.\ResourceHacker.exe -open .\love\Techmino.exe -save .\love\Techmino.exe -action addoverwrite -res ".\Techmino.res" -mask VERSIONINFO,1,'

32
.github/actions/get-cc/action.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: 'get cc'
description: 'download cc into specific dir'
inputs:
tag:
required: false
default:
arch:
required: true
dir:
required: false
default: '.'
repo:
required: false
default: 26F-Studio/cold_clear_ai_love2d_wrapper
temp-file:
required: false
default: temp.zip
runs:
using: "composite"
steps:
- run: |
echo "::set-output name=tag::"$(if [ -z "${{ inputs.tag }}" ]
then curl -w '%{url_effective}' -I -L -s -S https://github.com/${{ inputs.repo }}/releases/latest -o /dev/null | grep -o '\<[^/]*$'
else echo ${{ inputs.tag }}
fi)
id: get-tag
shell: bash
- uses: ./.github/actions/get-unzip
with:
url: https://github.com/${{ inputs.repo }}/releases/download/${{ steps.get-tag.outputs.tag }}/${{ inputs.arch }}.zip
dir: ${{ inputs.dir }}
temp-file: ${{ inputs.temp-file }}

View 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 }}')

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
Name=Techmino Alpha
Comment=Techmino is fun!
Exec=wrapper-love %f
Type=Application
Categories=Game;
Terminal=false
Icon=icon

BIN
.github/build/Linux/icon.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

5
.github/build/Linux/love.template vendored Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
export LOVE_LAUNCHER_LOCATION="$(dirname "$(which "$0")")"
export LD_LIBRARY_PATH="${LOVE_LAUNCHER_LOCATION}/lib/x86_64-linux-gnu:${LOVE_LAUNCHER_LOCATION}/usr/bin:${LOVE_LAUNCHER_LOCATION}/usr/lib:${LOVE_LAUNCHER_LOCATION}/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
/sbin/ldconfig -p | grep -q libstdc++ || export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${LOVE_LAUNCHER_LOCATION}/libstdc++/"
exec ${LOVE_BIN_WRAPPER} "${LOVE_LAUNCHER_LOCATION}/usr/bin/love" "${LOVE_LAUNCHER_LOCATION}/usr/share/Techmino"

View File

@@ -8,12 +8,9 @@ FILETYPE 0x1
{
BLOCK "040904B0"
{
VALUE "FileDescription", "Techmino Alpha"
VALUE "CompanyName", "26F Studio"
VALUE "FileDescription", "Techmino"
VALUE "FileVersion", "@Version"
VALUE "InternalName", "Techmino"
VALUE "LegalCopyright", "Copyright © 2019-2023 26F-Studio. Some Rights Reserved."
VALUE "OriginalFilename", "Techmino.exe"
VALUE "LegalCopyright", "Copyright @ 26F Studio"
VALUE "ProductName", "Techmino"
VALUE "ProductVersion", "@Version"
}

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

BIN
.github/build/Windows/icon.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/icon_background"/>
<foreground android:drawable="@mipmap/icon_foreground"/>
</adaptive-icon>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/icon_background"/>
<foreground android:drawable="@mipmap/icon_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 KiB

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/icon_background"/>
<foreground android:drawable="@mipmap/icon_foreground"/>
</adaptive-icon>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/icon_background"/>
<foreground android:drawable="@mipmap/icon_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -1,106 +0,0 @@
diff --git a/src/common/ios.h b/src/common/ios.h
index c1932555..552e432e 100644
--- a/src/common/ios.h
+++ b/src/common/ios.h
@@ -66,7 +66,7 @@ std::string getExecutablePath();
/**
* Causes devices with vibration support to vibrate for about 0.5 seconds.
**/
-void vibrate();
+void vibrate(const double seconds);
/**
* Enable mix mode (e.g. with background music apps) and playback with a muted device.
diff --git a/src/common/ios.mm b/src/common/ios.mm
index 7730991e..4ba8e708 100644
--- a/src/common/ios.mm
+++ b/src/common/ios.mm
@@ -36,6 +36,8 @@
#include <SDL_video.h>
#include <SDL_syswm.h>
+#include <sys/utsname.h>
+
static NSArray *getLovesInDocuments();
static bool deleteFileInDocuments(NSString *filename);
@@ -391,10 +393,40 @@ std::string getExecutablePath()
}
}
-void vibrate()
+void vibrate(const double seconds)
{
@autoreleasepool
{
+ struct utsname systemInfo;
+ uname(&systemInfo);
+ NSString *deviceString = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
+ NSRange iPhoneRange = [deviceString rangeOfString:@"iPhone"];
+ if (iPhoneRange.length == 6) {
+ NSRange commaRange = [deviceString rangeOfString:@","];
+ NSString *iPhone = [deviceString substringWithRange:iPhoneRange];
+ NSRange numRange = NSMakeRange(iPhoneRange.location + iPhoneRange.length, commaRange.location - iPhoneRange.location - iPhoneRange.length);
+ NSString *num = [deviceString substringWithRange:numRange];
+
+ if ([num intValue] >= 9) {
+ // iPhone 7 and above, see: https://gist.github.com/adamawolf/3048717#file-apple_mobile_device_types-txt-L22
+
+ if (@available(iOS 10.0, *)) {
+ // iOS 10.0 and above
+ UIImpactFeedbackGenerator *impact = nil;
+ if (seconds >= 0.5 && seconds < 1.5) {
+ impact = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleLight]; // 轻
+ } else if (seconds >= 1.5 && seconds < 2.5) {
+ impact = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleMedium]; // 中
+ } else if (seconds >= 2.5) {
+ impact = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleHeavy]; // 重
+ } else {
+ return;
+ }
+ [impact impactOccurred];
+ return;
+ }
+ }
+ }
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}
}
diff --git a/src/love.cpp b/src/love.cpp
index c8af8596..ae7a5e32 100644
--- a/src/love.cpp
+++ b/src/love.cpp
@@ -140,6 +140,10 @@ enum DoneAction
DONE_RESTART,
};
+extern "C" {
+ int luaopen_CCloader(lua_State *L);
+}
+
static DoneAction runlove(int argc, char **argv, int &retval)
{
// Oh, you just want the version? Okay!
@@ -158,6 +162,9 @@ static DoneAction runlove(int argc, char **argv, int &retval)
lua_State *L = luaL_newstate();
luaL_openlibs(L);
+ // Init CCloader
+ luaopen_CCloader(L);
+
// LuaJIT-specific setup needs to be done as early as possible - before
// get_app_arguments because that loads external library code. This is also
// loaded inside require("love"). Note that it doesn't use the love table.
diff --git a/src/modules/system/System.cpp b/src/modules/system/System.cpp
index e1de16d5..e0f03557 100644
--- a/src/modules/system/System.cpp
+++ b/src/modules/system/System.cpp
@@ -174,7 +174,7 @@ void System::vibrate(double seconds) const
#ifdef LOVE_ANDROID
love::android::vibrate(seconds);
#elif defined(LOVE_IOS)
- love::ios::vibrate();
+ love::ios::vibrate(seconds);
#else
LOVE_UNUSED(seconds);
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 908 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Some files were not shown because too many files have changed in this diff Show More