diff --git a/README.md b/README.md index 7475685..20174d4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,45 @@ -launch -====== +THE AS OF YET NOT OFFICIALLY NAMED LAUNCHER FOR IOQ3 +==================================================== -The launcher for ioquake3. +The launcher for ioquake3. Built with QT, written in C++ + +ROADMAP +======= + +Required features to reach: +--------------------------- + +Version 1.0(alpha) + +launch the ioquake3 program - DONE +launch quake3 at different resolutions - DONE +download/install patches for quake3 - not yet implemented +display EULA before downloading q3 patches - not yet implemented + + +2.0(beta) + +be able to download/install ioquake3 +be able to copy quake3 data from retail CD +be able to update ioquake3 +be able to update self +initial support for other operating systems - STARTED(Linux) + +3.0(Gold) + +config launch options +config player options +WYSIWYG name config +work with steam installation of quake3 +backup/save/swap configs +support for Linux, Windows, and OSX + +4.0(PLATINUM) + +support for other games (Tremulous/SmokinGuns/TurtleArena/etc.) +automated mod switcher +builtin server browser +integrated newsfeed +LAN support +preload mods/maps/content via internet protocols +uri integration (q3://, trem://, ioq3://, etc.) diff --git a/imgs.qrc b/imgs.qrc new file mode 100644 index 0000000..8b1d029 --- /dev/null +++ b/imgs.qrc @@ -0,0 +1,7 @@ + + + ioquaktree.png + iol.png + iolICO.png + + diff --git a/iol.png b/iol.png new file mode 100644 index 0000000..a202e17 Binary files /dev/null and b/iol.png differ diff --git a/iolICO.png b/iolICO.png new file mode 100644 index 0000000..d82e18b Binary files /dev/null and b/iolICO.png differ diff --git a/ioq3.png b/ioq3.png new file mode 100644 index 0000000..9db71b3 Binary files /dev/null and b/ioq3.png differ diff --git a/ioq3ICO.png b/ioq3ICO.png new file mode 100644 index 0000000..a59c7ef Binary files /dev/null and b/ioq3ICO.png differ diff --git a/ioquaktree.png b/ioquaktree.png new file mode 100644 index 0000000..794e315 Binary files /dev/null and b/ioquaktree.png differ diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..be7af75 --- /dev/null +++ b/main.cpp @@ -0,0 +1,11 @@ +#include +#include "mainwindow.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + ioLaunch w; + w.show(); + + return a.exec(); +} diff --git a/mainwindow.cpp b/mainwindow.cpp new file mode 100644 index 0000000..100154c --- /dev/null +++ b/mainwindow.cpp @@ -0,0 +1,218 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +ioLaunch::ioLaunch(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::ioLaunch) +{ + ui->setupUi(this); + resOption = ""; + screenOption = ""; + +} + +ioLaunch::~ioLaunch() +{ + delete ui; +} + +void ioLaunch::on_btnLaunch_clicked() +{ +#ifdef Q_OS_WIN32 + if(ioq3 == NULL) + { + msg.setText("Please select your Quake3 directory"); + msg.exec(); + QString path = QFileDialog::getExistingDirectory (this, tr("Directory"), directory.path()); + path.replace(" ", "\" \""); + ioq3 = path + "\\ioquake3.x86.exe +set r_mode -1"; + } + +#elif Q_OS_X11 + ioq3 = "ioquake3 +set r_mode -1"; +#elif Q_OS_MAC + ioq3 = "open -a ioquake3 +set r_mode -1"; +#endif + + + if(ioWedited == true && ioHedited == true) + { + + resOption = " +set r_customwidth " + QString::number(ioWidth) + " +set r_customheight " + QString::number(ioHeight); + + } + if(resOption == NULL) + { + resOption = ""; + } + if(screenOption == NULL) + { + screenOption = ""; + } + + myProcess.start(ioq3+resOption+screenOption); + if(!myProcess.waitForStarted()) + { + ioq3Failed.setText("ioquake3 failed to start!\nIs it installed?\n"); + ioq3Failed.exec(); + } +} + +void ioLaunch::on_cbResolution_highlighted(int index) +{ + ioWedited = false; + ioHedited = false; +} + +void ioLaunch::on_cbResolution_currentIndexChanged(int index) +{ + ioWedited = false; + ioHedited = false; + switch(index) + { + case 0: + { + resOption = ""; + break; + } + case 1: + { + ioWidth = QApplication::desktop()->screenGeometry().width(); + ioHeight = QApplication::desktop()->screenGeometry().height(); + + resOption = " +set r_customwidth " + QString::number(ioWidth) + " +set r_customheight " + QString::number(ioHeight); + break; + } + case 2: + { + resOption = " +set r_customwidth 320 +set r_customheight 240"; + break; + } + case 3: + { + resOption = " +set r_customwidth 400 +set r_customheight 300"; + break; + } + case 4: + { + resOption = " +set r_customwidth 512 +set r_customheight 384"; + break; + } + case 5: + { + resOption = " +set r_customwidth 640 +set r_customheight 480"; + break; + } + case 6: + { + resOption = " +set r_customwidth 800 +set r_customheight 600"; + break; + } + case 7: + { + resOption = " +set r_customwidth 960 +set r_customheight 720"; + break; + } + case 8: + { + resOption = " +set r_customwidth 1024 +set r_customheight 3768"; + break; + } + case 9: + { + resOption = " +set r_customwidth 1152 +set r_customheight 864"; + break; + } + case 10: + { + resOption = " +set r_customwidth 1280 +set r_customheight 1024"; + break; + } + case 11: + { + resOption = " +set r_customwidth 1600 +set r_customheight 1200"; + break; + } + case 12: + { + resOption = " +set r_customwidth 2048 +set r_customheight 1536"; + break; + } + case 13: + { + resOption = " +set r_customwidth 856 +set r_customheight 480"; + break; + } + case 14: + { + resOption = " +set r_customwidth 1280 +set r_customheight 720"; + break; + } + case 15: + { + resOption = " +set r_customwidth 1920 +set r_customheight 1080"; + break; + } + case 16: + { + resOption = " +set r_customwidth 1280 +set r_customheight 800"; + break; + } + default: + { + resOption = ""; + break; + } + } +} + +void ioLaunch::on_rbFull_toggled(bool checked) +{ + if(checked) + { + screenOption = " +set r_fullscreen 1"; + } +} + +void ioLaunch::on_rbWin_toggled(bool checked) +{ + if(checked) + { + screenOption = " +set r_fullscreen 0"; + } +} + +void ioLaunch::on_rbDefault_toggled(bool checked) +{ + if(checked) + { + screenOption = ""; + } +} + + +void ioLaunch::on_sbWidth_valueChanged(int arg1) +{ + ioWidth = 0; + if(arg1 >= 0) + { + ioWidth = arg1; + ioWedited = true; + } + else{ + ioWedited = false; + } +} + +void ioLaunch::on_sbHeight_valueChanged(int arg1) +{ + ioHeight = 0; + if(arg1 >= 0) + { + ioHeight = arg1; + ioHedited = true; + } + else{ + ioHedited = false; + } +} diff --git a/mainwindow.h b/mainwindow.h new file mode 100644 index 0000000..6f550f0 --- /dev/null +++ b/mainwindow.h @@ -0,0 +1,59 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Ui { +class ioLaunch; +} + +class ioLaunch : public QMainWindow +{ + Q_OBJECT + +public: + explicit ioLaunch(QWidget *parent = 0); + ~ioLaunch(); + +private slots: + void on_btnLaunch_clicked(); + + + void on_cbResolution_highlighted(int index); + + void on_cbResolution_currentIndexChanged(int index); + + void on_rbFull_toggled(bool checked); + + void on_rbWin_toggled(bool checked); + + void on_rbDefault_toggled(bool checked); + + void on_sbWidth_valueChanged(int arg1); + + void on_sbHeight_valueChanged(int arg1); + +private: + Ui::ioLaunch *ui; + QProcess myProcess; + QString ioq3; + QString resOption; + QString screenOption; + QMessageBox msg; + QMessageBox ioq3Failed; + QDir directory; + int ioWidth; + int ioHeight; + bool ioWedited; + bool ioHedited; + +}; + +#endif // MAINWINDOW_H diff --git a/mainwindow.ui b/mainwindow.ui new file mode 100644 index 0000000..a6ca48c --- /dev/null +++ b/mainwindow.ui @@ -0,0 +1,373 @@ + + + ioLaunch + + + true + + + + 0 + 0 + 450 + 360 + + + + + 4 + 2 + + + + + 450 + 360 + + + + + 450 + 360 + + + + + 1 + 1 + + + + + 450 + 360 + + + + + Courier New + + + + ioLaunch 0.2 + + + + :/imgs/iolICO.png:/imgs/iolICO.png + + + + + + + + 0 + 0 + + + + + 1 + 1 + + + + + + 0 + 279 + 451 + 61 + + + + font: 24pt "Arial Black"; +color: #7fa0d3; + + + Launch + + + + + + -10 + 0 + 471 + 281 + + + + + 451 + 0 + + + + #tabMain{ + background-image: url(:/imgs/iol.png); + background-repeat: no-repeat; + background-position:center center; +} +QTabBar::tab{ + width: 150px; +} +QTabWidget::tab-bar{ + alignment: center; +} + + + 0 + + + + + 445 + 0 + + + + Qt::LeftToRight + + + Launch + + + + + Settings + + + + + 110 + 40 + 91 + 21 + + + + Default + + + true + + + + + + 90 + 10 + 141 + 24 + + + + + Default + + + + + Native + + + + + 320x240 + + + + + 400x300 + + + + + 512x384 + + + + + 640x480 + + + + + 800x600 + + + + + 960x720 + + + + + 1024x768 + + + + + 1152x864 + + + + + 1280x1024 + + + + + 1600x1200 + + + + + 2048x1536 + + + + + 856x480(16:9) + + + + + 1280x720(16:9) + + + + + 1920x1080(16:9) + + + + + 1280x800(16:10) + + + + + + + 350 + 10 + 61 + 25 + + + + 100000 + + + + + + 310 + 40 + 121 + 21 + + + + Windowed + + + + + + 260 + 10 + 61 + 25 + + + + 100000 + + + + + + 10 + 10 + 81 + 21 + + + + Resolution + + + + + + 10 + 34 + 111 + 31 + + + + Screen Mode + + + + + + 240 + 10 + 16 + 31 + + + + W + + + + + + 200 + 40 + 111 + 21 + + + + FullScreen + + + false + + + + + + 330 + 10 + 16 + 31 + + + + H + + + + + + Rend2 + + + + + + + + + + + +