Managing File Sizes When Transporting Between Platforms

ID: Q120135

The information in this article applies to:

SUMMARY

When transporting objects such as screens between platforms such as from Windows to MS-DOS, the transporter will create additional objects (buttons, list boxes, and so on) that are platform-specific. The transported object will have information relevant to both platforms which will result in larger run-time files unless specific steps are taken to generate code for the specific platform the object was transported to.

MORE INFORMATION

When transporting an object from one platform to another, the transporter appends additional records to a screen SCX file. These additional records contain the platform-specific information necessary to run the object on the new platform. By default, when the transported screen is re-generated on the new platform, FoxPro creates an SPR with both the new platform and the old platform code. Consequently, the resulting SPR can be up to twice as large as it needs to be.

To remedy this problem, you must select the "xxx Objects only" (where "xxx" represents MS-DOS, WINDOWS, or MAC) box to generate code for the appropriate platform.

For example, in one test, we transported a screen created under FoxPro version 2.6 for Windows to FoxPro version 2.6 for MS-DOS. The screen was originally 14K in size. After transporting, the SCX file increased to 24K in size, due to the additional records added for the MS-DOS platform. When we regenerated the code without checking the "MS-DOS objects only" box, the resulting SPR code was 27K in size. But when we regenerated the code after selecting the "MS-DOS objects only" check box, the SPR code decreased to 16K in size, a net loss of 11K. This was because only code for the MS-DOS FoxPro environment was generated.

NOTE: if the screens are not a part of a project, then the "xxx objects only" box will have to be selected each and every time the screen is regenerated. Foxpro will use the default generator options. If, however, the screen is part of a project, it will only be necessary to set this option once. After that the setting for this option will be respected and only the platform-specific objects will be generated.

To permanently decrease the size of the SCX file for a given screen, you need to run the USE command (for example, USE CUSTOMER.SCX). Then run the DELETE FOR PLATFORM = <Platform type> cammand and use the PACK comment to pack the SCX. This is an alternate solution that keeps the SPR code from growing in size. Valid entries for the <Platform type> are MS-DOS, WINDOWS, MAC, and UNIX. All other platform values should be left alone.

Additional reference words: FoxMac FoxDos FoxWin 2.00 2.50 2.50a 2.50b 2.50c 2.60 2.60a Transport spr size KBCategory: kbenv kbtshoot KBSubcategory: FxenvGeneral

Last Reviewed: August 28, 1995