Logo Search packages:      
Sourcecode: unetbootin version File versions


unetbootin.h from UNetbootin <http://unetbootin.sourceforge.net>
Copyright (C) 2007-2008 Geza Kovacs <geza0kovacs@gmail.com>

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 2 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 at <http://www.gnu.org/licenses/> for more details.


#include <QtCore>
#include <QtGui>
#include <QtNetwork>
//#include <QtDebug>

#include "ui_unetbootin.h"

#ifdef Q_OS_WIN32
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <shellapi.h>

#define UNETBOOTINB "Auto Super Grub Disk"
#define NOEXTERN
//#define NOISO

#define UNETBOOTINB "UNetbootin-EeePCLinuxOS"
#define NOMANUAL
#define NOFLOPPY
//#define USBINSTALL

#define UNETBOOTINB "UNetbootin-Ubuntu Eee"
#define NOMANUAL
#define NOFLOPPY
//#define USBINSTALL

#ifdef ELIVE
#define UNETBOOTINB "Elive USB Installer"
#define NOMANUAL
#define NOFLOPPY
//#define USBINSTALL

#define NOMANUAL
#define NOFLOPPY
//#define USBINSTALL

#ifdef SLITAZ
#define UNETBOOTINB "SliTaz Installer"
#define NOMANUAL
#define NOFLOPPY
//#define USBINSTALL

#define UNETBOOTINB "UNetbootin"
//#define USBINSTALL

class customver : public QObject

class uninstaller : public QObject

class callexternappT : public QThread
      QString execFile;
      QString execParm;
      QString retnValu;
      void run();

class ubngetrequestheader : public QHttpRequestHeader
      ubngetrequestheader(QString urhost, QString urpath);

class randtmpfile : public QFile
      randtmpfile(QString rfpath, QString rfextn);
      static QString getrandfilename(QString rfpath, QString rfextn);

class nDirListStor : public QObject

      QStringList nDirFileListSL;
      int nMinFileSizeBytes;
      int nMaxFileSizeBytes;

public slots:
      void sAppendSelfUrlInfoList(QUrlInfo curDirUrl);

class unetbootin : public QWidget, private Ui::unetbootinui

      unetbootin(QWidget *parent = 0);
      QString appNlang;
      QString appDir;
      QString appLoc;
      QString ubntmpf;
      QString nameDistro;
      QString nameVersion;
      bool isarch64;
      bool islivecd;
      bool isnetinstall;
      bool overwriteall;
      QString targetDrive;
      QString targetPath;
      QString installType;
      QString targetDev;
      QString rawtargetDev;
      QString devluid;
      QString devlabel;
      QString devuuid;
      QString postinstmsg;
      QString kernelLine, kernelParam, kernelLoc, kernelOpts, initrdLine, initrdLoc, initrdOpts;
      QString slinitrdLine;
      QString sevzcommand;
      QPair<QPair<QStringList, QStringList>, QPair<QStringList, QStringList> > extraoptionsPL;
      #ifdef Q_OS_UNIX
        QString fdiskcommand;
      QString sfdiskcommand;
      QString volidcommand;
        QString syslinuxcommand;
        QString extlinuxcommand;
        bool isext2;
      void ubninitialize();
      QString displayfisize(quint64 fisize);
      QPair<QPair<QStringList, QList<quint64> >, QStringList> listarchiveconts(QString archivefile);
      bool overwritefileprompt(QString ovwfileloc);   
      bool extractfile(QString filepath, QString destinfileL, QString archivefile);
      bool extractkernel(QString archivefile, QString kernoutputfile, QPair<QStringList, QList<quint64> > archivefileconts);
      bool extractinitrd(QString archivefile, QString initoutputfile, QPair<QStringList, QList<quint64> > archivefileconts);
      QString extractcfg(QString archivefile, QStringList archivefileconts);
      QPair<QPair<QStringList, QStringList>, QPair<QStringList, QStringList> > extractcfgL(QString archivefile, QStringList archivefileconts);
      QString getfullarchivepath(QString relativefilepath, QStringList archivefile);
      QString filteroutlist(QString listofdata, QList<QRegExp> listofmatches);
      QString filteroutlist(QStringList listofdata, QList<QRegExp> listofmatches);
      QStringList filteroutlistL(QStringList listofdata, QList<QRegExp> listofmatches);
      void extractiso(QString isofile, QString exoutputdir);
      QStringList makepathtree(QString dirmkpathw, QStringList pathlist);
      QStringList extractallfiles(QString archivefile, QString dirxfilesto, QPair<QStringList, QList<quint64> > filesizelist);
      QString getgrubcfgargs(QString cfgfile);
      QPair<QPair<QStringList, QStringList>, QPair<QStringList, QStringList> > getgrubcfgargsL(QString cfgfile);
      QString getFirstTextBlock(QString fulltext);
      QString getcfgkernargs(QString cfgfile, QString archivefile, QStringList archivefileconts);
      QPair<QPair<QStringList, QStringList>, QPair<QStringList, QStringList> > getcfgkernargsL(QString cfgfile, QString archivefile, QStringList archivefileconts);
      QString searchforincludesfile(QString includesfile, QString archivefile, QStringList archivefileconts);
      QPair<QPair<QStringList, QStringList>, QPair<QStringList, QStringList> > searchforincludesfileL(QString includesfile, QString archivefile, QStringList archivefileconts);
      void downloadfile(QString fileurl, QString targetfile);
      QString downloadpagecontents(QString pageurl);
      QStringList lstFtpDirFiles(QString ldfDirStringUrl, int ldfMinSize, int ldfMaxSize);
      QStringList lstHttpDirFiles(QString ldfDirStringUrl);
      QStringList lstNetDirFiles(QString ldfDirStringUrl, int ldfMinSize, int ldfMaxSize);
      QPair<QString, int> weightedFilterNetDir(QString ldfDirStringUrl, int ldfMinSize, int ldfMaxSize, QList<QRegExp> ldfFileMatchExp);
      QString fileFilterNetDir(QStringList ldfDirStringUrlList, int ldfMinSize, int ldfMaxSize, QList<QRegExp> ldfFileMatchExp);
      QPair<QString, int> filterBestMatch(QStringList ufStringList, QList<QRegExp> filterExpList);
      void sysreboot();
      static QString callexternapp(QString xexecFile, QString xexecParm);
      QString getdevluid(QString voldrive);
      QString getlabel(QString voldrive);
      QString getuuid(QString voldrive);
      void refreshdriveslist();
      QStringList listcurdrives();
      QStringList listsanedrives();
      QStringList listalldrives();
      #ifdef Q_OS_UNIX
      QString locatecommand(QString commandtolocate, QString reqforinstallmode, QString packagename);
      QString locatedevicenode(QString mountpoint);
      QString locatemountpoint(QString devicenode);
      QString getGrubNotation(QString devicenode);
      int letterToNumber(QChar lettertoconvert);
      int getDiskNumber(QString devicenode);
      int getPartitionNumber(QString devicenode);
      #ifdef Q_OS_WIN32
      void installsvzip();
      void configsysEdit();
      void bootiniEdit();
      void vistabcdEdit();
      void instIndvfl(QString srcfName, QString dstfName);
      QString instTempfl(QString srcfName, QString dstfType);
      void runinst();
      void instDetType();
      void runinsthdd();
      void runinstusb();
      void fininstall();

private slots:
      void on_distroselect_currentIndexChanged(int distroselectIndex);
      void on_showalldrivescheckbox_clicked();
      void on_typeselect_currentIndexChanged(int typeselectIndex);
      void on_dverselect_currentIndexChanged();
      void on_diskimagetypeselect_currentIndexChanged();
      void on_FloppyFileSelector_clicked();
      void on_KernelFileSelector_clicked();
      void on_InitrdFileSelector_clicked();
      void on_CfgFileSelector_clicked();
      void on_cancelbutton_clicked();
      void on_okbutton_clicked();
      void on_frebootbutton_clicked();
      void on_fexitbutton_clicked();

public slots:
      void dlprogressupdate(int dlbytes, int maxbytes);
      void dlprogressupdate64(qint64 dlbytes, qint64 maxbytes);


Generated by  Doxygen 1.6.0   Back to index