Exemplo n.º 1
0
int main()
{
    string outdir = "_out_shots";
    string log = "_shots.log";
    string input = "input_full";
    string spreadOut = "_out3";

    Misc::Logger logger(log);
    logger.print = true;

    bf::remove_all(outdir);
    bf::remove_all(spreadOut);

    Spread::SpreadLib spread(spreadOut, "_tmp3");

    cout << "Importing screenshots:\n";
    Spread::JobInfoPtr info = Import::importShots(input, outdir, &spread, logger);
    if(info)
    {
        cout << "Waiting for job to finish...\n";
        info->wait();
        if(info->isError())
            cout << "FAILURE: " << info->getMessage() << endl;
    }
    else
        cout << "ERROR: Info was empty\n";

    if(bf::exists(outdir))
        printDir(outdir);

    return 0;
}
Exemplo n.º 2
0
void GameInf::launchGame()
{
  /* Simple ad-hoc solution for now, improve it later.
   */
  Spread::JobInfoPtr job = info.update();
  bool run = true;
  if(job)
    {
      JobProgress prog(job);

      if(!prog.start("Downloading update for " + info.ent->title + "..."))
        {
          if(job->isError())
            run = Boxes::ask("Update failed: " + job->getMessage() + "\n\nRun anyway?");
        }
    }

  if(run)
    info.launch();
}