CiscoSystems/HowToBuildCrossOverRpm

= How To Build the CrossOver RPM = Note - All actions performed as root - do NOT use sudo - you must be logged in as root.

Some docs are located at http://www.codeweavers.com/support/docs/crossover-pro/multiplesystems

This is taken from the original page on the Cisco Linux Twiki

Prepare for the install:

 * Turn off the automounter, make sure /usr/cisco is NOT mounted otherwise the perl scripts that run during install will come over NFS and it takes longer to install.
 * Make sure all remnants of any previous install are removed.
 * No /opt/cxoffice
 * No /root/.loki
 * No /root/.cxoffice

Main Install:

 * Install cxoffice (into /opt/cxoffice - default)
 * Exit setup program (This is not necessary for the 3.X product)
 * Run cxmultiuser script (This is not necessary for the 3.X product)
 * Run /opt/cxoffice/bin/cxsetup
 * Install DCOM95
 * Install IE6
 * Install Office XP
 * From CDROM (archive of CDs available in /auto/linux/sandbox/cxoffice)
 * Custom Install, select Word, Excel, Powerpoint and FrontPage
 * If you get a warning message about a .DLL than cannot be registered click the 'Ignore' button.
 * Service Pack 1
 * Service Pack 2
 * Install any missing standard fonts
 * Install MMXP
 * Install SofToken II
 * Install Remedy

Post Install:

o Edit /opt/cxoffice/support/dotwine/fake_windows/Windows/Icons/icons.db, Add:
 * Add the entry for Softoken II (and any other menu customizations)

[SofToken II] --link=Programs/SofToken II --path=C:\\Program Files\\Secure Computing\\SofToken-II\\SofToken-II.exe --menu= --icon=/opt/cxoffice/support/dotwine/fake_windows/Windows/Icons/stinit.xpm

o Go to Menus tab, find SofToken II entry and hit the "Recreate menu entry" button. o Verify there is a menu entry in the Windows Applications -> Programs folder in the Ximian Programs menu.
 * The file above (icons.db) is the file used by /opt/cxoffice/bin/cxmenu to create menus. This command can be called with the --createall option to attempt to create all menus.
 * Run /opt/cxoffice/bin/cxsetup

Clean Up:

rm -rf /opt/cxoffice/support/dotwine/fake_windows/Windows/Windows\ Update\ Setup\ Files rm -rf /opt/cxoffice/support/dotwine/fake_windows/Windows/*.[Tt] xt rm -rf /opt/cxoffice/support/dotwine/fake_windows/Windows/*.[Bb] [Aa] [Kk] rm -rf /opt/cxoffice/support/dotwine/fake_windows/Windows/*.[Ll] [Oo] [Gg] rm -rf /opt/cxoffice/support/dotwine/fake_windows/Windows/*.tmp rm -rf /opt/cxoffice/support/dotwine/fake_windows/Windows/Temp/* rm -rf /opt/cxoffice/support/dotwine/fake_windows/Windows/Temporary\ Internet\ Files/Content.IE5 rm -rf /opt/cxoffice/support/dotwine/fake_windows/Windows/Installer rm -rf /opt/cxoffice/support/dotwine/fake_windows/Temp/* rm -rf /opt/cxoffice/support/dotwine/fake_windows/Config.Msi chmod 666 /opt/cxoffice/support/dotwine/drive_c/Program\ Files/Remedy/Home/AR

Verify Applications Run:


 * Use a 'clean' user - either create a test account or make sure you run as a non-root user and that there is no existing .cxoffice directory in that user's home directory.

Build the RPM:


 * Edit /opt/cxoffice/support/template.spec. Above the Requires line, add:

Prereq   : gnome-vfs2


 * Run /opt/cxoffice/bin/buildrpm cisco.X as root, replacing the 'X' with a revision number.

Installing the RPM:


 * When testing the install of the RPM, do NOT use sudo - use 'sudo su -' or log in as root.

Crossover 5.00

Things are a little different with Crossover 5.00. Now things can be broken up into bottles. You can install different programs into different bottles. Then each bottle can be put into it's own RPM. Code Weavers has made it much easier now to package things as RPMS.

Their is no longer a need to backup up the base crossover program along with you windows programs. You can install the Crossover Pro RPM on first which is supplied by Code Weavers. Then you install programs into a bottle. The default bottle is called 'dotwine'. Then you create an RPM of the dotwine bottle.

On a new system you install the base Crossover RPM, plus the bottle RPM and that's it. Your ready to go.

Preparing the Installation

Use cxsetup to create your bottle environment and install the programs you want in your bottle.

Next you may feel you need to alter some of the menus.


 * if you want to remove some menu, go in CrossOver? Setup's Menu tab and deselect that menu. Unlike in 4.x and earlier versions, this is persistent, that is, if you make an RPM of the bottle and install it on another computer, the menus you have disabled will not be installed.


 * if you want to add custom menus and you have a .lnk files for them, the best is to just place them in 'c:\Windows\Start Menu' and then run:

~/cxoffice/bin/cxmenu --bottle win98 --sync --mode install


 * if you want your menus to start arbitrary Unix commands, then you can create them using the following cxmenu command:

~/cxoffice/bin/cxmenu --bottle win98 --create "StartMenu/Folder/MyApp" --description "Nice App" --mode install --command "\${CX_ROOT}/bin/wine --cx-app nice_app.exe" --shortcut my_app

or

~/cxoffice/bin/cxmenu --bottle win98 --create "StartMenu/XEyes" --description "Big Brother" --mode install --command "/usr/bin/X11/xeyes"

Of course you can also edit the cxmenu.conf file directly. It is not documented but the format is pretty simple. You can also look at cxoffice/support/crossover.menu for an example. And just in case you have localized menus, this is a UTF-8 file, so any language goes.

Creating the Bottle RPM

The RPM is created using a basic template located here /opt/cxoffice/support/cxbootle.spec. When a bottle RPM is installed as a user using sudo, menu creation commands will try and modify .cxoffice menu files in the users home directory. This isn't good since in most cases the sudo root user will get squashed and as a result create a bunch of error messages. Instead we want all menu creation to be done to the global environment. Therefore template needs to be modified to set $HOME to /root.

Edit /opt/cxoffice/support/cxbootle.spec and add these two lines to the very beginning of the %post section.

export HOME=/root


 * Select the Manage Bottles Tab.
 * Select the bottle you want to create an RPM of.
 * Click the Create RPM Button.
 * Change the tag to something like 'cisco.1'. This will end up as part of the release number in the RPM.
 * /opt/cxoffice/bin/cxbottle --bottle dotwine --rpm tag