From 787947b6a874efbb9656cc07f5f3079b64db80ef Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 22 Mar 2018 17:53:35 -0700 Subject: [PATCH] add a default tutorial json for dev interface --- interface/CMakeLists.txt | 24 ++++++++------------ interface/resources/serverless/tutorial.json | 18 +++++++++++++++ 2 files changed, 27 insertions(+), 15 deletions(-) create mode 100644 interface/resources/serverless/tutorial.json diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index edc7d4547c..f6332ce33e 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -331,19 +331,22 @@ else() # copy the resources files beside the executable add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_if_different - "${RESOURCES_RCC}" - "$" + "${RESOURCES_RCC}" + "$" # FIXME, the edit script code loads HTML from the scripts folder # which in turn relies on CSS that refers to the fonts. In theory # we should be able to modify the CSS to reference the QRC path to # the ttf files, but doing so generates a CORS policy violation, # so we have to retain a copy of the fonts outside of the resources binary COMMAND "${CMAKE_COMMAND}" -E copy_directory - "${PROJECT_SOURCE_DIR}/resources/fonts" - "$/resources/fonts" + "${PROJECT_SOURCE_DIR}/resources/fonts" + "$/resources/fonts" COMMAND "${CMAKE_COMMAND}" -E copy_directory - "${CMAKE_SOURCE_DIR}/scripts" - "${RESOURCES_DEV_DIR}/scripts" + "${CMAKE_SOURCE_DIR}/scripts" + "${RESOURCES_DEV_DIR}/scripts" + COMMAND "${CMAKE_COMMAND}" -E copy_if_different + "${PROJECT_SOURCE_DIR}/resources/serverless/tutorial.json" + "$/resources/serverless/tutorial.json" ) # link target to external libraries @@ -388,15 +391,6 @@ if (DOWNLOAD_SERVERLESS_CONTENT) "${SOURCE_DIR}/serverless/" "${RESOURCES_DEV_DIR}/serverless" ) - - # for installs, put the serverless content in the resources folder beside the executable - if (RESOURCES_INSTALL_DIR) - install( - DIRECTORY "${SOURCE_DIR}/serverless" - DESTINATION "${RESOURCES_INSTALL_DIR}" - COMPONENT ${CLIENT_COMPONENT} - ) - endif () endif () if (WIN32) diff --git a/interface/resources/serverless/tutorial.json b/interface/resources/serverless/tutorial.json new file mode 100644 index 0000000000..f690de6643 --- /dev/null +++ b/interface/resources/serverless/tutorial.json @@ -0,0 +1,18 @@ +{ + "Entities": [ + { + "type": "Box", + "dimensions": { + "x": 20, + "y": 1, + "z": 20 + }, + "position" : { + "x": 0, + "y": -12, + "z": 0 + } + } + ], + "Version": 84 +}