mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 08:24:24 -05:00
Working copy
This commit is contained in:
@@ -107,14 +107,13 @@ if (file_exists(APP_DB)) {
|
||||
processFilesManuallyInSqlite();
|
||||
processFilesManuallyInSqliteLinux();
|
||||
|
||||
|
||||
function toPngAll() {
|
||||
$q = realpath("bin\qdc6.exe");
|
||||
$iPath = $_SESSION['modpath']."\data\global\items";
|
||||
$oPath = realpath("docs\\{$_SESSION['modname']}\img\\items");
|
||||
exec("$q --first-frame-only \"$iPath\" -o \"$oPath\"");
|
||||
}
|
||||
|
||||
$iPath = $_SESSION['modpath'] . "\data\global\items";
|
||||
$oPath = realpath("docs\\{$_SESSION['modname']}\img\\items");
|
||||
exec("$q --first-frame-only \"$iPath\" -o \"$oPath\"");
|
||||
}
|
||||
|
||||
if (!is_dir("docs\\{$_SESSION['modname']}")) {
|
||||
mkdir("docs\\{$_SESSION['modname']}");
|
||||
mkdir("docs\\{$_SESSION['modname']}\\fonts", 0777, TRUE);
|
||||
@@ -124,36 +123,38 @@ if (file_exists(APP_DB)) {
|
||||
rcopy(realpath('docs/template/fonts'), realpath("docs\\{$_SESSION['modname']}\\fonts"));
|
||||
rcopy(realpath('docs/template/img'), realpath("docs\\{$_SESSION['modname']}\\img"));
|
||||
rcopy(realpath('docs/template/res'), realpath("docs\\{$_SESSION['modname']}\\res"));
|
||||
|
||||
|
||||
toPngAll();
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Process tbl files
|
||||
*
|
||||
*
|
||||
*/
|
||||
*/
|
||||
$tbl = $_SESSION['tbl'];
|
||||
|
||||
// ddump($tbl);
|
||||
|
||||
/*
|
||||
$string = D2Tbl::getStrings($tbl."string.tbl");
|
||||
$stringExpansion = D2Tbl::getStrings($tbl."expansionstring.tbl");
|
||||
$stringPatch = D2Tbl::getStrings($tbl."patchstring.tbl");
|
||||
|
||||
$strings = array_merge($stringPatch, $stringExpansion, $string);
|
||||
*/
|
||||
|
||||
$strs = ["dummy" => "dummy"];
|
||||
foreach (glob($tbl . "*.tbl") as $filename) {
|
||||
$strings = D2Tbl::getStrings($filename);
|
||||
if (!empty($strings))
|
||||
$strs = array_merge($strs, $strings);
|
||||
}
|
||||
|
||||
$db->writeTbl($strs);
|
||||
|
||||
// write each table to invidual db table
|
||||
$tbl = $_SESSION['tbl'];
|
||||
foreach (glob($tbl . "*.tbl") as $filename) {
|
||||
$tblName = pathinfo($filename)['filename'];
|
||||
$strings = D2Tbl::getStrings($filename);
|
||||
if (!empty($strings)) {
|
||||
$db->writeTbls($tblName, $strings);
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
// if config db does not exist, go to configure page
|
||||
header("Location: /src/D2Config.php");
|
||||
@@ -167,7 +168,7 @@ if (file_exists(APP_DB)) {
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0; URL=/" />
|
||||
<meta http-equiv="refresh" content="0; URL=/" />
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user