Home Help Center

Ice VS 2008 Addin inserts hard paths, not environmnet variable base paths

rpetersrpeters Member Rich PetersOrganization: braxton technologyProject: cross platfrom JNI replacement ✭✭
Inside of the ice configuration I specify $(Ice) which is an environment variable that points to the ice installation.

This and the expansions from it get stored in the .vcproj file has hard paths. See the snippets below.
That is very unfriendly and unworkable for multiple developers and build processes.


Here are some if the hard snippets:
<code>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""$(QTDIR)\include" ; .\GeneratedFiles\ ; ".\GeneratedFiles\$(ConfigurationName)" ; "$(QTDIR)\include\QtCore" ; "$(QTDIR)\include\QtXml" ; "$(QTDIR)\include\QtNetwork" ; "$(BtSharedDir)" ; ..\ ; ..\Shared ; .\ ; . ; C:\Program Files\ZeroC\Ice-3.4.0\include"
PreprocessorDefinitions="UNICODE,WIN32,QT_THREAD_SUPPORT,QT_NO_DEBUG,NDEBUG,QT_CORE_LIB,QT_XML_LIB,QT_NETWORK_LIB"
RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="qtmain.lib QtCore4.lib QtGui4.lib QtXml4.lib QtNetwork4.lib Ice.lib IceUtil.lib"
OutputFile="$(OutDir)\$(ProjectName).exe"
AdditionalLibraryDirectories=""$(QTDIR)\lib" ; "$(Ice)\lib" ; $(BtSharedDir)\Libs ; ..\Shared\Libs ; C:\Program Files\ZeroC\Ice-3.4.0\lib"
GenerateDebugInformation="true"
SubSystem="1"
LinkTimeCodeGeneration="1"
/>
<Global
Name="ZerocIce_HomeExpanded"
Value="C:\Program Files\ZeroC\Ice-3.4.0"
/>
</code>

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Rich,

    I agree, the add-in should not include such expanded path in the project file.

    We actually looked briefly into this issue for the 3.4.1 release (it was reported earlier - see http://www.zeroc.com/forums/help-center/4942-ice-3-4-vs-plug-team-setting.html); unfortunately this was not high priority and we didn't incorporate a fix in 3.4.1.

    Best regards,
    Bernard
  • rpetersrpeters Member Rich PetersOrganization: braxton technologyProject: cross platfrom JNI replacement ✭✭
    It would be really good if this could be fixed. Our build machines never have the same deployment as the dev machines, making the suggested solution of using the same location unworkable.

    Also, you need to consider that the use of the environment variable allows different releases of ice to be used without changing the communal vcproj file.

    This really should be a priority fix.

    thanks
    Rich
  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    The issue that Bernard is referring to about writing the full paths to the project file is only an issue because it causes the project files to be modified when the Ice installation is located in different locations on different machines. This means that if the project is in a code repository of some kind you will potentially get unnecessary commits of the project files when your developers commit other changes.

    However, having the projects actually work on different machines with Ice installations in different locations specified by an environment variable should not be an issue. The plugin is able to detect this and adjust the paths accordingly when the project is opened. If this is not working for you then there is a bug in the plugin. Have you tried this and confirmed that it does not work?
  • rpetersrpeters Member Rich PetersOrganization: braxton technologyProject: cross platfrom JNI replacement ✭✭
    Dwane, please see what happened to the vcproj file, It has hard paths inserted into it and checked into source control.

    The reason I brought this up is that it caused build failures and failures on other developers machines
  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    Hi Rich,

    I have not been able to reproduce failures like you describe. Yes, there are hard paths in the vcproj file but as I said the addin is designed to recognize when the value of the environment variable changes (whether on a single machine or when project is used on a different machine) and deal with it. In my testing it appears to work.

    When the project file is written it contains settings like the following.
            <Globals>
                    <Global
                            Name="ZerocIce_Enabled"
                            Value="True"
                    />
                    <Global
                            Name="ZerocIce_Home"
                            Value="$(ICE_HOME)"
                    />
                    <Global
                            Name="ZerocIce_HomeExpanded"
                            Value="C:\Program Files (x86)\ZeroC\Ice-3.4.1"
                    />
            </Globals>
    
    When the project is opened the addin recognizes that an environment variable is being used for Ice Home and adjusts paths in lib, include, etc if the expanded setting is not the same as when the project was previously opened.

    Like I mentioned this can cause unneeded changes in the projects that can pollute commits (which we plan to look into changing) but it should not produce build problems.

    Therefore the question is what is different about your usage that is causing problems? It appears you are using Ice 3.4.0. What OS are you using? Did you have any other versions of Ice installed when you installed 3.4.0?

    Also could you see if you still have the same issue with the recently released Ice 3.4.1?
  • rpetersrpeters Member Rich PetersOrganization: braxton technologyProject: cross platfrom JNI replacement ✭✭
    Dwayne,

    It looks like the issue is that my files dont have this section:
    <Global
    Name="ZerocIce_Home"
    Value="$(ICE_HOME)"
    />

    They just have the HomeExpanded key

    to answer your questions:
    OS is windows XP SP3
    Ice 3.31 was installed at the time I installed the 3.4.0 addin.
    I am not able to update to 3.4.1 immediately, but I will try it in a few days.

    Rich
  • rpetersrpeters Member Rich PetersOrganization: braxton technologyProject: cross platfrom JNI replacement ✭✭
    Dwayne,

    As I mentioned, our build is failing since we incorporated the ice plugin. We have an environment variable called Ice which points to ice. We reference it as the Ice home in the vcproj file. here is the snippet from the vcproj file


    <Global
    Name="ZerocIce_Enabled"
    Value="True"
    />
    <Global
    Name="ZerocIce_Home"
    Value="$(Ice)"
    />
    <Global
    Name="ZerocIce_HomeExpanded"
    Value="C:\Program Files\ZeroC\Ice-3.4.0"
    />



    upon building we get a message:

    Error 1 C:\Program Files\ZeroC\Ice-3.4.0\bin\x64\slice2cpp.exe not found. Review 'Ice Home' setting. e:\Build\WCell-2.0.0.63\WCNetReceiver\WcNetControlInterface.ice 0

    Now, where can the x64 stuff be coming from? This is a 32 bit machine, and we have never hosted on a 64 bit machine.
    Do you have any ideas about this?
    thanks
    Rich
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Rich,

    Regarding this strange "C:\Program Files\ZeroC\Ice-3.4.0\bin\x64\slice2cpp.exe", I just checked the code, and it's a bug. If the add-in cannot find slice2cpp in "iceHome"\bin, it tries "iceHome"\bin\x64\slice2cpp, without checking this file actually exists.

    Is $(Ice) a system environment variable on your system? Does it point to C:\Program Files\ZeroC\Ice-3.4.0?

    Thanks,
    Bernard
  • rpetersrpeters Member Rich PetersOrganization: braxton technologyProject: cross platfrom JNI replacement ✭✭
    Bernard,

    yes it is defined and points to the proper location of ICe, which in this case is E:\Program Files\ZeroC\Ice-3.4.0

    Does the environment variable Icehome have special meaning?

    thanks
    Rich
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Rich,

    The add-in currently sets this environment variable IceHome, which is not documented (and could be removed soon). Otherwise, it doesn't have a special meaning.

    Another undocumented feature of the add-in is the default Ice home, in case you don't set it explicitly: it's the directory of the add-in itself (less \bin). There is no C:\Program Files\ZeroC hard-coded anywhere.

    Presumably you have the add-in installed in $(Ice) (on E: ), so even if Visual Studio and the add-in don't see $(Ice) for some reason, the add-in should default to the correct Ice Home. I can't see what's wrong here. We'll try to reproduce this bug.

    Thanks,
    Bernard
  • mwtuppermwtupper Member Michael TupperOrganization: BraxtonProject: ACE
    After instructing the complier to the source code directory (C:\Ice-3.4.0\cpp\src) the slice2cpp is not found. It seems to have changed the IceHome directory but the Ice Home under Ice Configuration is still set to (C:\Ice-3.4.0). I found some (C:\Ice-3.4.0\cpp\include & C:\Ice-3.4.0\cpp\Lib) in the vcproj file and removed them. But the error still occurs.

    Error 1 C:\Ice-3.4.0\cpp\bin\slice2cpp.exe not found. Review 'Ice Home' setting. c:\DEV\ACE4\BtFrameSync\BtFrameSync.ice 0
Sign In or Register to comment.