Skip to content
Snippets Groups Projects
Commit 7f40eb7e authored by Axel Hahn's avatar Axel Hahn
Browse files

update builder + installer

parent 526e4c8f
No related branches found
No related tags found
No related merge requests found
......@@ -27,14 +27,15 @@ _mkdir($dirPackages);
_h1("Check target file");
if(file_exists($OUTFILE)){
echo "INFO: output file '$OUTFILE' already exists.\n";
$ts_in=filemtime($INFILE);
$ts_out=filemtime($OUTFILE);
if($ts_in>$ts_out){
echo "INFO: Source file '$INFILE' is newer than '$OUTFILE'. Compiling changes...\n";
echo "INFO: Source file \"$INFILE\" is newer than \"$OUTFILE\". Compiling changes...\n";
} else {
echo "INFO: Source is unchanged since last build..\n";
echo "🔹 INFO: Source is unchanged since last build... rebuilding it anyway.\n";
}
} else {
echo "✅ INFO: Target \"$OUTFILE\" does not exist yet.\n";
}
// ----------------------------------------------------------------------
......@@ -56,8 +57,8 @@ _h1("Compile");
_chdir("$selfdir/$dirBuild");
_exec("$SPC \
micro:combine \
'$TMPFILE' \
-O '$OUTFILE'");
\"$TMPFILE\" \
-O \"$OUTFILE\"");
// if(unlink($TMPFILE)){
// echo "Cleanup: $TMPFILE was deleted\n";
......@@ -67,15 +68,15 @@ _exec("$SPC \
_h1("Test generated binary");
_exec("file '$OUTFILE'");
_exec("'$OUTFILE' --ini=../src/simple.ini");
_exec("file \"$OUTFILE\"");
_exec("\"$OUTFILE\" --ini=../src/simple.ini");
_h1("Write architecture specific binary");
_exec("cp '$OUTFILE' '$OUTFILE2'");
_exec("cp \"$OUTFILE\" '$OUTFILE2'");
// ----------------------------------------------------------------------
_h1("Done");
_h1("Done: Build was successful.");
// ----------------------------------------------------------------------
......@@ -91,7 +91,7 @@ function _mkdir(string $sMyDir): void
_ok();
echo "\n";
} else {
_skip("mkdir: already exists: '$sMyDir");
_skip("mkdir: already exists: '$sMyDir'");
}
}
......@@ -144,13 +144,13 @@ if(file_exists($doneBuild)){
if ($bDoBild){
_exec("$SPC --no-interaction doctor");
_exec("$SPC download --no-interaction --with-php=$php_version --for-extensions '$php_libs'");
_exec("$SPC download --no-interaction --with-php=$php_version --for-extensions \"$php_libs\"");
echo "💡 Hint: this can take 2 minutes ...\n";
_exec("$SPC build --no-interaction --build-micro '$php_libs'");
_exec("$SPC build --no-interaction --build-micro \"$php_libs\"");
file_put_contents("$doneBuild", date("Y-m-d H:i:s") . "\n$sDoneData\n");
} else {
_skip("Micro already built - php $php_version - extensions '$php_libs'");
_skip("Micro already built - php $php_version - extensions \"$php_libs\"");
}
_h1("Done.");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment