File tree Expand file tree Collapse file tree 4 files changed +43
-16
lines changed
Expand file tree Collapse file tree 4 files changed +43
-16
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.14)
22set (CMAKE_C_STANDARD 11)
33
4- execute_process (
5- COMMAND bash -c "egrep '^\\ s*SDKRoot' $HOME/.Playdate/config"
6- COMMAND head -n 1
7- COMMAND cut -c9-
8- OUTPUT_VARIABLE SDK
9- OUTPUT_STRIP_TRAILING_WHITESPACE
10- )
4+ set (ENVSDK $ENV{PLAYDATE_SDK_PATH} )
5+
6+ if (NOT ${ENVSDK} STREQUAL "" )
7+ # Convert path from Windows
8+ file (TO_CMAKE_PATH ${ENVSDK} SDK)
9+ else ()
10+ execute_process (
11+ COMMAND bash -c "egrep '^\\ s*SDKRoot' $HOME/.Playdate/config"
12+ COMMAND head -n 1
13+ COMMAND cut -c9-
14+ OUTPUT_VARIABLE SDK
15+ OUTPUT_STRIP_TRAILING_WHITESPACE
16+ )
17+ endif ()
18+
19+ if (NOT EXISTS ${SDK} )
20+ message (FATAL_ERROR "SDK Path not found; set ENV value PLAYDATE_SDK_PATH" )
21+ return ()
22+ endif ()
1123
1224# Game Name Customization
1325set (PLAYDATE_GAME_NAME Playnote)
Original file line number Diff line number Diff line change @@ -4,7 +4,14 @@ STACK_SIZE = 61800
44PRODUCT = Playnote.pdx
55
66# Locate the SDK
7- SDK = $(shell egrep '^\s* SDKRoot' ~/.Playdate/config | head -n 1 | cut -c9-)
7+ SDK = ${PLAYDATE_SDK_PATH}
8+ ifeq ($(SDK ) ,)
9+ SDK = $(shell egrep '^\s* SDKRoot' ~/.Playdate/config | head -n 1 | cut -c9-)
10+ endif
11+
12+ ifeq ($(SDK ) ,)
13+ $(error SDK path not found; set ENV value PLAYDATE_SDK_PATH)
14+ endif
815
916# #####
1017# IMPORTANT: You must add your source folders to VPATH for make to find them
Original file line number Diff line number Diff line change @@ -42,11 +42,11 @@ import './components/NoNoteDialog'
4242import ' ./components/Thumbnail'
4343import ' ./components/Timeline'
4444import ' ./components/DitherSwatch'
45- import ' ./components/ScrollBar '
45+ import ' ./components/Scrollbar '
4646import ' ./components/KeyValList'
4747import ' ./components/TextView'
4848
49- import ' ./scenes/Screenbase '
49+ import ' ./scenes/ScreenBase '
5050
5151playdate .graphics .setFont (MAIN_FONT )
5252playdate .display .setRefreshRate (REFRESH_RATE_GLOBAL )
9797-- playdate.graphics.generateQRCode('https://playnote.studio/filehelp', 120, function (qr)
9898-- playdate.simulator.writeToFile(qr, '~/qr.png')
9999-- print('qr generated')
100- -- end)
100+ -- end)
Original file line number Diff line number Diff line change 44
55# REPLACE WITH THE NAME OF YOUR PLAYDATE GAME PDX
66GAME=" Playnote.pdx"
7+
78# SDK installer writes the install location to ~/.Playdate/config
8- SDK = ${PLAYDATE_SDK_PATH}
9- ifeq ($( SDK) ,)
10- SDK = $( shell egrep ' ^\s*SDKRoot' ~ /.Playdate/config | head -n 1 | cut -c9-)
11- endif
9+ if [ -z $PLAYDATE_SDK_PATH ]; then
10+ SDK=$( egrep ' ^\s*SDKRoot' ~ /.Playdate/config | head -n 1 | cut -c9-)
11+ else
12+ SDK=$PLAYDATE_SDK_PATH
13+ fi
14+
15+ if [ -z $SDK ]; then
16+ echo " Playdate SDK path not found; set environment value PLAYDATE_SDK_PATH."
17+ exit 1
18+ fi
19+
1220CMD=$1
1321
1422if [ -z $CMD ]; then
@@ -84,4 +92,4 @@ if [ $CMD == "release" ]; then
8492 rm ./${GAME} .zip
8593fi
8694
87- exit 0
95+ exit 0
You can’t perform that action at this time.
0 commit comments