Skip to content

Commit

Permalink
Updated versionCode to 6.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlynxZhou committed Jun 2, 2022
1 parent e43a9fe commit 48ff592
Show file tree
Hide file tree
Showing 3,328 changed files with 910,766 additions and 320,922 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ FlipClock Android
The Android wrapper for [FlipClock](https://github.com/AlynxZhou/flipclock/).
-----------------------------------------------------------------------------

[Google Play Store Page](https://play.google.com/store/apps/details?id=one.alynx.flipclock)

# WHY?

Fliqlo, the closed-source app for macOS has an iOS version, so I tried to make an Android version.
Expand All @@ -12,20 +14,20 @@ Fliqlo, the closed-source app for macOS has an iOS version, so I tried to make a

First, find a phone with LCD screen. Modern phones with non-square screens use OLED, and displaying similar patterns (FlipClock is one of those) will leave permanent mark on OLED screen.

Clone this repo, then call `git submodule update --init` to get FlipClock, then the font symlink under assets should work. Open this project with Android Studio and try to build by yourself.
Clone this repo, then run `git submodule update --init` to get FlipClock, then the font symlink under assets should work, if not, run `ln -s app/jni/flipclock/dists/flipclock.ttf app/src/main/assets/flipclock.ttf`. Open this project with Android Studio and try to build by yourself.

When the APP started, double tap to switch between 12/24-hour clock format, rotate your phone to switch between landscape and portrait, don't forget to enable your phone's auto-rotate option.

Java shim was taken directly from SDL2's `android-project` subdir and I won't modify them to keep consistnt with upstream.

The original FlipClock was used as a git submodule here to keep code clean, because we need to build SDL2 and SDL2_ttf's source inside this project (that's bad, but it's the only way).

The original FlipClock uses CMake, but we cannot use CMake when building Android APP. Android SDK do support CMake now, but the `FindSDL2.cmake` is written for finding pre-built SDL2, instead of building together from source code, also, SDL2_ttf's `CMakeLists.txt` cannot handle static build, either. So I just write some `Android.mk` files for building.
The original FlipClock uses Meson, but we cannot use Meson when building Android APP. So I just write some `Android.mk` files for building.

Wanna an iOS version? Just buy your closed-source Tesla! I am not interested in users of closed-source systems.
Wanna an iOS version? Just buy your closed-source Tesla! I am not interested in users of closed-source systems. Paying extra thousands of dollars (for buying a Mac) to gain the right for developing apps for my own mobile device is ridiculous.

# LICENSE

Code taken directly from SDL2 and SDL2_ttf should keep the same License with SDL2 and SDL2_ttf.

Code modified by me should use [Apache-2.0](./LICENSE).
Code modified by myself should use [Apache-2.0](./LICENSE).
14 changes: 9 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ else {
}

android {
compileSdkVersion 29
compileSdkVersion 32
defaultConfig {
if (buildAsApplication) {
applicationId "one.alynx.flipclock"
}
minSdkVersion 16
targetSdkVersion 29
versionCode 5
versionName "1.0.4"
minSdkVersion 23
targetSdkVersion 32
versionCode 6
versionName "1.0.5"
externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=android-16"
Expand All @@ -35,6 +35,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
applicationVariants.all { variant ->
tasks["merge${variant.name.capitalize()}Assets"]
.dependsOn("externalNativeBuild${variant.name.capitalize()}")
}
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
sourceSets.main {
jniLibs.srcDir 'libs'
Expand Down
29 changes: 8 additions & 21 deletions app/jni/SDL/Android.mk
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/audio/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/aaudio/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/openslES/*.c) \
$(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
Expand All @@ -30,10 +31,17 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/file/*.c) \
$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
$(wildcard $(LOCAL_PATH)/src/haptic/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/hidapi/*.c) \
$(wildcard $(LOCAL_PATH)/src/hidapi/android/*.cpp) \
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/virtual/*.c) \
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
$(wildcard $(LOCAL_PATH)/src/locale/*.c) \
$(wildcard $(LOCAL_PATH)/src/locale/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/misc/*.c) \
$(wildcard $(LOCAL_PATH)/src/misc/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
Expand All @@ -51,8 +59,6 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/video/yuv2rgb/*.c) \
$(wildcard $(LOCAL_PATH)/src/test/*.c))

LOCAL_SHARED_LIBRARIES := hidapi

LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
LOCAL_CFLAGS += \
-Wall -Wextra \
Expand All @@ -72,7 +78,6 @@ LOCAL_CFLAGS += \

# Warnings we haven't fixed (yet)
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare


LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid

Expand Down Expand Up @@ -115,22 +120,4 @@ LOCAL_MODULE_FILENAME := libSDL2main

include $(BUILD_STATIC_LIBRARY)

###########################
#
# hidapi library
#
###########################

include $(CLEAR_VARS)

LOCAL_CPPFLAGS += -std=c++11

LOCAL_SRC_FILES := src/hidapi/android/hid.cpp

LOCAL_MODULE := libhidapi
LOCAL_LDLIBS := -llog

include $(BUILD_SHARED_LIBRARY)

$(call import-module,android/cpufeatures)

8 changes: 4 additions & 4 deletions app/jni/SDL/BUGS.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Bugs are now managed in the SDL bug tracker, here:
Bugs are now managed in the SDL issue tracker, here:

https://bugzilla.libsdl.org/
https://github.com/libsdl-org/SDL/issues

You may report bugs there, and search to see if a given issue has already
been reported, discussed, and maybe even fixed.
Expand All @@ -11,6 +11,6 @@ You may also find help at the SDL forums/mailing list:

https://discourse.libsdl.org/

Bug reports are welcome here, but we really appreciate if you use Bugzilla, as
bugs discussed on the mailing list may be forgotten or missed.
Bug reports are welcome here, but we really appreciate if you use the issue
tracker, as bugs discussed on the mailing list may be forgotten or missed.

Loading

0 comments on commit 48ff592

Please sign in to comment.