Thursday, September 30, 2010

EnLiten Tip - Unpacking for cross-platform





Are you using EnLiten files to show colleagues and customers your simulation results?

If so, are you using the "self-extracting" or "pack-n-go" feature?

The one problem that might occur is that you give one of these files to a Mac user, what can they do? How can a Mac user to play a "self-extracting Windows EnLiten File" on their Mac?

I know the .els content is in there somewhere. Trying to open it by just selecting it in Mac EnLiten seems like the natural thing. Barring that, how can I "show the package contents"?

Solution:

Basically, there is a program
in the 'apex12' directory (command line only) that can extract
the embedded files from both version 1 and version 2 pack and
go files from any target architecture to your current platform.
It is called 'unpackngo' of course :). Some details from the
FAQ:

---------------------------------------------------------------------
There are two versions of CEI pack and go executables.

Version 1 files are generated from within EnLiten on the Windows platform only. In this case, when you run the embedded .exe the "File" menu will have a"Save extracted embedded files..." menu option that can be used to extract the .els files. Note: V1 files can also be extracted on other platforms using the unpackngo application documented for version 2 files.

Version 2 files are generated from the GUI or scripts within EnSight and are available on most platforms. They can contain EnLiten, EnVideo or Reveal files. In this case, there are command line options and a stand-alone tool that can be used to extract the files on any platform. If you run the embedded .exe with the -help option:

{embeddedfile} -help
Copyright (C) 2006, Computational Engineering International
Architecture: win32 Version: 1.00 Build date: May 15 2007
Usage: c:\Program Files\CEI\apex12\machines\win32\unpackngo.exe [options]
Options:
-dst {destdir} Select destination directory (default:system temp)
-src {archive} Select source (default:this file)
-key {key} Verify digital signature using key (default:none)
-extract Extract files from archive (default: run files)
-v Verbose mode

To extract the embedded files, use the following command:

{embeddedfile} -v -extract -dst c:\some\path\to\save\files\in

In the latest versions of EnSight there is a tool called: 'unpackngo.exe' that can extract files from an embedded executable. The most recent versions can extract files from both V1 and V2 formats. An example (under Windows):

unpackngo.exe -v -extract -dst c:\some\dir -src {embedded.exe}

unpackngo also works cross-platform. We supply unpackngo on Unix as well as Windows and it can extract files from any target architecture. The program is located at: $CEI_HOME\apex12\machines\$CEI_ARCH\unpackngo


0 comments:

Post a Comment