00001 void games()
00002 {
00003
00004
00005
00006
00007
00008
00009
00010 Bool_t UNIX = strcmp(gSystem->GetName(), "Unix") == 0;
00011 Int_t st1 = gSystem->Load("$(ROOTSYS)/test/Aclock");
00012 if (st1 == -1) {
00013 printf("===>The macro games will try to build the Aclock library\n");
00014 if (UNIX)
00015 gSystem->Exec("(cd $ROOTSYS/test; make Aclock)");
00016 else
00017 gSystem->Exec("(cd %ROOTSYS%\\test && nmake -f Makefile.win32 Aclock.dll)");
00018
00019 st1 = gSystem->Load("$(ROOTSYS)/test/Aclock");
00020 }
00021 Int_t st2 = gSystem->Load("$(ROOTSYS)/test/Hello");
00022 if (st2 == -1) {
00023 printf("===>The macro games will try to build the Hello library\n");
00024 if (UNIX)
00025 gSystem->Exec("(cd $ROOTSYS/test; make Hello)");
00026 else
00027 gSystem->Exec("(cd %ROOTSYS%\\test && nmake -f Makefile.win32 Hello.dll)");
00028
00029 st2 = gSystem->Load("$(ROOTSYS)/test/Hello");
00030 }
00031 Int_t st3 = gSystem->Load("$(ROOTSYS)/test/Tetris");
00032 if (st3 == -1) {
00033 if (UNIX) {
00034 printf("===>The macro games will try to build the Tetris library\n");
00035 gSystem->Exec("(cd $ROOTSYS/test; make Tetris)");
00036 } else {
00037 gSystem->Exec("(cd %ROOTSYS%\\test && nmake -f Makefile.win32 Tetris.dll)");
00038 }
00039 st3 = gSystem->Load("$(ROOTSYS)/test/Tetris");
00040 }
00041
00042 if (st1 || st2 || st3) {
00043 printf("ERROR: one of the shared libs in $ROOTSYS/test didn't load properly\n");
00044 return;
00045 }
00046
00047
00048 Hello *hello = new Hello();
00049
00050
00051 Aclock *clock = new Aclock();
00052
00053
00054 Tetris *tetris = new Tetris();
00055 }