-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
start emake release #107
Merged
Merged
start emake release #107
Changes from 35 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
124df96
start emake release
d39c172
build emake
81c9cb3
merge master
8d96b91
update submodule
610fa38
Update ci-build.sh
fundies 435a11a
Update ServerPlugin.cpp
fundies fbecc6e
Update CMakeLists.txt
fundies 7fd0034
Update CMakeLists.txt
fundies cadb4a1
Update CMakeLists.txt
fundies 2792f7b
Update ServerPlugin.cpp
fundies ade17aa
Update ci-build.sh
fundies d29092f
Update CMakeLists.txt
fundies d86b543
Append path, not replace it.
RobertBColton 1200733
Actually capture MSYS2 environment.
RobertBColton 1bedc92
oopsie
RobertBColton 68465f7
Actually capture the MSYS2 environment.
RobertBColton dd94de7
best guess at hack
fundies 82882bb
Update azure-jobs.yml
fundies 289d739
noquote
RobertBColton f2d1ba0
Update CMakeLists.txt
fundies fec0ba0
Log QProcess standard output & error
RobertBColton 140fdf3
Update ServerPlugin.cpp
RobertBColton 638b461
Update ServerPlugin.cpp
RobertBColton 05974fb
Update ServerPlugin.cpp
RobertBColton f0f64ff
Update ServerPlugin.cpp
RobertBColton 7265a15
Update ServerPlugin.cpp
RobertBColton e200f26
Update ServerPlugin.cpp
RobertBColton f882884
Update ServerPlugin.cpp
RobertBColton 5712ff5
Update ServerPlugin.cpp
RobertBColton 1c0c3e2
Update ServerPlugin.cpp
RobertBColton 1ab7ca0
Update ServerPlugin.cpp
RobertBColton dec11be
Update ServerPlugin.cpp
RobertBColton 4463e12
Update ServerPlugin.cpp
RobertBColton 1e945b4
oopsie
RobertBColton c055532
use boolean operators
RobertBColton dc8723e
Use cmake_dependent_option
RobertBColton 1dba8d6
Update CMakeLists.txt
fundies 77d6c85
update submodule
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -242,31 +242,87 @@ void CompilerClient::UpdateLoop() { | |
ServerPlugin::ServerPlugin(MainWindow& mainWindow) : RGMPlugin(mainWindow) { | ||
// create a new child process for us to launch an emake server | ||
process = new QProcess(this); | ||
|
||
connect(process, &QProcess::errorOccurred, [&](QProcess::ProcessError error) { | ||
qDebug() << "QProcess error: " << error << endl; | ||
}); | ||
connect(process, &QProcess::readyReadStandardOutput, [&]() { | ||
emit LogOutput(process->readAllStandardOutput()); | ||
}); | ||
connect(process, &QProcess::readyReadStandardError, [&]() { | ||
emit LogOutput(process->readAllStandardError()); | ||
}); | ||
|
||
#ifdef _WIN32 | ||
//TODO: Make all this stuff configurable in IDE | ||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); | ||
|
||
// FIXME: this is just an approximate guess on how to get emake running outside a msys shell and currently causes emake to crash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @RobertBColton I need your help debugging this. I can just leave it broken for now and have josh merge if you don't want to look now though |
||
QString msysPath; | ||
if (!env.contains("MSYS_ROOT")) { | ||
msysPath = env.value("SystemDrive", "C:") + "/msys64"; | ||
qDebug().noquote() << "Environmental variable \"MSYS_ROOT\" is not set defaulting MSYS path to: " + msysPath; | ||
} else msysPath = env.value("MSYS_ROOT"); | ||
|
||
env.insert("PATH", env.value("PATH") + ";" + msysPath + "/usr/bin;" + msysPath + "/mingw64/bin"); | ||
process->setProcessEnvironment(env); | ||
#endif | ||
|
||
// look for an executable file that looks like emake in some common directories | ||
QList<QString> searchPaths = {QDir::currentPath(), "./enigma-dev", "../RadialGM/Submodules/enigma-dev"}; | ||
QFileInfo emakeFileInfo(QFile("emake")); | ||
QList<QString> searchPaths = {QDir::currentPath(), "./enigma-dev", "../enigma-dev", "../RadialGM/Submodules/enigma-dev"}; | ||
#ifndef RGM_DEBUG | ||
QString emakeName = "emake"; | ||
#else | ||
QString emakeName = "emake-debug"; | ||
#endif | ||
|
||
QFileInfo emakeFileInfo; | ||
foreach (auto path, searchPaths) { | ||
const QDir dir(path); | ||
QDir::Filters filters = QDir::Filter::Executable | QDir::Filter::Files; | ||
// we use a wildcard because we want it to find emake.exe on Windows | ||
auto entryList = dir.entryInfoList(QStringList({"emake","emake.exe"}), filters, QDir::SortFlag::NoSort); | ||
auto entryList = dir.entryInfoList(QStringList({emakeName, emakeName + ".exe"}), filters, QDir::SortFlag::NoSort); | ||
if (!entryList.empty()) { | ||
emakeFileInfo = entryList.first(); | ||
break; | ||
} | ||
} | ||
|
||
if (emakeFileInfo.filePath().isEmpty()) { | ||
qDebug() << "Error: Failed to locate emake. Compiling and syntax check will not work.\n" << "Search Paths:\n" << searchPaths; | ||
return; | ||
} | ||
|
||
QFileInfo enigmaFileInfo; | ||
foreach (auto path, searchPaths) { | ||
const QDir dir(path); | ||
QDir::Filters filters = QDir::Filter::AllEntries; | ||
auto entryList = dir.entryInfoList(QStringList({"ENIGMAsystem"}), filters, QDir::SortFlag::NoSort); | ||
if (!entryList.empty()) { | ||
enigmaFileInfo = entryList.first(); | ||
break; | ||
} | ||
} | ||
|
||
if (enigmaFileInfo.filePath().isEmpty()) { | ||
qDebug() << "Error: Failed to locate ENIGMA sources. Compiling and syntax check will not work.\n" << "Search Paths:\n" << searchPaths; | ||
return; | ||
} | ||
|
||
// use the closest matching emake file we found and launch it in a child process | ||
qDebug() << emakeFileInfo.absoluteFilePath(); | ||
qDebug() << "Using emake exe at: " << emakeFileInfo.absolutePath(); | ||
qDebug() << "Using ENIGMA sources at: " << enigmaFileInfo.absolutePath(); | ||
process->setWorkingDirectory(emakeFileInfo.absolutePath()); | ||
QString program = emakeFileInfo.fileName(); | ||
QStringList arguments; | ||
arguments << "--server" | ||
<< "-e" | ||
<< "Paths" | ||
<< "-r" | ||
<< "--quiet"; | ||
<< "--quiet" | ||
<< "--enigma-root" | ||
<< enigmaFileInfo.absolutePath(); | ||
|
||
qDebug() << "Running: " << program << " " << arguments; | ||
|
||
process->start(program, arguments); | ||
process->waitForStarted(); | ||
|
Submodule enigma-dev
updated
74 files
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it failed n tried to build dll for msvc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are you actually using
LIB_TYPE
at? I don't seeLIB_TYPE
being used anywhere in here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's used in all the included cmakefiles in the enigma pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well there's no reason this shouldn't work, ask Josh. I don't believe this doesn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see it not working. in ci. Just put a dependent option as it's more correct anyways
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright dc8723e is sent, but I don't see how it will work.