48 global $bearsamppTools;
49 $result =
'<?xml version="1.0"?>' . PHP_EOL .
'<settings>' . PHP_EOL .
58 file_put_contents($bearsamppTools->getConsoleZ()->getConf(),
$result);
74 'change_refresh="10" ' .
76 'rows="' . $bearsamppTools->getConsoleZ()->getRows() .
'" ' .
77 'columns="' . $bearsamppTools->getConsoleZ()->getCols() .
'" ' .
78 'buffer_rows="2048" ' .
79 'buffer_columns="0" ' .
83 'save_size="0">' . PHP_EOL;
100 self::getIncrStr(3) .
'<color id="14" r="204" g="204" b="129"/>' . PHP_EOL .
101 self::getIncrStr(3) .
'<color id="15" r="255" g="255" b="255"/>' . PHP_EOL .
106 return $sectionConsoleStart . $sectionColors . $sectionConsoleEnd;
119 $sectionFont =
self::getIncrStr(2) .
'<font name="Courier New" size="10" bold="0" italic="0" smoothing="0">' . PHP_EOL .
124 'title="ConsoleZ" ' .
126 'use_tab_icon="1" ' .
127 'use_console_title="0" ' .
129 'show_cmd_tabs="0" ' .
130 'use_tab_title="1" ' .
131 'trim_tab_titles="20" ' .
132 'trim_tab_titles_right="0"/>';
136 'show_toolbar="1" ' .
137 'show_statusbar="1" ' .
139 'hide_single_tab="1" ' .
140 'show_scrollbars="1" ' .
141 'flat_scrollbars="0" ' .
142 'tabs_on_bottom="0"/>';
144 $stylesSection =
self::getIncrStr(2) .
'<styles caption="1" resizable="1" taskbar_button="1" border="1" inside_border="2" tray_icon="0">' . PHP_EOL .
145 self::getIncrStr(3) .
'<selection_color r="255" g="255" b="255"/>' . PHP_EOL .
154 'save_position="0"/>';
158 'active_alpha="240" ' .
159 'inactive_alpha="225" ' .
165 $sectionFont . PHP_EOL .
166 $windowSection . PHP_EOL .
167 $controlsSection . PHP_EOL .
168 $stylesSection . PHP_EOL .
169 $positionSection . PHP_EOL .
170 $transparencySection . PHP_EOL .
185 'copy_on_select="0" ' .
186 'clear_on_copy="1" ' .
189 'copy_newline_char="0" ' .
190 'sensitive_copy="1"/>';
194 $sectionTabHighlight =
self::getIncrStr(2) .
'<tab_highlight flashes="3" stay_highligted="1"/>';
197 $sectionCopyPaste . PHP_EOL .
198 $sectionScroll . PHP_EOL .
199 $sectionTabHighlight . PHP_EOL .
214 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="83" command="settings"/>' . PHP_EOL .
215 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="112" command="help"/>' . PHP_EOL .
216 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="1" extended="0" code="115" command="exit"/>' . PHP_EOL .
217 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="112" command="newtab1"/>' . PHP_EOL .
218 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="113" command="newtab2"/>' . PHP_EOL .
219 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="114" command="newtab3"/>' . PHP_EOL .
220 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="115" command="newtab4"/>' . PHP_EOL .
221 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="116" command="newtab5"/>' . PHP_EOL .
222 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="117" command="newtab6"/>' . PHP_EOL .
223 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="118" command="newtab7"/>' . PHP_EOL .
224 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="119" command="newtab8"/>' . PHP_EOL .
225 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="120" command="newtab9"/>' . PHP_EOL .
226 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="121" command="newtab10"/>' . PHP_EOL .
227 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="49" command="switchtab1"/>' . PHP_EOL .
228 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="50" command="switchtab2"/>' . PHP_EOL .
229 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="51" command="switchtab3"/>' . PHP_EOL .
230 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="52" command="switchtab4"/>' . PHP_EOL .
231 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="53" command="switchtab5"/>' . PHP_EOL .
232 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="54" command="switchtab6"/>' . PHP_EOL .
233 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="55" command="switchtab7"/>' . PHP_EOL .
234 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="56" command="switchtab8"/>' . PHP_EOL .
235 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="57" command="switchtab9"/>' . PHP_EOL .
236 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="48" command="switchtab10"/>' . PHP_EOL .
237 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="9" command="nexttab"/>' . PHP_EOL .
238 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="1" alt="0" extended="0" code="9" command="prevtab"/>' . PHP_EOL .
239 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="87" command="closetab"/>' . PHP_EOL .
240 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="0" code="82" command="renametab"/>' . PHP_EOL .
241 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="1" code="45" command="copy"/>' . PHP_EOL .
242 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="0" alt="0" extended="1" code="46" command="clear_selection"/>' . PHP_EOL .
243 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="1" alt="0" extended="1" code="45" command="paste"/>' . PHP_EOL .
244 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="stopscroll"/>' . PHP_EOL .
245 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollrowup"/>' . PHP_EOL .
246 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollrowdown"/>' . PHP_EOL .
247 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpageup"/>' . PHP_EOL .
248 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpagedown"/>' . PHP_EOL .
249 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollcolleft"/>' . PHP_EOL .
250 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollcolright"/>' . PHP_EOL .
251 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpageleft"/>' . PHP_EOL .
252 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpageright"/>' . PHP_EOL .
253 self::getIncrStr(2) .
'<hotkey ctrl="1" shift="1" alt="0" extended="0" code="112" command="dumpbuffer"/>' . PHP_EOL .
254 self::getIncrStr(2) .
'<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="activate"/>' . PHP_EOL .
271 self::getIncrStr(3) .
'<action ctrl="0" shift="0" alt="0" button="1" name="copy"/>' . PHP_EOL .
272 self::getIncrStr(3) .
'<action ctrl="0" shift="1" alt="0" button="1" name="select"/>' . PHP_EOL .
273 self::getIncrStr(3) .
'<action ctrl="0" shift="0" alt="0" button="3" name="paste"/>' . PHP_EOL .
274 self::getIncrStr(3) .
'<action ctrl="1" shift="0" alt="0" button="1" name="drag"/>' . PHP_EOL .
275 self::getIncrStr(3) .
'<action ctrl="0" shift="0" alt="0" button="2" name="menu"/>' . PHP_EOL .
325 $bearsamppTools->getConsoleZ()->getTabTitleDefault(),
327 $bearsamppTools->getConsoleZ()->getShell(),
348 if ($powerShellPath !==
false) {
350 $bearsamppTools->getConsoleZ()->getTabTitlePowershell(),
351 self::ICON_POWERSHELL,
375 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' .
$bearsamppBins->getPhp()->getPearExe() .
'" -V');
377 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' .
$bearsamppBins->getPhp()->getPearExe() .
' not found');
381 $bearsamppTools->getConsoleZ()->getTabTitlePear(),
403 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' .
$bearsamppBins->getMysql()->getCliExe() .
'" -u' .
407 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' .
$bearsamppBins->getMysql()->getCliExe() .
' not found');
411 $bearsamppTools->getConsoleZ()->getTabTitleMysql(),
433 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' .
$bearsamppBins->getMariadb()->getCliExe() .
'" -u' .
437 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' .
$bearsamppBins->getMariadb()->getCliExe() .
' not found');
441 $bearsamppTools->getConsoleZ()->getTabTitleMariadb(),
463 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' .
$bearsamppBins->getPostgresql()->getCliExe() .
'"' .
469 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' .
$bearsamppBins->getPostgresql()->getCliExe() .
' not found');
473 $bearsamppTools->getConsoleZ()->getTabTitlePostgresql(),
495 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getGit()->getExe() .
'" --version');
496 if (!file_exists($bearsamppTools->getGit()->getExe())) {
497 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getGit()->getExe() .
' not found');
501 $bearsamppTools->getConsoleZ()->getTabTitleGit(),
524 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' .
$bearsamppBins->getNodejs()->getLaunch() .
'"');
526 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' .
$bearsamppBins->getNodejs()->getLaunch() .
' not found');
530 $bearsamppTools->getConsoleZ()->getTabTitleNodejs(),
552 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getComposer()->getExe() .
'" -V');
553 if (!file_exists($bearsamppTools->getComposer()->getExe())) {
554 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getComposer()->getExe() .
' not found');
558 $bearsamppTools->getConsoleZ()->getTabTitleComposer(),
580 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getPython()->getExe() .
'" -V');
581 if (!file_exists($bearsamppTools->getPython()->getExe())) {
582 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getPython()->getExe() .
' not found');
586 $bearsamppTools->getConsoleZ()->getTabTitlePython(),
608 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getRuby()->getExe() .
'" -v');
609 if (!file_exists($bearsamppTools->getRuby()->getExe())) {
610 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getRuby()->getExe() .
' not found');
614 $bearsamppTools->getConsoleZ()->getTabTitleRuby(),
636 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getPerl()->getExe() .
'" -v');
637 if (!file_exists($bearsamppTools->getPerl()->getExe())) {
638 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getPerl()->getExe() .
' not found');
642 $bearsamppTools->getConsoleZ()->getTabTitlePerl(),
666 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getGhostscript()->getExeConsole() .
'" -v');
667 if (!file_exists($bearsamppTools->getGhostscript()->getExeConsole())) {
668 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getGhostscript()->getExeConsole() .
' not found');
672 $bearsamppTools->getConsoleZ()->getTabTitleGhostscript(),
673 self::ICON_GHOSTSCRIPT,
696 $shell = $bearsamppTools->getConsoleZ()->getShell(
'"' . $bearsamppTools->getNgrok()->getExe() .
'" version');
697 if (!file_exists($bearsamppTools->getNgrok()->getExe())) {
698 $shell = $bearsamppTools->getConsoleZ()->getShell(
'echo ' . $bearsamppTools->getNgrok()->getExe() .
' not found');
702 $bearsamppTools->getConsoleZ()->getTabTitleNgrok(),
722 private static function getTab($title, $icon, $shell, $initDir)
725 return self::getIncrStr(2) .
'<tab title="' . $title .
'" icon="' .
$bearsamppCore->getIconsPath(
false) .
'/' . $icon .
'" use_default_icon="0">' . PHP_EOL .
726 self::getIncrStr(3) .
'<console shell="' . $shell .
'" init_dir="' . $initDir .
'" run_as_user="0" user=""/>' . PHP_EOL .
727 self::getIncrStr(3) .
'<cursor style="0" r="255" g="255" b="255"/>' . PHP_EOL .
729 self::getIncrStr(4) .
'<image file="" relative="0" extend="0" position="0">' . PHP_EOL .
747 for ($i = 0; $i <= $size; $i++) {
static getTabMysqlSection()
static getTabNgrokSection()
static getHotkeysSection()
static getTabRubySection()
static getTabPerlSection()
static getTab($title, $icon, $shell, $initDir)
static getTabPythonSection()
static getTabNodejsSection()
static getTabGitSection()
static getIncrStr($size=1)
static getTabPowerShellSection()
static getAppearanceSection()
static getTabPearSection()
static getTabPostgresqlSection()
static getBehaviorSection()
static getConsoleSection()
static getTabCmdSection()
static getTabMariadbSection()
static getTabComposerSection()
static getTabGhostscriptSection()
static getPowerShellPath()