diff --git a/Source/GUI/VCL/GUI_Main.cpp b/Source/GUI/VCL/GUI_Main.cpp index a320ec500..173c9735f 100644 --- a/Source/GUI/VCL/GUI_Main.cpp +++ b/Source/GUI/VCL/GUI_Main.cpp @@ -255,6 +255,23 @@ void __fastcall TMainF::GUI_Configure() //Toolbar ToolBar->Visible=M_Options_ShowToolBar->Checked; + // FFmpeg + #ifndef MEDIAINFOGUI_PLUGIN_NO + Ztring InstallFolder = Application->ExeName.c_str(); + InstallFolder = InstallFolder.substr(0, InstallFolder.rfind(__T("\\")) + 1); + + if (!File::Exists(InstallFolder + __T("\\Plugin\\FFmpeg\\version.txt"))) //Try to install plugin + { + TPluginF* P = new TPluginF(this, PLUGIN_FFMPEG); + if (P->Configure()) + P->ShowModal(); + delete P; + + if (!File::Exists(InstallFolder + __T("\\Plugin\\FFmpeg\\version.txt"))) + MessageBox(NULL, __T("An error occured, please download and install the plugin manually from the MediaInfo download page."), __T("Error"), MB_OK); + } + #endif + //Translation Translate(); diff --git a/Source/GUI/VCL/GUI_Plugin.dfm b/Source/GUI/VCL/GUI_Plugin.dfm index 4ea6fa802..c4a653b3e 100644 --- a/Source/GUI/VCL/GUI_Plugin.dfm +++ b/Source/GUI/VCL/GUI_Plugin.dfm @@ -4,8 +4,8 @@ object PluginF: TPluginF BorderIcons = [biSystemMenu] BorderStyle = bsDialog Caption = 'Install Plugin' - ClientHeight = 200 - ClientWidth = 350 + ClientHeight = 146 + ClientWidth = 320 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText diff --git a/Source/Install/MediaInfo_GUI_Windows.nsi b/Source/Install/MediaInfo_GUI_Windows.nsi index ca50b920e..435be2993 100644 --- a/Source/Install/MediaInfo_GUI_Windows.nsi +++ b/Source/Install/MediaInfo_GUI_Windows.nsi @@ -192,6 +192,10 @@ Section Uninstall ExecWait '"$INSTDIR\graph_plugin_uninst.exe" /S _?=$INSTDIR' Delete "$INSTDIR\graph_plugin_uninst.exe" + IfFileExists "$INSTDIR\ffmpeg_plugin_uninst.exe" 0 +3 + ExecWait '"$INSTDIR\ffmpeg_plugin_uninst.exe" /S _?=$INSTDIR' + Delete "$INSTDIR\ffmpeg_plugin_uninst.exe" + Delete "$INSTDIR\${PRODUCT_NAME}.url" Delete "$INSTDIR\uninst.exe" Delete "$INSTDIR\MediaInfo.exe"