From 1705703b73dba84c0db9b0816dd1008d70cfbefb Mon Sep 17 00:00:00 2001 From: Jacki Date: Sat, 2 Mar 2024 02:22:50 +0100 Subject: [PATCH] Rename nreal to xreal in readme, cmake and binaries Signed-off-by: Jacki --- CMakeLists.txt | 12 ++++++------ README.md | 8 ++++---- examples/debug_d3/CMakeLists.txt | 12 ++++++------ examples/debug_d4/CMakeLists.txt | 12 ++++++------ examples/mcu_firmware/CMakeLists.txt | 14 +++++++------- examples/mcu_firmware/src/upgrade.c | 4 ++-- interface_lib/CMakeLists.txt | 19 +++++++++++-------- 7 files changed, 42 insertions(+), 39 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index edbffc1..e706878 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,19 +1,19 @@ cmake_minimum_required(VERSION 3.16) -project(nrealAirLinuxDriver C) +project(xrealAirLinuxDriver C) set(CMAKE_C_STANDARD 17) add_subdirectory(interface_lib) add_subdirectory(examples) -add_executable(nrealAirLinuxDriver +add_executable(xrealAirLinuxDriver src/driver.c ) -target_include_directories(nrealAirLinuxDriver - BEFORE PUBLIC ${NREAL_AIR_INCLUDE_DIR} +target_include_directories(xrealAirLinuxDriver + BEFORE PUBLIC ${XREAL_AIR_INCLUDE_DIR} ) -target_link_libraries(nrealAirLinuxDriver - ${NREAL_AIR_LIBRARY} +target_link_libraries(xrealAirLinuxDriver + ${XREAL_AIR_LIBRARY} ) \ No newline at end of file diff --git a/README.md b/README.md index 4e329b2..759cce6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Custom user-space driver for the nreal Air to use it on Linux +# Custom user-space driver for the Xreal Air, Xreal Air 2 and Xreal Air 2 Pro to use it on Linux ## Information before use @@ -62,11 +62,11 @@ make It's easiest to run the software with root privileges. ``` -sudo nrealAirLinuxDriver +sudo xrealAirLinuxDriver ``` -Alternatively, you can copy the nreal_air.rules to /etc/udev/rules.d: +Alternatively, you can copy the xreal_air.rules to /etc/udev/rules.d: ``` -sudo cp udev/nreal_air.rules /etc/udev/rules.d/xreal_air.rules +sudo cp udev/xreal_air.rules /etc/udev/rules.d/xreal_air.rules ``` diff --git a/examples/debug_d3/CMakeLists.txt b/examples/debug_d3/CMakeLists.txt index d214819..f626a9b 100644 --- a/examples/debug_d3/CMakeLists.txt +++ b/examples/debug_d3/CMakeLists.txt @@ -1,17 +1,17 @@ cmake_minimum_required(VERSION 3.16) -project(nrealAirDebugD3 C) +project(xrealAirDebugD3 C) set(CMAKE_C_STANDARD 17) add_executable( - nrealAirDebugD3 + xrealAirDebugD3 src/debug.c ) -target_include_directories(nrealAirDebugD3 - BEFORE PUBLIC ${NREAL_AIR_INCLUDE_DIR} +target_include_directories(xrealAirDebugD3 + BEFORE PUBLIC ${XREAL_AIR_INCLUDE_DIR} ) -target_link_libraries(nrealAirDebugD3 - ${NREAL_AIR_LIBRARY} +target_link_libraries(xrealAirDebugD3 + ${XREAL_AIR_LIBRARY} ) diff --git a/examples/debug_d4/CMakeLists.txt b/examples/debug_d4/CMakeLists.txt index d01a63f..125be7d 100644 --- a/examples/debug_d4/CMakeLists.txt +++ b/examples/debug_d4/CMakeLists.txt @@ -1,17 +1,17 @@ cmake_minimum_required(VERSION 3.16) -project(nrealAirDebugD4 C) +project(xrealAirDebugD4 C) set(CMAKE_C_STANDARD 17) add_executable( - nrealAirDebugD4 + xrealAirDebugD4 src/debug.c ) -target_include_directories(nrealAirDebugD4 - BEFORE PUBLIC ${NREAL_AIR_INCLUDE_DIR} +target_include_directories(xrealAirDebugD4 + BEFORE PUBLIC ${XREAL_AIR_INCLUDE_DIR} ) -target_link_libraries(nrealAirDebugD4 - ${NREAL_AIR_LIBRARY} +target_link_libraries(xrealAirDebugD4 + ${XREAL_AIR_LIBRARY} ) diff --git a/examples/mcu_firmware/CMakeLists.txt b/examples/mcu_firmware/CMakeLists.txt index 6b5d082..375be88 100644 --- a/examples/mcu_firmware/CMakeLists.txt +++ b/examples/mcu_firmware/CMakeLists.txt @@ -1,17 +1,17 @@ cmake_minimum_required(VERSION 3.16) -project(nrealAirUpgradeMCU C) +project(xrealAirUpgradeMCU C) set(CMAKE_C_STANDARD 17) add_executable( - nrealAirUpgradeMCU - src/upgrade.c + xrealAirUpgradeMCU + src/upgrade.c ) -target_include_directories(nrealAirUpgradeMCU - BEFORE PUBLIC ${NREAL_AIR_INCLUDE_DIR} +target_include_directories(xrealAirUpgradeMCU + BEFORE PUBLIC ${XREAL_AIR_INCLUDE_DIR} ) -target_link_libraries(nrealAirUpgradeMCU - ${NREAL_AIR_LIBRARY} +target_link_libraries(xrealAirUpgradeMCU + ${XREAL_AIR_LIBRARY} ) diff --git a/examples/mcu_firmware/src/upgrade.c b/examples/mcu_firmware/src/upgrade.c index 3b2ccc8..25e344e 100644 --- a/examples/mcu_firmware/src/upgrade.c +++ b/examples/mcu_firmware/src/upgrade.c @@ -1,7 +1,7 @@ // // Created by thejackimonster on 03.05.23. // -// Copyright (c) 2023 thejackimonster. All rights reserved. +// Copyright (c) 2023-2024 thejackimonster. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,7 @@ int main(int argc, const char** argv) { if (argc <= 1) { - printf("HOW TO USE IT:\n$ nrealAirUpgradeMCU \n"); + printf("HOW TO USE IT:\n$ xrealAirUpgradeMCU \n"); return 0; } diff --git a/interface_lib/CMakeLists.txt b/interface_lib/CMakeLists.txt index 1fc3449..7a75094 100644 --- a/interface_lib/CMakeLists.txt +++ b/interface_lib/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.16) -project(nrealAirLibrary C) +project(xrealAirLibrary C) set(CMAKE_C_STANDARD 17) @@ -9,7 +9,7 @@ add_subdirectory(modules/hidapi) add_subdirectory(modules/Fusion/Fusion) add_library( - nrealAirLibrary + xrealAirLibrary src/crc32.c src/device.c src/device3.c @@ -17,21 +17,24 @@ add_library( src/hid_ids.c ) -target_compile_options(nrealAirLibrary PRIVATE -fPIC) +target_compile_options(xrealAirLibrary PRIVATE -fPIC) -target_include_directories(nrealAirLibrary +target_include_directories(xrealAirLibrary BEFORE PUBLIC include ) -target_include_directories(nrealAirLibrary +target_include_directories(xrealAirLibrary SYSTEM BEFORE PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/modules/hidapi ${CMAKE_CURRENT_SOURCE_DIR}/modules/Fusion ) -target_link_libraries(nrealAirLibrary +target_link_libraries(xrealAirLibrary PRIVATE hidapi::hidapi json-c::json-c Fusion m ) -set(NREAL_AIR_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE) -set(NREAL_AIR_LIBRARY nrealAirLibrary PARENT_SCOPE) +set(XREAL_AIR_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE) +set(XREAL_AIR_LIBRARY xrealAirLibrary PARENT_SCOPE) + +set(NREAL_AIR_INCLUDE_DIR ${XREAL_AIR_INCLUDE_DIR} PARENT_SCOPE) +set(NREAL_AIR_LIBRARY ${XREAL_AIR_LIBRARY} PARENT_SCOPE)