Quantcast
Channel: rtrouton – Der Flounder
Viewing all articles
Browse latest Browse all 764

Building an SAP GUI installer for macOS

$
0
0

Since I’ve started working for my current employer, my colleagues and I have occasionally received the following question from various Mac admins:

“I’m using SAP in my environment. How do I deploy the Mac software for SAP?”

When we’ve followed up for more details, the “Mac software for SAP” usually means the SAP GUI software. SAP GUI comes in two flavors:

SAP GUI for Java supports the following operating systems:

  • openSUSE
  • Fedora
  • macOS
  • Microsoft Windows
  • AIX
  • Ubuntu

The SAP GUI for Java is what’s available for macOS, so how to get it and deploy it? For more details, please see below the jump.

Pre-requisite

SAP GUI is a Java application, so Java must be installed before proceeding further. As of October 11, 2018, I recommend installing the latest Oracle Java 8 JDK for macOS.

The Java JDK can be downloaded from the following website:

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Getting the SAP GUI for Java software

1. Go to the following link:

https://support.sap.com/en/my-support/software-downloads.html

2. Click on Support Packages & Patches

3. Click on Access Downloads

Screen Shot 2018 10 11 at 8 44 59 AM

4. Select By Category

Screen Shot 2018 10 11 at 8 45 46 AM

5. Select SAP Frontend Components

Screen Shot 2018 10 11 at 8 46 07 AM

6. Select SAP GUI for Java

Screen Shot 2018 10 11 at 8 47 59 AM

7. Click on the latest SAP GUI for Java

As of October 11, 2018, this will be SAP GUI for Java 7.50

8. Verify that the Items Available to Download drop-down menu is set to MAC OS

Screen Shot 2018 10 11 at 8 51 23 AM

9. Select and download the latest available PlatinGUI .jar file.

Screen Shot 2018 10 11 at 8 51 25 AM

Building configuration files

Along with the SAP GUI application, you can also prepare a set of pre-configured settings files for SAP GUI. These configuration files are described as part of the documentation for SAP GUI, in the Administration: Configuration Files section

Once you have your connections and settings files configured the way you want them, export them and name them as follows:

Connections: connections.template
Settings: settings.template

If you have additional exported settings, also follow the .template naming scheme.

Once you have your .template files ready, use the following Java command to create a file named templates.jar:

jar -cf /path/to/templates.jar /path/to/filename1.template /path/to/filename2.template /path/to/filename3.template

For example, if I have a settings.template file and a trustClassification.template file stored in my home folder, I would use the following Java command to create a templates.jar file on my user account’s Downloads folder:

jar -cf /Users/username/Downloads/templates.jar /Users/username/settings.template /Users/username/trustClassification.template

Screen Shot 2018 10 11 at 4 12 42 PM

Screen Shot 2018 10 10 at 3 20 44 PM

The .template files are stored inside the templates.jar file:

Screen Shot 2018 10 10 at 3 23 43 PM

Screen Shot 2018 10 10 at 3 23 40 PM

If the templates.jar file is in the same directory as the PlatinGUI .jar file when the installation process is run, the .template files will be installed along with the SAP GUI application and stored in SAP GUI.app/Contents/Resources.

Screen Shot 2018 10 11 at 2 24 23 PM

When a user launches the SAP GUI application, if they do not already have an ~/Library/Preferences/SAP directory, the settings.template and trustClassification.template files will be copied to the ~/Library/Preferences/SAP directory with the following filenames:

  • ~/Library/Preferences/SAP/settings
  • ~/Library/Preferences/SAP/trustClassification

Screen Shot 2018 10 11 at 2 28 02 PM

Building the SAP GUI installer

Pre-requisites:

  • Packages
  • SAP GUI for Java installer (this is the PlatinGUI .jar file)
  • templates.jar file (optional)

1. Set up a new Packages project and select Raw Package.

Screen Shot 2018 10 11 at 2 35 44 PM

2. In this case, I’m naming the project SAP GUI 7.50 rev4.

Screen Shot 2018 10 11 at 2 35 50 PM

3. Once the Packages project opens, click on the Project tab. You’ll want to make sure that the your information is correctly set here (if you don’t know what to put in, check the Help menu for the Packages User Guide. The information you need is in Chapter 4 – Configuring a project.)

Screen Shot 2018 10 11 at 2 36 16 PM

In this example, I’m not changing any of the options from what is set by default.

4. Next, click on the Settings tab. In the case of my project, I want to install with root privileges and not require a logout, restart or shutdown.

To accomplish this, I’m choosing the following options in the Settings section:

In the Tag section:

Identifier: set as appropriate (for my installer, I’m using com.sap.pkg.SAPGUI750rev4)
Version: set as appropriate (for my installer, I’m using 7.50.04 )

In the Post-installation Behavior section:

On Success: should be set to Do Nothing

In the Options section:

Require admin password for installation should be checked
Relocatable should be unchecked
Overwrite directory permissions should be unchecked
Follow symbolic links should be unchecked

Screen Shot 2018 10 11 at 2 36 54 PM

5. Select the Payload tab. Nothing here should be changed from the defaults.

Screen Shot 2018 10 11 at 2 37 03 PM

6. Select the Scripts tab. Under the Additional Resources section, add the following file:

The SAP GUI for Java installer (this is the PlatinGUI .jar file)

Screen Shot 2018 10 11 at 2 39 02 PM

Screen Shot 2018 10 11 at 2 39 10 PM

If you have a templates.jar file, also add that file.

Screen Shot 2018 10 11 at 11 32 53 AM

Screen Shot 2018 10 11 at 2 39 32 PM

Screen Shot 2018 10 11 at 3 57 33 PM

7. The last part is telling the SAP GUI for Java installer to run with the correct options selected. For this, you’ll need a postinstall script.

Screen Shot 2018 10 11 at 2 47 37 PM

See below the postinstall script being used for this installer package:

Once created, select the postinstall script and add it to the project.

Screen Shot 2018 10 11 at 2 48 39 PM

Screen Shot 2018 10 11 at 4 03 28 PM

8. Build the package. (If you don’t know to build, check the Help menu for the Packages User Guide. The information you need is in Chapter 3 – Creating a raw package project and Chapter 10 – Building a project.)

Screen Shot 2018 10 11 at 2 49 16 PM

Screen Shot 2018 10 11 at 2 49 57 PM

Testing the installer

Once the package has been built, test it by installing it on a test machine which has the following:

  • Java installed
  • Does not have the SAP GUI client installed

The end result should be that the SAP GUI client installs into /Applications.

Screen Shot 2018 10 11 at 3 05 49 PM

Screen Shot 2018 10 11 at 3 06 15 PM

If a templates.jar was included with the installer, the SAP GUI configuration template files specified by the templates.jar file should also be installed.

Screen Shot 2018 10 11 at 2 24 23 PM


Viewing all articles
Browse latest Browse all 764

Trending Articles