private void CreateApphostShim(string commandName, FilePath entryPoint) { string appHostSourcePath; if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { appHostSourcePath = Path.Combine(_appHostSourceDirectory, ApphostNameWithoutExtension + ".exe"); } else { appHostSourcePath = Path.Combine(_appHostSourceDirectory, ApphostNameWithoutExtension); } var appHostDestinationFilePath = GetShimPath(commandName).Value; var appBinaryFilePath = PathUtility.GetRelativePath(appHostDestinationFilePath, entryPoint.Value); EmbedAppNameInHost.EmbedAndReturnModifiedAppHostPath( appHostSourceFilePath: appHostSourcePath, appHostDestinationFilePath: appHostDestinationFilePath, appBinaryFilePath: appBinaryFilePath); }
public void CreateApphostShellShim(FilePath entryPoint, FilePath shimPath) { string appHostSourcePath; if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { appHostSourcePath = Path.Combine(_appHostSourceDirectory, ApphostNameWithoutExtension + ".exe"); } else { appHostSourcePath = Path.Combine(_appHostSourceDirectory, ApphostNameWithoutExtension); } var appHostDestinationFilePath = shimPath.Value; var appBinaryFilePath = PathUtility.GetRelativePath(appHostDestinationFilePath, entryPoint.Value); EmbedAppNameInHost.EmbedAndReturnModifiedAppHostPath( appHostSourceFilePath: appHostSourcePath, appHostDestinationFilePath: appHostDestinationFilePath, appBinaryFilePath: appBinaryFilePath); _filePermissionSetter.SetUserExecutionPermission(appHostDestinationFilePath); }