# HG changeset patch # User John D # Date 1480617845 18000 # Node ID 7f2d5c8c44919c69aa0b48b18a503bf0931eb50e # Parent 32a7bea19bb1a5fa982791be2165900c428398ce installer: update fc cache during install (Bug #45458) * tools/makeinst-script.sh.in: call fc_update.bat in installer script * installer-files/fc_update.bat: new file * binary-dist-rules.mk: copy fc_update.bat to dist * dist-files.mk: add fc_update.bat diff -r 32a7bea19bb1 -r 7f2d5c8c4491 binary-dist-rules.mk --- a/binary-dist-rules.mk Mon Nov 21 17:11:21 2016 -0500 +++ b/binary-dist-rules.mk Thu Dec 01 13:44:05 2016 -0500 @@ -90,6 +90,7 @@ if [ "$(ENABLE_DEVEL_TOOLS)" = "yes" ]; then \ cp $(TOP_DIR)/installer-files/cmdshell.bat $(OCTAVE_DIST_DIR)/; \ fi + cp $(TOP_DIR)/installer-files/fc_update.bat $(OCTAVE_DIST_DIR)/ endef else define copy-windows-dist-files @@ -101,6 +102,7 @@ cp $(OCTAVE_DIST_DIR)/bin/libblas.dll $(OCTAVE_DIST_DIR)/bin/librefblas.dll echo " octave.bat..." cp $(TOP_DIR)/installer-files/octave.bat $(OCTAVE_DIST_DIR)/ + cp $(TOP_DIR)/installer-files/fc_update.bat $(OCTAVE_DIST_DIR)/ endef endif endif diff -r 32a7bea19bb1 -r 7f2d5c8c4491 dist-files.mk --- a/dist-files.mk Mon Nov 21 17:11:21 2016 -0500 +++ b/dist-files.mk Thu Dec 01 13:44:05 2016 -0500 @@ -861,6 +861,7 @@ INSTALL_FILES_1 := \ cmdshell.bat \ + fc_update.bat \ gpl-3.0.txt \ octave.bat \ octave.bmp \ diff -r 32a7bea19bb1 -r 7f2d5c8c4491 installer-files/fc_update.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/installer-files/fc_update.bat Thu Dec 01 13:44:05 2016 -0500 @@ -0,0 +1,7 @@ +@echo off + +set ROOT_DIR=%~dp0 +echo "Updating fc-cache (may take a file) ..." +%ROOT_DIR%\bin\fc-cache.exe -v +echo "Done." + diff -r 32a7bea19bb1 -r 7f2d5c8c4491 tools/makeinst-script.sh.in --- a/tools/makeinst-script.sh.in Mon Nov 21 17:11:21 2016 -0500 +++ b/tools/makeinst-script.sh.in Thu Dec 01 13:44:05 2016 -0500 @@ -227,12 +227,15 @@ File "$OCTAVE_SOURCE/octave.vbs" File "$OCTAVE_SOURCE/octave-firsttime.vbs" + File "$OCTAVE_SOURCE/fc_update.bat" + ; distro files EOF if [ -f $OCTAVE_SOURCE/cmdshell.bat ]; then echo "File '$OCTAVE_SOURCE/cmdshell.bat'" >> $OUTFILE fi + # insert the files IFS=$'\n' for f in $(find $OCTAVE_SOURCE -type d -printf "%P\n"); do @@ -250,6 +253,10 @@ WriteINIStr "\$INSTDIR\\bin\\qt.conf" "Paths" "Prefix" "\$0" WriteINIStr "\$INSTDIR\\bin\\qt.conf" "Paths" "Translations" "translations" Pop \$0 + + ; run fc-cache updater + DetailPrint "Building font cache (may take a while)" + ExecWait "\$INSTDIR\\fc_update.bat" SectionEnd Section make_uninstaller