Skip to content

Commit

Permalink
rename output target
Browse files Browse the repository at this point in the history
  • Loading branch information
yibei333 committed Sep 27, 2024
1 parent 6948ed6 commit e16a0e9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion assets/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.2
1.0.3
5 changes: 2 additions & 3 deletions src/SingleExe.Tool/BuildCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void ReplaceProjectInformation(string tempFolder)

var csproj = tempFolder.CombinePath("SingleExe.csproj");
var csprojText = File.ReadAllText(csproj);
csprojText = csprojText.Replace("<AssemblyName>myapp</AssemblyName>", $"<AssemblyName>{EntrypointPath.GetFileName(false)}</AssemblyName>");
csprojText = csprojText.Replace("<AssemblyName>myapp</AssemblyName>", $"<AssemblyName>{Name}</AssemblyName>");
File.WriteAllText(csproj, csprojText);
}

Expand Down Expand Up @@ -195,8 +195,7 @@ static void BuildProject(IConsole console, string tempFolder)

void CopyFileToTarget(IConsole console, string tempFolder)
{
var fileName = EntrypointPath.GetFileName();
var filePath = tempFolder.CombinePath($"bin\\Release\\net472\\{fileName}");
var filePath = tempFolder.CombinePath($"bin\\Release\\net472\\{Name}.exe");
Output.CreateDirectoryIfNotExist();
var targetPath = Output.CombinePath($"{Name}.exe");
File.Copy(filePath, targetPath, true);
Expand Down
2 changes: 1 addition & 1 deletion src/SingleExe.Tool/SingleExe.Tool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<PackageReadmeFile>Nuget.md</PackageReadmeFile>
<AssemblyName>single-exe</AssemblyName>
Expand Down
3 changes: 2 additions & 1 deletion src/SingleExe/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ async void StartAsync()
var exePath = Path.Combine(tempFolder, App.EntryPoint);
if (!File.Exists(integrityFile) || !File.Exists(exePath))
{
if (Directory.Exists(tempFolder)) Directory.Delete(tempFolder, true);
if (!Directory.Exists(tempFolder)) Directory.CreateDirectory(tempFolder);
var zipFile = Path.Combine(tempFolder, "Source.zip");
if (File.Exists(zipFile)) File.Delete(zipFile);
Expand All @@ -41,7 +42,7 @@ async void StartAsync()
if (!File.Exists(exePath)) throw new Exception($"file not found:{exePath}");
var process = new Process
{
StartInfo = new ProcessStartInfo(exePath,string.Join(" ",Environment.GetCommandLineArgs()))
StartInfo = new ProcessStartInfo(exePath, string.Join(" ", Environment.GetCommandLineArgs()))
{
WorkingDirectory = new FileInfo(exePath).DirectoryName,
}
Expand Down

0 comments on commit e16a0e9

Please sign in to comment.