MapObjects打包问题

来源:互联网 发布:php清除cdn缓存 编辑:程序博客网 时间:2024/05/29 13:47

在用MO进行二次集成开发后,根据需求可能会进行软件打包,打包软件可以自己去下,如:installshield,那如何将MO中的各控件打包呢?具体内容如下:

1、将mo所需注册的几个文件放在filegruop中作为一个filegroup,名称为modll,当然你可以用其它的名称,把modll这个filegroup的self_registered属性设为no,destination属性(也就是路径属性)设为<commonfiles>/esri,也就是将mo的这几个dll拷到//common
            files/esri目录下。下面我介绍一下这几个mo的dll文件:
            File Version Comments   
                                                
            MO20.ocx  2.0.1.0 MapObjects2.0 ActiveX Control
            Shape20.dll    2.0.1.0 Shape support library
            AF20.dll 2.0.1.0 MapObjects support library
            AFCust20.tlb  - AF20 custom type library
            PE.dll 4.0.0 SDE 3.0 projection support library
            SG.dll 3.0.2.1 SDE 3.0 shape geometry support library
            MTCH.dll 8.0.185 Address Matching support library
            上面的这几个文件是必须的,以下几个文件根据你的功能要求添加
            Coverage20.dll   2.0.1.0 Coverage support library
            CAD20.dll 2.0.1.0 CAD support library
            Edat.dll     - CAD support library
            PANIO.dll     - CAD functions support library
            MoSde302.dll 2.0.1.0 SDE 3.0 support library
            SDE30.dll 3.0.2.1 SDE 3.0 extension library
            VPF20.dll 2.0.1.0 VPF support library
            MoSde302Table.dll      2.0.1.0 SDE 3.0 table support library
            OdbcTbl20.dll  2.0.1.0 ODBC support library
            InfoTable20.dll    2.0.1.0 INFO table support library
            JetTable20.dll     2.0.1.0 JET table support library
            AIImage20.dll     2.0.1.0 Image support library
            libtiff.dll     - Image support library
            elib.dll 8.3.1 Image support library
            efileio.dll     - Image support library
            ergxlib.dll     - Image support library
            ethrlib.dll     - Image support library
            ISO8211.dll     - Image support library
            Mobase.dll 2.0.1.0 MapObjects2.0 Grid support library
            Mofeat.dll 2.0.1.0 MapObjects2.0 Grid support library
            Mogridio.dll 2.0.1.0 MapObjects2.0 Grid support library
            dforrt.dll 6.0.612.101 Fortran Link Library
            MoMrSID.dll 2.0.1.0 MrSID Image support library
            MrSIDD.dll 2.0.0.0 MrSID Image support library
            以上的这些文件你可以在装过mo的机器的//common files/esri目录下找到。

            2、类似于第1步,把mo20需要的几个系统文件放在filegruop中作为一个filegroup,名称为system,当然你可以用其它的名称,把system这个filegroup的self_registered属性设为no,destination属性(也就是路径属性)设为<WINSYSDIR>,也就是将这几个dll拷到SYSTEM目录下。(如果2000或NT为system32,如果98为system),下面我介绍一下这几个dll
            Ctl3d32.dll
            mfc42.dll
            Msvcirt.dll
            Msvcp60.dll
            msvcrt.dll
            Msvcrt40.dll
            oleaut32.dll
            olepro32.dll
            stdole2.tlb
            其中你不要把这些dll都加到system这个filegruop中,因为这些是系统文件,系统本来就有的。我当初在2000下打包时把这些dll都加了进去,结果导致我的打包文件只能在2000下用,98下mo的一些dll注册不了,这个问题困扰了我好几天,也是我觉得嘴容易出错的地方。其实上面的几个文件只要把Msvcp60.dll这个文件加到system这个filegruop中就可以了,其它的千万不要加。Msvcp60.dll这个文件这个文件在system系统目录下可以找到(装过mo的机器)。

            3、把下面这几行加到installshield的脚本中的onfirstuiafter过程中,作用是在机器重启或执行注册。
            RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);  
            ("SoftwareMicrosoftWindowsCurrentVersionRunOnce","ESRISetup0",REGDB_STRING,"""
            + WINSYSDIR^ "RegSvr32.exe"+"""+ " /s " +"""+WINSYSDIR^
            "msvcrt.dll"+""",-1);
                 
            RegDBSetKeyValueEx("SoftwareMicrosoftWindowsCurrentVersionRunOnce","ESRISetup0",REGDB_STRING,"""
            + WINSYSDIR^ "RegSvr32.exe"+"""+ " /s " +"""+WINSYSDIR^
            "Mfc42.dll"+""",-1);
                 
            RegDBSetKeyValueEx("SoftwareMicrosoftWindowsCurrentVersionRunOnce","ESRISetup1",REGDB_STRING,"""
            + WINSYSDIR^ "RegSvr32.exe"+"""+ " /s " +"""+WINSYSDIR^
            "Olepro32.dll"+""",-1);   
                 
            RegDBSetKeyValueEx("SoftwareMicrosoftWindowsCurrentVersionRunOnce","ESRISetup2",REGDB_STRING,"""
            + WINSYSDIR^ "RegSvr32.exe"+"""+ " /s " +"""+WINSYSDIR^
            "Oleaut32.dll"+""",-1);   
                  
                 
            RegDBSetKeyValueEx("SoftwareMicrosoftWindowsCurrentVersionRunOnce","ESRISetup3",REGDB_STRING,"""+WINSYSDIR^"RegSvr32.exe
            "+"""+" /s "+"""+COMMONFILES^"ESRImo20.ocx"+""",-1);   
                 
            RegDBSetKeyValueEx("SoftwareMicrosoftWindowsCurrentVersionRunOnce","ESRISetup4",REGDB_STRING,"""+WINSYSDIR^"RegSvr32.exe
            "+"""+" /s "+"""+COMMONFILES^"ESRIShape20.dll"+""",-1);   
                 
            RegDBSetKeyValueEx("SoftwareMicrosoftWindowsCurrentVersionRunOnce","ESRISetup5",REGDB_STRING,"""+WINSYSDIR^"RegSvr32.exe
            "+"""+" /s "+"""+COMMONFILES^"ESRIOdbcTbl20.dll"+""",-1);
                 
            RegDBSetKeyValueEx("SoftwareMicrosoftWindowsCurrentVersionRunOnce","ESRISetup6",REGDB_STRING,"""+WINSYSDIR^"RegSvr32.exe
            "+"""+" /s "+"""+COMMONFILES^"ESRIJetTable20.dll"+""",-1);
                 
            RegDBSetKeyValueEx("SoftwareMicrosoftWindowsCurrentVersionRunOnce","ESRISetup2",REGDB_STRING,"""
            + WINSYSDIR^ "RegSvr32.exe"+"""+ " /s " +"""+WINSYSDIR^
            "MSXBSE35.DLL"+""",-1);

            4、注册字体。依照前两步,把字体文件拷到系统的fonts目录中,在脚本中添加注册语句,如:if
            (RegDBKeyExist("SoftwareMicrosoftWindows NTCurrentVersionFonts")==1)
            then
                   RegDBSetKeyValueEx("SoftwareMicrosoftWindows
            NTCurrentVersionFonts","ESRI Crime Analysis
            (TrueType)",REGDB_STRING,"Esri_8.ttf",-1);
                 
            elseif(RegDBKeyExist("SoftwareMicrosoftWindowsCurrentVersionFonts")==1)
            then
                     
            RegDBSetKeyValueEx("SoftwareMicrosoftWindowsCurrentVersionFonts","ESRI
            Crime Analysis (TrueType)",REGDB_STRING,"Esri_8.ttf",-1);
                 endif;   
            其中的判断语句为判断系统为98或2000。

原创粉丝点击