[c-host] a few build tweaks and updated README.md

This commit is contained in:
Geoffrey McRae 2019-04-10 22:04:36 +10:00
parent d5ad53dae7
commit da7c66419a
4 changed files with 40 additions and 7 deletions

View File

@ -1 +1 @@
a12-146-ga03075416c+1 a12-147-gd5ad53dae7+1

View File

@ -23,7 +23,6 @@ add_compile_options(
"-ffunction-sections" "-ffunction-sections"
"$<$<CONFIG:DEBUG>:-O0;-g3;-ggdb>" "$<$<CONFIG:DEBUG>:-O0;-g3;-ggdb>"
) )
set(CMAKE_EXE_LINKER FLAGS "-Wl,--gc-sections")
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
execute_process( execute_process(
@ -53,11 +52,15 @@ set(SOURCES
add_subdirectory(platform) add_subdirectory(platform)
if(WIN32)
add_executable(looking-glass-host WIN32 ${SOURCES})
else()
add_executable(looking-glass-host ${SOURCES}) add_executable(looking-glass-host ${SOURCES})
endif()
target_link_libraries(looking-glass-host target_link_libraries(looking-glass-host
platform platform
) )
set_target_properties(looking-glass-host PROPERTIES LINK_FLAGS "-Wl,--gc-sections")
install(PROGRAMS ${CMAKE_BINARY_DIR}/looking-glass-host DESTINATION bin/ COMPONENT binary) install(PROGRAMS ${CMAKE_BINARY_DIR}/looking-glass-host DESTINATION bin/ COMPONENT binary)
feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES) feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES)

View File

@ -41,4 +41,36 @@ cmake -G "MSYS Makefiles" ..
make make
``` ```
# Where is the log?
It is in your user's temp directory:
%TEMP%\looking-glass-host.txt
For example:
C:\Users\YourUser\AppData\Local\Temp\looking-glass-host.txt
# Why does this version require Administrator privileges
This is intentional for several reasons.
1. NvFBC requires a system wide hook to correctly obtain the cursor position as NVIDIA decided to not provide this as part of the cursor updates.
2. NvFBC requires administrator level access to enable the interface in the first place. (WIP)
3. DXGI performance can be improved if we have this. (WIP)
# Why isn't there a build with NvFBC support available.
Because NVIDIA have decided to put restrictions on the NvFBC API that simply make it incompatible with the GPL/2 licence. Providing a pre-built binary with NvFBC support would violate the EULA I have agreed to in order to access the NVidia Capture SDK.
# Why can't I compile NvFBC support into the host
You must download and install the NVidia Capture SDK. Please note that by doing so you will be agreeing to NVIDIA's SDK License agreement and the binary you produce can not be distributed.
# Can't you just re-write the NvFBC headers?
Technically yes, but since I have already agreed to the SDK License Agreement and seen the headers, I am tainted.
Until someone is able to reverse engineer these headers without prior knowleadge obtained from the SDK, and without agreeing to the NVIDIA SDK License, we can not legally include the headers or release a binary with NvFBC support built in.
_-Geoff_ _-Geoff_

View File

@ -99,7 +99,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
PSP_DEVICE_INTERFACE_DETAIL_DATA infData = NULL; PSP_DEVICE_INTERFACE_DETAIL_DATA infData = NULL;
SP_DEVICE_INTERFACE_DATA deviceInterfaceData; SP_DEVICE_INTERFACE_DATA deviceInterfaceData;
#if 0
// redirect stderr to a file // redirect stderr to a file
{ {
char tempPath[MAX_PATH+1]; char tempPath[MAX_PATH+1];
@ -110,7 +109,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
freopen(path, "a", stderr); freopen(path, "a", stderr);
free(path); free(path);
} }
#endif
// always flush stderr // always flush stderr
setbuf(stderr, NULL); setbuf(stderr, NULL);