spek

Acoustic spectrum analyser
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

commit c9ccdc647e78f504be180492758d60bc600b7002
parent 5c4d2af7a4a5741443459cd171e499b8c67bf745
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Sat, 10 Jul 2010 18:45:11 +1000

[win] Option to launch Spek when setup exits

Diffstat:
MMakefile.am | 3+++
Mwin/bundle.sh | 6+++++-
Awin/fix-msi.js | 13+++++++++++++
Mwin/spek.wxs | 12+++++++++++-
4 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am @@ -11,7 +11,10 @@ EXTRA_DIST = \ intltool-merge.in \ intltool-update.in \ win/LICENSE.rtf \ + win/banner.bmp \ win/bundle.sh \ + win/dialog.bmp \ + win/fix-msi.js \ win/spek.ico \ win/spek.rc \ win/spek.wxs diff --git a/win/bundle.sh b/win/bundle.sh @@ -53,11 +53,13 @@ do done # Clean up +mv bin/spek.exe ../ rm -fr share/locale rm -fr doc rm -fr presets rm *.txt -rm bin/avdevice* bin/avfilter* bin/swscale* bin/ff*.exe +rm bin/avdevice* bin/avfilter* bin/swscale* +rm bin/*.exe mv licenses share/ # Set the default GTK theme @@ -71,6 +73,7 @@ cd .. # Make the MSI package "$WIX_PATH"/candle spek.wxs files.wxs "$WIX_PATH"/light -ext WixUIExtension.dll -b Spek spek.wixobj files.wixobj -o spek.msi +start fix-msi.js spek.msi # Clean up rm *.res @@ -78,6 +81,7 @@ rm *.wixobj rm *.wixpdb # Create a zip archive +mv spek.exe Spek/bin/ cp LICENSE.rtf Spek/ cp spek.ico Spek/ "$SZ_PATH"/7z a spek.zip Spek diff --git a/win/fix-msi.js b/win/fix-msi.js @@ -0,0 +1,12 @@ +var msiOpenDatabaseModeTransact = 1; +var filespec = WScript.Arguments(0); +var installer = new ActiveXObject("WindowsInstaller.Installer"); +var database = installer.OpenDatabase(filespec, msiOpenDatabaseModeTransact); +var sql = "UPDATE `Control` SET `Control`.`Height` = '18', `Control`.`Width` = '170'," + + " `Control`.`Y`='243', `Control`.`X`='10' " + + "WHERE `Control`.`Dialog_`='ExitDialog' AND " + + " `Control`.`Control`='OptionalCheckBox'"; +var view = database.OpenView(sql); +view.Execute(); +view.Close(); +database.Commit(); +\ No newline at end of file diff --git a/win/spek.wxs b/win/spek.wxs @@ -23,7 +23,11 @@ <InstallExecuteSequence> <RemoveExistingProducts After="InstallInitialize" /> </InstallExecuteSequence> - + <CustomAction Id="StartAppOnExit" FileKey="spek.exe" ExeCommand="" Execute="immediate" Impersonate ="yes" Return="asyncNoWait" /> + <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch Spek when setup exits" /> + <UI> + <Publish Dialog="ExitDialog" Control="Finish" Order="1" Event="DoAction" Value="StartAppOnExit">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish> + </UI> <Icon Id="ProgramIcon" SourceFile="spek.ico"/> <DirectoryRef Id="ProgramMenuSubfolder"> <Component Id="StartMenuShortcut" Guid="165DF12B-D970-49BC-B07B-880B62ABC308"> @@ -79,11 +83,17 @@ <RegistryValue Root="HKLM" Key="SOFTWARE\Classes\.$(var.ext)\OpenWithProgids" Name="Spek.Audio" Value="" Type="string" /> <?endforeach?> </Component> + <Directory Id="bin" Name="bin"> + <Component Id="Spek" Guid="EC0CA007-EC9E-44E2-B9DE-AE91D3C8EF70"> + <File Id="spek.exe" Name="spek.exe" Source="spek.exe" /> + </Component> + </Directory> </Directory> </Directory> </Directory> <Feature Id="All" Title="$(var.ProductName)" Level="1"> <ComponentRef Id="Main" /> + <ComponentRef Id="Spek" /> <ComponentGroupRef Id="Files" /> <ComponentRef Id="StartMenuShortcut" /> <ComponentRef Id="DesktopShortcut" />