Skip to content

Commit

Permalink
Include VC++ Redist Merge Module in installer
Browse files Browse the repository at this point in the history
  • Loading branch information
akon47 committed Jun 24, 2022
1 parent 541aa5f commit 4585ae4
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 45 deletions.
12 changes: 6 additions & 6 deletions MediaEncoder/MediaEncoder.rc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// �ѱ���(���ѹα�) resources
// Korean (Korea) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
Expand Down Expand Up @@ -51,8 +51,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,4,0
PRODUCTVERSION 1,0,4,0
FILEVERSION 1,0,5,0
PRODUCTVERSION 1,0,5,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -67,12 +67,12 @@ BEGIN
BEGIN
BLOCK "041204b0"
BEGIN
VALUE "FileVersion", "1.0.4.0"
VALUE "FileVersion", "1.0.5.0"
VALUE "InternalName", "MediaEnc.dll"
VALUE "LegalCopyright", "Copyright (C) 2021"
VALUE "OriginalFilename", "MediaEnc.dll"
VALUE "ProductName", "MediaEncoder"
VALUE "ProductVersion", "1.0.4.0"
VALUE "ProductVersion", "1.0.5.0"
END
END
BLOCK "VarFileInfo"
Expand All @@ -81,7 +81,7 @@ BEGIN
END
END

#endif // �ѱ���(���ѹα�) resources
#endif // Korean (Korea) resources
/////////////////////////////////////////////////////////////////////////////


Expand Down
27 changes: 1 addition & 26 deletions ScreenRecorder/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,11 @@ protected override void OnStartup(StartupEventArgs e)
Mutex = new Mutex(true, AppConstants.AppName, out bool isNew);
if (isNew)
{
if (!IsMicrosoftVisualCPlusPlus2019OrNewerAvailable())
{
MessageBox.Show("Please Install \"Microsoft Visual C++ 2019 or newer Redistributable (x64)\"");
Environment.Exit(-2);
}

VideoClockEvent.Start();
AppManager.Instance.Initialize();
AppConfig.Instance.WhenChanged(() =>
{
VideoClockEvent.Framerate = AppConfig.Instance.AdvancedSettings ?
VideoClockEvent.Framerate = AppConfig.Instance.AdvancedSettings ?
AppConfig.Instance.SelectedRecordFrameRate : 60;
},
nameof(AppConfig.SelectedRecordFrameRate),
Expand Down Expand Up @@ -62,24 +56,5 @@ protected override void OnExit(ExitEventArgs e)

base.OnExit(e);
}

private bool IsMicrosoftVisualCPlusPlus2019OrNewerAvailable()
{
using (var depRegistryKey = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(@"Installer\Dependencies", false))
{
foreach (string subKeyName in depRegistryKey.GetSubKeyNames())
{
using (var registryKey = depRegistryKey.OpenSubKey(subKeyName))
{
if (registryKey.GetValue("DisplayName") is string displayName && Regex.IsMatch(displayName, "[cC]\\+\\+.*(?:2019|2022).*[xX]64"))
{
return true;
}
}
}
}

return false;
}
}
}
4 changes: 2 additions & 2 deletions ScreenRecorder/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.3.0")]
[assembly: AssemblyFileVersion("1.1.3.0")]
[assembly: AssemblyVersion("1.1.4.0")]
[assembly: AssemblyFileVersion("1.1.4.0")]
[assembly: System.Windows.Media.DisableDpiAwareness]
122 changes: 111 additions & 11 deletions Setup/Setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
}
"Entry"
{
"MsmKey" = "8:_176BC3484F384D259F573393B25FAEC1"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_1C7CBE96084EDA5D5B405F1164ACCE14"
"OwnerKey" = "8:_3C6494BFE21840E7A935CA4596E91F15"
"MsmSig" = "8:_UNDEFINED"
Expand All @@ -69,6 +75,12 @@
}
"Entry"
{
"MsmKey" = "8:_1F9B57CAFCBE4082BF61416CC3EEDA15"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_2521A76A87F28B23B43ECE2FA8DBE29B"
"OwnerKey" = "8:_3C6494BFE21840E7A935CA4596E91F15"
"MsmSig" = "8:_UNDEFINED"
Expand Down Expand Up @@ -171,6 +183,18 @@
}
"Entry"
{
"MsmKey" = "8:_4F6675E5329849B2A64FBB9C17439C03"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_5A655FBA845C420E91B417E14EE33834"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_5EEC94338A9840C583F6582F947A0587"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
Expand Down Expand Up @@ -273,6 +297,12 @@
}
"Entry"
{
"MsmKey" = "8:_982F9BEDE1A4481F9913ED1F132074CB"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_98470FDB4AC2FFA6CFB2592FF6AD17D4"
"OwnerKey" = "8:_3C6494BFE21840E7A935CA4596E91F15"
"MsmSig" = "8:_UNDEFINED"
Expand Down Expand Up @@ -376,6 +406,12 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_1CA83616006F6FF89986A6A496A90EAC"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_D6F63F37F4661857FC2726DBDCC6282C"
"MsmSig" = "8:_UNDEFINED"
}
Expand Down Expand Up @@ -430,12 +466,6 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_1CA83616006F6FF89986A6A496A90EAC"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_1C7CBE96084EDA5D5B405F1164ACCE14"
"MsmSig" = "8:_UNDEFINED"
}
Expand Down Expand Up @@ -483,7 +513,7 @@
"DisplayName" = "8:Release"
"IsDebugOnly" = "11:FALSE"
"IsReleaseOnly" = "11:TRUE"
"OutputFilename" = "8:..\\bin\\x64\\Release_Setup\\ScreenRecorder_Setup_1.1.3.msi"
"OutputFilename" = "8:..\\bin\\x64\\Release_Setup\\ScreenRecorder_Setup_1.1.4.msi"
"PackageFilesAs" = "3:2"
"PackageFileSize" = "3:-2147483648"
"CabType" = "3:1"
Expand Down Expand Up @@ -1527,23 +1557,23 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:ScreenRecorder"
"ProductCode" = "8:{98734EC4-1E4E-4548-B435-BBCFCB6F560D}"
"PackageCode" = "8:{89CD6820-8448-4E83-BFFF-9EBA08A505C5}"
"ProductCode" = "8:{54929989-659D-4E84-B2A2-4FCE0285888F}"
"PackageCode" = "8:{1D3594D8-7D3F-4FAA-8D44-FA8B27192640}"
"UpgradeCode" = "8:{75B87256-B559-4CF6-ABE6-AEF9F61BD36D}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.1.3"
"ProductVersion" = "8:1.1.4"
"Manufacturer" = "8:kimhwan"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:https://github.com/akon47/ScreenRecorder"
"Title" = "8:ScreenRecorder Setup"
"Subject" = "8:ScreenRecorder"
"ARPCONTACT" = "8:kimhwan"
"Keywords" = "8:"
"ARPCOMMENTS" = "8:"
"ARPCOMMENTS" = "8:A simple recording program with the ability to record screens and audio on your computer."
"ARPURLINFOABOUT" = "8:https://github.com/akon47/ScreenRecorder"
"ARPPRODUCTICON" = "8:_3C6494BFE21840E7A935CA4596E91F15"
"ARPIconIndex" = "3:32512"
Expand Down Expand Up @@ -2164,6 +2194,76 @@
}
"MergeModule"
{
"{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_176BC3484F384D259F573393B25FAEC1"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Redist\\MSVC\\v142\\MergeModules\\Microsoft_VC142_CXXAMP_x64.msm"
"Properties"
{
}
"LanguageId" = "3:0"
"Exclude" = "11:FALSE"
"Folder" = "8:"
"Feature" = "8:"
"IsolateTo" = "8:"
}
"{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_1F9B57CAFCBE4082BF61416CC3EEDA15"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Redist\\MSVC\\v142\\MergeModules\\Microsoft_VC142_OpenMP_x64.msm"
"Properties"
{
}
"LanguageId" = "3:0"
"Exclude" = "11:FALSE"
"Folder" = "8:"
"Feature" = "8:"
"IsolateTo" = "8:"
}
"{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_4F6675E5329849B2A64FBB9C17439C03"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Redist\\MSVC\\v142\\MergeModules\\Microsoft_VC142_MFC_x64.msm"
"Properties"
{
}
"LanguageId" = "3:0"
"Exclude" = "11:FALSE"
"Folder" = "8:"
"Feature" = "8:"
"IsolateTo" = "8:"
}
"{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_5A655FBA845C420E91B417E14EE33834"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Redist\\MSVC\\v142\\MergeModules\\Microsoft_VC142_MFCLOC_x64.msm"
"Properties"
{
}
"LanguageId" = "3:0"
"Exclude" = "11:FALSE"
"Folder" = "8:"
"Feature" = "8:"
"IsolateTo" = "8:"
}
"{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_982F9BEDE1A4481F9913ED1F132074CB"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Redist\\MSVC\\v142\\MergeModules\\Microsoft_VC142_CRT_x64.msm"
"Properties"
{
}
"LanguageId" = "3:0"
"Exclude" = "11:FALSE"
"Folder" = "8:"
"Feature" = "8:"
"IsolateTo" = "8:"
}
}
"ProjectOutput"
{
Expand Down

0 comments on commit 4585ae4

Please sign in to comment.