Skip to content

Commit f5058b6

Browse files
committed
Release 1.1.0
1 parent ce5a898 commit f5058b6

39 files changed

+1050
-235
lines changed

.clang-format

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,12 @@ SpaceBeforeInheritanceColon: true
5656
SpaceBeforeParens: ControlStatements
5757
SpaceBeforeRangeBasedForLoopColon: true
5858
SpaceInEmptyParentheses: false
59-
SpacesBeforeTrailingComments: 0
59+
SpacesBeforeTrailingComments: 1
6060
SpacesInAngles: false
6161
SpacesInCStyleCastParentheses: false
6262
SpacesInContainerLiterals: false
6363
SpacesInParentheses: false
6464
SpacesInSquareBrackets: false
6565
TabWidth: 4
6666
UseTab: Never
67+
LambdaBodyIndentation: OuterScope

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CMakeLists.txt

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
1010
set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
1111
set(INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
1212

13-
add_compile_definitions(HOT_RELOAD=1)
13+
# Enable hot reload on debug builds
14+
if (NOT DEFINED HOT_RELOAD)
15+
if (${CMAKE_BUILD_TYPE} MATCHES "^(Release|RelWithDebInfo|MinSizeRel)$")
16+
set(HOT_RELOAD 0)
17+
else ()
18+
set(HOT_RELOAD 1)
19+
endif ()
20+
endif ()
21+
add_compile_definitions(HOT_RELOAD=${HOT_RELOAD})
22+
message(STATUS "HOT_RELOAD = ${HOT_RELOAD}")
1423

1524
add_compile_options(-frtti -fexceptions -fvisibility=hidden -fPIE -fPIC)
1625

@@ -20,31 +29,31 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/qpm.cmake)
2029

2130
include(${EXTERN_DIR}/includes/kaleb/shared/cmake/assets.cmake)
2231

23-
if(${CMAKE_BUILD_TYPE} STREQUAL "RELEASE" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo" OR ${CMAKE_BUILD_TYPE} STREQUAL "MinSizeRel")
24-
# Better optimizations
25-
add_compile_options(-O3)
32+
if (${CMAKE_BUILD_TYPE} STREQUAL "RELEASE" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo" OR ${CMAKE_BUILD_TYPE} STREQUAL "MinSizeRel")
33+
# Better optimizations
34+
add_compile_options(-O2)
2635

27-
# LTO
28-
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
29-
add_compile_options(-flto)
30-
endif()
36+
# LTO
37+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
38+
add_compile_options(-flto)
39+
endif ()
3140

32-
if(${CMAKE_BUILD_TYPE} STREQUAL "DEBUG" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
33-
add_compile_options(-g)
34-
endif()
41+
if (${CMAKE_BUILD_TYPE} STREQUAL "DEBUG" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
42+
add_compile_options(-g)
43+
endif ()
3544

3645
# Targets
37-
if(QUEST)
38-
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/targets/quest.cmake)
39-
endif()
46+
if (QUEST)
47+
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/targets/quest.cmake)
48+
endif ()
4049

4150
# Post build
4251
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/strip.cmake)
4352

4453
# stop symbols leaking
4554
# TODO: Fix
4655
# add_link_options(-Wl, --exclude-libs, ALL)
47-
project( spotify-search
56+
project(spotify-search
4857
VERSION ${PACKAGE_VERSION})
4958

5059
add_compile_definitions(MOD_ID="${CMAKE_PROJECT_NAME}")

assets/BasicModal.bsml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<modal xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
2+
xsi:noNamespaceSchemaLocation='https://raw.githubusercontent.com/RedBrumbler/Quest-BSML-Docs/gh-pages/schema.xsd'
3+
id="modal_">
4+
<vertical vertical-fit="PreferredSize" background="round-rect-panel" pad="2" pref-width="70">
5+
<text id="textView_" font-size="3.5" word-wrapping="true"/>
6+
<horizontal>
7+
<button id="secondaryButton_" on-click="onDismissModalButtonClicked" text="Cancel"/>
8+
<primary-button id="primaryButton_" on-click="onContinueModalButtonClicked" text="Continue"/>
9+
</horizontal>
10+
</vertical>
11+
</modal>

assets/DownloadHistoryViewController.bsml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</horizontal>
88

99
<vertical horizontal-fit="Unconstrained">
10-
<list id='customSongsList_' select-cell='onCustomSongSelected' show-scrollbar='true' stick-scrolling="true"/>
10+
<list id='customSongsList_' show-scrollbar='true' stick-scrolling="true"/>
1111
</vertical>
1212

1313
</vertical>

assets/SettingsViewController.bsml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@
3232
<button id="clearCacheButton_" text="Clear Cache" on-click="onClearCacheButtonClicked"/>
3333
</horizontal>
3434

35+
<!-- Secure Authentication Token -->
36+
<horizontal spacing="4">
37+
<vertical horizontal-fit="Unconstrained">
38+
<text text="Secure Authentication Token"/>
39+
<horizontal spacing="1">
40+
<text text="Store the Spotify authentication token securely on this device by encrypting it with a PIN. You will be prompted to unlock it everytime you start the game. <color=#D32F2F>Disabling this would allow any other mod or app on your device to potentially access the authentication token!</color>" font-size="3" color="grey" rich-text="true"/>
41+
<horizontal flex-width="100"/>
42+
</horizontal>
43+
</vertical>
44+
<checkbox text="" id="requirePinCheckbox_" on-change="onRequirePinCheckboxChanged" pref-width="45"/>
45+
</horizontal>
46+
3547
<vertical flex-height="100"/>
3648
</vertical>
3749

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<vertical xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
2+
xsi:noNamespaceSchemaLocation='https://raw.githubusercontent.com/RedBrumbler/Quest-BSML-Docs/gh-pages/schema.xsd'>
3+
4+
<text font-size="5" text="Enter your PIN to unlock"/>
5+
6+
<text-field id="pinTextField_" text="PIN" pref-width="10"/>
7+
8+
<vertical flex-height="100"/>
9+
10+
<horizontal spacing="4">
11+
<primary-button id="loginButton_" text="Login" on-click="onLoginButtonClicked"/>
12+
<button id="forgotPinButton_" text="Forgot PIN" on-click="onForgotPinButtonClicked"/>
13+
</horizontal>
14+
15+
</vertical>

assets/SpotifyLoginViewController.bsml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<vertical xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
22
xsi:noNamespaceSchemaLocation='https://raw.githubusercontent.com/RedBrumbler/Quest-BSML-Docs/gh-pages/schema.xsd' horizontal-fit="Unconstrained" pad-left="32" pad-right="32">
33

4+
<!-- Introduction -->
45
<vertical pad-bottom="2" horizontal-fit="Unconstrained">
56
<text font-size="3" text="Welcome to Spotify Search. First, enter the details of your Spotify app (these can be found on the Spotify Developer Portal). Then, login with your Spotify account. This will only be needed the first time the mod is installed."/>
67
</vertical>
78

9+
<!-- Client ID input -->
810
<vertical vertical-fit="PreferredSize" horizontal-fit="Unconstrained" spacing="-1">
911
<text font-size="3.5" text="Client ID"/>
1012
<horizontal>
@@ -13,6 +15,7 @@
1315
</horizontal>
1416
</vertical>
1517

18+
<!-- Client Secret input-->
1619
<vertical vertical-fit="PreferredSize" horizontal-fit="Unconstrained" spacing="-1">
1720
<text font-size="3.5" text="Client Secret"/>
1821
<horizontal>
@@ -21,18 +24,19 @@
2124
</horizontal>
2225
</vertical>
2326

24-
<modal id="errorMessageModal_" click-off-closes="true">
25-
<vertical vertical-fit="PreferredSize" background="round-rect-panel" pad="2">
26-
<text id="errorMessageTextView_" text="there are so many aerorsad asda fsdfs f"/>
27-
<button interactable="true" on-click="onDismissModalButtonClicked" text="OK"/>
28-
</vertical>
29-
</modal>
30-
27+
<!-- Redirect URI -->
3128
<vertical vertical-fit="PreferredSize" horizontal-fit="Unconstrained" spacing="-1">
3229
<text font-size="3.5" text="Redirect URI"/>
3330
<text id="redirectUriTextField_" rich-text="true" word-wrapping="false" font-color="grey"/>
3431
</vertical>
3532

33+
<!-- PIN input -->
34+
<vertical id="pinInputContainer_" vertical-fit="PreferredSize" horizontal-fit="Unconstrained" spacing="-1">
35+
<text font-size="3.5" text="PIN"/>
36+
<text font-size="3" text="Create a PIN that will be used to securely store your credentials."/>
37+
<text-field id="pinTextField_" text="PIN"/>
38+
</vertical>
39+
3640
<vertical flex-height="100"/>
3741

3842
<vertical>

cmake/targets/android-ndk.cmake

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,38 @@
11
include_guard()
22

3-
if(NOT DEFINED CMAKE_ANDROID_NDK)
4-
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ndkpath.txt")
5-
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/ndkpath.txt" CMAKE_ANDROID_NDK)
6-
else()
7-
if(EXISTS $ENV{ANDROID_NDK_HOME})
8-
set(CMAKE_ANDROID_NDK $ENV{ANDROID_NDK_HOME})
9-
elseif(EXISTS $ENV{ANDROID_NDK_LATEST_HOME})
10-
set(CMAKE_ANDROID_NDK $ENV{ANDROID_NDK_LATEST_HOME})
11-
endif()
12-
endif()
13-
endif()
14-
15-
if(NOT DEFINED CMAKE_ANDROID_NDK)
3+
if (NOT DEFINED CMAKE_ANDROID_NDK)
4+
if (EXISTS $ENV{ANDROID_NDK_HOME})
5+
set(CMAKE_ANDROID_NDK $ENV{ANDROID_NDK_HOME})
6+
elseif (EXISTS $ENV{ANDROID_NDK_LATEST_HOME})
7+
set(CMAKE_ANDROID_NDK $ENV{ANDROID_NDK_LATEST_HOME})
8+
endif ()
9+
endif ()
10+
11+
if (NOT DEFINED CMAKE_ANDROID_NDK)
1612
message(Big time error buddy, no NDK)
17-
endif()
13+
endif ()
1814

1915
string(REPLACE "\\" "/" CMAKE_ANDROID_NDK ${CMAKE_ANDROID_NDK})
2016

21-
message(STATUS "Using NDK ${CMAKE_ANDROID_NDK}")
17+
message(STATUS "Using Android NDK: \"${CMAKE_ANDROID_NDK}\"")
2218

2319
# check if contains space
24-
if(CMAKE_ANDROID_NDK MATCHES " ")
20+
if (CMAKE_ANDROID_NDK MATCHES " ")
2521
message(FATAL_ERROR "CMAKE_ANDROID_NDK contains a space! Please remove it!")
26-
endif()
22+
endif ()
2723

2824

2925
# Quest is armv8-64
3026
# Uses Android 12-14 now
31-
3227
set(ANDROID_PLATFORM 24)
3328
set(ANDROID_ABI arm64-v8a)
3429
set(ANDROID_STL c++_static)
3530
set(ANDROID_USE_LEGACY_TOOLCHAIN_FILE OFF)
3631

37-
#TODO: Fix this warning
38-
if(CMAKE_TOOLCHAIN_FILE MATCHES ".+")
39-
message(WARNING "CMAKE_TOOLCHAIN_FILE already defined, overwriting! ${CMAKE_TOOLCHAIN_FILE}")
40-
endif()
41-
32+
# Set Android toolchain
33+
if (CMAKE_TOOLCHAIN_FILE)
34+
message(WARNING "CMAKE_TOOLCHAIN_FILE is already defined. Overwriting it!")
35+
endif ()
4236
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_ANDROID_NDK}/build/cmake/android.toolchain.cmake)
4337

4438
# Set triplet for vcpkg

0 commit comments

Comments
 (0)