From: <sag...@us...> - 2010-01-25 22:42:29
|
Revision: 479 http://modplug.svn.sourceforge.net/modplug/?rev=479&view=rev Author: saga-games Date: 2010-01-25 22:42:20 +0000 (Mon, 25 Jan 2010) Log Message: ----------- [Imp] Installer: Small improvment to VST scanning (don't write "NumPlugins" key if no plugins have been found). [Mod] Changed history (.txt) Modified Paths: -------------- trunk/OpenMPT/installer/vst_scan.iss trunk/OpenMPT/packageTemplate/History.txt Modified: trunk/OpenMPT/installer/vst_scan.iss =================================================================== --- trunk/OpenMPT/installer/vst_scan.iss 2010-01-25 19:38:07 UTC (rev 478) +++ trunk/OpenMPT/installer/vst_scan.iss 2010-01-25 22:42:20 UTC (rev 479) @@ -13,6 +13,7 @@ bExitSetup: Boolean; INIFile: String; VSTPluginNumber: Integer; + OldVSTPluginNumber: Integer; procedure ProcessDirectory (RootDir: String; Progress: Boolean); var @@ -75,37 +76,41 @@ if ((CurStep = ssInstall) And (IsTaskSelected('vst_scan'))) then begin - // Get the right INI path. - if(IsTaskSelected('portable')) then - begin - INIFile := ExpandConstant('{app}\mptrack.ini'); - end else - begin - INIFile := ExpandConstant('{userappdata}\OpenMPT\mptrack.ini'); + // Get the right INI path. + if(IsTaskSelected('portable')) then + begin + INIFile := ExpandConstant('{app}\mptrack.ini'); + end else + begin + INIFile := ExpandConstant('{userappdata}\OpenMPT\mptrack.ini'); + end; + VSTPluginNumber := GetIniInt('VST Plugins', 'NumPlugins', 0, 0, 0, INIFile); + OldVSTPluginNumber := VSTPluginNumber; + + // The folder to scan. + Dir := ExpandConstant('{pf}\Steinberg\VstPlugins'); + RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\VST', 'VSTPluginsPath', Dir); // won't touch Dir if registry path does not exist + // The progress page. + ProgressPage := CreateOutputProgressPage (CustomMessage ('ProgressTitle'), + CustomMessage ('ProgressCaption')); + ProgressPage.SetText (CustomMessage ('ProgressText'), Dir); + ProgressPage.SetProgress(0, 0); + ProgressPage.Show; + // Make the Cancel button visible during the operation. + ;WizardForm.CancelButton.Visible := TRUE; + // Scan the folder. + ProcessDirectory (Dir, TRUE); + // Hide the progress page. + try + finally + ProgressPage.Hide; + end; + + // Update INI key + + if(VSTPluginNumber <> OldVSTPluginNumber) then + begin + SetIniInt('VST Plugins', 'NumPlugins', VSTPluginNumber, INIFile); + end; end; - VSTPluginNumber := GetIniInt('VST Plugins', 'NumPlugins', 0, 0, 0, INIFile); - - // The folder to scan. - Dir := ExpandConstant('{pf}\Steinberg\VstPlugins'); - RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\VST', 'VSTPluginsPath', Dir); // won't touch Dir if registry path does not exist - // The progress page. - ProgressPage := CreateOutputProgressPage (CustomMessage ('ProgressTitle'), - CustomMessage ('ProgressCaption')); - ProgressPage.SetText (CustomMessage ('ProgressText'), Dir); - ProgressPage.SetProgress(0, 0); - ProgressPage.Show; - // Make the Cancel button visible during the operation. - ;WizardForm.CancelButton.Visible := TRUE; - // Scan the folder. - ProcessDirectory (Dir, TRUE); - // Hide the progress page. - try - finally - ProgressPage.Hide; - end; - - // Update INI key - SetIniInt('VST Plugins', 'NumPlugins', VSTPluginNumber, INIFile); - end; end; - Modified: trunk/OpenMPT/packageTemplate/History.txt =================================================================== --- trunk/OpenMPT/packageTemplate/History.txt 2010-01-25 19:38:07 UTC (rev 478) +++ trunk/OpenMPT/packageTemplate/History.txt 2010-01-25 22:42:20 UTC (rev 479) @@ -44,7 +44,6 @@ . <Jojo> PC notes are now deleted properly (last column). . <Jojo> Copying only the param column of PC notes overwrote the value column when pasting them. . <Jojo> Entering Note Fade notes didn't work the "old style" way. - . <Jojo> PC note handling was missing in OnClearSelection, so it was possible to delete the effect column only partly. Pattern tab::GUI + <Jojo> Channel rename dialog in channel header context menu. @@ -144,7 +143,7 @@ S3M . <Jojo> ST3 compatibility: Only allow waveforms 0 to 3 for S3x / S4x / S5x. - . <Jojo> The S3M format actually knows muted channels. This was not taking into account before. + . <Jojo> The S3M format actually knows muted channels. This was not taken into account before. XM::Loading ^ <Jojo> Allow to load modules with an empty order list (as they are, in fact, valid XM files). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |