michsens |
Tuesday 26 June 2012 at 20:39
|
michsens
|
Okay, the installation in a new prefix was just an idea.
The thing with the "eval_gettext" I'll try to remember next time. So it was my first POL script and also my first thread.
The dirty code does create a .reg file. This file then is permanent created within the prefix and is used before one of the office executables is used. With the "sed" command the variable "VLRenewalSchedule" of the user.reg should be copied and directly added into the new .reg file "VLRenew.reg". Since "sed" is directly included into the kernel and in the form I used it also completely usable in MAC-OS I thought this is a good idea. How else could this be done?
|
Quentin PÂRIS |
Wednesday 27 June 2012 at 0:19
|
Quentin PÂRIS
|
We could generate a .reg file and apply it each time before running Office 2k10 ?
|
michsens |
Wednesday 27 June 2012 at 8:25
|
michsens
|
Why? Are there any advantages of this? This .reg file is always the same and by the way it does not hurt anybody I think.
|
Quentin PÂRIS |
Wednesday 27 June 2012 at 10:21
|
Quentin PÂRIS
|
This .reg file is always the same.
It's not proved. Another issue is that sed does not really work so much on OSX, so we prefer avoid to use it. Eventually, I can ask you the same question: Why using sed while there is a clean tool in wine to perform such a thing?
|
michsens |
Monday 23 July 2012 at 15:37
|
michsens
|
Is there a clean POL function for removing prefix and all shortcuts?
|
michsens |
Monday 23 July 2012 at 16:29
|
michsens
|
Hello. Sorry for leaving the discussion for a while now, but I had plenty of stuff to do the last few weeks. Well, I tried to insert all your comments in the MSO2010 installation script. I also noticed that the line to generate the .reg file we were discussing before is not necessary. Here is the result of the new script:
#!/bin/bash
# Author : Tinou
## CHANGELOG
# (2012-05-05 - 14:45) Quentin PÂRIS - Wine version set to 1.5.3, Outlook 2010 compatiblity
# (2012-05-05 - 15:05) Quentin PÂRIS
# Check winbind presence on Linux, required to install
# Adding gettext support
# (2012-05-12 - 18:36) Quentin PÂRIS
# Requires 4.0.18
# (2012-06-25 - 17:56) Robert Paulo
# Adding activation procedure
# Adding KMS activation
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
PREFIX="Office2010"
WINEVERSION="1.5.3"
TITLE="Microsoft Office 2010"
shortcutWord="Microsoft Word 2010"
shortcutExcel="Microsoft Excel 2010"
shortcutPowerpoint="Microsoft Powerpoint 2010"
shortcutOneNote="Microsoft OneNote 2010"
shortcutOutlook="Microsoft Outlook 2010"
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/Office/top.jpg" "http://files.playonlinux.com/resources/setups/Office/left.png" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_presentation "$TITLE" "Microsoft" "http://www.microsoft.com" "Quentin PÂRIS" "$PREFIX"
POL_RequiredVersion 4.0.18 || POL_Debug_Fatal "$TITLE won't work with $APPLICATION_TITLE $VERSION\\nPlease update"
if [ "$POL_OS" = "Linux" ]; then
wbinfo -V || POL_Debug_Fatal "Please install winbind before installing $TITLE"
fi
POL_Debug_Init
POL_System_SetArch "x86"
POL_Wine_SelectPrefix "$PREFIX"
if [ "$(POL_Wine_PrefixExists "$PREFIX")" == "True" ]; then
POL_SetupWindow_menu "$(eval_gettext 'Wineprefix $PREFIX already exists!!!\\n\\nWhat would you prefer to do?')" "$TITLE" "Reinstall $TITLE~~~Activate installed $TITLE" "~~~"
performAction="$APP_ANSWER"
else
performAction="Install $TITLE in new wineprefix"
fi
if [ "$performAction" != "Activate installed $TITLE" ]; then
if [ "$performAction" == "Reinstall $TITLE" ]; then
POL_SetupWindow_question "$(eval_gettext 'Do you really want to delete wineprefix $PREFIX?\\n')" "$TITLE"
if [ "$APP_ANSWER" == "TRUE" ]; then
rm -Rf "$POL_USER_ROOT//wineprefix/$PREFIX/"
rm "$POL_USER_ROOT//shortcuts//$shortcutWord"
rm "$POL_USER_ROOT//shortcuts//$shortcutExcel"
rm "$POL_USER_ROOT//shortcuts//$shortcutPowerpoint"
rm "$POL_USER_ROOT//shortcuts//$shortcutOneNote"
rm "$POL_USER_ROOT//shortcuts//$shortcutOutlook"
fi
fi
POL_Wine_PrefixCreate "$WINEVERSION"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "x86/setup.exe" "setup.exe"
cd "$CDROM"
Set_OS win7
POL_Call POL_Install_dotnet20
POL_Wine_WaitBefore "$TITLE"
cd "$CDROM"
POL_Wine "$CDROM_SETUP"
POL_Wine_WaitExit "$TITLE"
sleep 10
POL_Call POL_Install_msxml6
POL_Call POL_Function_OverrideDLL native riched20 msxml6
POL_Call POL_Function_OverrideDLL native,builtin urlmon
POL_Shortcut "WINWORD.EXE" "$shortcutWord"
POL_Shortcut "EXCEL.EXE" "$shortcutExcel"
POL_Shortcut "POWERPNT.EXE" "$shortcutPowerpoint"
POL_Shortcut "ONENOTE.EXE" "$shortcutOneNote"
POL_Shortcut "OUTLOOK.EXE" "$shortcutOutlook"
POL_Extension_Write doc "$shortcutWord"
POL_Extension_Write docx "$shortcutWord"
POL_Extension_Write xls "$shortcutExcel"
POL_Extension_Write xlsx "$shortcutExcel"
POL_Extension_Write ppt "$shortcutPowerpoint"
POL_Extension_Write pptx "$shortcutPowerpoint"
POL_SetupWindow_message "$(eval_gettext '$TITLE has been installed successfully\\n\\nIf an installation Windows prevent your programs from running, restart the script and choose option "Reinstall $TITLE"!')" "$TITLE"
POL_SetupWindow_question "$(eval_gettext 'Do you want to activate your $TITLE?\\n\\nYou can also skip this step and activate $TITLE\\nlater by restarting this script.')" "$TITLE"
activateMSOffice="$APP_ANSWER"
else
activateMSOffice="TRUE"
fi
if [ "$activateMSOffice" == "TRUE" ]; then
POL_Wine_SelectPrefix "$PREFIX"
POL_SetupWindow_menu "$(eval_gettext 'Which type of activation?')" "$TITLE" "Volume Activation (KMS)~~~Skip activation" "~~~"
if [ "$APP_ANSWER" == "Volume Activation (KMS)" ]; then
dataCorrect="FALSE"
while [ "$dataCorrect" != "TRUE" ]; do
licenseServerName=""
POL_SetupWindow_textbox "$(eval_gettext 'Insert address of license server!')" "$TITLE"
licenseServerName=$APP_ANSWER
POL_SetupWindow_textbox "$(eval_gettext 'Insert port of license server!')" "$TITLE"
licenseServerPort=$APP_ANSWER
POL_SetupWindow_question "$(eval_gettext 'Are the data for the license server correct?\\nCan these values be added to the registry?\\n\\nLicense server name: $licenseServerName\\nLicense server port: $licenseServerPort')" "$TITLE"
dataCorrect=$APP_ANSWER
done
cd "$POL_USER_ROOT//wineprefix/$PREFIX/"
# copy registry value from user.reg
echo "[HKEY_LOCAL_MACHINE\\\\Software\\\\Microsoft\\\\OfficeSoftwareProtectionPlatform]" > VLKMSServ.reg
echo "\\"KeyManagementServiceName\\"=\\"$licenseServerName\\"" >> VLKMSServ.reg
echo "\\"KeyManagementServicePort\\"=\\"$licenseServerPort\\"" >> VLKMSServ.reg
POL_Wine regedit VLKMSServ.reg
sleep 2
rm VLKMSServ.reg
POL_SetupWindow_message "$(eval_gettext '$TITLE should be activated now.\\nMaybe two starts of $TITLE are necessary:\\nOne for initialising and one for registration.\\n\\nJust start, close and restart $TITLE!')" "$TITLE"
elif [ "$APP_ANSWER" == "Volume Activation (MAK)" ]; then
echo
fi
fi
POL_SetupWindow_Close
exit
I made all possible tests and found no further problems. But please, tell me if modification has to be done. Greetings, Robert. Edited by michsens
|
Quentin PÂRIS |
Monday 23 July 2012 at 16:43
|
Quentin PÂRIS
|
Be careful, I've changed things in the script since the last post :)
|
michsens |
Monday 23 July 2012 at 19:00
|
michsens
|
Okay, inserted your changes. Further remarks?
|
Quentin PÂRIS |
Monday 23 July 2012 at 20:12
|
Quentin PÂRIS
|
Another idea (sorry for always changing my mind)
Why not making a separate script for activation? So that people could see directly it
|
michsens |
Tuesday 24 July 2012 at 8:31
|
michsens
|
Hm, yes this might help people to find the activation easier. But then we should also find people who have time to extend this script for different other activation procedures. I can prepare this script and give possibilities to extend it. If only KMS volume activation is possible the script should only get this name. If someone who read this threat know some activation procedures beside KMS volume activation, please let me know! I only need to know what has to be done. Programming then is not a big deal.
|
michsens |
Tuesday 24 July 2012 at 8:45
|
michsens
|
Kicked out everything that does not belong to activation the script looks like following:
#!/bin/bash
# Author : Robert Paulo
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
PREFIX="Office2010"
WINEVERSION="1.5.3"
TITLE="Microsoft Office 2010"
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/Office/top.jpg" "http://files.playonlinux.com/resources/setups/Office/left.png" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_presentation "$TITLE" "Microsoft" "http://www.microsoft.com" "Quentin PÂRIS" "$PREFIX"
POL_RequiredVersion 4.0.18 || POL_Debug_Fatal "$TITLE won't work with $APPLICATION_TITLE $VERSION\\nPlease update"
if [ "$POL_OS" = "Linux" ]; then
wbinfo -V || POL_Debug_Fatal "Please install winbind before installing $TITLE"
fi
POL_Debug_Init
POL_System_SetArch "x86"
POL_Wine_SelectPrefix "$PREFIX"
if [ "$(POL_Wine_PrefixExists "$PREFIX")" == "True" ]; then
POL_SetupWindow_menu "$(eval_gettext 'Which type of activation?')" "$TITLE" "Volume Activation (KMS)~~~Skip activation" "~~~"
if [ "$APP_ANSWER" == "Volume Activation (KMS)" ]; then
dataCorrect="FALSE"
while [ "$dataCorrect" != "TRUE" ]; do
licenseServerName=""
POL_SetupWindow_textbox "$(eval_gettext 'Insert address of license server!')" "$TITLE"
licenseServerName=$APP_ANSWER
POL_SetupWindow_textbox "$(eval_gettext 'Insert port of license server!')" "$TITLE"
licenseServerPort=$APP_ANSWER
POL_SetupWindow_question "$(eval_gettext 'Are the data for the license server correct?\\nCan these values be added to the registry?\\n\\nLicense server name: $licenseServerName\\nLicense server port: $licenseServerPort')" "$TITLE"
dataCorrect=$APP_ANSWER
done
cd "$POL_USER_ROOT//wineprefix/$PREFIX/"
# copy registry value from user.reg
echo "[HKEY_LOCAL_MACHINE\\\\Software\\\\Microsoft\\\\OfficeSoftwareProtectionPlatform]" > VLKMSServ.reg
echo "\\"KeyManagementServiceName\\"=\\"$licenseServerName\\"" >> VLKMSServ.reg
echo "\\"KeyManagementServicePort\\"=\\"$licenseServerPort\\"" >> VLKMSServ.reg
POL_Wine regedit VLKMSServ.reg
sleep 2
rm VLKMSServ.reg
POL_SetupWindow_message "$(eval_gettext '$TITLE should be activated now.\\nMaybe two starts of $TITLE are necessary:\\nOne for initialising and one for registration.\\n\\nJust start, close and restart $TITLE!')" "$TITLE"
elif [ "$APP_ANSWER" == "Volume Activation (MAK)" ]; then
echo
fi
else
POL_SetupWindow_message "$(eval_gettext 'No $TTILE installation found.\\n\\nPlease use the $TITLE installation script!')" "$TITLE"
fi
POL_SetupWindow_Close
exit
Edited by michsens
|
Quentin PÂRIS |
Tuesday 24 July 2012 at 9:16
|
Quentin PÂRIS
|
Ok it looks good! Just check that office 2k10 is installed and then you can send it to validation :)
|
michsens |
Tuesday 24 July 2012 at 9:53
|
michsens
|
Oh, right. I deleted too much. How can I send it to validation?
|
michsens |
Tuesday 24 July 2012 at 9:59
|
michsens
|
Okay. Changed it.
|
Quentin PÂRIS |
Tuesday 24 July 2012 at 10:16
|
Quentin PÂRIS
|
http://www.playonmac.com/repository
|
michsens |
Tuesday 24 July 2012 at 10:17
|
michsens
|
Thanks.
|
Quentin PÂRIS |
Tuesday 24 July 2012 at 10:26
|
Quentin PÂRIS
|
Thank you for your work :)
|
sonigajanand |
Thursday 26 September 2013 at 12:54
|
sonigajanand
|
Since MS Office deletes the key "[HKEY_USERS\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform]" after every shutdown I modified the Shortcut of each Office 2010 Product that can be run under Wine:
#!/bin/bash [ "$PLAYONLINUX" = "" ] && exit 0 source "$PLAYONLINUX/lib/sources" export WINEPREFIX="/home/paulo/.PlayOnLinux//wineprefix/Office2010" export WINEDEBUG="-all" #POL_Log=Microsoft Office 2010
cd "/home/paulo/.PlayOnLinux//wineprefix/Office2010/" echo "[HKEY_USERS\\S-1-5-20\\Software\\Microsoft\\OfficeSoftwareProtection]" > VLRenew.regedit sed -n -e '/VLRenewalSchedule/,/^$/p' user.reg >> VLRenew.reg echo "\"Enable\"=\"Y\"" >> VLRenew.reg POL_Wine regedit.exe VLRenew.reg sleep 2
cd "/home/paulo/.PlayOnLinux//wineprefix/Office2010/drive_c/./Program Files/Microsoft Office/Office14" if [ -z "$@" ]; then POL_Wine "WINWORD.EXE" else POL_Wine "WINWORD.EXE" z:"${@//\//\\}" fi
For running Excel, Outlook, OneNote, and Powerpoint change the last lines to the specific executables. By the way, the last lines are very helpful when you want to start Office files out of any linux file browser. Otherwise in my case some errors were prompted by MS Office 2010.
|
edersongs |
Saturday 5 October 2013 at 12:49
|
edersongs
|
Since MS Office deletes the key "[HKEY_USERSS-1-5-20SoftwareMicrosoftOfficeSoftwareProtectionPlatform]" after every shutdown I modified the Shortcut of each Office 2010 Product that can be run under Wine:
#!/bin/bash [ "$PLAYONLINUX" = "" ] && exit 0 source "$PLAYONLINUX/lib/sources" export WINEPREFIX="/home/paulo/.PlayOnLinux//wineprefix/Office2010" export WINEDEBUG="-all" #POL_Log=Microsoft Office 2010
cd "/home/paulo/.PlayOnLinux//wineprefix/Office2010/" echo "[HKEY_USERS\S-1-5-20\Software\Microsoft\OfficeSoftwareProtection]" > VLRenew.regedit sed -n -e '/VLRenewalSchedule/,/^$/p' user.reg >> VLRenew.reg echo ""Enable"="Y"" >> VLRenew.reg POL_Wine regedit.exe VLRenew.reg sleep 2
cd "/home/paulo/.PlayOnLinux//wineprefix/Office2010/drive_c/./Program Files/Microsoft Office/Office14" if [ -z "$@" ]; then POL_Wine "WINWORD.EXE" else POL_Wine "WINWORD.EXE" z:"${@////\}" fi
For running Excel, Outlook, OneNote, and Powerpoint change the last lines to the specific executables. By the way, the last lines are very helpful when you want to start Office files out of any linux file browser. Otherwise in my case some errors were prompted by MS Office 2010.
I Was thinking about how can I use this script to start Office 2010 I have under wine without POL. My Office 2010 works nice but I can't activate it. It's installed in a wineprefix at: $HOME/.local/share/wineprefixes/office2010pro/ I call it with this script: #!/bin/bash # Word 2010 env WINEPREFIX="$HOME/.local/share/wineprefixes/office2010pro" wine C:\\windows\\command\\start.exe /Unix $HOME/.local/share/wineprefixes/office2010pro/dosdevices/c:/Program\ Files/Microsoft\ Office/Office14/WINWORD.EXE # done exit 0;
|