This shows you the differences between two versions of the page.
userspace:wps-office [2019/05/15 12:43] Thomas_H |
userspace:wps-office [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== WPS-Office 2016 (former KingSoft Office) ====== | ||
- | Tested with opsi 4.0.1\\ | ||
- | requiredWinstVersion >= 4.8.6\\ | ||
- | questions to: // | ||
- | |||
- | Special thanks to Mossi, [[https:// | ||
- | |||
- | The installation-files can be downloaded from: http:// | ||
- | |||
- | Attention: The installation of WPS-Office is a little bit more tricky, but I try a step-by-step manual here to make it as easy as possible. | ||
- | |||
- | ==== Technical Informations ==== | ||
- | |||
- | WPS-Office (former KingSoft Office) will normally be installed in the Folder of the logged-in User. This results in a unavailability for other users, who might log in in the computer. | ||
- | |||
- | So we have to change some things in the installation pack to force the setup to behave as we need it. | ||
- | Once done this change, the rest is easy and we can install the new file with opsi as well known. | ||
- | |||
- | |||
- | ==== Packing a new setup.exe ==== | ||
- | |||
- | So, lets start to change the installation-file first. | ||
- | |||
- | 1) download the WPS-Office (2016) from http:// | ||
- | 2) download (if you don't use it already) 7Zip from https:// | ||
- | 3) install 7Zip | ||
- | 4) open the WPSOffice_10.2.0.7646_Free.exe with 7Zip (yes, it's a ZIP-file) and extract it to a new folder (I name it now ' | ||
- | The contents of the new folder should look like this: | ||
- | |||
- | WPS-Office (this name is just an example) | ||
- | ├ $_11_ | ||
- | └ $PLUGINSDIR | ||
- | | ||
- | 5) Now open the folder " | ||
- | 6) Rename " | ||
- | 7) Open " | ||
- | 8) Add the following lines to the oem.ini (hint:if you only have a 32bit-system, | ||
- | < | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | |||
- | | ||
- | </ | ||
- | |||
- | 9) Save the oem.ini-file to the " | ||
- | 10) Leave $_11_-Folder to the parent folder (working-dir) | ||
- | 11) Create a new textfile in the working-dir named " | ||
- | 12) edit " | ||
- | 13) insert the following lines into " | ||
- | < | ||
- | ; | ||
- | | ||
- | | ||
- | ; | ||
- | </ | ||
- | 14) save the config.file in (ATTENTION! VERY IMPORTANT!!) UTF-8-Format | ||
- | 15) download 7zsd_tools from http:// | ||
- | | ||
- | 16) open 7zsd_tools_150_2712.7z with 7Zip | ||
- | 17) copy 7zsd_LZMA2_x64.sfx to your working-dir (or if you have downloaded older versions the ' | ||
- | 18) Mark now the two folders " | ||
- | 19) Choose the following Parameters: | ||
- | | ||
- | | ||
- | |||
- | The filename I have chosen was " | ||
- | 20) Click OK and let 7Zip create your archive. | ||
- | 21) Now the contents of your working-dir should look like this: | ||
- | |||
- | WPS-Office | ||
- | ├ $_11_ | ||
- | ├ $PLUGINSDIR | ||
- | ├ 7zsd_LZMA2_x64.sfx | ||
- | ├ config.txt | ||
- | └ WPSOffice_10.2.0.7646_Free.7z (or what name ever you gave the 7z-Archive) | ||
- | | ||
- | 22) Open a CMD and change into your working-dir | ||
- | 23) Enter the following command: | ||
- | | ||
- | < | ||
- | copy /b 7zsd_LZMA2_x64.sfx + config.txt + WPS-Office_10.2.0.7646_Free.7z WPS-Office_10.2.0.7646_Free.exe | ||
- | </ | ||
- | |||
- | Now you will have a new setup-file in your working-dir. Start it and check it out, if the installation runs fine and if the folder c:\program files [(x32)]\WPS-Office will be created and if you have the links on your desktop. | ||
- | |||
- | HINT: if you don't like the icon shown in the new setup-file, it's possible to edit the " | ||
- | |||
- | If all is fine, we can start to create the opsi-files. | ||
- | |||
- | Tree:\\ | ||
- | ├ wps-office.jpg\\ | ||
- | ├ WPS-Office_10.2.0.7646_Free.exe | ||
- | ├ setup.ins\\ | ||
- | └ uninstall.ins\\ | ||
- | |||
- | |||
- | ==== setup.ins ==== | ||
- | |||
- | <code winst> | ||
- | ; Copyright (c) uib gmbh (www.uib.de) | ||
- | ; This sourcecode is owned by uib | ||
- | ; and published under the Terms of the General Public License. | ||
- | ; credits: http:// | ||
- | |||
- | [Initial] | ||
- | SetLogLevel=9 | ||
- | ; Log Errors in Logfile but don't abort: | ||
- | ExitOnError=false | ||
- | ; Show syntax errors in the script: | ||
- | ScriptErrorMessages=on | ||
- | ; Dont trace step by step through the script: | ||
- | TraceMode=off | ||
- | ; let started programs run in front of the winst window | ||
- | StayOnTop=false | ||
- | |||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $Picture$ | ||
- | DefVar $MinimumSpace$ | ||
- | DefVar $InstallDir32$ | ||
- | DefVar $InstallDir64$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicenseKey$ | ||
- | DefVar $LicensePool$ | ||
- | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | ||
- | DefVar $Version$ | ||
- | DefVar $Inst_Cmd$ | ||
- | DefVar $Inst_Prg32$ | ||
- | DefVar $Inst_Prg64$ | ||
- | DefVar $Uninst_Cmd$ | ||
- | DefVar $Uninst_Prg$ | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | ||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | ; | ||
- | ; therefore please: only lower letters, no umlauts, | ||
- | ; no white space use ' | ||
- | Set $ProductId$ | ||
- | Set $Version$ | ||
- | Set $MinimumSpace$ | ||
- | Set $Picture$ | ||
- | ; the path were we find the product after the installation - not needed here, because of the oem.ini! | ||
- | ;Set $InstallDir32$ | ||
- | ;Set $InstallDir64$ | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | Set $Inst_Prg32$ | ||
- | Set $Inst_Prg64$ | ||
- | Set $Uninst_Prg$ | ||
- | Set $Inst_Cmd$ | ||
- | Set $Uninst_Cmd$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | if not(HasMinimumSpace (" | ||
- | LogError "Not enough space on %SystemDrive%, | ||
- | isFatalError | ||
- | ; Stop process and set installation status to failed | ||
- | else | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | if $LicenseRequired$ = " | ||
- | comment " | ||
- | Sub_get_licensekey | ||
- | endif | ||
- | |||
- | comment " | ||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | comment "Start setup program" | ||
- | Winbatch_install_32 | ||
- | Sub_check_exitcode | ||
- | endif | ||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | Message " | ||
- | comment "Start setup program" | ||
- | Winbatch_install_64 | ||
- | Sub_check_exitcode | ||
- | endif | ||
- | |||
- | endif | ||
- | |||
- | |||
- | [Winbatch_install_32] | ||
- | %ScriptPath%\$Inst_Prg32$ $Inst_Cmd$ | ||
- | |||
- | [Winbatch_install_64] | ||
- | %ScriptPath%\$Inst_Prg64$ $Inst_Cmd$ | ||
- | |||
- | |||
- | [Sub_check_exitcode] | ||
- | comment "Test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | if ($ExitCode$ = " | ||
- | comment "Looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ | ||
- | |||
- | |||
- | |||
- | ==== uninstall.ins ==== | ||
- | |||
- | < | ||
- | [Initial] | ||
- | ExitOnError=true | ||
- | StayOnTop = true | ||
- | |||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $ProductId$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $NTVersioninfo$ | ||
- | DefVar $uninstallstring$ | ||
- | DefVar $Parameter$ | ||
- | DefVar $Picture$ | ||
- | DefVar $UninstPrg$ | ||
- | DefVar $Version$ | ||
- | |||
- | SetLogLevel=6 | ||
- | |||
- | ; ---------------Define some Variables here ---------------------- | ||
- | Set $ProductId$ | ||
- | Set $Picture$ | ||
- | Set $Version$ | ||
- | Set $UninstPrg$ | ||
- | Set $uninstallstring$ = " | ||
- | Set $Parameter$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | ShowBitmap | ||
- | Message " | ||
- | |||
- | ; 64 Bit OS | ||
- | if GetSystemType = "64 Bit System" | ||
- | comment " 64 Bit System" | ||
- | comment " $ProductID$ wird entfernt." | ||
- | Sub_uninstall | ||
- | endif | ||
- | |||
- | ; 32 Bit OS | ||
- | if GetSystemType = "x86 System" | ||
- | comment " 32 Bit System" | ||
- | comment " $ProductID$ wird entfernt" | ||
- | Sub_uninstall | ||
- | endif | ||
- | |||
- | |||
- | [Winbatch_remove] | ||
- | " | ||
- | |||
- | |||
- | [Sub_uninstall] | ||
- | Winbatch_remove | ||
- | Sub_check_exitcode | ||
- | comment " | ||
- | |||
- | |||
- | [Sub_check_exitcode] | ||
- | comment "Test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "Looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ |