Cleaned up app build, still requires wrapper

This commit is contained in:
Andy Adshead 2019-06-05 04:00:26 +01:00
parent 6fbe87cccc
commit 63cf33a605
3 changed files with 17 additions and 6 deletions

View file

@ -160,7 +160,7 @@ namespace Ryujinx
/// Configures a <see cref="Switch"/> instance
/// </summary>
/// <param name="device">The instance to configure</param>
public static void Configure(Switch device)
public static void Configure(Switch device, bool wrapped_build)
{
if (Instance == null)
{
@ -178,7 +178,7 @@ namespace Ryujinx
if (Instance.EnableFileLog)
{
Logger.AddTarget(new AsyncLogTargetWrapper(
new FileLogTarget(Path.Combine(Program.ApplicationDirectory, "Ryujinx.log")),
new FileLogTarget(Path.Combine(Program.ApplicationDirectory, (wrapped_build) ? "..\\Ryujinx.log" : "Ryujinx.log")),
1000,
AsyncLogTargetOverflowAction.Block
));

View file

@ -29,8 +29,11 @@ namespace Ryujinx
Switch device = new Switch(renderer, audioOut);
Configuration.Load(Path.Combine(ApplicationDirectory, "Config.jsonc"));
Configuration.Configure(device);
bool wrappedBuild = ((args.Length > 0) && (args.Last() == "-WRAPPED_BUILD"));
Configuration.Load(Path.Combine(ApplicationDirectory, (wrappedBuild) ? "..\\Config.jsonc" : "Config.jsonc"));
Configuration.Configure(device, wrappedBuild);
Profile.Initalize();
@ -53,7 +56,7 @@ namespace Ryujinx
DiscordClient.SetPresence(DiscordPresence);
}
if (args.Length == 1)
if (args.Length >= 1)
{
if (Directory.Exists(args[0]))
{

View file

@ -20,7 +20,15 @@ build_script:
dotnet publish -c $env:config -r osx-x64
7z a ryujinx$env:config_name$env:APPVEYOR_BUILD_VERSION-win_x64.zip $env:APPVEYOR_BUILD_FOLDER\Ryujinx\bin\$env:config\netcoreapp2.1\win-x64\publish\
New-Item -Path "$env:APPVEYOR_BUILD_FOLDER\Ryujinx\bin\$env:config\netcoreapp2.1\win-x64\" -Name "Ryujinx" -ItemType "directory"
Move-Item -Path "$env:APPVEYOR_BUILD_FOLDER\Ryujinx\bin\$env:config\netcoreapp2.1\win-x64\publish\" -Destination "$env:APPVEYOR_BUILD_FOLDER\Ryujinx\bin\$env:config\netcoreapp2.1\win-x64\Ryujinx\bin\"
Move-Item -Path "$env:APPVEYOR_BUILD_FOLDER\Ryujinx\bin\$env:config\netcoreapp2.1\win-x64\Ryujinx\bin\Config.jsonc" -Destination "$env:APPVEYOR_BUILD_FOLDER\Ryujinx\bin\$env:config\netcoreapp2.1\win-x64\Ryujinx\Config.jsonc"
7z a ryujinx$env:config_name$env:APPVEYOR_BUILD_VERSION-win_x64.zip $env:APPVEYOR_BUILD_FOLDER\Ryujinx\bin\$env:config\netcoreapp2.1\win-x64\Ryujinx\
7z a ryujinx$env:config_name$env:APPVEYOR_BUILD_VERSION-linux_x64.tar $env:APPVEYOR_BUILD_FOLDER\Ryujinx\bin\$env:config\netcoreapp2.1\linux-x64\publish\