Sfoglia il codice sorgente

finalize package by performing some accumulated bugfixes and cleanups

Ralf S. Engelschall 22 anni fa
parent
commit
a384e2a893
2 ha cambiato i file con 23 aggiunte e 4 eliminazioni
  1. 10 0
      wine/wine.spec
  2. 13 4
      wine/winesetup.sh

+ 10 - 0
wine/wine.spec

@@ -139,3 +139,13 @@ AutoReqProv:  no
 %clean
     rm -rf $RPM_BUILD_ROOT
 
+%post
+    if [ $1 -eq 1 ]; then
+        ( echo "In order to use WINE, every user has to establish a reasonable"
+          echo "\$HOME/.wine/ folder containing at least the essential directory"
+          echo "structure of Windows on a classical C:\\ drive plus some initial"
+          echo "system registry. For this each WINE user should initially run:"
+          echo "\$ $RPM_INSTALL_PREFIX/bin/winesetup"
+        ) | %{l_rpmtool} msg -b
+    fi
+

+ 13 - 4
wine/winesetup.sh

@@ -34,7 +34,13 @@ done
 #   install important configuration file
 if [ ! -f "$HOME/.wine/config" ]; then
     echo "++ creating file \"$HOME/.wine/config\""
-    sed -e "s;\"/c\";\"$HOME/.wine/c_drive\";" \
+    sed -e 's;Drive E;Drive T;' \
+        -e 's;Drive F;Drive U;' \
+        -e 's;Drive Z;Drive R;' \
+        -e '/^\[Drive C\]/,/^$/s/"\/c"/"${HOME}\/.wine\/c_drive"/' \
+        -e '/^\[Drive R\]/,/^$/s/"hd"/"network"/' \
+        -e '/^\[wine\]/,/^$/s/e:/t:/g' \
+        -e '/^\[wine\]/,/^$/s/f:/u:/g' \
         <$l_prefix/share/wine/config >$HOME/.wine/config
 fi
 
@@ -59,7 +65,7 @@ link_app () {
         ln -s $l_prefix/lib/wine/$1.exe.so $2
     fi
 }
-link_app start        $HOME/.wine/c_drive/Windows/command/start.exe
+link_app start        $HOME/.wine/c_drive/Windows/Command/start.exe
 link_app notepad      $HOME/.wine/c_drive/Windows/notepad.exe
 link_app regedit      $HOME/.wine/c_drive/Windows/regedit.exe
 link_app rundll32     $HOME/.wine/c_drive/Windows/rundll32.exe
@@ -71,11 +77,14 @@ link_app progman      $HOME/.wine/c_drive/Windows/System/progman.exe
 link_app regsvr32     $HOME/.wine/c_drive/Windows/System/regsvr32.exe
 link_app winemine     $HOME/.wine/c_drive/Windows/System/winmine.exe
 link_app winver       $HOME/.wine/c_drive/Windows/System/winver.exe
+link_app user         $HOME/.wine/c_drive/Windows/System/user.exe
 link_app uninstaller  $HOME/.wine/c_drive/Windows/uninstall.exe
 link_app winhelp      $HOME/.wine/c_drive/Windows/winhelp.exe
 link_app winhelp      $HOME/.wine/c_drive/Windows/winhlp32.exe
 
 #   install default registry entries
-echo "++ installing default registry"
-$l_prefix/bin/regedit $l_prefix/share/wine/winedefault.reg
+if [ ! -f $HOME/.wine/system.reg ]; then
+    echo "++ installing initial registry"
+    $l_prefix/bin/regedit $l_prefix/share/wine/winedefault.reg
+fi