コード例 #1
0
ファイル: DefaultPlatform.cs プロジェクト: elpoch/Sharpmake
        public string GetDefaultOutputExtension(Project.Configuration.OutputType outputType)
        {
            switch (outputType)
            {
            case Project.Configuration.OutputType.Exe:
            case Project.Configuration.OutputType.DotNetConsoleApp:
            case Project.Configuration.OutputType.DotNetWindowsApp:
                return("exe");

            case Project.Configuration.OutputType.Lib:
                return("lib");

            case Project.Configuration.OutputType.Dll:
            case Project.Configuration.OutputType.DotNetClassLibrary:
                return("dll");

            case Project.Configuration.OutputType.None:
                return(string.Empty);

            default:
                return(outputType.ToString().ToLower());
            }
        }
コード例 #2
0
            public string GetDefaultOutputExtension(Project.Configuration.OutputType outputType)
            {
                switch (outputType)
                {
                // Using the Unix extensions since Darwin is a Unix implementation and the
                // executables Mac users interact with are actually bundles. If this causes
                // issues, see if using .app for executables and .dylib/.framework for
                // libraries work better. iOS is Darwin/Cocoa so assuming that the same goes
                // for it.
                case Project.Configuration.OutputType.Exe:
                case Project.Configuration.OutputType.IosApp:
                case Project.Configuration.OutputType.IosTestBundle:
                    return(string.Empty);

                case Project.Configuration.OutputType.Lib:
                    return("a");

                case Project.Configuration.OutputType.Dll:
                    return("so");

                // .NET remains the same on all platforms. (Mono loads .exe and .dll regardless
                // of platforms, and I assume the same about .NET Core.)
                case Project.Configuration.OutputType.DotNetConsoleApp:
                case Project.Configuration.OutputType.DotNetWindowsApp:
                    return("exe");

                case Project.Configuration.OutputType.DotNetClassLibrary:
                    return("dll");

                case Project.Configuration.OutputType.None:
                    return(string.Empty);

                default:
                    return(outputType.ToString().ToLower());
                }
            }