Ejemplo n.º 1
0
        private static string getSliceCompilerArgs(Project project, bool depend)
        {
            IncludePathList includes =
                new IncludePathList(Util.getProjectProperty(project, Util.PropertyIceIncludePath));
            string extraOpts = Util.getProjectProperty(project, Util.PropertyIceExtraOptions).Trim();
            bool tie = Util.getProjectPropertyAsBool(project, Util.PropertyIceTie);
            bool ice = Util.getProjectPropertyAsBool(project, Util.PropertyIcePrefix);
            bool streaming = Util.getProjectPropertyAsBool(project, Util.PropertyIceStreaming);
            bool checksum = Util.getProjectPropertyAsBool(project, Util.PropertyIceChecksum);

            string args = "";

            if(depend)
            {
                args += "--depend ";
            }

            if(Util.isCppProject(project))
            {
                String dllExportSymbol = Util.getProjectProperty(project, Util.PropertyIceDllExport);
                if(!String.IsNullOrEmpty(dllExportSymbol))
                {
                    args += "--dll-export=" + dllExportSymbol + " ";
                }

                String preCompiledHeader = Util.getPrecompileHeader(project);
                if(!String.IsNullOrEmpty(preCompiledHeader))
                {
                    args += "--add-header=" + Util.quote(preCompiledHeader) + " ";
                }
            }

            if(Util.isSilverlightProject(project))
            {
                args += "-I\"" + Util.getIceSlHome() + "\\slice\" ";
            }
            else
            {
                args += "-I\"" + Util.getIceHome() + "\\slice\" ";
            }

            foreach(string i in includes)
            {
                if(String.IsNullOrEmpty(i))
                {
                    continue;
                }
                String include = Util.expandEnvironmentVars(i);
                if(include.EndsWith("\\", StringComparison.Ordinal) &&
                   include.Split(new char[]{'\\'}, StringSplitOptions.RemoveEmptyEntries).Length == 1)
                {
                    include += ".";
                }

                if(include.EndsWith("\\", StringComparison.Ordinal) &&
                   !include.EndsWith("\\\\", StringComparison.Ordinal))
                {
                   include += "\\";
                }
                args += "-I" + Util.quote(include) + " ";
            }

            if(!String.IsNullOrEmpty(extraOpts))
            {
                args += Util.expandEnvironmentVars(extraOpts) + " ";
            }

            if(tie && Util.isCSharpProject(project) && !Util.isSilverlightProject(project))
            {
                args += "--tie ";
            }

            if(ice)
            {
                args += "--ice ";
            }

            if(streaming)
            {
                args += "--stream ";
            }

            if(checksum)
            {
                args += "--checksum ";
            }

            return args;
        }
Ejemplo n.º 2
0
 public void load()
 {
     sliceIncludeList.Items.Clear();
     IncludePathList list =
                     new IncludePathList(Util.getProjectProperty(_project, Util.PropertyIceIncludePath));
     foreach(String s in list)
     {
         sliceIncludeList.Items.Add(s.Trim());
         if(Path.IsPathRooted(s.Trim()))
         {
             sliceIncludeList.SetItemCheckState(sliceIncludeList.Items.Count - 1, CheckState.Checked);
         }
     }
 }
Ejemplo n.º 3
0
 private IncludePathList sliceIncludes()
 {
     IncludePathList paths = new IncludePathList();
     foreach(String s in sliceIncludeList.Items)
     {
         paths.Add(s.Trim());
     }
     return paths;
 }
Ejemplo n.º 4
0
 /* public */
 /// <summary>
 /// Clears this instance
 /// </summary>
 public void Clear()
 {
     IncludePathList.Clear();
     TutorialList.Clear();
 }