Example #1
0
        private static void ApplyConfigTransformationIfAvailable(ProgramParameters inputParameters)
        {
            using (ZipFile zippedXapFile = ZipFile.Read(inputParameters.XapLocation))
            {

                if (!zippedXapFile.ContainsEntry(SILVERLIGHT_CONFIG_FILE))
                    ExitAsNoChangePossible();

                if (!zippedXapFile.ContainsEntry(
                    GetSilverlightEnvironmentTransformFile(inputParameters.TargetEnvironment)))
                    ExitAsNoChangeAvailable(inputParameters.TargetEnvironment);

                PerformTransformation(zippedXapFile, inputParameters);
            }
        }
Example #2
0
        private static ProgramParameters ParseParameters(string[] args)
        {
            ProgramParameters programParams = new ProgramParameters { Files = new List<string>(args), OutputFile = "outputFile.exe"};
            if (programParams.Files.Count == 0)
            {
                string testFileName = @"..\..\StandardLibrary\CoreLibrary.cleps";
                string testFileName2 = @"..\..\SampleCode\TestProgram.cleps";

                if (File.Exists(testFileName) && File.Exists(testFileName2))
                {
                    programParams.Files.Add(testFileName);
                    programParams.Files.Add(testFileName2);
                }
            }

            return programParams;
        }
 /// <summary>
 /// Sets program parameters
 /// </summary>
 /// <param name="Program">program to set parameter on.</param>
 /// <param name="pname">Name of parameter to set.</param>
 /// <param name="value">new value of parameter.</param>
 public static void ProgramParameteri(uint Program, ProgramParameters pname, int value)
 {
     Delegates.glProgramParameteri(Program, pname, value);
 }
Example #4
0
        private static void PerformTransformation(ZipFile zippedXapFile, ProgramParameters inputParameters)
        {
            RemoveTemporarySilverlightConfigFile();

            string silverlightEnvironmentTransformFile =
                GetSilverlightEnvironmentTransformFile(inputParameters.TargetEnvironment);

            RemoveTemporarySilverlightTransformFile(silverlightEnvironmentTransformFile);

            ExecuteTransformationOnArchive(
                zippedXapFile, inputParameters.TargetEnvironment, silverlightEnvironmentTransformFile);

            RemoveTemporarySilverlightConfigFile();
            RemoveTemporarySilverlightTransformFile(silverlightEnvironmentTransformFile);
        }