Esempio n. 1
0
 Init(
     Bam.Core.Module parent)
 {
     base.Init(parent);
     this.RegisterGeneratedFile(Key, this.CreateTokenizedString("$(packagebuilddir)/$(moduleoutputdir)/$(OutputName)$(exeext)"));
     this.Linker = DefaultToolchain.C_Linker(this.BitDepth);
     if (this.BuildEnvironment.Platform.Includes(Bam.Core.EPlatform.Windows))
     {
         if (this.Linker.Macros.Contains("pdbext"))
         {
             this.RegisterGeneratedFile(PDBKey, this.IsPrebuilt ? null : this.CreateTokenizedString("@changeextension($(0),$(pdbext))", this.GeneratedPaths[Key]));
         }
     }
     this.PrivatePatch(settings =>
     {
         var linker        = settings as C.ICommonLinkerSettings;
         linker.OutputType = ELinkerOutput.Executable;
     });
 }
Esempio n. 2
0
        Init(
            Bam.Core.Module parent)
        {
            base.Init(parent);
            this.RegisterGeneratedFile(Key, this.CreateTokenizedString("$(packagebuilddir)/$(moduleoutputdir)/$(OutputName)$(exeext)"));
            this.Linker = DefaultToolchain.C_Linker(this.BitDepth);
            if (this.BuildEnvironment.Platform.Includes(Bam.Core.EPlatform.Windows))
            {
                if (this.Linker.Macros.Contains("pdbext"))
                {
                    this.RegisterGeneratedFile(PDBKey, this.IsPrebuilt ? null : this.CreateTokenizedString("@changeextension($(0),$(pdbext))", this.GeneratedPaths[Key]));
                }

                if (!this.IsPrebuilt)
                {
                    var rcContainer = this.CreateWinResourceContainer();
                    if (this.ThirdpartyWindowsVersionResourcePath != null)
                    {
                        var versionRC = rcContainer.AddFiles(this.ThirdpartyWindowsVersionResourcePath);
                        this.WindowsVersionResource = versionRC[0] as WinResource;
                    }
                    else
                    {
                        var versionSource = Bam.Core.Module.Create <WinVersionResource>(preInitCallback: module =>
                        {
                            module.BinaryModule = this;
                            module.InputPath    = this.CreateTokenizedString("$(packagebuilddir)/$(config)/$(OutputName)_version.rc");
                        });
                        var versionRC = rcContainer.AddFile(versionSource);
                        this.WindowsVersionResource = versionRC;
                    }
                }
            }
            this.PrivatePatch(settings =>
            {
                var linker        = settings as C.ICommonLinkerSettings;
                linker.OutputType = ELinkerOutput.Executable;
            });
        }