diff --git a/assets/.DS_Store b/assets/.DS_Store new file mode 100644 index 0000000..ac30881 Binary files /dev/null and b/assets/.DS_Store differ diff --git a/assets/Info.plist b/assets/Info.plist new file mode 100644 index 0000000..cb3a624 --- /dev/null +++ b/assets/Info.plist @@ -0,0 +1,35 @@ + + + + + NSPrincipalClass + NSApplication + CFBundleDevelopmentRegion + English + CFBundleExecutable + buckshot + CFBundleGetInfoString + 0.1, Copyright 2016 Dagen Brock + CFBundleIconFile + icons.icns + CFBundleIdentifier + com.dagenbrock.buckshot + CFBundleDocumentTypes + + + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.1 + CFBundleSignature + buckshot + CFBundleVersion + 0.1 + NSHumanReadableCopyright + Copyright 2016 Dagen Brock + LSMinimumSystemVersion + 10.3 + + diff --git a/assets/icon1024.png b/assets/icon1024.png new file mode 100644 index 0000000..68967c6 Binary files /dev/null and b/assets/icon1024.png differ diff --git a/assets/icon128.png b/assets/icon128.png new file mode 100644 index 0000000..2aa88b7 Binary files /dev/null and b/assets/icon128.png differ diff --git a/assets/icon16.png b/assets/icon16.png new file mode 100644 index 0000000..93d992c Binary files /dev/null and b/assets/icon16.png differ diff --git a/assets/icon256.png b/assets/icon256.png new file mode 100644 index 0000000..2ec7467 Binary files /dev/null and b/assets/icon256.png differ diff --git a/assets/icon32.png b/assets/icon32.png new file mode 100644 index 0000000..6382659 Binary files /dev/null and b/assets/icon32.png differ diff --git a/assets/icon512.png b/assets/icon512.png new file mode 100644 index 0000000..063474e Binary files /dev/null and b/assets/icon512.png differ diff --git a/assets/icon64.png b/assets/icon64.png new file mode 100644 index 0000000..55aecb7 Binary files /dev/null and b/assets/icon64.png differ diff --git a/assets/icons.icns b/assets/icons.icns new file mode 100644 index 0000000..4367e67 Binary files /dev/null and b/assets/icons.icns differ diff --git a/buckshot/README.md b/buckshot/README.md new file mode 100644 index 0000000..e69de29 diff --git a/buckshot/buckshot.pro b/buckshot/buckshot.pro new file mode 100644 index 0000000..1783ee9 --- /dev/null +++ b/buckshot/buckshot.pro @@ -0,0 +1,23 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2016-11-28T18:58:07 +# +#------------------------------------------------- + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = buckshot +TEMPLATE = app + + +SOURCES += main.cpp\ + mainwindow.cpp + +HEADERS += mainwindow.h + +FORMS += mainwindow.ui + +DISTFILES += \ + ../b2d diff --git a/buckshot/buckshot.pro.user b/buckshot/buckshot.pro.user new file mode 100644 index 0000000..7f6efbb --- /dev/null +++ b/buckshot/buckshot.pro.user @@ -0,0 +1,336 @@ + + + + + + EnvironmentId + {604923ac-6650-4c69-8172-ab5bd4c4d88b} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.7.0 clang 64bit + Desktop Qt 5.7.0 clang 64bit + qt.57.clang_64_kit + 1 + 0 + 0 + + /Users/dbrock/Google Drive/appleiigs/buckshot/build-buckshot-Desktop_Qt_5_7_0_clang_64bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /Users/dbrock/Google Drive/appleiigs/buckshot/build-buckshot-Desktop_Qt_5_7_0_clang_64bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + /Users/dbrock/Google Drive/appleiigs/buckshot/build-buckshot-Desktop_Qt_5_7_0_clang_64bit-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + buckshot + + Qt4ProjectManager.Qt4RunConfiguration:/Users/dbrock/Google Drive/appleiigs/buckshot/buckshot/buckshot.pro + true + + buckshot.pro + false + + /Users/dbrock/Google Drive/appleiigs/buckshot/build-buckshot-Desktop_Qt_5_7_0_clang_64bit-Release/buckshot.app/Contents/MacOS + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + + diff --git a/buckshot/main.cpp b/buckshot/main.cpp new file mode 100644 index 0000000..b48f94e --- /dev/null +++ b/buckshot/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/buckshot/mainwindow.cpp b/buckshot/mainwindow.cpp new file mode 100644 index 0000000..4cc885a --- /dev/null +++ b/buckshot/mainwindow.cpp @@ -0,0 +1,411 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" +#include "qfiledialog.h" +#include "qprocess.h" +#include "qdebug.h" +#include "qtimer.h" +#include +#include "qmessagebox.h" + +const QString MainWindow::imageName = QString("saved"); + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); + + this->setWindowTitle("buckshot"); + + // SET TEMP DIR FOR CACHE/BUILDING + tmpDir = new QTemporaryDir(); + if (tmpDir->isValid()) { + tmpDirPath = tmpDir->path(); // dir.path() returns the unique directory path + } else { + tmpDirPath = "/tmp/"; // fallback. may not work on all OSes + } + // AND NOW THE PATHNAMES FOR OUR CACHE FILES + + inputImgPath = QString("%1/%2.bmp").arg(tmpDirPath).arg(imageName); + previewImgPath = QString("%1/%2_Preview.bmp").arg(tmpDirPath).arg(imageName); + qDebug() << inputImgPath << previewImgPath; + + // depends SAVED.A2FC, SAVEDC.BIN, SAVEDCH.BIN + //outputImgPath = QString("%1/%2").arg(tmpDirPath).arg(); + + + + + + // populate combobox + QStringList outputFormats; + outputFormats << "LR" << "DLR" << "HGR" << "DHGR" << "MONO"; + ui->comboBox_outputFormat->addItems(outputFormats); + + // + QStringList inputResolutions; + inputResolutions << "40 x 48 - Full Scale LGR" + << "80 x 48 - Full Scale DLGR" + << "140 x 192 - Full Scale (HGR & DHGR)" + << "280 x 192 - Double Width Scale (HGR & DHGR)" + << "320 x 200 - Classic Size" + << "560 x 384 - Quadruple Width, Double Height Scale" + << "640 x 400 - Classic Size" + << "640 x 480 - Classic Size"; + ui->comboBox_inputResolution->addItems(inputResolutions); + updateDisplayModes(); + + // live preview stuff + updateNeeded = false; + previewTimer = new QTimer(this); + connect(previewTimer, SIGNAL(timeout()), this, SLOT(previewTimerTimeout())); +} + +//ions << 0 "40 x 48 - Full Scale LGR (LGR ONLY)" +// 1 "80 x 48 - Full Scale DLGR (DLGR ONLY)" +// 2 "140 x 192 - Full Scale (HGR & DHGR)" +// 3 "280 x 192 - Double Width Scale (HGR & DHGR)" +// 4 "320 x 200 - Classic Size" +// 5 "560 x 384 - Quadruple Width, Double Height Scale" +// 6 "640 x 400 - Classic Size" +// 7 "640 x 480 - Classic Size"; +void MainWindow::updateDisplayModes() { + + QList disabledList = QList(); // = QList() << 1 << 1; + + // Enable all first + QList enabledList = QList() << 0 << 1 << 2 << 3 << 4 << 5 << 6 << 7; + QListIterator e(enabledList); + while (e.hasNext()) { + // Get the index of the value to disable + QModelIndex index = ui->comboBox_inputResolution->model()->index(e.next(), 0); + // enable flag + QVariant vEnable(1 | 32); + // the magic + ui->comboBox_inputResolution->model()->setData(index, vEnable, Qt::UserRole - 1); + } + + // DELETE? + + // SET DISABLED ITEMS - AND DEFAULT RESOLUTION FOR MODE + if (ui->comboBox_outputFormat->currentText() == "LR") { + disabledList << 2 << 3; + inputWidth = 40; + inputHeight = 48; + ui->comboBox_inputResolution->setCurrentIndex(0); + } else if (ui->comboBox_outputFormat->currentText() == "DLR") { + disabledList << 2 << 3; + inputWidth = 80; + inputHeight = 48; + ui->comboBox_inputResolution->setCurrentIndex(1); + } else if (ui->comboBox_outputFormat->currentText() == "MONO") { + disabledList << 0 << 1 << 2 << 4 << 6 << 7; + inputWidth = 280; + inputHeight = 192; + ui->comboBox_inputResolution->setCurrentIndex(3); + } else if (ui->comboBox_outputFormat->currentText() == "DHGR") { + inputWidth = 280; + inputHeight = 192; + ui->comboBox_inputResolution->setCurrentIndex(3); + } else { + inputWidth = 140; + inputHeight = 192; + ui->comboBox_inputResolution->setCurrentIndex(2); + } + // SET SOME DEFAULTS + + + + + QListIterator d(disabledList); + while (d.hasNext()) { + // Get the index of the value to disable + QModelIndex index = ui->comboBox_inputResolution->model()->index(d.next(), 0); + // This is the effective 'disable' flag + QVariant vDisable(0); + // the magic + ui->comboBox_inputResolution->model()->setData(index, vDisable, Qt::UserRole - 1); + } + + + + +} + +MainWindow::~MainWindow() +{ + delete ui; +} + + +void MainWindow::on_pushButton_sourceFilename_clicked() +{ + QString filename = QFileDialog::getOpenFileName(); + if (filename != NULL) { + ui->lineEdit_sourceFilename->setText(filename); + QPixmap mypix(filename); + ui->label_source->setPixmap(mypix); + ui->label_source->setScaledContents(true); + QSize sourceSize = ui->label_source->pixmap()->size(); + qDebug() << sourceSize; + QString resolutionString = QString("%1 x %2").arg(sourceSize.width()).arg(sourceSize.height()); + qDebug() << resolutionString; + ui->label_sourceResolution->setText(resolutionString); + } +} + +void MainWindow::updateInputSize() +{ + switch (ui->comboBox_inputResolution->currentIndex()) { + case 0: + inputWidth = 40; + inputHeight = 48; + break; + case 1: + inputWidth = 80; + inputHeight = 48; + break; + case 2: + inputWidth = 140; + inputHeight = 192; + break; + case 3: + inputWidth = 280; + inputHeight = 192; + break; + case 4: + inputWidth = 320; + inputHeight = 200; + break; + case 5: + inputWidth = 560; + inputHeight = 384; + break; + case 6: + inputWidth = 640; + inputHeight = 400; + break; + case 7: + inputWidth = 640; + inputHeight = 480; + break; + default: + qDebug() << "default, error?"; + break; + } + + QSize sourceSize = ui->label_source->pixmap()->size(); + double sx = (double)inputWidth / sourceSize.width(); + double sy = (double)inputHeight / sourceSize.height(); + QString scaleString = QString("%1 x %2").arg(sx).arg(sy); + ui->label_scaleFactor->setText(scaleString); + +} + +void MainWindow::livePreview() +{ + if (ui->checkBox_livePreview->isChecked()) { + on_pushButton_preview_clicked(); + } +} + +void MainWindow::on_pushButton_preview_clicked() +{ + if (ui->label_source->pixmap() == NULL) { + ui->plainTextEdit_lastCmd->document()->setPlainText("Please open a source image first!"); + return; + } + // GET SCALE FACTOR + updateInputSize(); + + // NOW GENERATE SCALED QPIXMAP TO SAVE + QPixmap scaledPixmap = ui->label_source->pixmap()->scaled(inputWidth,inputHeight); + scaledPixmap.save(inputImgPath,"BMP", 0); + + // NOW FIND OUR OUTPUT FORMAT + QString outputFormat = "H"; // HIRES + switch (ui->comboBox_outputFormat->currentIndex()) { + case 0: + outputFormat = "L"; + break; + case 1: + outputFormat = "DL"; + break; + case 2: + outputFormat = "H"; + break; + case 3: + outputFormat = "D"; + break; + case 4: + outputFormat = "mono"; + break; + } + + QString tempDir = "/tmp"; + + + QString converterPath = "/Users/dbrock/appleiigs/grlib/b2d"; + //converterPath = QString("%1/b2d").arg(QDir::currentPath()); + converterPath = QString("%1/b2d").arg(QCoreApplication::applicationDirPath()); + + QProcess process; + QStringList args; + args << inputImgPath; // "/tmp/saved.bmp" + args << outputFormat; + + if (ui->horizontalSlider_crossHatch->value() > 0) { + QString crossHatchArg = QString("Z%1").arg(ui->horizontalSlider_crossHatch->value()); + args << crossHatchArg; + } + if (ui->horizontalSlider_colorBleed->value() > 0) { + QString colorBleedArg = QString("R%1").arg(ui->horizontalSlider_colorBleed->value()); + args << colorBleedArg; + } + + + args << "V"; // MUST HAVE! OUR PREVIEW IMAGE + + + + //qint64 pid = 0; + //QString working_dir = "/tmp/"; + //process.startDetached(converterPath, args, working_dir, &pid); + process.start(converterPath,args); + process.waitForFinished(); // BLOCKS!!! + + qDebug() << converterPath << " " << args ; + + + QString commandString = QString("%1 %2").arg(converterPath, args.join(" ")); + ui->plainTextEdit_lastCmd->document()->setPlainText(commandString); + + // ALL DONE SO TRY TO LOAD PREVIEW + QPixmap previewPix(previewImgPath); + qDebug() << previewPix.width() << previewPix.height(); + float realScale = 1; + if (previewPix.width() == 80) { + int scale = 3; + realScale = scale; + previewPix = previewPix.scaled(80*scale, 48*scale); + } + if (previewPix.width() == 560) { + float scale = 0.5f; + realScale = scale; + previewPix = previewPix.scaled((int)(560*scale),(int)(384*scale), Qt::KeepAspectRatio,Qt::SmoothTransformation); + } + ui->label_preview->setPixmap(previewPix); + + ui->groupBox_preview->setTitle(QString("Preview - Scale %1").arg(realScale)); + +} + +// When this timer is running, it checks to see if a +// preview update has been requested, and handles it if so. +void MainWindow::previewTimerTimeout() +{ + if (updateNeeded) { + on_pushButton_preview_clicked(); + updateNeeded = false; + } +} + +void MainWindow::on_horizontalSlider_crossHatch_valueChanged(int value) +{ + if (value==0){ + ui->label_crossHatch->setText("Off"); + } else { + ui->label_crossHatch->setText(QString::number(value)); + } + updateNeeded = 1; +} + +void MainWindow::on_horizontalSlider_colorBleed_valueChanged(int value) +{ + if (value==0){ + ui->label_colorBleed->setText("Off"); + } else { + ui->label_colorBleed->setText(QString::number(value)); + } + updateNeeded = 1; +} + +void MainWindow::on_comboBox_outputFormat_currentIndexChanged(int index) +{ + updateNeeded = 1; + updateDisplayModes(); +} + +void MainWindow::on_comboBox_inputResolution_currentIndexChanged(int index) +{ + updateNeeded = 1; +} + +void MainWindow::on_checkBox_livePreview_stateChanged(int arg1) +{ + // preview update timer + if (arg1) { + updateNeeded = 1; + + previewTimer->start(500); + } else { + previewTimer->stop(); + } +} + +void MainWindow::on_pushButton_saveImage_pressed() +{ + if (ui->label_preview->pixmap() == NULL) { + ui->plainTextEdit_lastCmd->document()->setPlainText("Please open a source image and run a preview first!"); + return; + } + QString a2filename; + QString suffix; + QString filters = QString("All Images (*.A2FC *.BIN *.SLO *.DLO);;HGR (*.BIN);;DHGR (*.A2FC);;LR (*.SLO);;DLR (*.DLO);;All files (*.*)"); + QString defaultFilter; + // SAVED.A2FC + + if (ui->comboBox_outputFormat->currentText() == "LR") { + a2filename = QString("%1/%2.SLO").arg(tmpDirPath,imageName.toUpper()); + suffix = ".SLO"; + defaultFilter = "LR (*.SLO)"; + } else if (ui->comboBox_outputFormat->currentText() == "DLR") { + a2filename = QString("%1/%2.DLO").arg(tmpDirPath,imageName.toUpper()); + suffix = ".DLO"; + defaultFilter = "DLR (*.DLO)"; + } else if (ui->comboBox_outputFormat->currentText() == "HGR") { + a2filename = QString("%1/%2CH.BIN").arg(tmpDirPath,imageName.toUpper()); + suffix = ".BIN"; + defaultFilter = "HGR (*.BIN)"; + } else if (ui->comboBox_outputFormat->currentText() == "DHGR") { + a2filename = QString("%1/%2.A2FC").arg(tmpDirPath,imageName.toUpper()); + suffix = ".A2FC"; + defaultFilter = "DHGR (*.A2FC)"; + } else if (ui->comboBox_outputFormat->currentText() == "MONO") { + a2filename = QString("%1/%2M.BIN").arg(tmpDirPath,imageName.toUpper()); + suffix = ".BIN"; + defaultFilter = "HGR (*.BIN)"; + } + + // QString filters("Music files (*.mp3);;Text files (*.txt);;All files (*.*)"); + + + /* Static method approach */ + QString saveFile = QFileDialog::getSaveFileName(0, "Save file", QDir::currentPath(), + filters, &defaultFilter); + QFile::copy(a2filename, saveFile); +// /* Direct object construction approach */ +// QFileDialog fileDialog(0, "Save file", QDir::currentPath(), filters); +// fileDialog.setD +// fileDialog.selectNameFilter(defaultFilter); +// fileDialog.exec(); + +} + + +void MainWindow::on_actionWhat_is_this_triggered() +{ + QMessageBox msgBox; + msgBox.setText("This is an image conversion utility to output images for use on classic 8-bit Apple II computers.\n\nPlease see readme for instructions.\n\nSorry for bugs, it's just a toy.\n\n(c)2016 Dagen Brock *\n\n\n * bmp2dhr is by Bill Buckles and does the the actual heavy lifting of conversion! But don't bug him about this software, please."); + msgBox.exec(); +} diff --git a/buckshot/mainwindow.h b/buckshot/mainwindow.h new file mode 100644 index 0000000..219cc00 --- /dev/null +++ b/buckshot/mainwindow.h @@ -0,0 +1,63 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + +namespace Ui { +class MainWindow; +} + +/* + * 280x192 + * ~306 x 210 + */ + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + +private slots: + + + void on_pushButton_sourceFilename_clicked(); + + void on_pushButton_preview_clicked(); + + void on_horizontalSlider_crossHatch_valueChanged(int value); + + void on_horizontalSlider_colorBleed_valueChanged(int value); + + void on_comboBox_outputFormat_currentIndexChanged(int index); + + void on_comboBox_inputResolution_currentIndexChanged(int index); + + void on_checkBox_livePreview_stateChanged(int arg1); + void previewTimerTimeout(); + void on_pushButton_saveImage_pressed(); + + void on_actionWhat_is_this_triggered(); + +private: + Ui::MainWindow *ui; + void updateInputSize(); + void livePreview(); + void updateDisplayModes(); + int inputWidth; + int inputHeight; + bool updateNeeded; + QTimer *previewTimer; + + QTemporaryDir *tmpDir; + QString tmpDirPath; + static const QString imageName; //"saved" + QString inputImgPath; + QString previewImgPath; + QString outputImgPath; +}; + +#endif // MAINWINDOW_H diff --git a/buckshot/mainwindow.ui b/buckshot/mainwindow.ui new file mode 100644 index 0000000..0ec26f4 --- /dev/null +++ b/buckshot/mainwindow.ui @@ -0,0 +1,413 @@ + + + MainWindow + + + + 0 + 0 + 671 + 534 + + + + MainWindow + + + + + + 10 + 40 + 331 + 241 + + + + Source + + + + + 10 + 25 + 306 + 210 + + + + Use "Open Source Image" above to get started. + + + Qt::AlignCenter + + + + + + + 362 + 40 + 301 + 221 + + + + Preview + + + + + 11 + 22 + 280 + 192 + + + + Apple ][ Preview + + + Qt::AlignCenter + + + + + + + 10 + 0 + 651 + 41 + + + + + + + + + + Open Source Image + + + + + + + + + 550 + 260 + 111 + 32 + + + + Preview + + + + + + 320 + 407 + 31 + 16 + + + + Off + + + + + + 320 + 439 + 31 + 16 + + + + Off + + + + + + 440 + 260 + 101 + 30 + + + + Live Preview + + + + + + 147 + 438 + 161 + 22 + + + + Qt::Horizontal + + + + + + 8 + 296 + 134 + 20 + + + + Apple ][ Display Mode + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 147 + 294 + 201 + 26 + + + + + + + 0 + 438 + 140 + 20 + + + + Color Bleed Reduction + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 105 + 380 + 37 + 16 + + + + Scale: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 0 + 400 + 140 + 30 + + + + Crosshatch Threshold + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 28 + 326 + 114 + 16 + + + + Source Resolution: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 147 + 348 + 201 + 26 + + + + + + + 147 + 404 + 161 + 22 + + + + 50 + + + Qt::Horizontal + + + + + + 150 + 326 + 211 + 16 + + + + Source Resolution: + + + + + + 21 + 350 + 121 + 20 + + + + Scale to Resolution: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 150 + 380 + 211 + 16 + + + + Scale + + + + + + 520 + 360 + 131 + 20 + + + + Last Command Run: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 370 + 380 + 291 + 79 + + + + + 9 + + + + + + + 550 + 290 + 111 + 32 + + + + Save Image + + + + + + 350 + 290 + 20 + 181 + + + + Qt::Vertical + + + + + + + 0 + 0 + 671 + 22 + + + + + About + + + + + + + + TopToolBarArea + + + false + + + + + + What is this? + + + + + + + diff --git a/doc/README.txt b/doc/README.txt new file mode 100644 index 0000000..b3d18f3 --- /dev/null +++ b/doc/README.txt @@ -0,0 +1,4 @@ +This is an image conversion utility by Dagen Brock. + +It is actually just a GUI layer over bmp2dhgr by Bill Buckles. +Don't bug him with support questions for this application. diff --git a/make_dist_mac.sh b/make_dist_mac.sh new file mode 100755 index 0000000..8628202 --- /dev/null +++ b/make_dist_mac.sh @@ -0,0 +1,23 @@ +DEXTRAS=buckshot-osx/ +DDIR=buckshot-osx/buckshot.app +ADIR=assets + +mkdir -p $DDIR +cp -R build-buckshot-Desktop_Qt_5_7_0_clang_64bit-Release/buckshot.app $DEXTRAS + +mkdir -p $DDIR/Contents/MacOS +mkdir -p $DDIR/Contents/Resources +cp $ADIR/Info.plist $DDIR/Contents +cp $ADIR/icons.icns $DDIR/Contents/Resources +dylibbundler -od -b -x $DDIR/Contents/MacOS/buckshot -d $DDIR/Contents/libs/ + +# files to include in dmg +#cp doc/gsplusmanual.pdf $DEXTRAS +#cp doc/gsplusmanual.txt $DEXTRAS +cp doc/README.txt $DEXTRAS +cp ../b2d $DDIR/Contents/MacOS +#cp COPYING.txt $DEXTRAS + +#tar -cvzf gsplus-osx.tar.gz gsplus-osx/ + +# packaging now in DMG script diff --git a/make_dmg_mac.sh b/make_dmg_mac.sh new file mode 100755 index 0000000..1e97ed4 --- /dev/null +++ b/make_dmg_mac.sh @@ -0,0 +1,22 @@ +#!/bin/sh +git clone https://github.com/andreyvit/yoursway-create-dmg.git +cd yoursway-create-dmg + +test -f buckshot.dmg && rm buckshot.dmg +./create-dmg \ + --volname "buckshot" \ + --volicon "../assets/icons.icns" \ + --background "../../gsplus/assets/gsp_dmg_bg_600x500.png" \ + --window-pos 200 120 \ + --window-size 600 500 \ + --icon-size 100 \ + --icon buckshot.app 180 130 \ + --hide-extension buckshot.app \ + --icon README.txt 80 330 \ + --app-drop-link 410 130 \ + buckshot.dmg \ + ../buckshot-osx/ +cp buckshot.dmg .. + #--icon gsplusmanual.pdf 220 330 \ + #--icon gsplusmanual.txt 360 330 \ + #--icon COPYING.txt 500 330 \