diff --git a/CMakeLists.txt b/CMakeLists.txt index f84fd1e..8163ce5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -315,6 +315,12 @@ else() target_link_libraries(${PROJECT_NAME} ${SpeechD_LIBRARIES}) +set_target_properties(${PROJECT_NAME} PROPERTIES + INSTALL_RPATH "$ORIGIN" + BUILD_WITH_INSTALL_RPATH TRUE +) + + endif() target_link_libraries(${PROJECT_NAME} Poco::Foundation) diff --git a/Release/Include/menu.as b/Release/Include/menu.as index 171baa9..6734fab 100644 --- a/Release/Include/menu.as +++ b/Release/Include/menu.as @@ -38,7 +38,7 @@ class menu bool in_submenu = false; bool speak_index = false; bool enable_tab_order = true; - sound_pool sp; + sound_pool sp(6); string open_sound, close_sound, move_sound, click_sound, border_sound, wrapp_sound; menu(const string&in title, bool is_submenu = false) diff --git a/Release/Tests/menu_test.ngt b/Release/Tests/menu_test.ngt index 4787b49..004eebd 100644 --- a/Release/Tests/menu_test.ngt +++ b/Release/Tests/menu_test.ngt @@ -5,18 +5,29 @@ screen_reader::speak("Hello", true); void last_option(){ screen_reader::speak("Test"); } +void create_nested_menus(menu@ parent_menu) { +menu@ current_menu = parent_menu; + +for (int i = 1; i <= 10000; ++i) { +menu sub("&Submenu " + i); +sub.add_item("Item " + i, null); +current_menu.add_submenu("&Submenu " + i, sub); +@current_menu = sub; +} +} + + void main(){ show_window("Menu Test"); wait(500); +screen_reader::speak("Loading..."); menu m("Hello"); m.speak_index = true; -menu sub("Test"); -sub.add_item("Submenu item", null); -sub.add_item("Test", null); m.add_item("Fi&rst", first_option); m.add_item("&Last", last_option); -m.add_submenu("&Additional", sub); +create_nested_menus(m); + while(!quit_requested){ wait(5); m.monitor(); diff --git a/Release/Tests/println.ngt b/Release/Tests/println.ngt new file mode 100644 index 0000000..72d6ba6 --- /dev/null +++ b/Release/Tests/println.ngt @@ -0,0 +1,4 @@ +int main() { + println("Hello, World!"); + return 0; +} diff --git a/Release/Tests/runtime_error.ngt b/Release/Tests/runtime_error.ngt index 00ef568..b45e540 100644 --- a/Release/Tests/runtime_error.ngt +++ b/Release/Tests/runtime_error.ngt @@ -1,5 +1,4 @@ -array a; -int main(){ -a[5000]; -return 0; +void main(){ +char[] c; +c[0]; } \ No newline at end of file diff --git a/Release/Tests/sound_pool_test.ngt b/Release/Tests/sound_pool_test.ngt index d44362a..cc2d72a 100644 --- a/Release/Tests/sound_pool_test.ngt +++ b/Release/Tests/sound_pool_test.ngt @@ -13,7 +13,7 @@ update_window_freq=0; while(!quit_requested){ wait_event(); if(key_repeat(KEY_SPACE)){ -sp.play_1d("c:/windows/media/Windows Default.wav", 0, 20, false); +sp.play_1d("/mnt/c/windows/media/Windows Default.wav", 0, 20, false); sp.update_listener_position(20, 0, 0); } }