Auto copy ShareX_NativeMessagingHost.exe file

This commit is contained in:
Jaex 2023-10-23 12:44:49 +03:00
parent 3f46ff1b98
commit 92ffd12734
4 changed files with 8 additions and 10 deletions

View file

@ -89,6 +89,9 @@
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy /y "$(TargetPath)" "$(SolutionDir)ShareX\$(OutDir)"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View file

@ -48,7 +48,7 @@ Source: "{#MyAppReleaseDirectory}\*.dll"; DestDir: {app}; Flags: ignoreversion
Source: "{#MyAppRootDirectory}\Licenses\*.txt"; DestDir: {app}\Licenses; Flags: ignoreversion
Source: "{#MyAppOutputDirectory}\Recorder-devices-setup.exe"; DestDir: {app}; Flags: ignoreversion
Source: "{#MyAppOutputDirectory}\ffmpeg.exe"; DestDir: {app}; Flags: ignoreversion
Source: "{#MyAppRootDirectory}\ShareX.NativeMessagingHost\bin\Release\ShareX_NativeMessagingHost.exe"; DestDir: {app}; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\ShareX_NativeMessagingHost.exe"; DestDir: {app}; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\de\*.resources.dll"; DestDir: {app}\Languages\de; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\es\*.resources.dll"; DestDir: {app}\Languages\es; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\es-MX\*.resources.dll"; DestDir: {app}\Languages\es-MX; Flags: ignoreversion

View file

@ -67,7 +67,6 @@ private enum SetupJobs
private static string SolutionPath => Path.Combine(ParentDir, "ShareX.sln");
private static string BinDir => Path.Combine(ParentDir, "ShareX", "bin", Configuration);
private static string NativeMessagingHostDir => Path.Combine(ParentDir, "ShareX.NativeMessagingHost", "bin", Configuration);
private static string SteamLauncherDir => Path.Combine(ParentDir, "ShareX.Steam", "bin", Configuration);
private static string ExecutablePath => Path.Combine(BinDir, "ShareX.exe");
@ -378,7 +377,7 @@ private static void CreateFolder(string source, string destination, SetupJobs jo
FileHelpers.CopyFiles(RecorderDevicesSetupPath, destination);
FileHelpers.CopyFiles(Path.Combine(NativeMessagingHostDir, "ShareX_NativeMessagingHost.exe"), destination);
FileHelpers.CopyFiles(Path.Combine(source, "ShareX_NativeMessagingHost.exe"), destination);
}
foreach (string directory in Directory.GetDirectories(source))

View file

@ -1286,13 +1286,9 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
cd $(ProjectDir)APIKeys\
if not exist APIKeysLocal.cs (
type nul &gt; APIKeysLocal.cs
)
</PreBuildEvent>
<PreBuildEvent>if not exist "$(ProjectDir)APIKeys\APIKeysLocal.cs" (
type nul &gt; "$(ProjectDir)APIKeys\APIKeysLocal.cs"
)</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.