예제 #1
0
파일: rlstring.cpp 프로젝트: chinqkung/pvb
int rlString::operator==(rlString &s2)
{
  if(strcmp(txt,s2.text()) == 0) return 1;
  return 0;
}
예제 #2
0
파일: main.cpp 프로젝트: 376473984/pvb
int main(int ac, char **av)
{
    int fake = 0;
    for(int i=0; i<ac; i++) {
        cmdline.cat(av[i]);
        cmdline.cat(" ");
    }
    for(int i=1; i<ac; i++)
    {
        const char *arg = av[i];
        if(strcmp(av[i],"-o") == 0)
        {
            i++;
            fmake = av[i];
        }
        else if(strcmp(av[i],"-builddir") == 0)
        {
            i++;
            builddir = av[i];
            if(strlen(builddir) + 4 < sizeof(destination))
            {
                strcpy(destination, builddir);
                strcat(destination,"/");
            }
        }
        else if(*arg != '-')
        {
            fname = av[i];
        }
        else if(strcmp(av[i],"-fake") == 0)
        {
            fake = 1;
        }
        else
        {
            printf("fake_qmake is a fake of qmake from qt with a very reduced set of features.\n");
            printf("but sufficient to build a pvserver or other simple commandline tools with MinGW.\n");
            printf("if you need all the qmake functions install the qt development package.\n");
            printf("usage:   fake_qmake <-fake> <name.pro> <-o makefile>   <-builddir directory>\n");
#ifdef RLWIN32
            printf("default: fake_qmake          name.pro   -o Makefile.win -builddir release\n");
#else
            printf("default: fake_qmake          name.pro   -o Makefile\n");
#endif
            return -1;
        }
    }

    if(fake == 0)
    {
        perhapsRunQmake(ac,av);
    }
    printf("running fake_qmake\n");

    if(fpro.load(fname.text()) >= 0)
    {
        if(interpretProFile() >= 0)
        {
            fout = fopen(fmake.text(),"w");
            if(fout == NULL)
            {
                printf("could not write makefile=%s\n",fmake.text());
                return -1;
            }
            if(writeMakefile() < 0)
            {
                printf("error writeing makefile=%s\n", fmake.text());
            }
            fclose(fout);
        }
        else
        {
            printf("error interpreting file=%s line=%s\n", fname.text(), line.text());
        }
    }
    else
    {
        printf("could not load project_file=%s\n", fname.text());
    }

    return 0;
}
예제 #3
0
파일: rlstring.cpp 프로젝트: chinqkung/pvb
rlString::rlString(rlString &s2)
{
  txt = new char [strlen(s2.text())+1];
  ::strcpy(txt,s2.text());
}