diff --git a/Makefile.am b/Makefile.am index d5c7372..369945f 100644 --- 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 index ba71fce..c7a77a5 100755 --- 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 new file mode 100644 index 0000000..0ec1a1e --- /dev/null +++ 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 index 38576d7..6bed2e3 100644 --- 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" />