Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/splashkit/skm into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
macite committed Sep 29, 2022
2 parents 04ff8e3 + 320988d commit d163ca3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
7 changes: 5 additions & 2 deletions dotnet/files/Program.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
using System;
using SplashKitSDK;

public class Program
namespace SkmProject
{
public static void Main()
public class Program
{
public static void Main()
{

}
}
}
22 changes: 18 additions & 4 deletions fix/dotnet/skm_fix_dotnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ APP_PATH=`cd "$APP_PATH"; pwd`

PRJ_NAME="${PWD##*/}.csproj"
SKM_PATH=`cd "$APP_PATH/../.."; pwd`
PROGRAM_CS_NAME='Program.cs'
MAC_RUN_CONFIG=" <PropertyGroup Condition=\" '\$(RunConfiguration)' == 'Default' \">\n\
<StartAction>Project</StartAction>\n\
<ExternalConsole>true</ExternalConsole>\n\
<EnvironmentVariables>\n\
<Variable name=\"DYLD_LIBRARY_PATH\" value=\"$DYLIB_PATH\" />\n\
</EnvironmentVariables>\n </PropertyGroup>\n"

source "${SKM_PATH}/tools/set_sk_env_vars.sh"

Expand All @@ -17,11 +24,18 @@ else
fi

if [ $SK_OS = "macos" ]; then
sed -i '' "s|<TargetFramework>.*</TargetFramework>|<TargetFramework>netcoreapp5.0</TargetFramework>|g" "$PRJ_NAME"
sed -i '' "s|<ImplicitUsings>.*</ImplicitUsings>|<ImplicitUsings>disable</ImplicitUsings>|g" "$PRJ_NAME"
sed -i '' "s|<TargetFramework>.*</TargetFramework>|<TargetFramework>net6.0</TargetFramework>|g" "$PRJ_NAME"
if ! grep -q RunConfiguration "$PRJ_NAME"; then
sed -i '' "s|</Project>|$MAC_RUN_CONFIG\n</Project>|g" "$PRJ_NAME"
fi
else
sed -i "s|<TargetFramework>.*</TargetFramework>|<TargetFramework>netcoreapp5.0</TargetFramework>|g" "$PRJ_NAME"
sed -i "s|<ImplicitUsings>.*</ImplicitUsings>|<ImplicitUsings>disable</ImplicitUsings>|g" "$PRJ_NAME"
sed -i "s|<TargetFramework>.*</TargetFramework>|<TargetFramework>net6.0</TargetFramework>|g" "$PRJ_NAME"
fi

if [ $SK_OS = "macos" ]; then
sed -i '' "s|namespace SkmProject|namespace ${PWD##*/}|g" "$PROGRAM_CS_NAME"
else
sed -i "s|namespace SkmProject|namespace ${PWD##*/}|g" "$PROGRAM_CS_NAME"
fi

dotnet restore

0 comments on commit d163ca3

Please sign in to comment.