From 12540886722e80caaa0b301b1908f2f949b379b4 Mon Sep 17 00:00:00 2001
From: Joshua Villasenor <jvillasenor@apple.com>
Date: Mon, 26 Jun 2023 12:49:37 -0700
Subject: [PATCH] Update DFT prompt, add interactive flag and update rpath
 (#27485)

---
 .../commands/interactive/InteractiveCommands.mm        |  2 +-
 src/darwin/Framework/Matter.xcodeproj/project.pbxproj  | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm
index d0c900c3271ddd..a3db301d6529ee 100644
--- a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm
+++ b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm
@@ -22,7 +22,7 @@
 
 #include <editline.h>
 
-constexpr const char * kInteractiveModePrompt = ">>> ";
+constexpr const char * kInteractiveModePrompt = "Stop and restart stack: [Ctrl+_] & [Ctrl+^] \nQuit Interactive: 'quit()'\n>>> ";
 constexpr const char * kInteractiveModeHistoryFilePath = "/tmp/darwin_framework_tool_history";
 constexpr const char * kInteractiveModeStopCommand = "quit()";
 
diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj
index 3350100d208491..03c94bc395960b 100644
--- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj
+++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj
@@ -1576,6 +1576,7 @@
 					CONFIG_BUILD_FOR_HOST_UNIT_TEST,
 					CONFIG_USE_LOCAL_STORAGE,
 					"CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1",
+					"CONFIG_USE_INTERACTIVE_MODE=1",
 				);
 				"HEADER_SEARCH_PATHS[arch=*]" = (
 					"$(CHIP_ROOT)/examples/darwin-framework-tool",
@@ -1595,6 +1596,10 @@
 					"$(CHIP_ROOT)/examples/chip-tool/commands/clusters",
 					"$(CHIP_ROOT)/zzz_generated/chip-tool",
 				);
+				LD_RUNPATH_SEARCH_PATHS = (
+					"@executable_path",
+					"$(BUILT_PRODUCTS_DIR)",
+				);
 				"LIBRARY_SEARCH_PATHS[arch=*]" = (
 					"$(CONFIGURATION_TEMP_DIR)/Matter.build/out/lib",
 					"$(CONFIGURATION_TEMP_DIR)/Matter.build/out/obj/src/app/lib",
@@ -1625,6 +1630,7 @@
 					CONFIG_BUILD_FOR_HOST_UNIT_TEST,
 					CONFIG_USE_LOCAL_STORAGE,
 					"CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1",
+					"CONFIG_USE_INTERACTIVE_MODE=1",
 				);
 				"HEADER_SEARCH_PATHS[arch=*]" = (
 					"$(CHIP_ROOT)/examples//darwin-framework-tool",
@@ -1645,6 +1651,10 @@
 					"$(CHIP_ROOT)/examples/chip-tool",
 					"$(CHIP_ROOT)/zzz_generated/chip-tool",
 				);
+				LD_RUNPATH_SEARCH_PATHS = (
+					"@executable_path",
+					"$(BUILT_PRODUCTS_DIR)",
+				);
 				"LIBRARY_SEARCH_PATHS[arch=*]" = (
 					"$(CONFIGURATION_TEMP_DIR)/Matter.build/out/lib",
 					"$(CONFIGURATION_TEMP_DIR)/Matter.build/out/obj/src/app/lib",