From 16eb448eb4449b1baa28cdc97dc99a8e54087f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Wed, 5 Mar 2008 22:25:33 +0000 Subject: [PATCH] * The HaikuImage script will put a file "fresh_install" into /boot/home/config/settings. * The Bootscript will check for the existance of this file and updates the mime database with all the applications and preflets that come with the install. Then it removes the indicator file. This fixes the problem that all the apps are not known to the system until you run them once. Ie "Open With..." and such stuff works out of the box. Feel free to find a more elegant way, I just found this simple and effective. :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24247 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/HaikuImage | 4 ++++ data/settings/fresh_install | 1 + data/system/boot/Bootscript | 12 ++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 data/settings/fresh_install diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage index 6650bb3a6e..d90829064a 100644 --- a/build/jam/HaikuImage +++ b/build/jam/HaikuImage @@ -363,6 +363,10 @@ local bisonFiles = "yacc.c" "c.m4" "c++.m4" ; SEARCH on $(bisonFiles) = [ FDirName $(HAIKU_TOP) src bin bison data ] ; AddFilesToHaikuImage beos etc : $(bisonFiles) ; +# fresh install indicator file +SEARCH on fresh_install = [ FDirName $(HAIKU_TOP) data settings ] ; +AddFilesToHaikuImage home config settings : fresh_install ; + # boot loader AddFilesToHaikuImage beos system : zbeos ; diff --git a/data/settings/fresh_install b/data/settings/fresh_install new file mode 100644 index 0000000000..c2d6a0c50d --- /dev/null +++ b/data/settings/fresh_install @@ -0,0 +1 @@ +This file is only supposed to exist on fresh Haiku installations. diff --git a/data/system/boot/Bootscript b/data/system/boot/Bootscript index b60a460286..77775a953f 100644 --- a/data/system/boot/Bootscript +++ b/data/system/boot/Bootscript @@ -121,3 +121,15 @@ if [ "$SAFEMODE" != "yes" ]; then . $HOME/config/boot/UserBootscript fi fi + +# Check for fresh install and register all bundled app mimetypes +FRESH_INSTALL_INDICATOR_FILE=$HOME/config/settings/fresh_install +if [ -e $FRESH_INSTALL_INDICATOR_FILE ]; then + mimeset -all -f /boot/beos/apps + mimeset -all -f /boot/beos/preferences + mimeset -all -f /boot/beos/system/servers + mimeset -all -f /boot/apps + rm $FRESH_INSTALL_INDICATOR_FILE +fi + +