ZaSz
2009-06-29 08:33:01
Ok This is what I got
^I posted it. That is pretty much a variant lol So no need for help there.
Also, how would I run command line commands??
^ fixed also
Unanswered questions:
I need help for this. (Issue is below
It wont finish moving files until the end… It's not a timing issue. It just waits to the end… And my FileExist's works, ive tested on a fully downloaded reflection.
#define writeln(X) cout<<X<<"\n"How would I make it actually kinda a variant like in scar? ^I posted it. That is pretty much a variant lol So no need for help there.
Also, how would I run command line commands??
^ fixed also
Unanswered questions:
I need help for this. (Issue is below
)#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <iostream>
#include <stdlib.h>
#include <sys/stat.h>
#define writeln(X) cout<<X<<"\n"
#define userinput(question,storedvar) cout<<question<<":"; cin>> storedvar;
using namespace std;
bool FileExists(string strFilename) {
struct stat stFileInfo;
bool blnReturn;
int intStat;
intStat = stat(strFilename.c_str(),&stFileInfo);
if(intStat == 0) {
blnReturn = true;
} else {
blnReturn = false;
}
return(blnReturn);
}
int main()
{
string me;
if(!FileExists("Includes/srl/SRL/reflection/RSBuild.txt")) {
writeln("Reflection does not exist. Downloading");
writeln("Srl is being downloaded. Please do not press keys or enter.");
writeln("It's common to get 1 svn write error.");
popen("svn checkout http://scardevreflection.googlecode.com/svn/trunk Includes/srl/SRL/reflection", "r");
Sleep(10000);
system("cls");
}
if(!FileExists("Includes/srl/SRL/reflection/RSBuild.txt")) {
writeln("Reflection is yet to be downloaded. Try 1/6");
writeln("Waiting 10 seconds for try #2");
Sleep(10000);
system("cls");
}
if(!FileExists("Includes/srl/SRL/reflection/RSBuild.txt")) {
writeln("Reflection is yet to be downloaded. Try 2/6");
writeln("Waiting 10 seconds for try #3");
Sleep(10000);
system("cls");
}
if(!FileExists("Includes/srl/SRL/reflection/RSBuild.txt")) {
writeln("Reflection is yet to be downloaded. Try 3/6");
writeln("Waiting 10 seconds for try #4");
Sleep(10000);
system("cls");
}
if(!FileExists("Includes/srl/SRL/reflection/RSBuild.txt")) {
writeln("Reflection is yet to be downloaded. Try 4/6");
writeln("Waiting 10 seconds for try #5");
Sleep(10000);
system("cls");
}
if(!FileExists("Includes/srl/SRL/reflection/RSBuild.txt")) {
writeln("Reflection is yet to be downloaded. Try 5/6");
writeln("Waiting 10 seconds for try #6");
Sleep(10000);
system("cls");
}
if(!FileExists("Includes/srl/SRL/reflection/RSBuild.txt")) {
writeln("Reflection is yet to be downloaded. Try 6/6");
writeln("Waiting 10 seconds to check the final time. ");
Sleep(10000);
system("cls");
}
if(FileExists("Includes/srl/SRL/reflection/RSBuild.txt")) {
writeln("It seems like Reflection Has downloaded Correctly");
} else {
writeln("Reflection Download Failed");
}
//cin.get();
}
It wont finish moving files until the end… It's not a timing issue. It just waits to the end… And my FileExist's works, ive tested on a fully downloaded reflection.