diff --git a/ArchiSteamFarm/ArchiSteamFarm.csproj b/ArchiSteamFarm/ArchiSteamFarm.csproj index e5696d7ee..afb436c4b 100644 --- a/ArchiSteamFarm/ArchiSteamFarm.csproj +++ b/ArchiSteamFarm/ArchiSteamFarm.csproj @@ -274,8 +274,8 @@ cp "$(TargetDir)config/example.json" "$(SolutionDir)out/config" cp "$(TargetDir)config/minimal.json" "$(SolutionDir)out/config" - if [ -n "$MONO_FACADES" ]; then - mono "$(SolutionDir)tools/ILRepack/ILRepack.exe" "/lib:$MONO_FACADES" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out/ASF-Service.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll" + if [ -n "$MONO_API_PATH" ]; then + mono "$(SolutionDir)tools/ILRepack/ILRepack.exe" "/lib:${MONO_API_PATH}" "/lib:${MONO_API_PATH}/Facades" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out/ASF-Service.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll" else mono "$(SolutionDir)tools/ILRepack/ILRepack.exe" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out/ASF-Service.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll" fi diff --git a/ConfigGenerator/ConfigGenerator.csproj b/ConfigGenerator/ConfigGenerator.csproj index 4b2506599..49fd309ec 100644 --- a/ConfigGenerator/ConfigGenerator.csproj +++ b/ConfigGenerator/ConfigGenerator.csproj @@ -187,8 +187,8 @@ . "$(SolutionDir)mono_envsetup.sh" fi - if [ -n "$MONO_FACADES" ]; then - mono "$(SolutionDir)tools/ILRepack/ILRepack.exe" "/lib:$MONO_FACADES" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out/ASF-ConfigGenerator.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll" + if [ -n "$MONO_API_PATH" ]; then + mono "$(SolutionDir)tools/ILRepack/ILRepack.exe" "/lib:${MONO_API_PATH}" "/lib:${MONO_API_PATH}/Facades" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out/ASF-ConfigGenerator.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll" else mono "$(SolutionDir)tools/ILRepack/ILRepack.exe" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out/ASF-ConfigGenerator.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll" fi diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index 3933a8456..97a3ab48d 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -385,8 +385,8 @@ . "$(SolutionDir)mono_envsetup.sh" fi - if [ -n "$MONO_FACADES" ]; then - mono "$(SolutionDir)tools/ILRepack/ILRepack.exe" "/lib:$MONO_FACADES" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out/ASF-GUI.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll" + if [ -n "$MONO_API_PATH" ]; then + mono "$(SolutionDir)tools/ILRepack/ILRepack.exe" "/lib:${MONO_API_PATH}" "/lib:${MONO_API_PATH}/Facades" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out/ASF-GUI.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll" else mono "$(SolutionDir)tools/ILRepack/ILRepack.exe" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out/ASF-GUI.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll" fi diff --git a/mono_envsetup.sh b/mono_envsetup.sh index 465943f99..87cbade42 100644 --- a/mono_envsetup.sh +++ b/mono_envsetup.sh @@ -72,7 +72,7 @@ VERSION_LESS_EQUAL_THAN() { # Main echo "INFO: Mono environment setup executed!" -CURRENT_MONO_VERSION="$(mono -V | head -n 1 | cut -d ' ' -f 5 | cut -d '.' -f '1-3')" # We take only first three version numbers, this is needed for facades path in OS X +CURRENT_MONO_VERSION="$(mono -V | head -n 1 | cut -d ' ' -f 5 | cut -d '.' -f '1-3')" # We take only first three version numbers, this is needed for API path in OS X echo "INFO: Mono version: $CURRENT_MONO_VERSION | Required: ${MINIMUM_MONO_VERSION}+" @@ -87,22 +87,22 @@ MONO_DEBUG_ADD_IF_AVAILABLE "no-gdb-backtrace" MONO_ENV_OPTIONS_ADD "-O=all" MONO_ENV_OPTIONS_ADD "--server" -if [ -n "$MONO_FACADES" ]; then - echo "INFO: Mono facades path was already set to: $MONO_FACADES" +if [ -n "$MONO_API_PATH" ]; then + echo "INFO: Mono API path was already set to: $MONO_API_PATH" else for MONO_LOCATION in "/opt/mono" "/usr" "/Library/Frameworks/Mono.framework/Versions/${CURRENT_MONO_VERSION}"; do - for API in "${MINIMUM_NET_FRAMEWORK}-api" "4.5"; do # 4.5 is fallback path that existed before Mono decided to split Facades on per-API basis - still available - if [ -d "${MONO_LOCATION}/lib/mono/${API}/Facades" ]; then - export MONO_FACADES="${MONO_LOCATION}/lib/mono/${API}/Facades" + for API in "${MINIMUM_NET_FRAMEWORK}-api" "4.5"; do # 4.5 is fallback path that existed before Mono decided to split libraries on per-API basis - still available + if [ -d "${MONO_LOCATION}/lib/mono/${API}" ]; then + export MONO_API_PATH="${MONO_LOCATION}/lib/mono/${API}" break 2 fi done done - if [ -n "$MONO_FACADES" ]; then - echo "INFO: Mono facades path resolved to: $MONO_FACADES" + if [ -n "$MONO_API_PATH" ]; then + echo "INFO: Mono API path resolved to: $MONO_API_PATH" else - echo "WARN: Could not find Mono facades!" + echo "WARN: Could not find Mono API path!" fi fi