Skip to content

Commit

Permalink
Merge pull request #779 from g-maxime/ffmpeg
Browse files Browse the repository at this point in the history
Add ffmpeg plugin to uninst targets
  • Loading branch information
JeromeMartinez authored Nov 27, 2023
2 parents 6fdec0b + 82c7eba commit 90a6a7a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
17 changes: 17 additions & 0 deletions Source/GUI/VCL/GUI_Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions Source/GUI/VCL/GUI_Plugin.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions Source/Install/MediaInfo_GUI_Windows.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 90a6a7a

Please sign in to comment.