Update build scripts and publish single file builds

This commit is contained in:
Dankrushen
2021-02-08 19:01:52 -05:00
parent be54a26304
commit 15261f2a1b
5 changed files with 16 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ xcopy "../pkgs/rife-ncnn" "FlowframesApp%ver%/FlowframesData\pkgs\rife-ncnn" /E
echo %ver% >> "FlowframesApp%ver%/FlowframesData/ver.ini"
xcopy /E "Build" "FlowframesApp%ver%"
xcopy "Build\Flowframes.exe" "FlowframesApp%ver%"
cd ..\Build

View File

@@ -30,7 +30,7 @@ xcopy "../pkgs/rife-ncnn" "FlowframesApp%ver%/FlowframesData\pkgs\rife-ncnn" /E
echo %ver% >> "FlowframesApp%ver%/FlowframesData/ver.ini"
xcopy /E "Build" "FlowframesApp%ver%"
xcopy "Build\Flowframes.exe" "FlowframesApp%ver%"
cd ..\Build

View File

@@ -5,8 +5,12 @@
<TargetFramework>net5.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
<PublishTrimmed>true</PublishTrimmed>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>false</SelfContained>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<PublishTrimmed>false</PublishTrimmed>
<PublishReadyToRun>true</PublishReadyToRun>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>

View File

@@ -29,7 +29,8 @@ namespace Flowframes.IO
public static string GetExeDir()
{
return AppDomain.CurrentDomain.BaseDirectory;
var fileName = Process.GetCurrentProcess().MainModule?.FileName;
return fileName != null ? Directory.GetParent(fileName).ToString() : AppDomain.CurrentDomain.BaseDirectory;
}
public static Image GetImage(string path)

6
Code/nuget.config Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>