mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-12 18:38:12 +00:00
[idd] debug: log to C:\ProgramData\Looking Glass (IDD)
This commit is contained in:
@@ -43,16 +43,7 @@ void CDebug::Init(const char * name)
|
|||||||
if (IsDebuggerPresent())
|
if (IsDebuggerPresent())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// get the system temp directory
|
std::string folder = "C:\\ProgramData\\Looking Glass (IDD)\\";
|
||||||
char tempPath[MAX_PATH];
|
|
||||||
DWORD pathLen = GetTempPathA(sizeof(tempPath), tempPath);
|
|
||||||
if (pathLen == 0)
|
|
||||||
{
|
|
||||||
DEBUG_ERROR_HR(GetLastError(), "Failed to get the temp path");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string folder = tempPath;
|
|
||||||
std::string baseName = name;
|
std::string baseName = name;
|
||||||
std::string ext = ".txt";
|
std::string ext = ".txt";
|
||||||
std::string logFile = folder + baseName + ext;
|
std::string logFile = folder + baseName + ext;
|
||||||
|
@@ -78,6 +78,7 @@ Function ShowHelpMessage
|
|||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
|
SetShellVarContext all
|
||||||
|
|
||||||
var /GLOBAL cmdLineParams
|
var /GLOBAL cmdLineParams
|
||||||
Push $R0
|
Push $R0
|
||||||
@@ -153,6 +154,9 @@ SectionEnd
|
|||||||
Section "!Indirect Display Driver (IDD)" Section1
|
Section "!Indirect Display Driver (IDD)" Section1
|
||||||
SectionIn RO
|
SectionIn RO
|
||||||
|
|
||||||
|
DetailPrint "Creating log directory"
|
||||||
|
CreateDirectory "$APPDATA\Looking Glass (IDD)"
|
||||||
|
|
||||||
DetailPrint "Extracting IDD"
|
DetailPrint "Extracting IDD"
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
File lgidd.cat
|
File lgidd.cat
|
||||||
@@ -201,8 +205,6 @@ Section "!Indirect Display Driver (IDD)" Section1
|
|||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Uninstall" Section6
|
Section "Uninstall" Section6
|
||||||
SetShellVarContext all
|
|
||||||
|
|
||||||
!insertmacro StopLGIddHelper
|
!insertmacro StopLGIddHelper
|
||||||
|
|
||||||
DetailPrint "Uninstalling IDD"
|
DetailPrint "Uninstalling IDD"
|
||||||
|
Reference in New Issue
Block a user