Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) TestQtCreatorProFile

 

TestQtCreatorProFile is a tool to test the QtCreatorProFile class.

 

 

 

 

 

Downloads

 

Technical facts

 

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

Qt project file: ./ToolTestQtCreatorProFile/ToolTestQtCreatorProFileConsole.pro

 

include(../../ConsoleApplication.pri)
include(../../Libraries/Boost.pri)
include(../../Libraries/GeneralConsole.pri)

#Specific
include(../../Classes/CppQtCreatorProFile/CppQtCreatorProFile.pri)
include(../../Classes/CppQrcFile/CppQrcFile.pri)

include(ToolTestQtCreatorProFileConsole.pri)

SOURCES += main.cpp

 

 

 

 

 

Qt project file: ./ToolTestQtCreatorProFile/ToolTestQtCreatorProFileDesktop.pro

 

include(../../DesktopApplication.pri)

include(../../Libraries/Boost.pri)
include(../../Libraries/GeneralConsole.pri)
include(../../Libraries/GeneralDesktop.pri)

#Specific for this application
include(../../Classes/CppQtCreatorProFile/CppQtCreatorProFile.pri)
include(../../Classes/CppQrcFile/CppQrcFile.pri)
include(../../Tools/ToolTestQtCreatorProFile/ToolTestQtCreatorProFileDesktop.pri)

SOURCES += qtmain.cpp

 

 

 

 

 

./ToolTestQtCreatorProFile/ToolTestQtCreatorProFileConsole.pri

 

INCLUDEPATH += \
    ../../Tools/ToolTestQtCreatorProFile

SOURCES += \
    ../../Tools/ToolTestQtCreatorProFile/testqtcreatorprofilemenudialog.cpp

HEADERS += \
    ../../Tools/ToolTestQtCreatorProFile/testqtcreatorprofilemenudialog.h

OTHER_FILES += \
    ../../Tools/ToolTestQtCreatorProFile/Licence.txt

RESOURCES += \
    ../../Tools/ToolTestQtCreatorProFile/ToolTestQtCreatorProFile.qrc

 

 

 

 

 

./ToolTestQtCreatorProFile/ToolTestQtCreatorProFileDesktop.pri

 

include(../../Tools/ToolTestQtCreatorProFile/ToolTestQtCreatorProFileConsole.pri)

HEADERS += \
    ../../Tools/ToolTestQtCreatorProFile/qttestqtcreatorprofilemenudialog.h \
    ../../Tools/ToolTestQtCreatorProFile/qttestqtcreatorprofilemaindialog.h

SOURCES += \
    ../../Tools/ToolTestQtCreatorProFile/qttestqtcreatorprofilemenudialog.cpp \
    ../../Tools/ToolTestQtCreatorProFile/qttestqtcreatorprofilemaindialog.cpp

FORMS += \
    ../../Tools/ToolTestQtCreatorProFile/qttestqtcreatorprofilemenudialog.ui \
    ../../Tools/ToolTestQtCreatorProFile/qttestqtcreatorprofilemaindialog.ui

 

 

 

 

 

./ToolTestQtCreatorProFile/ToolTestQtCreatorProFileWebsite.pri

 

include(../../Tools/ToolTestQtCreatorProFile/ToolTestQtCreatorProFileConsole.pri)
SOURCES +=
HEADERS +=

 

 

 

 

 

./ToolTestQtCreatorProFile/main.cpp

 

//---------------------------------------------------------------------------
/*
TestQtCreatorProFile, tool to test the QtCreatorProFile class
Copyright (C) 2010-2013 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestQtCreatorProFile.htm
//---------------------------------------------------------------------------

//#include <cassert>
//#include <fstream>
//#include <iostream>
//#include <iterator>
#include <vector>

//#include "qtcreatorprofile.h"
#include "testqtcreatorprofilemenudialog.h"
#include "trace.h"

int main(int argc, char* argv[])
{
  START_TRACE();
  const std::vector<std::string> args { ribi::MenuDialog::ConvertArguments(argc,argv) };
  return ribi::TestQtCreatorProFileMenuDialog().Execute(args);
}

 

 

 

 

 

./ToolTestQtCreatorProFile/qtmain.cpp

 

//---------------------------------------------------------------------------
/*
TestProFile, tool to test the QtCreatorProFile class
Copyright (C) 2010-2013 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestProFile.htm
//---------------------------------------------------------------------------
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include <QApplication>
#include "qttestqtcreatorprofilemenudialog.h"
#include "trace.h"
#pragma GCC diagnostic pop

const std::string CreateStyleSheet()
{

  const std::string style_sheet
    =
    "QDialog"
    "{"
    "  background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 #bbb, stop: 1 #fff);"
    "}"
    ;
  return style_sheet;
}

int main(int argc, char *argv[])
{
  QApplication a(argc, argv);
  a.setStyleSheet(CreateStyleSheet().c_str());
  START_TRACE();
  ribi::QtTestQtCreatorProFileMenuDialog w;
  w.show();
  return a.exec();
}

 

 

 

 

 

./ToolTestQtCreatorProFile/qttestqtcreatorprofilemaindialog.h

 

//---------------------------------------------------------------------------
/*
TestQtCreatorProFile, tool to test the QtCreatorProFile class
Copyright (C) 2010-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestQtCreatorProFile.htm
//---------------------------------------------------------------------------
#ifndef QTTESTQTCREATORPROFILEMAINDIALOG_H
#define QTTESTQTCREATORPROFILEMAINDIALOG_H

#include "qthideandshowdialog.h"

namespace Ui {
  class QtTestQtCreatorProFileMainDialog;
}

namespace ribi {

class QtTestQtCreatorProFileMainDialog : public QtHideAndShowDialog
{
  Q_OBJECT

public:
  explicit QtTestQtCreatorProFileMainDialog(QWidget *parent = 0);
  QtTestQtCreatorProFileMainDialog(const QtTestQtCreatorProFileMainDialog&) = delete;
  QtTestQtCreatorProFileMainDialog& operator=(const QtTestQtCreatorProFileMainDialog&) = delete;
  ~QtTestQtCreatorProFileMainDialog() noexcept;

private slots:
  void on_button_select_clicked();

private:
  Ui::QtTestQtCreatorProFileMainDialog *ui;

  #ifndef NDEBUG
  static void Test() noexcept;
  #endif
};

} //~namespace ribi

#endif // QTTESTQTCREATORPROFILEMAINDIALOG_H

 

 

 

 

 

./ToolTestQtCreatorProFile/qttestqtcreatorprofilemaindialog.cpp

 

//---------------------------------------------------------------------------
/*
TestQtCreatorProFile, tool to test the QtCreatorProFile class
Copyright (C) 2010-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestQtCreatorProFile.htm
//---------------------------------------------------------------------------
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include "qttestqtcreatorprofilemaindialog.h"

#include <sstream>

#include <QFile>
#include <QFileDialog>

#include "qtcreatorprofile.h"
#include "testqtcreatorprofilemenudialog.h"
#include "testtimer.h"
#include "trace.h"
#include "ui_qttestqtcreatorprofilemaindialog.h"
#pragma GCC diagnostic pop

ribi::QtTestQtCreatorProFileMainDialog::QtTestQtCreatorProFileMainDialog(QWidget *parent)
: QtHideAndShowDialog(parent),
   ui(new Ui::QtTestQtCreatorProFileMainDialog)
{
  #ifndef NDEBUG
  Test();
  #endif
  ui->setupUi(this);
}

ribi::QtTestQtCreatorProFileMainDialog::~QtTestQtCreatorProFileMainDialog() noexcept
{
  delete ui;
}

void ribi::QtTestQtCreatorProFileMainDialog::on_button_select_clicked()
{
  const std::string filename
    = QFileDialog::getOpenFileName(
      this,"Please select a .pro file",
      QString(),
      "Qt Project files (*.pro)"
      ).toStdString();

  if (!QFile::exists(filename.c_str()))
  {
    ui->text_result->clear();
    const std::string text = "File '" + filename + "' does not exist.";
    ui->text_result->setPlainText(text.c_str());
    return;
  }

  const boost::shared_ptr<const QtCreatorProFile> p(new QtCreatorProFile(filename));

  std::stringstream s;
  s << (*p);

  ui->text_result->clear();
  ui->text_result->setPlainText(s.str().c_str());
}

#ifndef NDEBUG
void ribi::QtTestQtCreatorProFileMainDialog::Test() noexcept
{
  {
    static bool is_tested{false};
    if (is_tested) return;
    is_tested = true;
  }
  const TestTimer test_timer(__func__,__FILE__,1.0);
}
#endif

 

 

 

 

 

./ToolTestQtCreatorProFile/qttestqtcreatorprofilemenudialog.h

 

//---------------------------------------------------------------------------
/*
TestQtCreatorProFile, tool to test the QtCreatorProFile class
Copyright (C) 2010-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestQtCreatorProFile.htm
//---------------------------------------------------------------------------
#ifndef QTTESTQTCREATORPROFILEMENUDIALOG_H
#define QTTESTQTCREATORPROFILEMENUDIALOG_H

#include "qthideandshowdialog.h"

namespace Ui {
class QtTestQtCreatorProFileMenuDialog;
}

namespace ribi {

class QtTestQtCreatorProFileMenuDialog : public QtHideAndShowDialog
{
  Q_OBJECT

public:
  explicit QtTestQtCreatorProFileMenuDialog(QWidget *parent = 0);
  QtTestQtCreatorProFileMenuDialog(const QtTestQtCreatorProFileMenuDialog&) = delete;
  QtTestQtCreatorProFileMenuDialog& operator=(const QtTestQtCreatorProFileMenuDialog&) = delete;
  ~QtTestQtCreatorProFileMenuDialog() noexcept;

private slots:
  void on_button_start_clicked();
  void on_button_about_clicked();
  void on_button_quit_clicked();

private:
  Ui::QtTestQtCreatorProFileMenuDialog *ui;

  #ifndef NDEBUG
  static void Test() noexcept;
  #endif
};

} //~namespace ribi

#endif // QTTESTQTCREATORPROFILEMENUDIALOG_H

 

 

 

 

 

./ToolTestQtCreatorProFile/qttestqtcreatorprofilemenudialog.cpp

 

//---------------------------------------------------------------------------
/*
TestQtCreatorProFile, tool to test the QtCreatorProFile class
Copyright (C) 2010-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestQtCreatorProFile.htm
//---------------------------------------------------------------------------
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include "qttestqtcreatorprofilemenudialog.h"

#include <cassert>

#include "qtaboutdialog.h"
#include "qttestqtcreatorprofilemaindialog.h"
#include "testtimer.h"
#include "testqtcreatorprofilemenudialog.h"
#include "trace.h"
#include "ui_qttestqtcreatorprofilemenudialog.h"
#pragma GCC diagnostic pop

ribi::QtTestQtCreatorProFileMenuDialog::QtTestQtCreatorProFileMenuDialog(QWidget *parent) :
  QtHideAndShowDialog(parent),
  ui(new Ui::QtTestQtCreatorProFileMenuDialog)
{
  #ifndef NDEBUG
  Test();
  #endif
  ui->setupUi(this);
}

ribi::QtTestQtCreatorProFileMenuDialog::~QtTestQtCreatorProFileMenuDialog() noexcept
{
  delete ui;
}

void ribi::QtTestQtCreatorProFileMenuDialog::on_button_start_clicked()
{
  QtTestQtCreatorProFileMainDialog d;
  this->ShowChild(&d);
}

void ribi::QtTestQtCreatorProFileMenuDialog::on_button_about_clicked()
{
  About a = TestQtCreatorProFileMenuDialog().GetAbout();
  //a.AddLibrary("QtRichelBilderbeekGalleryDialog version: " + QtRichelBilderbeekGalleryDialog::GetVersion());
  //a.AddLibrary("QtRichelBilderbeekResources version: " + RichelBilderbeek::QtResources::GetVersion());
  QtAboutDialog d(a);
  d.setWindowIcon(this->windowIcon());
  this->ShowChild(&d);
}

void ribi::QtTestQtCreatorProFileMenuDialog::on_button_quit_clicked()
{
  close();
}

#ifndef NDEBUG
void ribi::QtTestQtCreatorProFileMenuDialog::Test() noexcept
{
  {
    static bool is_tested{false};
    if (is_tested) return;
    is_tested = true;
  }
  TestQtCreatorProFileMenuDialog();
  {
    const TestQtCreatorProFileMenuDialog d;
    assert(!d.GetVersion().empty());
  }
  {
    const QtTestQtCreatorProFileMainDialog d;
    assert(!d.GetVersion().empty());
  }
  const TestTimer test_timer(__func__,__FILE__,1.0);
}
#endif

 

 

 

 

 

./ToolTestQtCreatorProFile/testqtcreatorprofilemenudialog.h

 

//---------------------------------------------------------------------------
/*
TestQtCreatorProFile, tool to test the QtCreatorProFile class
Copyright (C) 2010-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestQtCreatorProFile.htm
//---------------------------------------------------------------------------
#ifndef TESTQTCREATORPROFILEMENUDIALOG_H
#define TESTQTCREATORPROFILEMENUDIALOG_H

#include "menudialog.h"

namespace ribi {

struct TestQtCreatorProFileMenuDialog final : public MenuDialog
{
  TestQtCreatorProFileMenuDialog();
  About GetAbout() const noexcept override;
  Help GetHelp() const noexcept override;
  boost::shared_ptr<const Program> GetProgram() const noexcept override;
  std::string GetVersion() const noexcept override;
  std::vector<std::string> GetVersionHistory() const noexcept override;

  private:
  int ExecuteSpecific(const std::vector<std::string>& argv) noexcept override;

  #ifndef NDEBUG
  static void Test() noexcept;
  #endif
};

} //~namespace ribi

#endif // TESTQTCREATORPROFILEMENUDIALOG_H

 

 

 

 

 

./ToolTestQtCreatorProFile/testqtcreatorprofilemenudialog.cpp

 

//---------------------------------------------------------------------------
/*
TestQtCreatorProFile, tool to test the QtCreatorProFile class
Copyright (C) 2010-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestQtCreatorProFile.htm
//---------------------------------------------------------------------------
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include "testqtcreatorprofilemenudialog.h"

#include <cassert>
#include <iostream>

#include "fileio.h"
#include "qtcreatorprofile.h"
#include "testtimer.h"
#include "richelbilderbeekprogram.h"
#include "trace.h"
#pragma GCC diagnostic pop

ribi::TestQtCreatorProFileMenuDialog::TestQtCreatorProFileMenuDialog()
{
  #ifndef NDEBUG
  Test();
  #endif
}

int ribi::TestQtCreatorProFileMenuDialog::ExecuteSpecific(const std::vector<std::string>& argv) noexcept
{
  const int argc = static_cast<int>(argv.size());
  if (argc == 3 && (argv[1] == "-f" || argv[1] == "--filename"))
  {
    const std::string filename = argv[2];
    if (filename.empty())
    {
      std::cout << "Please specify a filename.\n";
    }
    else if (filename.size() < 5)
    {
      std::cout << "Please specify a full Qt Creator (.pro) project filename.\n";
    }
    else if (filename.substr(filename.size() - 4,4) != ".pro")
    {
      std::cout << "Please specify a filename ending on .pro.\n";
    }
    else if (!fileio::FileIo().IsRegularFile(filename))
    {
      std::cout << "Please specify a Qt Creator (.pro) project filename that exists.\n";
    }
    else
    {
      const boost::shared_ptr<const QtCreatorProFile> p(
        new QtCreatorProFile(filename));
      std::cout << (*p) << '\n';
      return 0;
    }
    return 1;
  }
  std::cout << GetHelp() << '\n';
  return 1;
}

ribi::About ribi::TestQtCreatorProFileMenuDialog::GetAbout() const noexcept
{
  About a(
    "Richel Bilderbeek",
    "TestQtCreatorProFile",
    "tool to test the QtCreatorProFile class",
    "the 18th May 2013",
    "2010-2015",
    "http://www.richelbilderbeek.nl/ToolTestQtCreatorProFile.htm",
    GetVersion(),
    GetVersionHistory());
  a.AddLibrary("QtCreatorProFile version: " + QtCreatorProFile::GetVersion());
  a.AddLibrary("Trace version: " + Trace::GetVersion());
  return a;
}

ribi::Help ribi::TestQtCreatorProFileMenuDialog::GetHelp() const noexcept
{
  return Help(
    GetAbout().GetFileTitle(),
    GetAbout().GetFileDescription(),
    {
      Help::Option('f',"filename","filename of Qt Creator project (.pro) file")
    },
    {
      GetAbout().GetFileTitle() + " -f Project1.pro",
      GetAbout().GetFileTitle() + " --filename Project1.pro"
    }
  );
}

boost::shared_ptr<const ribi::Program> ribi::TestQtCreatorProFileMenuDialog::GetProgram() const noexcept
{
  const boost::shared_ptr<const Program> p {
    new ProgramTestQtCreatorProFile
  };
  assert(p);
  return p;
}

std::string ribi::TestQtCreatorProFileMenuDialog::GetVersion() const noexcept
{
  return "1.4";
}

std::vector<std::string> ribi::TestQtCreatorProFileMenuDialog::GetVersionHistory() const noexcept
{
  return {
    "2010-xx-xx: version 1.0: initial version, called TestProFile",
    "2012-02-27: version 1.1: initial version with About information",
    "2013-05-18: version 1.2: renamed this tool to TestQtCreatorProFile",
    "2013-11-05: version 1.3: conformized for ProjectRichelBilderbeekConsole",
    "2014-01-27: version 1.4: removed Boost.Filesystem and Boost.Program_Options"
  };
}

#ifndef NDEBUG
void ribi::TestQtCreatorProFileMenuDialog::Test() noexcept
{
  {
    static bool is_tested{false};
    if (is_tested) return;
    is_tested = true;
  }
  const TestTimer test_timer(__func__,__FILE__,1.0);
  const bool verbose{false};
  {
    std::stringstream s;
    s
      << "SOURCES += qtmain.cpp" << '\n'
    ;
    const std::string filename = fileio::FileIo().GetTempFileName(".pro");
    {
      std::ofstream f(filename.c_str());
      f << s.str();
    }
    assert(fileio::FileIo().IsRegularFile(filename));
    const boost::shared_ptr<const QtCreatorProFile> p(
      new QtCreatorProFile(filename)
    );
    assert(p->GetSources().size() == 1);
    if (verbose) { TRACE(*p); }

    fileio::FileIo().DeleteFile(filename);
  }
  {
    std::stringstream s;
    s
      << "include(../../DesktopApplication.pri)" << '\n'
      << "" << '\n'
      << "#Libs" << '\n'
      << "include(../../Libraries/Boost.pri)" << '\n'
      << "" << '\n'
      << "#Console" << '\n'
      << "include(../../Classes/CppAbout/CppAbout.pri)" << '\n'
      << "include(../../Classes/CppFileIo/CppFileIo.pri)" << '\n'
      << "include(../../Classes/CppHelp/CppHelp.pri)" << '\n'
      << "include(../../Classes/CppMenuDialog/CppMenuDialog.pri)" << '\n'
      << "include(../../Classes/CppRichelBilderbeekProgram/CppRichelBilderbeekProgram.pri)" << '\n'
      << "include(../../Classes/CppTrace/CppTrace.pri)" << '\n'
      << "" << '\n'
      << "#Desktop" << '\n'
      << "include(../../Classes/CppQtAboutDialog/CppQtAboutDialog.pri)" << '\n'
      << "include(../../Classes/CppQtHideAndShowDialog/CppQtHideAndShowDialog.pri)" << '\n'
      << "" << '\n'
      << "#Specific for this application" << '\n'
      << "include(../../Classes/CppQtCreatorProFile/CppQtCreatorProFile.pri)" << '\n'
      << "include(../../Classes/CppQrcFile/CppQrcFile.pri)" << '\n'
      << "include(../../Tools/ToolTestQtCreatorProFile/ToolTestQtCreatorProFileDesktop.pri)" << '\n'
      << "" << '\n'
      << "SOURCES += qtmain.cpp" << '\n'
    ;
    const std::string filename = fileio::FileIo().GetTempFileName(".pro");
    {
      std::ofstream f(filename.c_str());
      f << s.str();
    }
    assert(fileio::FileIo().IsRegularFile(filename));
    const boost::shared_ptr<const QtCreatorProFile> p(
      new QtCreatorProFile(filename)
    );
    assert(p->GetSources().size() == 1);
    if (verbose) { TRACE(*p); }

    fileio::FileIo().DeleteFile(filename);
  }
}
#endif

 

 

 

 

 

./ToolTestQtCreatorProFile/zip.sh

 

#!/bin/sh

echo "Removing user information"
rm *.user

echo "Removing possible temp file"
rm copy.txt
rm tmp.txt


echo "Creating of all main folders"

mkdir temp_zip
mkdir temp_zip/..
mkdir temp_zip/Classes
mkdir temp_zip/Website

echo "Creating of all subfolders"

mkdir temp_zip/../ToolRichelBilderbeekGallery
mkdir temp_zip/Classes/CppAbout
mkdir temp_zip/Classes/CppCodeToHtml
mkdir temp_zip/Classes/CppProFile
mkdir temp_zip/Classes/CppQtAboutDialog
mkdir temp_zip/Classes/CppQtRichelBilderbeekGalleryDialog
mkdir temp_zip/Classes/CppRichelBilderbeekProgram
mkdir temp_zip/Classes/CppWtAboutDialog
mkdir temp_zip/Classes/CppWtAutoConfig
mkdir temp_zip/Classes/CppWtRichelBilderbeekGalleryDialog
mkdir temp_zip/Website

echo "Copying files"

cp ../../../ToolRichelBilderbeekGallery/*.* temp_zip/../ToolRichelBilderbeekGallery
cp ../../Classes/CppAbout/*.* temp_zip/Classes/CppAbout
cp ../../Classes/CppCodeToHtml/*.* temp_zip/Classes/CppCodeToHtml
cp ../../Classes/CppProFile/*.* temp_zip/Classes/CppProFile
cp ../../Classes/CppQtAboutDialog/*.* temp_zip/Classes/CppQtAboutDialog
cp ../../Classes/CppQtRichelBilderbeekGalleryDialog/*.* temp_zip/Classes/CppQtRichelBilderbeekGalleryDialog
cp ../../Classes/CppRichelBilderbeekProgram/*.* temp_zip/Classes/CppRichelBilderbeekProgram
cp ../../Classes/CppWtAboutDialog/*.* temp_zip/Classes/CppWtAboutDialog
cp ../../Classes/CppWtAutoConfig/*.* temp_zip/Classes/CppWtAutoConfig
cp ../../Classes/CppWtRichelBilderbeekGalleryDialog/*.* temp_zip/Classes/CppWtRichelBilderbeekGalleryDialog
cp ../../Website/*.* temp_zip/Website

FILENAME="ToolRichelBilderbeekGallerySource"
ZIP_FILENAME=$FILENAME".zip"

echo "Compressing files"

cd temp_zip
zip -r $FILENAME ..
zip -r $FILENAME Classes
zip -r $FILENAME Website
cd ..
cp "temp_zip/"$ZIP_FILENAME $ZIP_FILENAME

echo "Cleaning up"

echo "Emptying subfolders"

rm temp_zip/../ToolRichelBilderbeekGallery/*.*
rm temp_zip/Classes/CppAbout/*.*
rm temp_zip/Classes/CppCodeToHtml/*.*
rm temp_zip/Classes/CppProFile/*.*
rm temp_zip/Classes/CppQtAboutDialog/*.*
rm temp_zip/Classes/CppQtRichelBilderbeekGalleryDialog/*.*
rm temp_zip/Classes/CppRichelBilderbeekProgram/*.*
rm temp_zip/Classes/CppWtAboutDialog/*.*
rm temp_zip/Classes/CppWtAutoConfig/*.*
rm temp_zip/Classes/CppWtRichelBilderbeekGalleryDialog/*.*
rm temp_zip/Website/*.*

echo "Removing subfolders"

rmdir temp_zip/../ToolRichelBilderbeekGallery
rmdir temp_zip/Classes/CppAbout
rmdir temp_zip/Classes/CppCodeToHtml
rmdir temp_zip/Classes/CppProFile
rmdir temp_zip/Classes/CppQtAboutDialog
rmdir temp_zip/Classes/CppQtRichelBilderbeekGalleryDialog
rmdir temp_zip/Classes/CppRichelBilderbeekProgram
rmdir temp_zip/Classes/CppWtAboutDialog
rmdir temp_zip/Classes/CppWtAutoConfig
rmdir temp_zip/Classes/CppWtRichelBilderbeekGalleryDialog
rmdir temp_zip/Website

echo "Removing main folders"

rmdir temp_zip/..
rmdir temp_zip/Classes
rmdir temp_zip/Website

echo "Removing temporary folder"

rm temp_zip/*.*
rmdir temp_zip

echo "Done"

# CreateQtProjectZipFile, version 1.0
# Copyright (C) 2012 Richel Bilderbeek
# Programmed on the 25th February 2012
# by Richel Bilderbeek
#
# CreateQtProjectZipFile can be downloaded from http://www.richelbilderbeek.nl/ToolCreateQtProjectZipFile.htm
# Licenced under GPL 3.0

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict

This page has been created by the tool CodeToHtml