49 global $bearsamppTools;
50 $result =
'<?xml version="1.0"?>' . PHP_EOL .
'<settings>' . PHP_EOL .
59 file_put_contents($bearsamppTools->getConsoleZ()->getConf(),
$result);
75 'change_refresh="10" ' .
77 'rows="' . $bearsamppTools->getConsoleZ()->getRows() .
'" ' .
78 'columns="' . $bearsamppTools->getConsoleZ()->getCols() .
'" ' .
79 'buffer_rows="2048" ' .
80 'buffer_columns="0" ' .
84 'save_size="0">' . PHP_EOL;
101 self::getIncrStr(3) .
'<color id="14" r="204" g="204" b="129"/>' . PHP_EOL .
102 self::getIncrStr(3) .
'<color id="15" r="255" g="255" b="255"/>' . PHP_EOL .
107 return $sectionConsoleStart . $sectionColors . $sectionConsoleEnd;
120 $sectionFont =
self::getIncrStr(2) .
'<font name="Courier New" size="10" bold="0" italic="0" smoothing="0">' . PHP_EOL .
125 'title="ConsoleZ" ' .
127 'use_tab_icon="1" ' .
128 'use_console_title="0" ' .
130 'show_cmd_tabs="0" ' .
131 'use_tab_title="1" ' .
132 'trim_tab_titles="20" ' .
133 'trim_tab_titles_right="0"/>';
137 'show_toolbar="1" ' .
138 'show_statusbar="1" ' .
140 'hide_single_tab="1" ' .
141 'show_scrollbars="1" ' .
142 'flat_scrollbars="0" ' .
143 'tabs_on_bottom="0"/>';
145 $stylesSection =
self::getIncrStr(2) .
'<styles caption="1" resizable="1" taskbar_button="1" border="1" inside_border="2" tray_icon="0">' . PHP_EOL .
146 self::getIncrStr(3) .
'<selection_color r="255" g="255" b="255"/>' . PHP_EOL .
155 'save_position="0"/>';
159 'active_alpha="240" ' .
160 'inactive_alpha="225" ' .
166 $sectionFont . PHP_EOL .
167 $windowSection . PHP_EOL .
168 $controlsSection . PHP_EOL .
169 $stylesSection . PHP_EOL .
170 $positionSection . PHP_EOL .
171 $transparencySection . PHP_EOL .
186 'copy_on_select="0" ' .
187 'clear_on_copy="1" ' .
190 'copy_newline_char="0" ' .
191 'sensitive_copy="1"/>';
195 $sectionTabHighlight =
self::getIncrStr(2) .
'<tab_highlight flashes="3" stay_highligted="1"/>';
198 $sectionCopyPaste . PHP_EOL .
199 $sectionScroll . PHP_EOL .
200 $sectionTabHighlight . PHP_EOL .
215 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="83" command="settings"/>' . PHP_EOL .
216 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="112" command="help"/>' . PHP_EOL .
217 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="1" extended="0" code="115" command="exit"/>' . PHP_EOL .
218 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="112" command="newtab1"/>' . PHP_EOL .
219 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="113" command="newtab2"/>' . PHP_EOL .
220 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="114" command="newtab3"/>' . PHP_EOL .
221 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="115" command="newtab4"/>' . PHP_EOL .
222 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="116" command="newtab5"/>' . PHP_EOL .
223 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="117" command="newtab6"/>' . PHP_EOL .
224 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="118" command="newtab7"/>' . PHP_EOL .
225 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="119" command="newtab8"/>' . PHP_EOL .
226 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="120" command="newtab9"/>' . PHP_EOL .
227 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="121" command="newtab10"/>' . PHP_EOL .
228 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="49" command="switchtab1"/>' . PHP_EOL .
229 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="50" command="switchtab2"/>' . PHP_EOL .
230 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="51" command="switchtab3"/>' . PHP_EOL .
231 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="52" command="switchtab4"/>' . PHP_EOL .
232 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="53" command="switchtab5"/>' . PHP_EOL .
233 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="54" command="switchtab6"/>' . PHP_EOL .
234 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="55" command="switchtab7"/>' . PHP_EOL .
235 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="56" command="switchtab8"/>' . PHP_EOL .
236 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="57" command="switchtab9"/>' . PHP_EOL .
237 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="48" command="switchtab10"/>' . PHP_EOL .
238 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="9" command="nexttab"/>' . PHP_EOL .
239 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="1" alt="0" extended="0" code="9" command="prevtab"/>' . PHP_EOL .
240 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="87" command="closetab"/>' . PHP_EOL .
241 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="82" command="renametab"/>' . PHP_EOL .
242 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="1" code="45" command="copy"/>' . PHP_EOL .
243 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="1" code="46" command="clear_selection"/>' . PHP_EOL .
244 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="1" alt="0" extended="1" code="45" command="paste"/>' . PHP_EOL .
245 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="stopscroll"/>' . PHP_EOL .
246 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollrowup"/>' . PHP_EOL .
247 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollrowdown"/>' . PHP_EOL .
248 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpageup"/>' . PHP_EOL .
249 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpagedown"/>' . PHP_EOL .
250 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollcolleft"/>' . PHP_EOL .
251 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollcolright"/>' . PHP_EOL .
252 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpageleft"/>' . PHP_EOL .
253 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpageright"/>' . PHP_EOL .
254 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="1" alt="0" extended="0" code="112" command="dumpbuffer"/>' . PHP_EOL .
255 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="activate"/>' . PHP_EOL .
272 self::getIncrStr(3) .
'<action ctrl="0" shift="0" alt="0" button="1" name="copy"/>' . PHP_EOL .
273 self::getIncrStr(3) .
'<action ctrl="0" shift="1" alt="0" button="1" name="select"/>' . PHP_EOL .
274 self::getIncrStr(3) .
'<action ctrl="0" shift="0" alt="0" button="3" name="paste"/>' . PHP_EOL .
275 self::getIncrStr(3) .
'<action ctrl="1" shift="0" alt="0" button="1" name="drag"/>' . PHP_EOL .
276 self::getIncrStr(3) .
'<action ctrl="0" shift="0" alt="0" button="2" name="menu"/>' . PHP_EOL .
327 $bearsamppTools->getConsoleZ()->getTabTitleDefault(),
329 $bearsamppTools->getConsoleZ()->getShell(),
350 if ($powerShellPath !==
false) {
352 $bearsamppTools->getConsoleZ()->getTabTitlePowershell(),
353 self::ICON_POWERSHELL,
377 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' .
$bearsamppBins->getPhp()->getPearExe() .
'" -V');
379 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' .
$bearsamppBins->getPhp()->getPearExe() .
' not found');
383 $bearsamppTools->getConsoleZ()->getTabTitlePear(),
405 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' .
$bearsamppBins->getMysql()->getCliExe() .
'" -u' .
409 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' .
$bearsamppBins->getMysql()->getCliExe() .
' not found');
413 $bearsamppTools->getConsoleZ()->getTabTitleMysql(),
435 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' .
$bearsamppBins->getMariadb()->getCliExe() .
'" -u' .
439 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' .
$bearsamppBins->getMariadb()->getCliExe() .
' not found');
443 $bearsamppTools->getConsoleZ()->getTabTitleMariadb(),
465 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' .
$bearsamppBins->getPostgresql()->getCliExe() .
'"' .
471 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' .
$bearsamppBins->getPostgresql()->getCliExe() .
' not found');
475 $bearsamppTools->getConsoleZ()->getTabTitlePostgresql(),
497 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getGit()->getExe() .
'" --version');
498 if (!file_exists($bearsamppTools->getGit()->getExe())) {
499 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getGit()->getExe() .
' not found');
503 $bearsamppTools->getConsoleZ()->getTabTitleGit(),
526 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' .
$bearsamppBins->getNodejs()->getLaunch() .
'"');
528 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' .
$bearsamppBins->getNodejs()->getLaunch() .
' not found');
532 $bearsamppTools->getConsoleZ()->getTabTitleNodejs(),
554 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getComposer()->getExe() .
'" -V');
555 if (!file_exists($bearsamppTools->getComposer()->getExe())) {
556 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getComposer()->getExe() .
' not found');
560 $bearsamppTools->getConsoleZ()->getTabTitleComposer(),
582 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getPython()->getExe() .
'" -V');
583 if (!file_exists($bearsamppTools->getPython()->getExe())) {
584 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getPython()->getExe() .
' not found');
588 $bearsamppTools->getConsoleZ()->getTabTitlePython(),
610 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getRuby()->getExe() .
'" -v');
611 if (!file_exists($bearsamppTools->getRuby()->getExe())) {
612 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getRuby()->getExe() .
' not found');
616 $bearsamppTools->getConsoleZ()->getTabTitleRuby(),
638 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getYarn()->getExe() .
'" --version');
639 if (!file_exists($bearsamppTools->getYarn()->getExe())) {
640 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getYarn()->getExe() .
' not found');
644 $bearsamppTools->getConsoleZ()->getTabTitleYarn(),
666 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getPerl()->getExe() .
'" -v');
667 if (!file_exists($bearsamppTools->getPerl()->getExe())) {
668 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getPerl()->getExe() .
' not found');
672 $bearsamppTools->getConsoleZ()->getTabTitlePerl(),
696 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getGhostscript()->getExeConsole() .
'" -v');
697 if (!file_exists($bearsamppTools->getGhostscript()->getExeConsole())) {
698 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getGhostscript()->getExeConsole() .
' not found');
702 $bearsamppTools->getConsoleZ()->getTabTitleGhostscript(),
703 self::ICON_GHOSTSCRIPT,
726 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getNgrok()->getExe() .
'" version');
727 if (!file_exists($bearsamppTools->getNgrok()->getExe())) {
728 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getNgrok()->getExe() .
' not found');
732 $bearsamppTools->getConsoleZ()->getTabTitleNgrok(),
752 private static function getTab($title, $icon, $shell, $initDir)
755 return self::getIncrStr(2) .
'<tab title="' . $title .
'" icon="' .
$bearsamppCore->getIconsPath(
false) .
'/' . $icon .
'" use_default_icon="0">' . PHP_EOL .
756 self::getIncrStr(3) .
'<console shell="' . $shell .
'" init_dir="' . $initDir .
'" run_as_user="0" user=""/>' . PHP_EOL .
757 self::getIncrStr(3) .
'<cursor style="0" r="255" g="255" b="255"/>' . PHP_EOL .
759 self::getIncrStr(4) .
'<image file="" relative="0" extend="0" position="0">' . PHP_EOL .
777 for ($i = 0; $i <= $size; $i++) {
static getAppearanceSection()
static getTabGhostscriptSection()
static getTabMysqlSection()
static getTabPearSection()
static getHotkeysSection()
static getBehaviorSection()
static getTabNodejsSection()
static getTabMariadbSection()
static getTabComposerSection()
static getTabPythonSection()
static getTabNgrokSection()
static getConsoleSection()
static getTabCmdSection()
static getTabPerlSection()
static getTabGitSection()
static getTabPostgresqlSection()
static getTabPowerShellSection()
static getIncrStr($size=1)
static getTab($title, $icon, $shell, $initDir)
static getTabRubySection()
static getTabYarnSection()
static getPowerShellPath()