Main

April 25, 2008

Customizing Workspace in Under 5 Minutes

If you would like to do some simple customizations with WorkSpace 8.0.1 such as switching out the corporate logo and login screens, these steps should make your life easier.

First, download this sample WorkspaceCustomizationBatchFiles.zip from https://share.acrobat.com/adc/document.do?docid=bf6c4f37-12e5-11dd-acd1-65538200e0b2. This will provide you with batch files to help extract and then repackage the WorkSpace EAR file (these are not part of LC ES).

Download and unzip the file onto your C:\ drive into a folder of your choosing. No spaces in the folder name. In the directory you will find 4 batch files marked with easy to follow steps. (The last three could have been combined but I wanted to explain what goes on behind the scenes.)

Preparation
Before running any of these steps, you must have the 2.0.1 Flex JDK in your path as well as your Java SDK. Take note that the compile step will not work with the 3.0.0 JDK compiler.

  • C:\Program Files\Adobe\Flex Builder 3\sdks\2.0.1\bin

  • C:\Program Files\Java\jdk1.5.0_12\bin
  • Step1-CreateCustomizableWorkspaceEnvironment.bat
    The first step takes the EAR file from your J2EE deploy directory and extracts the files you need to customize the look and feel of WorkSpace. Although not required, you may want to change the WORKING_DIR to direct output to another location. What you will need to do is change the JBOSS_DIR to the directory where your LC EAR files are deployed. If you are using the default turn-key installation you won't need to change this.

    The first batch file covers these steps:

  • Set some variables so we're not hard-coding everything

  • Create the required directories

  • Backup the original EAR file

  • Extract the EAR file to a WAR file

  • Extract the WAR contents out to something we can use
  • Once the first step is complete you can quickly make changes to the images and style sheet that provide you with the look and feel of the default Workspace.

    The first image to start with would be the "login_splash.png" which gives you the background on the login screen. You can find this image under C:\WorkspaceCustomization\ExpandedWAR\images\login_splash.png. The next most obvious change would be the "corp-logo.png" image that is displayed at the top left hand corner of WorkSpace. This is found under C:\WorkspaceCustomization\ExpandedWAR\images\corp-logo.png.

    You have a choice to change the images by overwriting the existing files or simply change the HeaderPane or loginSplash sections in the C:\WorkspaceCustomization\ExpandedWAR\lc.css style sheet.

    Step2-CompileNewSWF.bat
    Once the images and style sheet have been changed we need to recompile the workspace-theme.swf file. This can be done by running the step 2 batch file. Again, be sure you are using the 2.0.1 SDK. To check, drop to a command line and run mxmlc.exe to see which version you are using.

    Step3-CreateNewWARFile.bat>
    The next step is to package up the changes into a WAR file. This step will create a new WAR file under C:\WorkspaceCustomization\NewWAR.

    Step4-CreateNewEARFile.bat
    Lastly, run step 4 and the new adobe-workspace-client.ear will be created under C:\WorkspaceCustomization\NewEAR.

    Deploy the new EAR file
    Backup and then delete the original adobe-workspace-client.ear file (Do NOT backup the ear file in the deploy directory or it will remain deployed). Under the default turn-key installation this can be found under C:\Adobe\LiveCycle8\jboss\server\all\deploy\adobe-workspace-client.ear. When you remove the file, you should receive a message in your log that indicates that the application has been undeployed:
    2008-04-25 13:14:19,041 INFO [org.jboss.deployment.EARDeployer] Undeploying J2EE application, destroy step: file:/C:/Adobe/LiveCycle8/jboss/server/all/deploy/adobe-workspace-client.ear

    Now copy the C:\WorkspaceCustomization\NewEAR\adobe-workspace-client.ear into the C:\Adobe\LiveCycle8\jboss\server\all\deploy directory to deploy the newly customized WorkSpace application.

    When deployed correctly your log should indicate that the new application has been deployed:
    2008-04-25 13:16:58,364 INFO [org.jboss.deployment.EARDeployer] Started J2EE application: file:/C:/Adobe/LiveCycle8/jboss/server/all/deploy/adobe-workspace-client.ear

    To test your new application, go to http://yourmachine:8080/workspace and make sure the changes have taken place (be sure to close and reopen your browser in case any caching has occurred).

    You should now have a slightly customized version of WorkSpace deployed!

    If you would like to go one step further and create a separate URL for your new WorkSpace, do the following BEFORE running the step 4 batch file.

  • Open the C:\WorkspaceCustomization\ExpandedEAR\META-INF\application.xml file

  • Change the value between the anotherdepartment tags to a URL that you require

  • Run the step 4 batch file

  • Rename the EAR to something that does not conflict with the already deployed WorkSpace file C:\WorkspaceCustomization\NewEAR\another-adobe-workspace-client.ear
  • This is useful when creating Workspace versions that look slightly different for different groups or departments without having to change the underlying Flex application.