Skip to content

Commit

Permalink
Use RPATH on Linux to avoid relative path to libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1maker committed Oct 28, 2024
1 parent bbd44cd commit 13ff485
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Release/Include/menu.as
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
19 changes: 15 additions & 4 deletions Release/Tests/menu_test.ngt
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 4 additions & 0 deletions Release/Tests/println.ngt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
int main() {
println("Hello, World!");
return 0;
}
7 changes: 3 additions & 4 deletions Release/Tests/runtime_error.ngt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
array<char> a;
int main(){
a[5000];
return 0;
void main(){
char[] c;
c[0];
}
2 changes: 1 addition & 1 deletion Release/Tests/sound_pool_test.ngt
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 13ff485

Please sign in to comment.