From f504315c5dbe0f7b9da64275b33a028d8a88bb74 Mon Sep 17 00:00:00 2001 From: Mirek Fidler Date: Sat, 13 Aug 2022 19:19:51 +0200 Subject: [PATCH] fixed startup crash in linux --- uppsrc/ide/OutputMode.cpp | 2 +- uppsrc/ide/main.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/uppsrc/ide/OutputMode.cpp b/uppsrc/ide/OutputMode.cpp index 5bef4991b..06a4f46a8 100644 --- a/uppsrc/ide/OutputMode.cpp +++ b/uppsrc/ide/OutputMode.cpp @@ -447,7 +447,6 @@ void Ide::SetMethod(const String& m) { method = m; current_builder = GetMethodVars(method).Get("BUILDER", ""); - TriggerIndexer(); } void Ide::SelectMethod() @@ -460,6 +459,7 @@ void Ide::SelectMethod() } SyncBuildMode(); SetHdependDirs(); + TriggerIndexer(); } void Ide::DropModeList() diff --git a/uppsrc/ide/main.cpp b/uppsrc/ide/main.cpp index 77a9246fc..ace33541c 100644 --- a/uppsrc/ide/main.cpp +++ b/uppsrc/ide/main.cpp @@ -120,8 +120,13 @@ void AppMain___() { // Set this for storing libclang preamble // TODO CLANG flag? +#ifdef PLATFORM_POSIX + setenv("TMPDIR", CacheDir(), 1); + setenv("TMP", CacheDir(), 1); +#else SetEnvironmentVariable("TMPDIR", CacheDir()); SetEnvironmentVariable("TMP", CacheDir()); // Looks like libclang ignores TMPDIR +#endif // Ctrl::ShowRepaint(50); #ifdef flagPEAKMEM