even the installer requires composer now, so check for that first

This commit is contained in:
Shish 2020-03-23 18:47:18 +00:00
parent 3f26013b28
commit 040bffa4f6
2 changed files with 9 additions and 25 deletions

View file

@ -26,17 +26,6 @@ function install()
);
}
if (!file_exists("vendor/")) {
exit_with_page("Install Error", "
<p>Shimmie is unable to find the composer vendor directory.</p>
<p>Have you followed the composer setup instructions found in the
<a href=\"https://github.com/shish/shimmie2#installation-development\">README</a>?</p>
<p>If you are not intending to do any development with Shimmie,
it is highly recommend you use one of the pre-packaged releases
found on <a href=\"https://github.com/shish/shimmie2/releases\">Github</a> instead.</p>
");
}
// Pull in necessary files
require_once "vendor/autoload.php";
global $_tracer;

View file

@ -3,14 +3,7 @@
* Make sure that shimmie is correctly installed *
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
if (!file_exists("data/config/shimmie.conf.php")) {
require_once "core/install.php";
install();
exit;
}
if (!file_exists("vendor/")) {
//CHECK: Should we just point to install.php instead? Seems unsafe though.
print <<<EOD
<!DOCTYPE html>
<html lang="en">
@ -24,13 +17,9 @@ if (!file_exists("vendor/")) {
<h1>Install Error</h1>
<h3>Warning: Composer vendor folder does not exist!</h3>
<div class="container">
<p>Shimmie is unable to find the composer vendor directory.<br>
Have you followed the composer setup instructions found in the
<a href="https://github.com/shish/shimmie2#installation-development">README</a>?</p>
<p>If you are not intending to do any development with Shimmie,
it is highly recommend you use one of the pre-packaged releases
found on <a href="https://github.com/shish/shimmie2/releases">Github</a> instead.</p>
<p>Shimmie is unable to find the composer <code>vendor</code> directory.
<br>To finish installing, you need to run <code>composer install</code>
in the shimmie directory.
</div>
</div>
</body>
@ -40,6 +29,12 @@ EOD;
exit;
}
if (!file_exists("data/config/shimmie.conf.php")) {
require_once "core/install.php";
install();
exit;
}
require_once "vendor/autoload.php";