Skip to content

Commit 1e7348c

Browse files
committed
ActiveX Imports: set current directory earlier
1 parent 25ff8f0 commit 1e7348c

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

FlashpointSecurePlayer/FlashpointSecurePlayerGUI.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,15 @@ private async Task ImportActiveX(ErrorDelegate errorDelegate) {
314314
ProgressManager.CurrentGoal.Start(6);
315315

316316
try {
317+
// fix for loading dependencies
318+
try {
319+
Directory.SetCurrentDirectory(Path.GetFullPath(TemplateName));
320+
} catch (Exception ex) {
321+
LogExceptionToLauncher(ex);
322+
errorDelegate(String.Format(Properties.Resources.GameIsMissingFiles, TemplateName));
323+
throw new ActiveXImportFailedException("The ActiveX Import failed because setting the Current Directory failed.");
324+
}
325+
317326
ActiveXControl activeXControl = null;
318327

319328
try {

FlashpointSecurePlayer/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
// You can specify all the values or you can default the Build and Revision Numbers
3434
// by using the '*' as shown below:
3535
// [assembly: AssemblyVersion("1.0.*")]
36-
[assembly: AssemblyVersion("2.1.3.0")]
37-
[assembly: AssemblyFileVersion("2.1.3.0")]
36+
[assembly: AssemblyVersion("2.1.4.0")]
37+
[assembly: AssemblyFileVersion("2.1.4.0")]
3838
[assembly: NeutralResourcesLanguage("en")]
3939

FlashpointSecurePlayer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Flashpoint Secure Player 2.1.3
1+
# Flashpoint Secure Player 2.1.4
22
This player attempts to solve common compatibility or portability issues posed by browser plugins on Windows for the purpose of playback in BlueMaxima's Flashpoint.
33

44
It is compatible with Windows 7, Windows 8, Windows 8.1 and Windows 10, and requires .NET Framework 4.5. If you are on Windows 8.1 or Windows 10, or if you are on Windows 7/8 and have updates enabled, you already have .NET Framework 4.5. Otherwise, you may [download .NET Framework 4.5.](http://www.microsoft.com/en-us/download/details.aspx?id=30653)

FlashpointSecurePlayer/RegistryStates.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -756,15 +756,6 @@ public async Task StartImportAsync(string templateName, BINARY_TYPE binaryType)
756756
throw new ArgumentException("The path to \"" + TemplateName + "\" is not supported.");
757757
}
758758

759-
// fix for loading dependencies
760-
try {
761-
Directory.SetCurrentDirectory(fullPath);
762-
} catch (SecurityException) {
763-
throw new TaskRequiresElevationException("Setting the Current Directory requires elevation.");
764-
} catch {
765-
// Fail silently.
766-
}
767-
768759
// check permission to run
769760
if (!TraceEventSession.IsElevated().GetValueOrDefault()) {
770761
throw new TaskRequiresElevationException("The Trace Event Session requires elevation.");

0 commit comments

Comments
 (0)