Click here to Skip to main content
15,881,757 members
Articles / Programming Languages / C

Creating a self extracting binary

Rate me:
Please Sign up or sign in to vote.
3.93/5 (6 votes)
4 Mar 2010CPOL5 min read 25.9K   1.7K   25  
This is a utility to compress files in a self extracting binary. The self extracting binary can be used without any installation on any system to extract files from it.
/****************************************************************************
** Meta object code from reading C++ file 'cselfextractor.h'
**
** Created: Sat Feb 27 20:16:00 2010
**      by: The Qt Meta Object Compiler version 62 (Qt 4.6.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#include "cselfextractor.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'cselfextractor.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 62
#error "This file was generated using the moc from 4.6.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif

QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_cselfextractor[] = {

 // content:
       4,       // revision
       0,       // classname
       0,    0, // classinfo
       5,   14, // methods
       0,    0, // properties
       0,    0, // enums/sets
       0,    0, // constructors
       0,       // flags
       0,       // signalCount

 // slots: signature, parameters, type, tag, flags
      21,   15,   16,   15, 0x09,
      32,   15,   15,   15, 0x09,
      40,   15,   15,   15, 0x09,
      56,   15,   16,   15, 0x09,
      80,   15,   15,   15, 0x09,

       0        // eod
};

static const char qt_meta_stringdata_cselfextractor[] = {
    "cselfextractor\0\0bool\0AddFiles()\0About()\0"
    "ClearFileList()\0ArchiveorExtractFiles()\0"
    "SelectOutputPath()\0"
};

const QMetaObject cselfextractor::staticMetaObject = {
    { &QDialog::staticMetaObject, qt_meta_stringdata_cselfextractor,
      qt_meta_data_cselfextractor, 0 }
};

#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &cselfextractor::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION

const QMetaObject *cselfextractor::metaObject() const
{
    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}

void *cselfextractor::qt_metacast(const char *_clname)
{
    if (!_clname) return 0;
    if (!strcmp(_clname, qt_meta_stringdata_cselfextractor))
        return static_cast<void*>(const_cast< cselfextractor*>(this));
    return QDialog::qt_metacast(_clname);
}

int cselfextractor::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: { bool _r = AddFiles();
            if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; }  break;
        case 1: About(); break;
        case 2: ClearFileList(); break;
        case 3: { bool _r = ArchiveorExtractFiles();
            if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; }  break;
        case 4: SelectOutputPath(); break;
        default: ;
        }
        _id -= 5;
    }
    return _id;
}
QT_END_MOC_NAMESPACE

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) FIS
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions