From 27732611c8a6b3e7aeae47b98927e1a23d20b1a6 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 11 Jun 2013 15:21:19 +0200 Subject: [vmplayer] clean up run-virt.include: drop support for old player versions [vmplayer] limit RAM to 3800MB on 32bit [xorg] include libglx on openSUSE [rootfs-stage32] add gfx driver loading service - currently not actually loading them, but checking for i915 gfx to enable 3D support in VMWare Player --- .../data/etc/openslx/vmware/run-virt.include | 448 +++++++++++---------- .../modules/vmplayer/data/opt/openslx/bin/vmplayer | 4 + 2 files changed, 236 insertions(+), 216 deletions(-) (limited to 'remote/modules/vmplayer/data') diff --git a/remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include b/remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include index d3fa9981..9b0fea91 100644 --- a/remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include +++ b/remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include @@ -20,7 +20,7 @@ runvmwareconfheader () { -echo "# This configuration file was generated by $0" >${conffile} +echo "# This configuration file was generated by $0" > "$conffile" # check for the ostype case "${vmostype}" in @@ -48,6 +48,7 @@ case "${vmostype}" in ;; windows7*) shfolders="TRUE" + enable3d="TRUE" ;; windows8*) shfolders="TRUE" @@ -71,120 +72,104 @@ case "${vmostype}" in shfolders="FALSE" ;; esac -case "$vmversion" in - *) - svga_autodetect="TRUE" - numvcpus="1" - echo ".encoding = \"UTF-8\" -# version specific stuff - all versions -config.version = \"8\"" >>${conffile} - ;; -esac -case "$vmversion" in - 2.*|3.*|4.*|5.*|6.*|7.*|8.*|9.*) - [ ${shfolders} == FALSE ] || echo " -# version specific stuff - ver. 2.*|3.*|6.*|7.*|8.*|9.* -sharedFolder.option = \"alwaysEnabled\"" >>${conffile} - ;; -esac -case "$vmversion" in - 2.5|3.*|4.*|5.*|6.5|7.*|8.*|9.*) - if [ "${cpu_cores}" -ge "2" 2>/dev/null ]; then - numvcpus="2" - fi - if [ "${mem}" -ge "8000" 2>/dev/null ]; then - mem=8000 - fi - cap3d="TRUE" # helper var for loging output - echo " -# version specific stuff - ver. 2.5|3.*|6.5|7.* -ehci.present = \"TRUE\" -mks.enable3d = \"${enable3d}\"" >>${conffile} - ;; -esac -case "$vmversion" in - 3.*|4.*|7.*|8.*|9.*) - numvcpus="${cpu_cores}" - if [ "${cpu_cores}" -ge "4" 2>/dev/null ]; then - numvcpus="4" - fi - # svga_autodetect="FALSE" # if defined manual, see below - echo " + +svga_autodetect="TRUE" + +numvcpus="${cpu_cores}" +[ "${cpu_cores}" -ge "4" 2>/dev/null ] && numvcpus="4" + +if [ "x$shfolders" != "xFALSE" ]; then + ENABLE_SHARE='sharedFolder.option = "alwaysEnabled"' +else + ENABLE_SHARE='' +fi + +[ "${mem}" -ge "8000" ] && mem=8000 + +cap3d="WHAT IS THIS VAR USED FOR?" # helper var for loging output + +cat >> "$conffile" <>${conffile} - ;; -esac +cpuid.coresPerSocket = "$cpu_cores" +maxvcpus = "4" +monitor.virtual_mmu = "automatic" +monitor.virtual_exec = "automatic" +floppy1.clientDevice = "FALSE" +floppy1.readonly = "TRUE" -echo " # id -virtualHW.version = \"${hwver}\" -displayName = \"${displayname}\" -guestOS = \"${vmostype}\" +virtualHW.version = "$hwver" +displayName = "$displayname" +guestOS = "$vmostype" # CPU/MEM -numvcpus = \"${numvcpus}\" -memsize = \"${mem}\" -MemAllowAutoScaleDown = \"FALSE\" -MemTrimRate = \"-1\" +numvcpus = "$numvcpus" +memsize = "$mem" +MemAllowAutoScaleDown = "FALSE" +MemTrimRate = "-1" # ide-disks -ide0:0.present = \"${ide}\" -ide0:0.fileName = \"${diskfile}\" -ide0:0.mode = \"independent-nonpersistent\" -ide1:0.present = \"${cdrom0}\" -ide1:0.autodetect = \"TRUE\" -ide1:0.fileName = \"auto detect\" -ide1:0.deviceType = \"cdrom-raw\" -ide1:1.present = \"${cdrom1}\" -ide1:1.autodetect = \"TRUE\" -ide1:1.fileName = \"auto detect\" -ide1:1.deviceType = \"cdrom-raw\" +ide0:0.present = "$ide" +ide0:0.fileName = "$diskfile" +ide0:0.mode = "independent-nonpersistent" +ide1:0.present = "$cdrom0" +ide1:0.autodetect = "TRUE" +ide1:0.fileName = "auto detect" +ide1:0.deviceType = "cdrom-raw" +ide1:1.present = "$cdrom1" +ide1:1.autodetect = "TRUE" +ide1:1.fileName = "auto detect" +ide1:1.deviceType = "cdrom-raw" # scsi-disks -scsi0.present = \"${scsi}\" -scsi0:0.present = \"${scsi}\" -scsi0:0.fileName = \"${diskfile}\" -scsi0.virtualDev = \"${hddrv}\" -scsi0:0.mode = \"independent-nonpersistent\" +scsi0.present = "$scsi" +scsi0:0.present = "$scsi" +scsi0:0.fileName = "$diskfile" +scsi0.virtualDev = "$hddrv" +scsi0:0.mode = "independent-nonpersistent" # floppies -floppy0.present = \"${floppy0}\" -floppy0.startConnected = \"FALSE\" -floppy0.autodetect = \"TRUE\" -floppy0.fileName = \"auto detect\" +floppy0.present = "$floppy0" +floppy0.startConnected = "FALSE" +floppy0.autodetect = "TRUE" +floppy0.fileName = "auto detect" + # we need floppy b: for our windows client configuration -floppy1.present = \"${floppy1}\" -floppy1.startConnected = \"TRUE\" -floppy1.fileType = \"file\" -floppy1.fileName = \"${floppy1name}\" +floppy1.present = "$floppy1" +floppy1.startConnected = "TRUE" +floppy1.fileType = "file" +floppy1.fileName = "$floppy1name" # nics -ethernet0.present = \"TRUE\" -ethernet0.addressType = \"static\" -${network_virtualDev} -ethernet0.connectionType = \"${network_kind}\" -#ethernet1.connectionType = \"custom\" -#ethernet1.vnet = \"/dev/vmnet2\" -ethernet0.address = \"00:50:56:${VM_ID}:${machostpart}\" -ethernet0.wakeOnPcktRcv = \"FALSE\" +ethernet0.present = "TRUE" +ethernet0.addressType = "static" +$network_virtualDev +ethernet0.connectionType = "$network_kind" +#ethernet1.connectionType = "custom" +#ethernet1.vnet = "/dev/vmnet2" +ethernet0.address = "00:50:56:$VM_ID:$machostpart" +ethernet0.wakeOnPcktRcv = "FALSE" # sound -sound.present = \"TRUE\" -sound.fileName = \"-1\" -sound.autodetect = \"TRUE\" -sound.virtualdev = \"${sound}\" +sound.present = "TRUE" +sound.fileName = "-1" +sound.autodetect = "TRUE" +sound.virtualdev = "$sound" # svga -svga.autodetect = \"${svga_autodetect}\" +svga.autodetect = "$svga_autodetect" # usb -usb.present = \"TRUE\" -usb.generic.autoconnect = \"TRUE\" +usb.present = "TRUE" +usb.generic.autoconnect = "TRUE" # pci configuration usb.pciSlotNumber = "16" @@ -194,35 +179,37 @@ ehci.pciSlotNumber = "19" scsi0.pciSlotNumber = "20" # shared folders -sharedFolder0.present = \"${shfolders}\" -sharedFolder0.enabled = \"${shfolders}\" -sharedFolder0.expiration = \"never\" -sharedFolder0.guestName = \"${sharename}\" -sharedFolder0.hostPath = \"${sharepath}\" -sharedFolder0.readAccess = \"TRUE\" -sharedFolder0.writeAccess = \"TRUE\" -sharedFolder.maxNum = \"1\" +$ENABLE_SHARE +sharedFolder0.present = "$shfolders" +sharedFolder0.enabled = "$shfolders" +sharedFolder0.expiration = "never" +sharedFolder0.guestName = "$sharename" +sharedFolder0.hostPath = "$sharepath" +sharedFolder0.readAccess = "TRUE" +sharedFolder0.writeAccess = "TRUE" +sharedFolder.maxNum = "1" # dirs/configs -tmpDirectory = \"${redodir}\" -redoLogDir = \"${redodir}\" -mainMem.useNamedFile = \"TRUE\" -snapshot.disabled = \"TRUE\" -tools.syncTime = \"TRUE\" -isolation.tools.hgfs.disable = \"FALSE\" -hgfs.mapRootShare = \"TRUE\" -isolation.tools.dnd.disable = \"FALSE\" -isolation.tools.copy.enable = \"TRUE\" -isolation.tools.paste.enabled = \"TRUE\" +tmpDirectory = "$redodir" +redoLogDir = "$redodir" +mainMem.useNamedFile = "TRUE" +snapshot.disabled = "TRUE" +tools.syncTime = "TRUE" +isolation.tools.hgfs.disable = "FALSE" +hgfs.mapRootShare = "TRUE" +isolation.tools.dnd.disable = "FALSE" +isolation.tools.copy.enable = "TRUE" +isolation.tools.paste.enabled = "TRUE" # serial port -serial0.present = \"${serial}\" -${serialdev} +serial0.present = "$serial" +$serialdev # parallel port -parallel0.present = \"${parallel}\" -parallel0.bidirectional = \"${paralbidi}\" -${paraldev}" >>${conffile} +parallel0.present = "$parallel" +parallel0.bidirectional = "$paralbidi" +$paraldev +HEREEND # set the appropriate permissions for the vmware config file chmod u+rwx ${conffile} >/dev/null 2>&1 @@ -230,67 +217,72 @@ chmod u+rwx ${conffile} >/dev/null 2>&1 preferencesheader () { -echo ".encoding = \"UTF-8\" + cat > "$vmhome/preferences" <${vmhome}/preferences +HEREEND # different eula parameters from Workstation 9+/ Player 5+ -case "$vmversion" in + case "$vmversion" in 3.*|4.*|7.*|8.*) - echo " -pref.eula.size = \"2\" -pref.eula.0.appName = \"VMware Player\" -pref.eula.0.buildNumber = \"${vmbuild}\" -pref.eula.1.appName = \"VMware Workstation\" -pref.eula.1.buildNumber = \"${vmbuild}\"" >>${vmhome}/preferences + cat >> "$vmhome/preferences" <>${vmhome}/preferences + cat >> "$vmhome/preferences" </dev/null 2>&1 -mkdir -p ${confdir} >/dev/null 2>&1 -mkdir -p ${vmhome}/dndlogs >/dev/null 2>&1 -touch ${vmhome}/dndlogs/dndlog.conf >/dev/null 2>&1 +mkdir -p "$redodir" >/dev/null 2>&1 +mkdir -p "$confdir" >/dev/null 2>&1 +mkdir -p "$vmhome/dndlogs" >/dev/null 2>&1 +touch "$vmhome/dndlogs/dndlog.conf" >/dev/null 2>&1 # create preferences preferencesheader # create VMware startup file runvmwareconfheader + # link to conffile if confdir != redodir -ln -s ${conffile} ${redodir}/run-vmware.conf >/dev/null 2>&1 +ln -s "$conffile" "$redodir/run-vmware.conf" >/dev/null 2>&1 # sync is needed to ensure that data is really written to virtual disk sync @@ -423,7 +439,7 @@ sync # own nvram. We need it for floppy drive b, default nvram has just drive a # TODO: optimize, currently kinda inefficient, too much copys, but we # don't know which one is installed... -cp /etc/openslx/vmware/nvram ${confdir}/nvram 2>/dev/null +cp "/etc/openslx/vmware/nvram" "$confdir/nvram" 2>/dev/null # logging and stdout diff --git a/remote/modules/vmplayer/data/opt/openslx/bin/vmplayer b/remote/modules/vmplayer/data/opt/openslx/bin/vmplayer index 030e9175..147f514f 100755 --- a/remote/modules/vmplayer/data/opt/openslx/bin/vmplayer +++ b/remote/modules/vmplayer/data/opt/openslx/bin/vmplayer @@ -1,6 +1,10 @@ #!/bin/sh # radically simplified version of the original script vmplayer by VMware Inc. PREFIX=/usr/lib/vmware # depends on the vmware location + +# HACK: Let the OpenGL driver report s3tc capability even if not present, so 3D will be enabled +export force_s3tc_enable=true + exec "$PREFIX"'/lib/wrapper-gtk24.sh' \ "$PREFIX"'/lib' \ "$PREFIX"'/bin/vmplayer' \ -- cgit v1.2.3-55-g7522