Archived

This forum has been archived. Please start a new discussion on GitHub.

Deployment with v3.2

Hello,
I have a question related to deployment. Does migration to v3.2 has any impact on it? MFC-based application doesn't work after re-deployment, even though deployment package includes ice32.dll and iceutil32.dll, and MyApp.dll is deployed into the same directory as those two files; setting environment path variable %Ice%\bin seems to fix the issue.
Am I missing some settings in my Deployment project? (.msi in VC v7.1 on Windows 2000/XP). I have not experienced any issues with ICE v2.1.2.
Thank you
Yuri

Comments

  • matthew
    matthew NL, Canada
    If adding the Ice bin directory to your path resolves the issue then it sounds to me like you are missing some DLL.
  • Thanks for your response, Matthew,
    How would you recommend to determine which one is missing? Additional dependencies I include using project settings are Ice.lib IceUtil.lib;
    Here are includes into header file generated from MyQuery.ice file:
    #include <Ice/LocalObjectF.h>
    #include <Ice/ProxyF.h>
    #include <Ice/ObjectF.h>
    #include <Ice/Exception.h>
    #include <Ice/LocalObject.h>
    #include <Ice/Proxy.h>
    #include <Ice/Object.h>
    #include <Ice/Outgoing.h>
    #include <Ice/Incoming.h>
    #include <Ice/Direct.h>
    #include <Ice/UserExceptionFactory.h>
    #include <Ice/FactoryTable.h>
    #include <Ice/StreamF.h>
    #include <Ice/Identity.h>
    #include <Ice/UndefSysMacros.h>

    Bellow are includes in cpp file:
    #include "MyQuery.h"
    #include <Ice/LocalException.h>
    #include <Ice/ObjectFactory.h>
    #include <Ice/BasicStream.h>
    #include <Ice/Object.h>
    #include <IceUtil/Iterator.h>
    #include <IceUtil/ScopedArray.h>

    As result of the build, files ice32.dll and iceutil32.dll are included into the deployment package. Please suggest the ICE documentation I should read.
    Thank you
  • bernard
    bernard Jupiter, FL
    The dependencies are usually very easy to figure out: if you want to use IceUtil features, you include <IceUtil/IceUtil.h>, and if you want to use Ice (core) features, you include <Ice/Ice.h>. And you always link with the Ice and IceUtil DLL, using ice.lib iceutil.lib or iceD.lib and iceutilD.lib depending on your build configuration.

    Since you're building this application yourself, the libraries dependencies are most likely listed on your link command (look for the ".lib" files).

    But if there is any doubt, you can also use:
    > dumpbin /imports <your exe or DLL>

    (dumpbin is a Visual Studio command-line tool)

    Cheers,
    Bernard
  • Bernard, thank you for your comments,
    but still I need to ask for help again. Bellow are 2 lists of dumpbin imports: one is for My.dll built with ICE v2.1.2, second - built with ICE v3.2. Those lists look identical as following:
    FIRST with v2.1.2:
    Dump of file XBI.dll
    File Type: DLL
    Section contains the following imports:
    ice21.dll
    iceutil21.dll
    MFC71.DLL
    MSVCR71.dll
    KERNEL32.dll
    USER32.dll
    GDI32.dll
    SHELL32.dll
    COMCTL32.dll
    SHLWAPI.dll
    ole32.dll
    OLEAUT32.dll
    MSVCP71.dll
    WS2_32.dll
    ADVAPI32.dll
    oledlg.dll
    Summary
    35000 .data
    74000 .rdata
    40000 .reloc
    30000 .rsrc
    1C4000 .text

    SECOND with ICE v3.2
    Dump of file XBI.dll
    File Type: DLL
    Section contains the following imports:
    ice32.dll
    iceutil32.dll
    MFC71.DLL
    MSVCR71.dll
    KERNEL32.dll
    USER32.dll
    GDI32.dll
    SHELL32.dll
    COMCTL32.dll
    SHLWAPI.dll
    ole32.dll
    OLEAUT32.dll
    MSVCP71.dll
    WS2_32.dll
    ADVAPI32.dll
    oledlg.dll
    Summary
    16000 .data
    69000 .rdata
    37000 .reloc
    30000 .rsrc
    193000 .text

    The build with ICE v2.1.2 works fine, the one with ICE v 3.2 seems to work on the same PC only after adding Ice bin directory to path. Deployment package contains the same number of dll files(mfc, msvc71) with appropriate ice<version>.dll and iceutil<version>.dll. What could be missing here? Please advise.
    Thank you in advance
    Yuri
  • bernard
    bernard Jupiter, FL
    Please add bzip2.dll (ice32.dll depends on it).

    It's possible that as of Ice 2.1.2, the corresponding bzip code was inside the Ice DLL, and not in a separate DLL.

    Cheers,
    Bernard
  • Bernard,
    adding bzip2.dll resolves the issue. Thank you!
    And which corresponding lib should I link my project with in order to include bzip2.dll into deployment package, or should it be linked automatically?
    Regards
  • bernard
    bernard Jupiter, FL
    Glad to hear this fixed your problem!

    bzip2.dll is a dependency of ice32.dll. You don't need to link your own DLL directly with bzip2; the Ice binary distribution does not even include the corresponding import library (.lib file).

    Cheers,
    Bernard
  • Bernard,
    OK, it looks to me like my development PC environment has Ice bin directory added to the path, so when I'm building the deployment project, the fact that bzip2.dll is a dependency of ice32.dll is not detected; as a result the bzip2.dll code is not being included into ice32.dll.. does it sound reasonable to you?
    Thanks for your support.
  • bernard
    bernard Jupiter, FL
    Hi Yuri,

    I did not use Visual Studio deployment projects recently, but, yes, it appears likely that Visual Studio does not detect bzip2.dll as a dependency of ice32.dll.
    There is probably a way to add 'bzip2.dll' manually to the list of files you want to include in your .msi.

    For assistance with Visual Studio, I'd recommend to post your question on a Microsoft newsgroup.

    Cheers,
    Bernard
  • Thank you, Bernard
  • Bernard,
    Including bzip2.dll does not resolve the issue on the Windows 2K platform. Is there anything else I might be missing.
    Thanks
  • Never mind.. It's OK now