mirror of
https://github.com/msikma/pokesprite.git
synced 2026-09-07 18:05:10 -05:00
Add error in case no GD is present.
This commit is contained in:
@@ -41,6 +41,7 @@ class I18n
|
||||
'icon_dir_failure' => "<frm=red>Couldn't open icon directory (%s). Skipping.</frm>\n",
|
||||
'dir_create' => "Creating output directory.\n",
|
||||
'dir_error' => "<frm=red>Couldn't create directories.</frm>\n",
|
||||
'gd_error' => "<frm=red>Error: GD functions seem to be missing, e.g. imagecreatefrompng(). Install them or recompile PHP with GD support, then try again.</frm>\n",
|
||||
'dir_success' => "<frm=green>Dirs successfully created.</frm>\n",
|
||||
'no_cli' => "<frm=red>We don't seem to be running via the command line. Keep in mind this tool was designed for command line usage, and hasn't been tested in other situations.</frm>\n",
|
||||
'pngcrush_missing' => "<frm=red>pngcrush seems to be missing (path: %s). By default, it needs to be in the tools directory, chmodded to be executable, and at least version 1.7.60.\nImage will not be optimized by pngcrush.</frm>\n",
|
||||
|
||||
@@ -105,6 +105,12 @@ I18n::set_default_lines();
|
||||
$termfrm = new TerminalFormatter();
|
||||
I18n::add_output_filter(array('PkSpr\TerminalFormatter', 'format'));
|
||||
|
||||
// Check if we have GD.
|
||||
if (!function_exists('imagecreatefrompng')) {
|
||||
print(I18n::l('gd_error'));
|
||||
die();
|
||||
}
|
||||
|
||||
// Print basic program info.
|
||||
print(I18n::lf('info', array(
|
||||
$title_str,
|
||||
|
||||
Reference in New Issue
Block a user