]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge branch 'master' into master-merge
authorThomas Debesse <dev@illwieckz.net>
Fri, 24 Jun 2022 23:56:13 +0000 (01:56 +0200)
committerThomas Debesse <dev@illwieckz.net>
Fri, 24 Jun 2022 23:56:13 +0000 (01:56 +0200)
gamepack-manager
libs/transformpath/transformpath.cpp
setup/macos/NetRadiant

index 232c75962dc9ad21a60a937e24cad02c8bc7cbf4..efcb751f94a7056681739ce62e8f2223c339fdea 100755 (executable)
@@ -294,11 +294,12 @@ downloadExtraUrls ()
 {
        if [ -f 'extra-urls.txt' ]
        then
-               while IFS='     ' read -r extra_file extra_url
+               local line
+               while read line
                do
-                       (
-                               ${WGET} -O "${extra_file}" "${extra_url}"
-                       ) </dev/null
+                       local extra_file="$(echo "${line}" | cut -f1 -d$'\t')"
+                       local extra_url="$(echo "${line}" | cut -f2 -d$'\t')"
+                       ${WGET} -O "${extra_file}" "${extra_url}" < /dev/null
                done < 'extra-urls.txt'
        fi
 }
index 67e482e14ab58aa1c41c28f7ebdfe1e0ac05309b..c949bc2ff41ee0333613c87e3e776babda41f917 100644 (file)
@@ -98,7 +98,7 @@ static std::string getUserName()
                return path;
        }
 
-       globalErrorStream() << "\%USERNAME\% not found.\n";
+       globalErrorStream() << "%USERNAME% not found.\n";
 
        return "";
 #endif // !GDEF_OS_WINDOWS
@@ -145,7 +145,7 @@ static std::string getHomePath()
                return path;
        }
 
-       globalErrorStream() << "\%HOMEPATH\% not found, guessing…\n";
+       globalErrorStream() << "%HOMEPATH% not found, guessing…\n";
 
        std::string path1 = getUserProfilePath();
 
@@ -154,7 +154,7 @@ static std::string getHomePath()
                return path1;
        }
 
-       globalErrorStream() << "\%HOMEPATH\% not found.\n";
+       globalErrorStream() << "%HOMEPATH% not found.\n";
 
        return "";
 #endif // !GDEF_OS_WINDOWS
@@ -206,7 +206,7 @@ static std::string getSystemDrive()
                return path;
        }
 
-       globalErrorStream() << "\%SYSTEMDRIVE\% not found, guessing…\n";
+       globalErrorStream() << "%SYSTEMDRIVE% not found, guessing…\n";
 
        return "C:";
 }
@@ -220,7 +220,7 @@ static std::string getUserProfilePath()
                return path;
        }
 
-       globalErrorStream() << "\%USERPROFILE\% not found, guessing…\n";
+       globalErrorStream() << "%USERPROFILE% not found, guessing…\n";
 
        std::string path1 = getSystemDrive();
        std::string path2 = getUserName();
@@ -230,7 +230,7 @@ static std::string getUserProfilePath()
                return path1 + "\\Users\\" + path2;
        }
 
-       globalErrorStream() << "\%USERPROFILE\% not found.\n";
+       globalErrorStream() << "%USERPROFILE% not found.\n";
 
        return "";
 }
@@ -244,7 +244,7 @@ static std::string getProgramFilesPath()
                return path;
        }
 
-       globalErrorStream() << "\%ProgramFiles\% not found, guessing…\n";
+       globalErrorStream() << "%ProgramFiles% not found, guessing…\n";
 
        std::string path1 = getSystemDrive();
        return path1 + "\\Program Files";
@@ -259,7 +259,7 @@ static std::string getProgramFilesX86Path()
                return path;
        }
 
-       globalErrorStream() << "\%ProgramFiles(x86)\% not found, guessing…\n";
+       globalErrorStream() << "%ProgramFiles(x86)% not found, guessing…\n";
 
        return getProgramFilesPath();
 }
@@ -273,7 +273,7 @@ static std::string getProgramW6432Path()
                return path;
        }
 
-       globalErrorStream() << "\%ProgramW6432\% not found, guessing…\n";
+       globalErrorStream() << "%ProgramW6432% not found, guessing…\n";
 
        return getProgramFilesPath();
 }
@@ -287,7 +287,7 @@ static std::string getAppDataPath()
                return path;
        }
 
-       globalErrorStream() << "\%APPDATA\% not found, guessing…\n";
+       globalErrorStream() << "%APPDATA% not found, guessing…\n";
 
        std::string path1 = getUserProfilePath();
 
@@ -296,7 +296,7 @@ static std::string getAppDataPath()
                return path1 + "\\AppData\\Roaming";
        }
 
-       globalErrorStream() << "\%APPDATA\% not found.\n";
+       globalErrorStream() << "%APPDATA% not found.\n";
 
        return std::string( "" );
 }
@@ -393,12 +393,12 @@ struct pathTransformer_t
 static const pathTransformer_t pathTransformers[] =
 {
 #if GDEF_OS_WINDOWS
-       { "\%HOMEPATH\%", getHomePath },
-       { "\%USERPROFILE\%", getUserProfilePath },
-       { "\%ProgramFiles\%", getProgramFilesPath },
-       { "\%ProgramFiles(x86)\%", getProgramFilesX86Path },
-       { "\%ProgramW6432\%", getProgramW6432Path },
-       { "\%APPDATA\%", getAppDataPath },
+       { "%HOMEPATH%", getHomePath },
+       { "%USERPROFILE%", getUserProfilePath },
+       { "%ProgramFiles%", getProgramFilesPath },
+       { "%ProgramFiles(x86)%", getProgramFilesX86Path },
+       { "%ProgramW6432%", getProgramW6432Path },
+       { "%APPDATA%", getAppDataPath },
        { "[CSIDL_MYDOCUMENTS]", getMyDocumentsPath },
 #endif // GDEF_OS_WINDOWS
 
index 21933a1620ab26c37cbe9996442b9b99baecff31..9bfbf742039cfacb8736a22a4197b98215fd1eeb 100755 (executable)
@@ -33,12 +33,14 @@ then
        export GTK_PATH="${bundle_dir}"
 fi
 
-if [ "$(defaults read -g AppleInterfaceStyle 2>/dev/null)" = 'Dark' ]
-then
-       color='dark'
-else
-       color='light'
-fi
+color="$(defaults read -g AppleInterfaceStyle 2>/dev/null)"
+case "${color}" in
+       'Dark')
+               ;;
+       *)
+       color='Light'
+               ;;
+esac
 
 gtkrc_file="${bundle_dir}/share/themes/Mojave-${color}/gtk-2.0/gtkrc"