Use new CI system (#732)

* - Init new CI/CD system

* - Update resources

* - Update android assets

* - Update iOS assets

* - Use stable version

* - Fix apple bundle id

* - Use libs-path

* - Try modify iOS love source codes

* - Update patch

* - Try add ColdClear to macOS

* - Try add Cold Clear to Linux

* - Fix download ColdClear

* - Change inputs order

* - Try new get-CC

* - Fix iOS
This commit is contained in:
Particle_G
2022-07-29 18:21:46 +08:00
committed by GitHub
parent b111e67077
commit aedb541f68
108 changed files with 660 additions and 816 deletions

View File

@@ -1,5 +0,0 @@
#!/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

@@ -1 +0,0 @@
*.template text eol=crlf

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

View File

@@ -0,0 +1,5 @@
<?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

@@ -0,0 +1,5 @@
<?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.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

View File

@@ -0,0 +1,5 @@
<?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

@@ -0,0 +1,5 @@
<?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.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

106
.github/build/iOS/love.patch vendored Normal file
View File

@@ -0,0 +1,106 @@
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.

After

Width:  |  Height:  |  Size: 908 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,10 @@
[Desktop Entry]
Name=Techmino Development
Comment=Techmino is fun!
MimeType=application/x-love-game;
Exec=app %f
Type=Application
Categories=Game;
Terminal=false
Icon=icon
NoDisplay=false

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -1,8 +1,10 @@
[Desktop Entry]
Name=Techmino Alpha
Name=Techmino
Comment=Techmino is fun!
Exec=wrapper-love %f
MimeType=application/x-love-game;
Exec=app %f
Type=Application
Categories=Game;
Terminal=false
Icon=icon
NoDisplay=false

View File

@@ -1 +0,0 @@
*.template text eol=lf

View File

@@ -1,56 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>19B88</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>love</string>
<key>CFBundleIconFile</key>
<string>iconfile</string>
<key>CFBundleIdentifier</key>
<string>@bundleId</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Techmino</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>@versionName</string>
<key>CFBundleSignature</key>
<string>LoVe</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>11C504</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>19B90</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1130</string>
<key>DTXcodeBuild</key>
<string>11C504</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>LSMinimumSystemVersion</key>
<string>10.7</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>©2020-@thisYear 26F Studio, GNU LGPLv3.0</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<false/>
</dict>
</plist>

BIN
.github/build/macOS/release/dmg.icns vendored Normal file

Binary file not shown.

BIN
.github/build/macOS/release/dmg.png vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1 @@
*.rc text eol=crlf

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

23
.github/build/windows/dev/template.rc vendored Normal file
View File

@@ -0,0 +1,23 @@
1 VERSIONINFO
FILEVERSION @FileVersion
PRODUCTVERSION @FileVersion
FILEOS 0x40004
FILETYPE 0x1
{
BLOCK "StringFileInfo"
{
BLOCK "040904B0"
{
VALUE "FileDescription", "Techmino Development"
VALUE "CompanyName", "26F Studio"
VALUE "LegalCopyright", "Copyright @ 26F Studio"
VALUE "ProductName", "Techmino"
VALUE "ProductVersion", "@Version"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0409 0x04E4
}
}

View File

@@ -0,0 +1 @@
*.rc text eol=crlf

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -8,7 +8,7 @@ FILETYPE 0x1
{
BLOCK "040904B0"
{
VALUE "FileDescription", "Techmino Alpha"
VALUE "FileDescription", "Techmino"
VALUE "CompanyName", "26F Studio"
VALUE "LegalCopyright", "Copyright @ 26F Studio"
VALUE "ProductName", "Techmino"