mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Editor can be started from Launcher (disabled for ios)
This commit is contained in:
parent
4cd91ffbed
commit
b38752bde1
@ -64,6 +64,11 @@ void startGame(const QStringList & args)
|
||||
#endif
|
||||
}
|
||||
|
||||
void startEditor(const QStringList & args)
|
||||
{
|
||||
startExecutable(pathToQString(VCMIDirs::get().editorPath()), args);
|
||||
}
|
||||
|
||||
#ifndef Q_OS_IOS
|
||||
void startExecutable(QString name, const QStringList & args)
|
||||
{
|
||||
|
@ -10,6 +10,7 @@
|
||||
#pragma once
|
||||
|
||||
void startGame(const QStringList & args);
|
||||
void startEditor(const QStringList & args);
|
||||
|
||||
#ifdef VCMI_IOS
|
||||
extern "C" void launchGame(int argc, char * argv[]);
|
||||
|
@ -69,6 +69,10 @@ MainWindow::MainWindow(QWidget * parent)
|
||||
move(position);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_IOS
|
||||
ui->startEditorButton->hide();
|
||||
#endif
|
||||
|
||||
ui->tabListWidget->setCurrentIndex(0);
|
||||
|
||||
ui->settingsView->isExtraResolutionsModEnabled = ui->modlistView->isExtraResolutionsModEnabled();
|
||||
@ -103,6 +107,11 @@ void MainWindow::on_startGameButton_clicked()
|
||||
startGame({});
|
||||
}
|
||||
|
||||
void MainWindow::on_startEditorButton_clicked()
|
||||
{
|
||||
startEditor({});
|
||||
}
|
||||
|
||||
const CModList & MainWindow::getModList() const
|
||||
{
|
||||
return ui->modlistView->getModList();
|
||||
|
@ -52,4 +52,5 @@ private slots:
|
||||
void on_modslistButton_clicked();
|
||||
void on_settingsButton_clicked();
|
||||
void on_lobbyButton_clicked();
|
||||
void on_startEditorButton_clicked();
|
||||
};
|
||||
|
@ -158,6 +158,7 @@ class VCMIDirsWIN32 final : public IVCMIDirs
|
||||
std::vector<bfs::path> dataPaths() const override;
|
||||
|
||||
bfs::path clientPath() const override;
|
||||
bfs::path editorPath() const override;
|
||||
bfs::path serverPath() const override;
|
||||
|
||||
bfs::path libraryPath() const override;
|
||||
@ -348,6 +349,7 @@ std::vector<bfs::path> VCMIDirsWIN32::dataPaths() const
|
||||
}
|
||||
|
||||
bfs::path VCMIDirsWIN32::clientPath() const { return binaryPath() / "VCMI_client.exe"; }
|
||||
bfs::path VCMIDirsWIN32::editorPath() const { return binaryPath() / "VCMI_editor.exe"; }
|
||||
bfs::path VCMIDirsWIN32::serverPath() const { return binaryPath() / "VCMI_server.exe"; }
|
||||
|
||||
bfs::path VCMIDirsWIN32::libraryPath() const { return "."; }
|
||||
@ -359,6 +361,7 @@ class IVCMIDirsUNIX : public IVCMIDirs
|
||||
{
|
||||
public:
|
||||
bfs::path clientPath() const override;
|
||||
bfs::path editorPath() const override;
|
||||
bfs::path serverPath() const override;
|
||||
|
||||
virtual bool developmentMode() const;
|
||||
@ -371,6 +374,7 @@ bool IVCMIDirsUNIX::developmentMode() const
|
||||
}
|
||||
|
||||
bfs::path IVCMIDirsUNIX::clientPath() const { return binaryPath() / "vcmiclient"; }
|
||||
bfs::path IVCMIDirsUNIX::editorPath() const { return binaryPath() / "vcmieditor"; }
|
||||
bfs::path IVCMIDirsUNIX::serverPath() const { return binaryPath() / "vcmiserver"; }
|
||||
|
||||
#ifdef VCMI_APPLE
|
||||
|
@ -35,10 +35,13 @@ public:
|
||||
// Paths to global system-wide data directories. First items have higher priority
|
||||
virtual std::vector<boost::filesystem::path> dataPaths() const = 0;
|
||||
|
||||
// Full path to client executable, including server name (e.g. /usr/bin/vcmiclient)
|
||||
// Full path to client executable, including name (e.g. /usr/bin/vcmiclient)
|
||||
virtual boost::filesystem::path clientPath() const = 0;
|
||||
|
||||
// Full path to server executable, including server name (e.g. /usr/bin/vcmiserver)
|
||||
// Full path to editor executable, including name (e.g. /usr/bin/vcmieditor)
|
||||
virtual boost::filesystem::path editorPath() const = 0;
|
||||
|
||||
// Full path to server executable, including name (e.g. /usr/bin/vcmiserver)
|
||||
virtual boost::filesystem::path serverPath() const = 0;
|
||||
|
||||
// Path where vcmi libraries can be found (in AI and Scripting subdirectories)
|
||||
|
Loading…
Reference in New Issue
Block a user