Skip to content

Commit

Permalink
Merge pull request CosmosOS#256 from rebizu/master
Browse files Browse the repository at this point in the history
chg: fix pre requisit for setup program
  • Loading branch information
charlesbetros committed Nov 16, 2015
2 parents 700a75f + 5aa504c commit a4c842e
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions source/Cosmos.Build.Builder/CosmosTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Cosmos.Build.Builder {
public class CosmosTask : Task {
protected string mCosmosDir;
protected string mOutputDir;
protected BuildState mBuildState;
protected BuildState mBuildState;
protected string mAppDataDir;
protected int mReleaseNo;
protected string mInnoFile;
Expand Down Expand Up @@ -85,12 +85,12 @@ protected override List<string> DoRun() {
if (!App.TestMode) {
CheckPrereqs(); //Working
// No point in continuing if Prerequisites are missing
// Could potentially add more State checks in the future, but for now
// Could potentially add more State checks in the future, but for now
// only the prerequisites are handled...
if (mBuildState != BuildState.PrerequisiteMissing)
{
CleanupVSIPFolder();

CompileCosmos(); //Working
CopyTemplates();

Expand All @@ -109,7 +109,10 @@ protected override List<string> DoRun() {
} else {
Section("Testing...");
//Uncomment bits that you want to test...
CheckForInno(); //CheckPrereqs(); //Working
//CheckForInno();
CheckPrereqs(); //Working
if (mBuildState != BuildState.PrerequisiteMissing)
Echo("failed");
//Cleanup(); //Working

//CompileCosmos(); //Working
Expand Down Expand Up @@ -162,8 +165,13 @@ protected bool CheckForProduct(string aCheck, bool aCanThrow, string aKey, strin
using (var xKey = Registry.LocalMachine.OpenSubKey(aKey + xSubKey)) {
string xValue = (string)xKey.GetValue(aValueName);
if (xValue != null && xValue.ToUpper().Contains(xCheck)) {
mBuildState = BuildState.Running;
return true;
if (mBuildState != BuildState.PrerequisiteMissing)
{
mBuildState = BuildState.Running;
return true;
}
else
return false;
}
}
}
Expand Down Expand Up @@ -458,6 +466,7 @@ void CopyTemplates() {
void CreateSetup() {
Section("Creating Setup");


string xISCC = Path.Combine(mInnoPath, "ISCC.exe");
if (!File.Exists(xISCC)) {
mExceptionList.Add("Cannot find Inno setup.");
Expand Down

0 comments on commit a4c842e

Please sign in to comment.