Download recorder devices from GitHub repo
This commit is contained in:
parent
84df75bd7d
commit
5fd2d3fefa
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -311,7 +311,8 @@ namespace ShareX.ScreenCaptureLib
|
||||
|
||||
private async void btnInstallHelperDevices_Click(object sender, EventArgs e)
|
||||
{
|
||||
string filePath = FileHelpers.GetAbsolutePath("Recorder-devices-setup.exe");
|
||||
string version = "0.12.10";
|
||||
string filePath = FileHelpers.GetAbsolutePath($"recorder-devices-{version}-setup.exe");
|
||||
|
||||
if (!string.IsNullOrEmpty(filePath) && File.Exists(filePath))
|
||||
{
|
||||
|
@ -1,52 +0,0 @@
|
||||
#define MyAppName "Recorder Devices for ShareX"
|
||||
#define MyAppRootDirectory "..\.."
|
||||
#define MyAppOutputDirectory MyAppRootDirectory + "\Output"
|
||||
#define MyAppLibDirectory MyAppRootDirectory + "\Lib"
|
||||
#define MyAppVersion "0.12.10"
|
||||
|
||||
[Setup]
|
||||
AppName={#MyAppName}
|
||||
AppVerName={#MyAppName} {#MyAppVersion}
|
||||
AppVersion={#MyAppVersion}
|
||||
ArchitecturesAllowed=x64os arm64 x86
|
||||
ArchitecturesInstallIn64BitMode=x64os
|
||||
DefaultDirName={commonpf}\{#MyAppName}
|
||||
DefaultGroupName={#MyAppName}
|
||||
OutputBaseFilename=Recorder-devices-setup
|
||||
OutputDir={#MyAppOutputDirectory}
|
||||
SolidCompression=yes
|
||||
|
||||
[Files]
|
||||
Source: "{#MyAppLibDirectory}\screen-capture-recorder.dll"; DestDir: {app}; Flags: regserver 32bit; Check: not IsWin64
|
||||
Source: "{#MyAppLibDirectory}\screen-capture-recorder-x64.dll"; DestDir: {app}; Flags: regserver 64bit; Check: IsWin64
|
||||
Source: "{#MyAppLibDirectory}\virtual-audio-capturer.dll"; DestDir: {app}; Flags: regserver 32bit; Check: not IsWin64
|
||||
Source: "{#MyAppLibDirectory}\virtual-audio-capturer-x64.dll"; DestDir: {app}; Flags: regserver 64bit; Check: IsWin64
|
||||
|
||||
#include "CodeDependencies.iss"
|
||||
|
||||
[Code]
|
||||
procedure InitializeWizard;
|
||||
begin
|
||||
Dependency_InitializeWizard;
|
||||
end;
|
||||
|
||||
function PrepareToInstall(var NeedsRestart: Boolean): String;
|
||||
begin
|
||||
Result := Dependency_PrepareToInstall(NeedsRestart);
|
||||
end;
|
||||
|
||||
function NeedRestart: Boolean;
|
||||
begin
|
||||
Result := Dependency_NeedRestart;
|
||||
end;
|
||||
|
||||
function UpdateReadyMemo(const Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
|
||||
begin
|
||||
Result := Dependency_UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo);
|
||||
end;
|
||||
|
||||
function InitializeSetup(): Boolean;
|
||||
begin
|
||||
Dependency_AddVC2010;
|
||||
Result := true;
|
||||
end;
|
@ -48,9 +48,7 @@ Source: "{#MyAppFilePath}"; DestDir: {app}; Flags: ignoreversion
|
||||
Source: "{#MyAppFilePath}.config"; DestDir: {app}; Flags: ignoreversion
|
||||
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: "{#MyAppOutputDirectory}\exiftool.exe"; DestDir: {app}; Flags: ignoreversion
|
||||
Source: "{#MyAppOutputDirectory}\*.exe"; DestDir: {app}; Flags: ignoreversion
|
||||
Source: "{#MyAppOutputDirectory}\exiftool_files\*"; DestDir: {app}\exiftool_files; Flags: ignoreversion recursesubdirs
|
||||
Source: "{#MyAppReleaseDirectory}\ShareX_File_Icon.ico"; DestDir: {app}; Flags: ignoreversion
|
||||
Source: "{#MyAppReleaseDirectory}\ShareX_NativeMessagingHost.exe"; DestDir: {app}; Flags: ignoreversion
|
||||
|
@ -82,7 +82,6 @@ namespace ShareX.Setup
|
||||
private static string MicrosoftStorePackageFilesDir => Path.Combine(SetupDir, "MicrosoftStore");
|
||||
|
||||
private static string SetupPath => Path.Combine(OutputDir, $"ShareX-{AppVersion}-setup.exe");
|
||||
private static string RecorderDevicesSetupPath => Path.Combine(OutputDir, "Recorder-devices-setup.exe");
|
||||
private static string PortableZipPath => Path.Combine(OutputDir, $"ShareX-{AppVersion}-portable.zip");
|
||||
private static string DebugZipPath => Path.Combine(OutputDir, $"ShareX-{AppVersion}-debug.zip");
|
||||
private static string SteamUpdatesDir => Path.Combine(SteamOutputDir, "Updates");
|
||||
@ -90,12 +89,15 @@ namespace ShareX.Setup
|
||||
private static string MicrosoftStoreAppxPath => Path.Combine(OutputDir, $"ShareX-{AppVersion}.appx");
|
||||
private static string MicrosoftStoreDebugAppxPath => Path.Combine(OutputDir, $"ShareX-{AppVersion}-debug.appx");
|
||||
private static string FFmpegPath => Path.Combine(OutputDir, "ffmpeg.exe");
|
||||
private static string RecorderDevicesSetupPath => Path.Combine(OutputDir, $"recorder-devices-{RecorderDevicesVersion}-setup.exe");
|
||||
private static string ExifToolPath => Path.Combine(OutputDir, "exiftool.exe");
|
||||
private static string MakeAppxPath => Path.Combine(WindowsKitsDir, "x64", "makeappx.exe");
|
||||
|
||||
private const string InnoSetupCompilerPath = @"C:\Program Files (x86)\Inno Setup 6\ISCC.exe";
|
||||
private const string FFmpegVersion = "7.1";
|
||||
private static string FFmpegDownloadURL = $"https://github.com/ShareX/FFmpeg/releases/download/v{FFmpegVersion}/ffmpeg-{FFmpegVersion}-win64.zip";
|
||||
private const string RecorderDevicesVersion = "0.12.10";
|
||||
private static string RecorderDevicesDownloadURL = $"https://github.com/ShareX/RecorderDevices/releases/download/v{RecorderDevicesVersion}/recorder-devices-{RecorderDevicesVersion}-setup.exe";
|
||||
private const string ExifToolVersion = "13.29";
|
||||
private static string ExifToolDownloadURL = $"https://github.com/ShareX/ExifTool/releases/download/v{ExifToolVersion}/exiftool-{ExifToolVersion}-win64.zip";
|
||||
|
||||
@ -119,6 +121,7 @@ namespace ShareX.Setup
|
||||
if (Job.HasFlag(SetupJobs.DownloadTools))
|
||||
{
|
||||
DownloadFFmpeg();
|
||||
DownloadRecorderDevices();
|
||||
DownloadExifTool();
|
||||
}
|
||||
|
||||
@ -275,7 +278,6 @@ namespace ShareX.Setup
|
||||
|
||||
private static void CompileSetup()
|
||||
{
|
||||
CompileISSFile("Recorder-devices-setup.iss");
|
||||
CompileISSFile("ShareX-setup.iss");
|
||||
CreateChecksumFile(SetupPath);
|
||||
}
|
||||
@ -375,13 +377,11 @@ namespace ShareX.Setup
|
||||
|
||||
if (job != SetupJobs.CreateMicrosoftStoreFolder && job != SetupJobs.CreateMicrosoftStoreDebugFolder)
|
||||
{
|
||||
if (!File.Exists(RecorderDevicesSetupPath))
|
||||
if (File.Exists(RecorderDevicesSetupPath))
|
||||
{
|
||||
CompileISSFile("Recorder-devices-setup.iss");
|
||||
FileHelpers.CopyFiles(RecorderDevicesSetupPath, destination);
|
||||
}
|
||||
|
||||
FileHelpers.CopyFiles(RecorderDevicesSetupPath, destination);
|
||||
|
||||
FileHelpers.CopyFiles(Path.Combine(source, "ShareX_File_Icon.ico"), destination);
|
||||
FileHelpers.CopyFiles(Path.Combine(source, "ShareX_NativeMessagingHost.exe"), destination);
|
||||
FileHelpers.CopyFiles(Path.Combine(source, "host-manifest-chrome.json"), destination);
|
||||
@ -446,6 +446,18 @@ namespace ShareX.Setup
|
||||
}
|
||||
}
|
||||
|
||||
private static void DownloadRecorderDevices()
|
||||
{
|
||||
if (!File.Exists(RecorderDevicesSetupPath))
|
||||
{
|
||||
string fileName = Path.GetFileName(RecorderDevicesDownloadURL);
|
||||
string filePath = Path.Combine(OutputDir, fileName);
|
||||
|
||||
Console.WriteLine("Downloading: " + RecorderDevicesDownloadURL);
|
||||
WebHelpers.DownloadFileAsync(RecorderDevicesDownloadURL, filePath).GetAwaiter().GetResult();
|
||||
}
|
||||
}
|
||||
|
||||
private static void DownloadExifTool()
|
||||
{
|
||||
if (!File.Exists(ExifToolPath))
|
||||
|
Loading…
x
Reference in New Issue
Block a user