* adjust the build script for latest xampp version.
@@ -20,21 +20,22 @@ echo `$sevenz x -y $xampp`;
|
||||
|
||||
/* rm useless files. */
|
||||
error_reporting(E_ALL);
|
||||
$file->removeDir('./xampp/anonymous');
|
||||
$file->removeDir('./xampp/cgi-bin');
|
||||
$file->removeDir('./xampp/contrib');
|
||||
$file->removeDir('./xampp/contrib');
|
||||
$file->removeDir('./xampp/install');
|
||||
$file->removeDir('./xampp/nsi');
|
||||
$file->removeDir('./xampp/licenses');
|
||||
$file->removeDir('./xampp/locale');
|
||||
$file->removeDir('./xampp/mailoutput');
|
||||
$file->removeDir('./xampp/mailtodisk');
|
||||
$file->removeDir('./xampp/perl');
|
||||
$file->removeDir('./xampp/phpmyadmin');
|
||||
$file->removeDir('./xampp/sendmail');
|
||||
$file->removeDir('./xampp/security');
|
||||
$file->removeDir('./xampp/src');
|
||||
$file->batchRemoveFile('./xampp/tmp/*');
|
||||
$file->removeDir('./xampp/webdav');
|
||||
$file->removeFile('./xampp/setup_xampp.bat');
|
||||
$file->batchRemoveFile('./xampp/*.txt');
|
||||
$file->batchRemoveFile('./xampp/*.bat');
|
||||
$file->batchRemoveFile('./xampp/*.exe');
|
||||
$file->batchRemoveFile('./xampp/*.ini');
|
||||
|
||||
/* Process apache module. */
|
||||
$file->batchRemoveFile('./xampp/apache/*.txt');
|
||||
@@ -42,28 +43,34 @@ $file->batchRemoveFile('./xampp/apache/*.bat');
|
||||
$file->rename('./xampp/apache/modules', './xampp/apache/modulesold');
|
||||
$file->mkdir('./xampp/apache/modules');
|
||||
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_auth_basic.so', './xampp/apache/modules/mod_auth_basic.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_mime_magic.so', './xampp/apache/modules/mod_mime_magic.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_mime.so', './xampp/apache/modules/mod_mime.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_expires.so', './xampp/apache/modules/mod_expires.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_env.so', './xampp/apache/modules/mod_env.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_rewrite.so', './xampp/apache/modules/mod_rewrite.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_vhost_alias.so','./xampp/apache/modules/mod_vhost_alias.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_setenvif.so', './xampp/apache/modules/mod_setenvif.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_autoindex.so', './xampp/apache/modules/mod_autoindex.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_authz_user.so', './xampp/apache/modules/mod_authz_user.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_authz_host.so', './xampp/apache/modules/mod_authz_host.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_alias.so', './xampp/apache/modules/mod_alias.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_dir.so', './xampp/apache/modules/mod_dir.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_deflate.so', './xampp/apache/modules/mod_deflate.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_access_compat.so', './xampp/apache/modules/mod_access_compat.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_auth_basic.so', './xampp/apache/modules/mod_auth_basic.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_auth_basic.so', './xampp/apache/modules/mod_auth_basic.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_authz_core.so', './xampp/apache/modules/mod_authz_core.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_mime_magic.so', './xampp/apache/modules/mod_mime_magic.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_mime.so', './xampp/apache/modules/mod_mime.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_expires.so', './xampp/apache/modules/mod_expires.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_env.so', './xampp/apache/modules/mod_env.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_rewrite.so', './xampp/apache/modules/mod_rewrite.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_vhost_alias.so', './xampp/apache/modules/mod_vhost_alias.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_setenvif.so', './xampp/apache/modules/mod_setenvif.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_autoindex.so', './xampp/apache/modules/mod_autoindex.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_authz_user.so', './xampp/apache/modules/mod_authz_user.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_authz_host.so', './xampp/apache/modules/mod_authz_host.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_alias.so', './xampp/apache/modules/mod_alias.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_dir.so', './xampp/apache/modules/mod_dir.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_deflate.so', './xampp/apache/modules/mod_deflate.so');
|
||||
$file->copyFile('./xampp/apache/modulesold/mod_filter.so', './xampp/apache/modules/mod_filter.so');
|
||||
$file->removeDir('./xampp/apache/modulesold');
|
||||
|
||||
/* Remove apache's error, icons, include, lib, logs directory. */
|
||||
$file->removeDir('./xampp/apache/cgi-bin');
|
||||
$file->removeDir('./xampp/apache/error');
|
||||
$file->removeDir('./xampp/apache/icons');
|
||||
$file->removeDir('./xampp/apache/include');
|
||||
$file->removeDir('./xampp/apache/lib');
|
||||
$file->batchRemoveFile('./xampp/apache/logs/*.log');
|
||||
$file->removeDir('./xampp/apache/manual');
|
||||
|
||||
$file->rename('./xampp/apache/bin', './xampp/apache/binold');
|
||||
$file->mkdir('./xampp/apache/bin');
|
||||
@@ -82,24 +89,11 @@ $file->removeDir('./xampp/apache/binold');
|
||||
|
||||
/* Process the apache's config file. */
|
||||
$httpdConf = file_get_contents('./xampp/apache/conf/httpd.conf');
|
||||
$httpdConf = str_replace('LoadModule actions_module modules/mod_actions.so', '#LoadModule actions_module modules/mod_actions.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule actions_module modules/mod_actions.so', '#LoadModule actions_module modules/mod_actions.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule actions_module modules/mod_actions.so', '#LoadModule actions_module modules/mod_actions.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule asis_module modules/mod_asis.so', '#LoadModule asis_module modules/mod_asis.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule auth_digest_module modules/mod_auth_digest.so', '#LoadModule auth_digest_module modules/mod_auth_digest.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule authn_default_module modules/mod_authn_default.so', '#LoadModule authn_default_module modules/mod_authn_default.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule actions_module modules/mod_actions.so', '#LoadModule actions_module modules/mod_actions.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule allowmethods_module modules/mod_allowmethods.so', '#LoadModule allowmethods_module modules/mod_allowmethods.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule asis_module modules/mod_asis.so', '#LoadModule asis_module modules/mod_asis.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule authn_core_module modules/mod_authn_core.so', '#LoadModule authn_default_module modules/mod_authn_core.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule authn_file_module modules/mod_authn_file.so', '#LoadModule authn_file_module modules/mod_authn_file.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule authz_default_module modules/mod_authz_default.so', '#LoadModule authz_default_module modules/mod_authz_default.so', $httpdConf);
|
||||
|
||||
$httpdConf = file_get_contents('./xampp/apache/conf/httpd.conf');
|
||||
$httpdConf = str_replace('LoadModule actions_module modules/mod_actions.so', '#LoadModule actions_module modules/mod_actions.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule actions_module modules/mod_actions.so', '#LoadModule actions_module modules/mod_actions.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule actions_module modules/mod_actions.so', '#LoadModule actions_module modules/mod_actions.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule asis_module modules/mod_asis.so', '#LoadModule asis_module modules/mod_asis.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule auth_digest_module modules/mod_auth_digest.so', '#LoadModule auth_digest_module modules/mod_auth_digest.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule authn_default_module modules/mod_authn_default.so', '#LoadModule authn_default_module modules/mod_authn_default.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule authn_file_module modules/mod_authn_file.so', '#LoadModule authn_file_module modules/mod_authn_file.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule authz_default_module modules/mod_authz_default.so', '#LoadModule authz_default_module modules/mod_authz_default.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule authz_groupfile_module modules/mod_authz_groupfile.so','#LoadModule authz_groupfile_module modules/mod_authz_groupfile.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule cgi_module modules/mod_cgi.so', '#LoadModule cgi_module modules/mod_cgi.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule dav_lock_module modules/mod_dav_lock.so', '#LoadModule dav_lock_module modules/mod_dav_lock.so', $httpdConf);
|
||||
@@ -108,6 +102,7 @@ $httpdConf = str_replace('LoadModule include_module modules/mod_include.so',
|
||||
$httpdConf = str_replace('LoadModule info_module modules/mod_info.so', '#LoadModule info_module modules/mod_info.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule isapi_module modules/mod_isapi.so', '#LoadModule isapi_module modules/mod_isapi.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule log_config_module modules/mod_log_config.so', '#LoadModule log_config_module modules/mod_log_config.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule cache_disk_module modules/mod_cache_disk.so', '#LoadModule log_config_module modules/mod_cache_disk.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule negotiation_module modules/mod_negotiation.so', '#LoadModule negotiation_module modules/mod_negotiation.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule proxy_module modules/mod_proxy.so', '#LoadModule proxy_module modules/mod_proxy.so', $httpdConf);
|
||||
$httpdConf = str_replace('LoadModule proxy_ajp_module modules/mod_proxy_ajp.so', '#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so', $httpdConf);
|
||||
@@ -115,8 +110,8 @@ $httpdConf = str_replace('LoadModule ssl_module modules/mod_ssl.so',
|
||||
$httpdConf = str_replace('LoadModule status_module modules/mod_status.so', '#LoadModule status_module modules/mod_status.so', $httpdConf);
|
||||
$httpdConf = str_replace('#LoadModule deflate_module modules/mod_deflate.so', 'LoadModule deflate_module modules/mod_deflate.so', $httpdConf);
|
||||
$httpdConf = str_replace('#LoadModule expires_module modules/mod_expires.so', 'LoadModule expires_module modules/mod_expires.so', $httpdConf);
|
||||
$httpdConf = str_replace('#LoadModule filter_module modules/mod_filter.so', 'LoadModule filter_module modules/mod_filter.so', $httpdConf);
|
||||
|
||||
$httpdConf = str_replace('Include "conf/extra/httpd-perl.conf"', '#Include "conf/extra/httpd-perl.conf"', $httpdConf);
|
||||
$httpdConf = str_replace('Include "conf/extra/httpd-multilang-errordoc.conf"', '#Include "conf/extra/httpd-multilang-errordoc.conf"', $httpdConf);
|
||||
$httpdConf = str_replace('Include "conf/extra/httpd-userdir.conf"', '#Include "conf/extra/httpd-userdir.conf"', $httpdConf);
|
||||
$httpdConf = str_replace('Include "conf/extra/httpd-info.conf"', '#Include "conf/extra/httpd-info.conf"', $httpdConf);
|
||||
@@ -130,9 +125,9 @@ foreach($httpdConf as $key => $line)
|
||||
if(empty($line) or substr($line, 0, 1) == '#') unset($httpdConf[$key]);
|
||||
}
|
||||
$httpdConf = join("\n", $httpdConf);
|
||||
file_put_contents('./xampp/apache/conf/httpd.conf', str_replace('88', '80', $httpdConf));
|
||||
file_put_contents('./xampp/apache/conf/httpd80.conf', str_replace('88', '80', $httpdConf));
|
||||
file_put_contents('./xampp/apache/conf/httpd88.conf', str_replace('80', '88', $httpdConf));
|
||||
$httpdConf = str_replace('Options Indexes', 'Options', $httpdConf); // Turn off the directory index feature.
|
||||
$httpdConf = str_replace('ht*', 'zt*', $httpdConf); // Deny the access of .ztaccess.
|
||||
file_put_contents('./xampp/apache/conf/httpd.conf', $httpdConf);
|
||||
|
||||
/* Move .htacces to .ztaccess. */
|
||||
$httpdDefaultConfig = './xampp/apache/conf/extra/httpd-default.conf';
|
||||
@@ -171,7 +166,7 @@ $file->copyFile('./xampp/mysql/binold/mysql.exe', './xampp/mysql/bin/mysql.
|
||||
$file->copyFile('./xampp/mysql/binold/mysqld.exe', './xampp/mysql/bin/mysqld.exe');
|
||||
$file->copyFile('./xampp/mysql/binold/mysqldump.exe', './xampp/mysql/bin/mysqldump.exe');
|
||||
$file->copyFile('./xampp/mysql/binold/myisamchk.exe', './xampp/mysql/bin/myisamchk.exe');
|
||||
$file->copyFile('./xampp/mysql/binold/my.ini', './xampp/mysql/bin/my.ini');
|
||||
$file->rename('./xampp/mysql/binold/my.ini', './xampp/mysql/my.ini');
|
||||
|
||||
$file->removeDir('./xampp/mysql/binold');
|
||||
|
||||
@@ -183,7 +178,6 @@ $file->copyFile('./xampp/mysql/shareold/english/errmsg.sys', './xampp/mysql/shar
|
||||
$file->removeDir('../xampp/mysql/shareold');
|
||||
|
||||
/* Process mysql's data directory. */
|
||||
$file->removeDir('./xampp/mysql/data/phpmyadmin');
|
||||
$file->removeDir('./xampp/mysql/data/test');
|
||||
$file->removeDir('./xampp/mysql/data/webauth');
|
||||
$file->removeDir('./xampp/mysql/data/cdcol');
|
||||
@@ -191,12 +185,12 @@ $file->batchRemoveFile('./xampp/mysql/data/ib*');
|
||||
$file->batchRemoveFile('./xampp/mysql/data/mysql*');
|
||||
|
||||
/* Remove mysql's useless config files. */
|
||||
$file->batchRemoveFile('./xampp/mysql/*.ini');
|
||||
$file->batchRemoveFile('./xampp/mysql/my-*');
|
||||
$file->removeFile('./xampp/mysql/README');
|
||||
$file->removeFile('./xampp/mysql/COPYING');
|
||||
|
||||
/* Process mysql's conf file. */
|
||||
$myConf = file_get_contents('./xampp/mysql/bin/my.ini');
|
||||
$myConf = file_get_contents('./xampp/mysql/my.ini');
|
||||
$myConf = str_replace('#bind-address="127.0.0.1"', 'bind-address="127.0.0.1"', $myConf);
|
||||
$myConf = str_replace('#skip-innodb', "default-storage-engine=MyISAM\nskip-innodb\n", $myConf);
|
||||
|
||||
@@ -209,9 +203,7 @@ foreach($myConf as $key => $line)
|
||||
}
|
||||
$myConf = join("\n", $myConf);
|
||||
$myConf = str_replace('
|
||||
', '', $myConf);
|
||||
file_put_contents('./xampp/mysql/bin/my.ini', str_replace('3308', '3306', $myConf));
|
||||
file_put_contents('./xampp/mysql/bin/my3306.ini', str_replace('3308', '3306', $myConf));
|
||||
', '', $myConf);
|
||||
file_put_contents('./xampp/mysql/my.ini', $myConf);
|
||||
|
||||
/* Processing php. */
|
||||
@@ -224,6 +216,7 @@ $file->removeDir('./xampp/php/tests');
|
||||
$file->removeDir('./xampp/php/tests');
|
||||
$file->removeDir('./xampp/php/Text');
|
||||
$file->removeDir('./xampp/php/tmp');
|
||||
$file->removeDir('./xampp/php/www');
|
||||
$file->removeDir('./xampp/php/scripts');
|
||||
$file->batchRemoveFile('./xampp/php/dbunit*');
|
||||
$file->batchRemoveFile('./xampp/php/*.bat');
|
||||
@@ -236,28 +229,39 @@ $file->batchRemoveFile('./xampp/php/phpcov');
|
||||
$file->batchRemoveFile('./xampp/php/phpcov');
|
||||
$file->batchRemoveFile('./xampp/php/phptok');
|
||||
$file->batchRemoveFile('./xampp/php/phpunit');
|
||||
$file->batchRemoveFile('./xampp/php/*.php');
|
||||
$file->batchRemoveFile('./xampp/php/phpcs');
|
||||
$file->batchRemoveFile('./xampp/php/phpdoc');
|
||||
$file->batchRemoveFile('./xampp/php/phpuml');
|
||||
$file->batchRemoveFile('./xampp/php/*.sh');
|
||||
$file->batchRemoveFile('./xampp/php/logs/*');
|
||||
|
||||
|
||||
$file->removeDir('./xampp/php/extras/fonts');
|
||||
$file->removeDir('./xampp/php/extras/mibs');
|
||||
$file->removeDir('./xampp/php/extras/openssl');
|
||||
$file->removeFile('./xampp/php/extras/openssl.cnf');
|
||||
|
||||
$file->rename('./xampp/php/php5apache2_4.dll', './xampp/php/php5apache2_4.bak');
|
||||
$file->rename('./xampp/php/php5ts.dll', './xampp/php/php5ts.bak');
|
||||
$file->rename('./xampp/php/ssleay32.dll', './xampp/php/ssleay32.dll.bak');
|
||||
$file->rename('./xampp/php/libeay32.dll', './xampp/php/libeay32.dll.bak');
|
||||
$file->rename('./xampp/php/libsasl.dll', './xampp/php/libsasl.dll.bak');
|
||||
$file->batchRemoveFile('./xampp/php/*.dll');
|
||||
$file->batchRemoveFile('./xampp/php/*.dll');
|
||||
$file->rename('./xampp/php/php5apache2_4.bak', './xampp/php/php5apache2_4.dll');
|
||||
$file->rename('./xampp/php/php5ts.bak', './xampp/php/php5ts.dll');
|
||||
$file->rename('./xampp/php/ssleay32.dll.bak', './xampp/php/ssleay32.dll');
|
||||
$file->rename('./xampp/php/libeay32.dll.bak', './xampp/php/libeay32.dll');
|
||||
$file->rename('./xampp/php/libeay32.dll.bak', './xampp/php/libeay32.dll');
|
||||
$file->copyFile('./xampp/php/libsasl.dll.bak', './xampp/apache/bin/libsasl.dll');
|
||||
$file->rename('./xampp/php/libsasl.dll.bak', './xampp/php/libsasl.dll');
|
||||
|
||||
/* Process php ini file. */
|
||||
$phpConfig = file_get_contents('./xampp/php/php.ini');
|
||||
$phpConfig = file_get_contents('./xampp/php/php.ini');
|
||||
$phpConfig = str_replace('extension=php_exif.dll',';extension=php_exif.dll', $phpConfig);
|
||||
$phpConfig = str_replace('extension=php_gettext.dll',';extension=php_gettext.dll', $phpConfig);
|
||||
$phpConfig = str_replace('extension=php_pdo_odbc.dll',';extension=php_pdo_odbc.dll', $phpConfig);
|
||||
$phpConfig = str_replace('extension=php_pdo_sqlite.dll',';extension=php_pdo_sqlite.dll', $phpConfig);
|
||||
$phpConfig = str_replace('extension=php_soap.dll',';extension=php_soap.dll', $phpConfig);
|
||||
$phpConfig = str_replace('extension=php_sqlite.dll',';extension=php_sqlite.dll', $phpConfig);
|
||||
$phpConfig = str_replace('extension=php_xsl.dll',';extension=php_xsl.dll', $phpConfig);
|
||||
$phpConfig = str_replace('extension=php_sqlite3.dll','extension=php_ldap.dll', $phpConfig); // load ldap extension.
|
||||
$phpConfig = str_replace('extension=php_xmlrpc.dll','extension=php_openssl.dll', $phpConfig); // load openssl extension.
|
||||
@@ -282,7 +286,7 @@ foreach($phpConfig as $key => $line)
|
||||
if(stripos($line, 'eaccelerator') !== false) unset($phpConfig[$key]);
|
||||
if(stripos($line, 'xdebug') !== false) unset($phpConfig[$key]);
|
||||
}
|
||||
$phpConfig = join("\n", $phpConfig);
|
||||
$phpConfig = join("\n", $phpConfig);
|
||||
$phpConfig = 'zend_extension = "\xampp\php\ext\ioncube_loader_win_5.4.dll"' . "\n" . $phpConfig;
|
||||
|
||||
file_put_contents('./xampp/php/php.ini', str_replace('
|
||||
@@ -299,21 +303,20 @@ $file->copyFile('./xampp/php/extold/php_pdo_mysql.dll', './xampp/php/ext/php_pdo
|
||||
$file->copyFile('./xampp/php/extold/php_mysqli.dll', './xampp/php/ext/php_mysqli.dll');
|
||||
$file->copyFile('./xampp/php/extold/php_pdo_mysql.dll', './xampp/php/ext/php_pdo_mysql.dll');
|
||||
$file->copyFile('./xampp/php/extold/php_sockets.dll', './xampp/php/ext/php_sockets.dll');
|
||||
$file->copyFile('./xampp/php/extold/php_openssl.dll', './xampp/php/ext/php_openssl.dll');
|
||||
$file->copyFile('./xampp/php/extold/php_ldap.dll', './xampp/php/ext/php_ldap.dll');
|
||||
$file->copyFile('./xampp/php/extold/php_curl.dll', './xampp/php/ext/php_curl.dll');
|
||||
$file->removeDir('./xampp/php/extold');
|
||||
|
||||
/* Process sqlbuddy. */
|
||||
if(!is_dir('./xampp/admin/')) $file->mkdir('./xampp/admin/');
|
||||
if(!is_dir('./xampp/admin/sqlbuddy'))
|
||||
{
|
||||
echo `$sevenz x -y $sqlbuddy`;
|
||||
$file->rename('./sqlbuddy', './xampp/admin/sqlbuddy');
|
||||
$file->copyFile($buildDir . '/sqlbuddyconfig.php', './xampp/admin/sqlbuddy/config.php');
|
||||
$file->removeDir('./xampp/php/extold');
|
||||
|
||||
/* Process control panel. */
|
||||
if(file_exists('./xampp/xampp-control.exe')) $file->rename('./xampp/xampp-control.exe', './xampp/zentaoamp-control-en.exe');
|
||||
|
||||
/* Process control panel. */
|
||||
|
||||
/* Process phpmyadmin. */
|
||||
$file->mkdir('./xampp/admin');
|
||||
$file->rename('./xampp/phpMyAdmin', './xampp/admin/phpmyadmin');
|
||||
$file->rename('./xampp/admin/phpmyadmin/locale', './xampp/admin/phpmyadmin/locale.old');
|
||||
$file->mkdir('./xampp/admin/phpmyadmin/locale');
|
||||
$file->rename('./xampp/admin/phpmyadmin/locale.old/en_GB', './xampp/admin/phpmyadmin/locale/en_GB');
|
||||
$file->rename('./xampp/admin/phpmyadmin/locale.old/zh_CN', './xampp/admin/phpmyadmin/locale/zh_CN');
|
||||
$file->rename('./xampp/admin/phpmyadmin/locale.old/zh_TW', './xampp/admin/phpmyadmin/locale/zh_TW');
|
||||
$file->removeDir('./xampp/admin/phpmyadmin/locale.old');
|
||||
|
||||
@@ -322,15 +325,10 @@ $file->copyFile($buildDir . '/index.php', './xampp/htdocs/index.php');
|
||||
|
||||
/* Copy zentao.conf. */
|
||||
$file->copyFile($buildDir . '/zentao.conf', './xampp/apache/conf/extra/httpd-xampp.conf');
|
||||
|
||||
|
||||
/* Copy ioncube loader. */
|
||||
$file->copyFile($buildDir . '/ioncube_loader_win_5.4.dll', './xampp/php/ext/ioncube_loader_win_5.4.dll');
|
||||
|
||||
/* Copy serive bat file. */
|
||||
$file->copyFile($buildDir . '/apache_installservice.bat', './xampp/apache_installservice.bat');
|
||||
$file->copyFile($buildDir . '/apache_uninstallservice.bat', './xampp/apache_uninstallservice.bat');
|
||||
$file->copyFile($buildDir . '/mysql_installservice.bat', './xampp/mysql_installservice.bat');
|
||||
$file->copyFile($buildDir . '/mysql_uninstallservice.bat', './xampp/mysql_uninstallservice.bat');
|
||||
|
||||
/* Copy the src of control panel and readme files. */
|
||||
$file->mkdir('./xampp/source');
|
||||
|
||||
@@ -7,34 +7,40 @@ $config->langs['en'] = 'EN';
|
||||
$lang->cn->title = '欢迎使用禅道集成运行环境!';
|
||||
$lang->cn->poweredBy = "由<a href='http://www.apachefriends.org/' target='_blank'>xampp</a>精简而来";
|
||||
|
||||
$lang->cn->links['zentao']['link'] = '/zentao/';
|
||||
$lang->cn->links['zentao']['text'] = '访问禅道';
|
||||
$lang->cn->links['zentao']['target'] = '_self';
|
||||
$lang->cn->links['official']['link'] = 'http://www.zentao.net/';
|
||||
$lang->cn->links['official']['text'] = '禅道官网';
|
||||
$lang->cn->links['official']['target'] = '_blank';
|
||||
$lang->cn->links['sqlbudyy']['link'] = '/sqlbuddy/';
|
||||
$lang->cn->links['sqlbudyy']['text'] = '数据库管理';
|
||||
$lang->cn->links['sqlbudyy']['target'] = '_blank';
|
||||
$lang->cn->links['phpinfo']['link'] = '?mode=phpinfo';
|
||||
$lang->cn->links['phpinfo']['text'] = 'PHP信息';
|
||||
$lang->cn->links['phpinfo']['target'] = '_blank';
|
||||
$lang->cn->links['zentao']['link'] = '/zentao/';
|
||||
$lang->cn->links['zentao']['text'] = '访问禅道';
|
||||
$lang->cn->links['zentao']['target'] = '_self';
|
||||
|
||||
$lang->cn->links['official']['link'] = 'http://www.zentao.net/';
|
||||
$lang->cn->links['official']['text'] = '禅道官网';
|
||||
$lang->cn->links['official']['target'] = '_blank';
|
||||
|
||||
$lang->cn->links['phpmyadmin']['link'] = '/phpmyadmin/';
|
||||
$lang->cn->links['phpmyadmin']['text'] = '数据库管理';
|
||||
$lang->cn->links['phpmyadmin']['target'] = '_blank';
|
||||
|
||||
$lang->cn->links['phpinfo']['link'] = '?mode=phpinfo';
|
||||
$lang->cn->links['phpinfo']['text'] = 'PHP信息';
|
||||
$lang->cn->links['phpinfo']['target'] = '_blank';
|
||||
|
||||
$lang->en->title = 'Welcome to use zentao!';
|
||||
$lang->en->poweredBy = "reduced from <a href='http://www.apachefriends.org/' target='_blank'>xampp</a>";
|
||||
|
||||
$lang->en->links['zentao']['link'] = '/zentao/';
|
||||
$lang->en->links['zentao']['text'] = 'ZenTao';
|
||||
$lang->en->links['zentao']['target'] = '_self';
|
||||
$lang->en->links['official']['link'] = 'http://www.zentao.net/';
|
||||
$lang->en->links['official']['text'] = 'Community';
|
||||
$lang->en->links['official']['target'] = '_blank';
|
||||
$lang->en->links['sqlbudyy']['link'] = '/sqlbuddy/';
|
||||
$lang->en->links['sqlbudyy']['text'] = 'MySQL';
|
||||
$lang->en->links['sqlbudyy']['target'] = '_blank';
|
||||
$lang->en->links['phpinfo']['link'] = '?mode=phpinfo';
|
||||
$lang->en->links['phpinfo']['text'] = 'PHP';
|
||||
$lang->en->links['phpinfo']['target'] = '_blank';
|
||||
$lang->en->links['zentao']['link'] = '/zentao/';
|
||||
$lang->en->links['zentao']['text'] = 'ZenTao';
|
||||
$lang->en->links['zentao']['target'] = '_self';
|
||||
|
||||
$lang->en->links['official']['link'] = 'http://www.zentao.net/';
|
||||
$lang->en->links['official']['text'] = 'Community';
|
||||
$lang->en->links['official']['target'] = '_blank';
|
||||
|
||||
$lang->en->links['phpmyadmin']['link'] = '/phpmyadmin/';
|
||||
$lang->en->links['phpmyadmin']['text'] = 'MySQL';
|
||||
$lang->en->links['phpmyadmin']['target'] = '_blank';
|
||||
|
||||
$lang->en->links['phpinfo']['link'] = '?mode=phpinfo';
|
||||
$lang->en->links['phpinfo']['text'] = 'PHP';
|
||||
$lang->en->links['phpinfo']['target'] = '_blank';
|
||||
|
||||
if(is_file('./my.php')) include './my.php';
|
||||
|
||||
|
||||
BIN
build/windows/xampp/ioncube_loader_win_5.4.dll
Normal file
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
$sbconfig['DefaultAdapter'] = "mysql";
|
||||
$sbconfig['DefaultHost'] = "localhost:" . getPortOfMySQL();
|
||||
$sbconfig['DefaultUser'] = "root";
|
||||
$sbconfig['EnableUpdateCheck'] = true;
|
||||
$sbconfig['RowsPerPage'] = 100;
|
||||
$sbconfig['EnableGzip'] = true;
|
||||
|
||||
function getPortOfMySQL()
|
||||
{
|
||||
$mysqlConfig = file_get_contents('../../mysql/bin/my.ini');
|
||||
if(strpos($mysqlConfig, '3308')) return '3308';
|
||||
return '3306';
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1,14 +0,0 @@
|
||||
[exclude-form-class-property]
|
||||
TDBGrid.*.FieldName
|
||||
*.Origin
|
||||
|
||||
[exclude-form-class]
|
||||
TIBSQL
|
||||
TIBDataSet
|
||||
TIBQuery
|
||||
TIBStoredProc
|
||||
TIntegerField
|
||||
TLargeintField
|
||||
TFloatField
|
||||
TIBStringField
|
||||
TDateTimeField
|
||||
@@ -1,278 +0,0 @@
|
||||
unit uApache;
|
||||
|
||||
interface
|
||||
|
||||
uses GnuGettext, uBaseModule, SysUtils, Classes, Windows, ExtCtrls, StdCtrls, Buttons,
|
||||
uNetstatTable, uTools, uProcesses, Messages, uServices;
|
||||
|
||||
type
|
||||
tApacheLogType = (altAccess, altError);
|
||||
|
||||
tApache = class(tBaseModule)
|
||||
OldPIDs, OldPorts: string;
|
||||
procedure ServiceInstall; override;
|
||||
procedure ServiceUnInstall; override;
|
||||
procedure Start; override;
|
||||
procedure Stop; override;
|
||||
procedure Admin; override;
|
||||
procedure UpdateStatus; override;
|
||||
procedure CheckIsService; reintroduce;
|
||||
procedure EditConfig(ConfigFile: string); reintroduce;
|
||||
procedure ShowLogs(LogType: tApacheLogType); reintroduce;
|
||||
procedure AddLog(Log: string; LogType: tLogType=ltDefault); reintroduce;
|
||||
constructor Create(pbbService: TBitBtn; pStatusPanel: tPanel; pPIDLabel, pPortLabel: tLabel; pStartStopButton, pAdminButton: tBitBtn);
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
const
|
||||
cServiceName = 'Apache2.2';
|
||||
cModuleName = 'apache';
|
||||
|
||||
{ tApache }
|
||||
|
||||
procedure tApache.AddLog(Log: string; LogType: tLogType=ltDefault);
|
||||
begin
|
||||
inherited AddLog(cModuleName, Log, LogType);
|
||||
end;
|
||||
|
||||
procedure tApache.Admin;
|
||||
var
|
||||
App, Param: string;
|
||||
begin
|
||||
inherited;
|
||||
Param:='http://localhost/xampp/';
|
||||
if Config.BrowserApp<>'' then begin
|
||||
App:=Config.BrowserApp;
|
||||
ExecuteFile(App,Param,'',SW_SHOW);
|
||||
Addlog(Format(_('Executing "%s" "%s"'),[App,Param]),ltDebug);
|
||||
end else begin
|
||||
ExecuteFile(Param,'','',SW_SHOW);
|
||||
Addlog(Format(_('Executing "%s"'),[Param]),ltDebug);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure tApache.CheckIsService;
|
||||
var
|
||||
s: string;
|
||||
begin
|
||||
inherited CheckIsService(cServiceName);
|
||||
if isService then s:=_('Service installed')
|
||||
else s:=_('Service not installed');
|
||||
AddLog(Format(_('Checking for service (name="%s"): %s'),[cServiceName,s]),ltDebug);
|
||||
end;
|
||||
|
||||
constructor tApache.Create;
|
||||
const Ports:array[0..1] of integer=(80,443);
|
||||
var
|
||||
PortBlocker: string;
|
||||
ServerApp: string;
|
||||
p: integer;
|
||||
begin
|
||||
inherited;
|
||||
ModuleName:=cModuleName;
|
||||
AddLog(_('Initializing module...'),ltDebug);
|
||||
ServerApp:=basedir+'apache\bin\httpd.exe';
|
||||
if not FileExists(ServerApp) then
|
||||
AddLog(Format(_('Possible problem detected: file "%s" not found - run this program from your XAMPP root directory!'),[ServerApp]),ltError);
|
||||
|
||||
CheckIsService;
|
||||
|
||||
if Config.CheckDefaultPorts then begin
|
||||
AddLog(_('Checking default ports...'),ltDebug);
|
||||
|
||||
for p:=Low(Ports) to High(Ports) do begin
|
||||
PortBlocker:=NetStatTable.isPortInUse(Ports[p]);
|
||||
if (PortBlocker<>'') then begin
|
||||
if (LowerCase(PortBlocker)=LowerCase(ServerApp)) then begin
|
||||
AddLog(Format(_('"%s" seems to be running on port %d?'),[ServerApp,Ports[p]]),ltError);
|
||||
end else begin
|
||||
AddLog(Format(_('Possible problem detected: Port %d in use by "%s"!'),[Ports[p],PortBlocker]),ltError);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor tApache.Destroy;
|
||||
begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure tApache.EditConfig(ConfigFile: string);
|
||||
var
|
||||
App, Param: string;
|
||||
begin
|
||||
App:=Config.EditorApp;
|
||||
Param:=BaseDir+ConfigFile;
|
||||
Addlog(Format(_('Executing %s %s'),[App,Param]),ltDebug);
|
||||
ExecuteFile(app,param,'',SW_SHOW);
|
||||
end;
|
||||
|
||||
|
||||
procedure tApache.ServiceInstall;
|
||||
var
|
||||
App, Param: string;
|
||||
RC: Integer;
|
||||
begin
|
||||
App:=BaseDir+'apache\bin\httpd.exe';
|
||||
Param:='-k install';
|
||||
AddLog(_('Installing service...'));
|
||||
AddLog(Format(_('Executing "%s %s"'),[App, Param]),ltDebug);
|
||||
RC:=RunAsAdmin(App,Param,SW_HIDE);
|
||||
if RC=0 then AddLog(Format(_('Return code: %d'),[RC]),ltDebug)
|
||||
else AddLog(Format(_('There may be an error, return code: %d - %s'),[RC,SystemErrorMessage(RC)]),ltError);
|
||||
end;
|
||||
|
||||
procedure tApache.ServiceUnInstall;
|
||||
var
|
||||
App, Param: string;
|
||||
RC: Cardinal;
|
||||
begin
|
||||
App:=BaseDir+'apache\bin\httpd.exe';
|
||||
Param:='-k uninstall';
|
||||
AddLog(_('Uninstalling service...'));
|
||||
AddLog(Format(_('Executing "%s %s"'),[App, Param]),ltDebug);
|
||||
RC:=RunAsAdmin(App,Param,SW_HIDE);
|
||||
if RC=0 then AddLog(Format(_('Return code: %d'),[RC]),ltDebug)
|
||||
else AddLog(Format(_('There may be an error, return code: %d - %s'),[RC,SystemErrorMessage(RC)]),ltError);
|
||||
end;
|
||||
|
||||
procedure tApache.ShowLogs(LogType: tApacheLogType);
|
||||
var
|
||||
App, Param: string;
|
||||
begin
|
||||
App:=Config.EditorApp;
|
||||
if LogType=altAccess then
|
||||
Param:=BaseDir+'apache\logs\access.log';
|
||||
if LogType=altError then
|
||||
Param:=BaseDir+'apache\logs\error.log';
|
||||
AddLog(Format(_('Executing "%s %s"'),[App,Param]),ltDebug);
|
||||
ExecuteFile(app,param,'',SW_SHOW);
|
||||
end;
|
||||
|
||||
procedure tApache.Start;
|
||||
var
|
||||
App: string;
|
||||
RC: Cardinal;
|
||||
begin
|
||||
if isService then begin
|
||||
AddLog(Format(_('Starting %s service...'),[cModuleName]));
|
||||
App:=Format('start "%s"',[cServiceName]);
|
||||
AddLog(Format(_('Executing "%s"'),['net '+App]),ltDebug);
|
||||
RC:=RunAsAdmin('net',App,SW_HIDE);
|
||||
if RC=0 then AddLog(Format(_('Return code: %d'),[RC]),ltDebug)
|
||||
else AddLog(Format(_('There may be an error, return code: %d - %s'),[RC,SystemErrorMessage(RC)]),ltError);
|
||||
end else begin
|
||||
AddLog(Format(_('Starting %s app...'),[cModuleName]));
|
||||
App:=BaseDir+'apache\bin\httpd.exe';
|
||||
AddLog(Format(_('Executing "%s"'),[App]),ltDebug);
|
||||
RunProcess(App,SW_HIDE,false);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure tApache.Stop;
|
||||
var
|
||||
i, pPID: Integer;
|
||||
App: string;
|
||||
RC: Cardinal;
|
||||
begin
|
||||
if isService then begin
|
||||
AddLog(Format(_('Stopping %s service...'),[cModuleName]));
|
||||
App:=Format('stop "%s"',[cServiceName]);
|
||||
AddLog(Format(_('Executing "%s"'),['net '+App]),ltDebug);
|
||||
RC:=RunAsAdmin('net',App,SW_HIDE);
|
||||
if RC=0 then AddLog(Format(_('Return code: %d'),[RC]),ltDebug)
|
||||
else AddLog(Format(_('There may be an error, return code: %d - %s'),[RC,SystemErrorMessage(RC)]),ltError);
|
||||
end else begin
|
||||
if PIDList.Count>0 then begin
|
||||
for i:=0 to PIDList.Count-1 do begin
|
||||
pPID:=Integer(PIDList[i]);
|
||||
AddLog(_('Stopping')+' '+cModuleName+' '+Format('(PID: %d)',[pPID]));
|
||||
App:=Format(BaseDir+'apache\bin\pv.exe -f -k -q -i %d',[pPID]);
|
||||
AddLog(Format(_('Executing "%s"'),[App]),ltDebug);
|
||||
RunProcess(App,SW_HIDE,false);
|
||||
end;
|
||||
end else begin
|
||||
AddLog(_('No PIDs found?!'));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure tApache.UpdateStatus;
|
||||
var
|
||||
p: Integer;
|
||||
ProcInfo: TProcInfo;
|
||||
s: string;
|
||||
ports: string;
|
||||
begin
|
||||
isRunning:=false;
|
||||
PIDList.Clear;
|
||||
for p:=0 to Processes.ProcessList.Count-1 do begin
|
||||
ProcInfo:=Processes.ProcessList[p];
|
||||
if { (pos(BaseDir,ProcInfo.ExePath)=1) and } (pos('httpd.exe',ProcInfo.Module)=1) then begin
|
||||
isRunning:=true;
|
||||
PIDList.Add(Pointer(ProcInfo.PID));
|
||||
end;
|
||||
end;
|
||||
|
||||
// Checking processes
|
||||
s:='';
|
||||
for p:=0 to PIDList.Count-1 do begin
|
||||
if p=0 then s:=IntToStr(Integer(PIDList[p]))
|
||||
else s:=s+#13+IntToStr(Integer(PIDList[p]));
|
||||
end;
|
||||
if s<>OldPIDs then begin
|
||||
lPID.Caption:=s;
|
||||
OldPIDs:=s;
|
||||
end;
|
||||
|
||||
// Checking netstats
|
||||
s:='';
|
||||
for p:=0 to PIDList.Count-1 do begin
|
||||
ports:=NetStatTable.GetPorts4PID(Integer(PIDList[p]));
|
||||
if ports<>'' then begin
|
||||
if s='' then s:=ports
|
||||
else s:=s+', '+ports;
|
||||
end;
|
||||
end;
|
||||
if s<>OldPorts then begin
|
||||
lPort.Caption:=s;
|
||||
OldPorts:=s;
|
||||
end;
|
||||
|
||||
if byte(isRunning)<>oldIsRunningByte then begin
|
||||
|
||||
if oldIsRunningByte<>2 then begin
|
||||
if isRunning then s:=_('running')
|
||||
else s:=_('stopped');
|
||||
AddLog(_('Status change detected:')+' '+s);
|
||||
end;
|
||||
|
||||
oldIsRunningByte:=byte(isRunning);
|
||||
if isRunning then begin
|
||||
pStatus.Color:=cRunningColor;
|
||||
bStartStop.Caption:=_('Stop');
|
||||
bAdmin.Enabled:=true;
|
||||
end else begin
|
||||
pStatus.Color:=cStoppedColor;
|
||||
bStartStop.Caption:=_('Start');
|
||||
bAdmin.Enabled:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
if AutoStart then begin
|
||||
AutoStart:=false;
|
||||
if isRunning then begin
|
||||
AddLog(_('Autostart active: modul is already running - aborted'),ltError);
|
||||
end else begin
|
||||
AddLog(_('Autostart active: starting...'));
|
||||
Start;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -1,93 +0,0 @@
|
||||
unit uBaseModule;
|
||||
|
||||
interface
|
||||
|
||||
uses GnuGettext, Classes, ExtCtrls, StdCtrls, Buttons, SysUtils, uTools, uServices;
|
||||
|
||||
type
|
||||
tBaseModule = class
|
||||
public
|
||||
bbService: TBitBtn;
|
||||
pStatus: tPanel;
|
||||
lPID: tLabel;
|
||||
lPort: tLabel;
|
||||
bStartStop: tBitBtn;
|
||||
bAdmin: TBitBtn;
|
||||
AutoStart: boolean;
|
||||
|
||||
oldIsRunningByte: byte;
|
||||
isRunning: boolean;
|
||||
isService: boolean;
|
||||
PIDList: tList;
|
||||
|
||||
ModuleName: string;
|
||||
procedure Start; virtual; abstract;
|
||||
procedure Stop; virtual; abstract;
|
||||
procedure Admin; virtual; abstract;
|
||||
procedure UpdateStatus; virtual; abstract;
|
||||
|
||||
procedure ServiceInstall; virtual; abstract;
|
||||
procedure ServiceUnInstall; virtual; abstract;
|
||||
|
||||
procedure SetServiceButton(isActive: boolean);
|
||||
procedure CheckIsService(ServiceName: string);
|
||||
|
||||
procedure AddLog(module,log: string; LogType: tLogType);
|
||||
constructor Create(pbbService: TBitBtn; pStatusPanel: tPanel; pPIDLabel, pPortLabel: tLabel; pStartStopButton, pAdminButton: tBitBtn);
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses uMain;
|
||||
|
||||
{ tBaseModule }
|
||||
|
||||
procedure tBaseModule.Addlog(module, log: string; LogType: tLogType);
|
||||
begin
|
||||
fMain.AddLog(module,log,LogType);
|
||||
end;
|
||||
|
||||
procedure tBaseModule.CheckIsService(ServiceName: string);
|
||||
var
|
||||
ServiceStatus: TServiceStatus;
|
||||
begin
|
||||
ServiceStatus:=GetServiceStatus(ServiceName);
|
||||
isService:=ServiceStatus in [ssRunning, ssStopped];
|
||||
SetServiceButton(isService);
|
||||
end;
|
||||
|
||||
constructor tBaseModule.Create(pbbService: TBitBtn; pStatusPanel: tPanel; pPIDLabel, pPortLabel: tLabel; pStartStopButton, pAdminButton: tBitBtn);
|
||||
begin
|
||||
PIDList:=TList.Create;
|
||||
isRunning:=false;
|
||||
isService:=false;
|
||||
|
||||
bbService:=pbbService;
|
||||
pStatus:=pStatusPanel;
|
||||
lPID:=pPIDLabel;
|
||||
lPort:=pPortLabel;
|
||||
bStartStop:=pStartStopButton;
|
||||
bAdmin:=pAdminButton;
|
||||
|
||||
oldIsRunningByte:=2;
|
||||
|
||||
AutoStart:=false;
|
||||
end;
|
||||
|
||||
destructor tBaseModule.Destroy;
|
||||
begin
|
||||
PIDList.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure tBaseModule.SetServiceButton(isActive: boolean);
|
||||
begin
|
||||
bbService.Glyph:=nil;
|
||||
if isActive then
|
||||
fMain.ImageList.GetBitmap(0, bbService.Glyph) ;
|
||||
if not isActive then
|
||||
fMain.ImageList.GetBitmap(1, bbService.Glyph) ;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -1,341 +0,0 @@
|
||||
object fConfig: TfConfig
|
||||
Left = 463
|
||||
Top = 124
|
||||
Caption = 'Configuration of Control Panel'
|
||||
ClientHeight = 404
|
||||
ClientWidth = 343
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
KeyPreview = True
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnCreate = FormCreate
|
||||
OnKeyPress = FormKeyPress
|
||||
OnShow = FormShow
|
||||
DesignSize = (
|
||||
343
|
||||
404)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 32
|
||||
Height = 13
|
||||
Caption = 'Editor:'
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 8
|
||||
Top = 56
|
||||
Width = 165
|
||||
Height = 13
|
||||
Caption = 'Browser (empty = system default)'
|
||||
end
|
||||
object bSelectEditor: TBitBtn
|
||||
Left = 308
|
||||
Top = 22
|
||||
Width = 26
|
||||
Height = 25
|
||||
Anchors = [akTop, akRight]
|
||||
DoubleBuffered = True
|
||||
Glyph.Data = {
|
||||
20050000424D2005000000000000360400002800000010000000100000000100
|
||||
080001000000EA000000130B0000130B000000010000000100004E525300585B
|
||||
5D006B6F7100187A9B00197A9D000C72A500187DA1001889B1002899BF00189A
|
||||
C600199AC6001B9CC70020A0C90021A2CE0025A2CF003FB8D7005BBCCE0042B2
|
||||
DE006BBFDA0042B3E20042BAEF0052BEE7004FC1E2005AC7FF006BD7FF006FD5
|
||||
FD007BDFFF0079E4F0007BE3FF00909699009AA0A300A3AAAD00ADB3B700BFC7
|
||||
CB0084D7FF0084E7FF0084EBFF0089F0F7008CF3FF0094F7FF009CF3FF0096F9
|
||||
FB009CFFFF00A5FFFF00C8D0D400F7FBFF00FFFFFF0000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000102C00000003
|
||||
2C2120000A1F000320212C0000000003211E02000A010003021E210000000120
|
||||
0C0500030002200000000003090B2A00091800040805011F00000004090A1B2A
|
||||
071C00051A1104001D0000000004090E0F2A0724000523140900020000000004
|
||||
09130C2B08270004151005010000000409190925082A00041729030100000007
|
||||
092209122E2E2D00052E0004232E060200000003092416000B090107011E0000
|
||||
010901280526052E000409041E2100000109012E042A012E0609000320212C00
|
||||
0000012C010D042E0003091E2100072C0000012C012C040D01200121082C0000
|
||||
102C0001}
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 0
|
||||
OnClick = bSelectEditorClick
|
||||
end
|
||||
object eEditor: TEdit
|
||||
Left = 8
|
||||
Top = 24
|
||||
Width = 294
|
||||
Height = 21
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
TabOrder = 1
|
||||
end
|
||||
object bSave: TBitBtn
|
||||
Left = 260
|
||||
Top = 371
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Save'
|
||||
DoubleBuffered = True
|
||||
Glyph.Data = {
|
||||
DE010000424DDE01000000000000760000002800000024000000120000000100
|
||||
0400000000006801000000000000000000001000000000000000000000000000
|
||||
80000080000000808000800000008000800080800000C0C0C000808080000000
|
||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
|
||||
3333333333333333333333330000333333333333333333333333F33333333333
|
||||
00003333344333333333333333388F3333333333000033334224333333333333
|
||||
338338F3333333330000333422224333333333333833338F3333333300003342
|
||||
222224333333333383333338F3333333000034222A22224333333338F338F333
|
||||
8F33333300003222A3A2224333333338F3838F338F33333300003A2A333A2224
|
||||
33333338F83338F338F33333000033A33333A222433333338333338F338F3333
|
||||
0000333333333A222433333333333338F338F33300003333333333A222433333
|
||||
333333338F338F33000033333333333A222433333333333338F338F300003333
|
||||
33333333A222433333333333338F338F00003333333333333A22433333333333
|
||||
3338F38F000033333333333333A223333333333333338F830000333333333333
|
||||
333A333333333333333338330000333333333333333333333333333333333333
|
||||
0000}
|
||||
ModalResult = 1
|
||||
NumGlyphs = 2
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 2
|
||||
OnClick = bSaveClick
|
||||
ExplicitTop = 335
|
||||
end
|
||||
object bAbort: TBitBtn
|
||||
Left = 179
|
||||
Top = 371
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Abort'
|
||||
DoubleBuffered = True
|
||||
Kind = bkAbort
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 3
|
||||
OnClick = bAbortClick
|
||||
ExplicitTop = 335
|
||||
end
|
||||
object bSelectBrowser: TBitBtn
|
||||
Left = 308
|
||||
Top = 69
|
||||
Width = 26
|
||||
Height = 25
|
||||
Anchors = [akTop, akRight]
|
||||
DoubleBuffered = True
|
||||
Glyph.Data = {
|
||||
20050000424D2005000000000000360400002800000010000000100000000100
|
||||
080001000000EA000000130B0000130B000000010000000100004E525300585B
|
||||
5D006B6F7100187A9B00197A9D000C72A500187DA1001889B1002899BF00189A
|
||||
C600199AC6001B9CC70020A0C90021A2CE0025A2CF003FB8D7005BBCCE0042B2
|
||||
DE006BBFDA0042B3E20042BAEF0052BEE7004FC1E2005AC7FF006BD7FF006FD5
|
||||
FD007BDFFF0079E4F0007BE3FF00909699009AA0A300A3AAAD00ADB3B700BFC7
|
||||
CB0084D7FF0084E7FF0084EBFF0089F0F7008CF3FF0094F7FF009CF3FF0096F9
|
||||
FB009CFFFF00A5FFFF00C8D0D400F7FBFF00FFFFFF0000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000102C00000003
|
||||
2C2120000A1F000320212C0000000003211E02000A010003021E210000000120
|
||||
0C0500030002200000000003090B2A00091800040805011F00000004090A1B2A
|
||||
071C00051A1104001D0000000004090E0F2A0724000523140900020000000004
|
||||
09130C2B08270004151005010000000409190925082A00041729030100000007
|
||||
092209122E2E2D00052E0004232E060200000003092416000B090107011E0000
|
||||
010901280526052E000409041E2100000109012E042A012E0609000320212C00
|
||||
0000012C010D042E0003091E2100072C0000012C012C040D01200121082C0000
|
||||
102C0001}
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 4
|
||||
OnClick = bSelectBrowserClick
|
||||
end
|
||||
object eBrowser: TEdit
|
||||
Left = 8
|
||||
Top = 71
|
||||
Width = 294
|
||||
Height = 21
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
TabOrder = 5
|
||||
end
|
||||
object cbDebug: TCheckBox
|
||||
Left = 8
|
||||
Top = 260
|
||||
Width = 149
|
||||
Height = 17
|
||||
Caption = 'Show debug stuff'
|
||||
TabOrder = 6
|
||||
OnClick = cbDebugClick
|
||||
end
|
||||
object cbDebugDetails: TComboBox
|
||||
Left = 179
|
||||
Top = 258
|
||||
Width = 126
|
||||
Height = 21
|
||||
Style = csDropDownList
|
||||
ItemHeight = 13
|
||||
TabOrder = 7
|
||||
Items.Strings = (
|
||||
'Details'
|
||||
'Very many details')
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 8
|
||||
Top = 98
|
||||
Width = 327
|
||||
Height = 95
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
Caption = ' Autostart of modules '
|
||||
TabOrder = 8
|
||||
DesignSize = (
|
||||
327
|
||||
95)
|
||||
object Label3: TLabel
|
||||
Left = 8
|
||||
Top = 65
|
||||
Width = 309
|
||||
Height = 28
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
AutoSize = False
|
||||
Caption = 'Selected modules will be started on next launch of this program.'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clInactiveCaptionText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
WordWrap = True
|
||||
end
|
||||
object cbASApache: TCheckBox
|
||||
Left = 8
|
||||
Top = 20
|
||||
Width = 97
|
||||
Height = 17
|
||||
Caption = 'Apache'
|
||||
TabOrder = 0
|
||||
end
|
||||
object cbASMySQL: TCheckBox
|
||||
Left = 8
|
||||
Top = 43
|
||||
Width = 97
|
||||
Height = 17
|
||||
Caption = 'MySQL'
|
||||
TabOrder = 1
|
||||
end
|
||||
object cbASFileZilla: TCheckBox
|
||||
Left = 145
|
||||
Top = 22
|
||||
Width = 97
|
||||
Height = 17
|
||||
Caption = 'FileZilla'
|
||||
TabOrder = 2
|
||||
end
|
||||
object cbASMercury: TCheckBox
|
||||
Left = 145
|
||||
Top = 45
|
||||
Width = 97
|
||||
Height = 17
|
||||
Caption = 'Mercury'
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
object cbCheckDefaultPorts: TCheckBox
|
||||
Left = 8
|
||||
Top = 231
|
||||
Width = 221
|
||||
Height = 17
|
||||
AllowGrayed = True
|
||||
Caption = 'Check default ports on startup'
|
||||
TabOrder = 9
|
||||
OnClick = cbDebugClick
|
||||
end
|
||||
object BitBtn1: TBitBtn
|
||||
Left = 8
|
||||
Top = 292
|
||||
Width = 149
|
||||
Height = 25
|
||||
Caption = 'Change language'
|
||||
DoubleBuffered = True
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 10
|
||||
OnClick = BitBtn1Click
|
||||
end
|
||||
object bConfigUserdefined: TBitBtn
|
||||
Left = 8
|
||||
Top = 323
|
||||
Width = 149
|
||||
Height = 25
|
||||
Cancel = True
|
||||
Caption = 'User defined files'
|
||||
DoubleBuffered = True
|
||||
ModalResult = 7
|
||||
NumGlyphs = 2
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 11
|
||||
OnClick = bConfigUserdefinedClick
|
||||
end
|
||||
object cbTomcatVisible: TCheckBox
|
||||
Left = 8
|
||||
Top = 199
|
||||
Width = 221
|
||||
Height = 17
|
||||
AllowGrayed = True
|
||||
Caption = 'Tomcat output window visible'
|
||||
TabOrder = 12
|
||||
OnClick = cbDebugClick
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
DefaultExt = 'exe'
|
||||
Filter = 'Executables (*.exe)|*.exe|All files (*.*)|*.*'
|
||||
Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||
Left = 136
|
||||
Top = 4
|
||||
end
|
||||
end
|
||||
@@ -1,142 +0,0 @@
|
||||
unit uConfig;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
GnuGettext, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, Buttons, uTools;
|
||||
|
||||
type
|
||||
TfConfig = class(TForm)
|
||||
bSelectEditor: TBitBtn;
|
||||
eEditor: TEdit;
|
||||
OpenDialog1: TOpenDialog;
|
||||
Label1: TLabel;
|
||||
bSave: TBitBtn;
|
||||
bAbort: TBitBtn;
|
||||
Label2: TLabel;
|
||||
bSelectBrowser: TBitBtn;
|
||||
eBrowser: TEdit;
|
||||
cbDebug: TCheckBox;
|
||||
cbDebugDetails: TComboBox;
|
||||
GroupBox1: TGroupBox;
|
||||
cbASApache: TCheckBox;
|
||||
cbASMySQL: TCheckBox;
|
||||
cbASFileZilla: TCheckBox;
|
||||
cbASMercury: TCheckBox;
|
||||
Label3: TLabel;
|
||||
cbCheckDefaultPorts: TCheckBox;
|
||||
BitBtn1: TBitBtn;
|
||||
bConfigUserdefined: TBitBtn;
|
||||
cbTomcatVisible: TCheckBox;
|
||||
procedure bAbortClick(Sender: TObject);
|
||||
procedure bSaveClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure bSelectEditorClick(Sender: TObject);
|
||||
procedure bSelectBrowserClick(Sender: TObject);
|
||||
procedure cbDebugClick(Sender: TObject);
|
||||
procedure BitBtn1Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure bConfigUserdefinedClick(Sender: TObject);
|
||||
private
|
||||
{ Private-Deklarationen }
|
||||
public
|
||||
end;
|
||||
|
||||
var
|
||||
fConfig: TfConfig;
|
||||
|
||||
implementation
|
||||
|
||||
uses uMain, uLanguage, uConfigUserDefined;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfConfig.bSelectBrowserClick(Sender: TObject);
|
||||
var dp: string;
|
||||
begin
|
||||
dp:=ExtractFilePath(eBrowser.Text);
|
||||
if dp<>'' then begin
|
||||
OpenDialog1.InitialDir:=dp;
|
||||
OpenDialog1.FileName:=ExtractFileName(eBrowser.Text);
|
||||
end;
|
||||
if OpenDialog1.Execute then eBrowser.Text:=OpenDialog1.FileName;
|
||||
end;
|
||||
|
||||
procedure TfConfig.bSelectEditorClick(Sender: TObject);
|
||||
var dp: string;
|
||||
begin
|
||||
dp:=ExtractFilePath(eEditor.Text);
|
||||
if dp<>'' then begin
|
||||
OpenDialog1.InitialDir:=dp;
|
||||
OpenDialog1.FileName:=ExtractFileName(eEditor.Text);
|
||||
end;
|
||||
if OpenDialog1.Execute then eEditor.Text:=OpenDialog1.FileName;
|
||||
end;
|
||||
|
||||
procedure TfConfig.cbDebugClick(Sender: TObject);
|
||||
begin
|
||||
cbDebugDetails.Visible:=cbDebug.Checked;
|
||||
end;
|
||||
|
||||
procedure TfConfig.BitBtn1Click(Sender: TObject);
|
||||
begin
|
||||
fLanguage.ShowModal;
|
||||
end;
|
||||
|
||||
procedure TfConfig.bConfigUserdefinedClick(Sender: TObject);
|
||||
begin
|
||||
fConfigUserDefined.ShowModal;
|
||||
end;
|
||||
|
||||
procedure TfConfig.bSaveClick(Sender: TObject);
|
||||
begin
|
||||
Config.EditorApp:=Trim(eEditor.Text);
|
||||
Config.BrowserApp:=Trim(eBrowser.Text);
|
||||
Config.ShowDebug:=cbDebug.Checked;
|
||||
Config.DebugLevel:=cbDebugDetails.ItemIndex;
|
||||
Config.CheckDefaultPorts:=cbCheckDefaultPorts.Checked;
|
||||
Config.TomcatVisible:=cbTomcatVisible.Checked;
|
||||
|
||||
Config.ASApache:=cbASApache.Checked;
|
||||
Config.ASMySQL:=cbASMySQL.Checked;
|
||||
Config.ASFileZilla:=cbASFileZilla.Checked;
|
||||
Config.ASMercury:=cbASMercury.Checked;
|
||||
|
||||
SaveSettings;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfConfig.bAbortClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfConfig.FormCreate(Sender: TObject);
|
||||
begin
|
||||
TranslateComponent(Self);
|
||||
end;
|
||||
|
||||
procedure TfConfig.FormKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if key=#27 then begin key:=#0; bAbort.Click; end;
|
||||
end;
|
||||
|
||||
procedure TfConfig.FormShow(Sender: TObject);
|
||||
begin
|
||||
eEditor.Text:=Config.EditorApp;
|
||||
eBrowser.Text:=Config.BrowserApp;
|
||||
cbDebug.Checked:=Config.ShowDebug;
|
||||
cbDebugDetails.Visible:=cbDebug.Checked;
|
||||
cbDebugDetails.ItemIndex:=Config.DebugLevel;
|
||||
cbCheckDefaultPorts.Checked:=Config.CheckDefaultPorts;
|
||||
cbTomcatVisible.Checked:=Config.TomcatVisible;
|
||||
|
||||
cbASApache.Checked:=Config.ASApache;
|
||||
cbASMySQL.Checked:=Config.ASMySQL;
|
||||
cbASFileZilla.Checked:=Config.ASFileZilla;
|
||||
cbASMercury.Checked:=Config.ASMercury;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -1,231 +0,0 @@
|
||||
object fConfigUserDefined: TfConfigUserDefined
|
||||
Left = 487
|
||||
Top = 248
|
||||
Caption = 'User-defined log/config-files'
|
||||
ClientHeight = 689
|
||||
ClientWidth = 557
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnCreate = FormCreate
|
||||
OnKeyPress = FormKeyPress
|
||||
OnShow = FormShow
|
||||
DesignSize = (
|
||||
557
|
||||
689)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object lHeader1: TLabel
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 310
|
||||
Height = 13
|
||||
Caption =
|
||||
'Enter user defined files. Files must be relative to xampp-basedi' +
|
||||
'r!'
|
||||
end
|
||||
object lHeader2: TLabel
|
||||
Left = 8
|
||||
Top = 27
|
||||
Width = 222
|
||||
Height = 13
|
||||
Caption = 'Example: "apache\conf\extra\httpd-info.conf"'
|
||||
end
|
||||
object lConfig: TLabel
|
||||
Left = 17
|
||||
Top = 60
|
||||
Width = 35
|
||||
Height = 13
|
||||
Caption = 'Config'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lLogs: TLabel
|
||||
Left = 280
|
||||
Top = 60
|
||||
Width = 26
|
||||
Height = 13
|
||||
Caption = 'Logs'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object bSave: TBitBtn
|
||||
Left = 474
|
||||
Top = 656
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Save'
|
||||
DoubleBuffered = True
|
||||
Glyph.Data = {
|
||||
DE010000424DDE01000000000000760000002800000024000000120000000100
|
||||
0400000000006801000000000000000000001000000000000000000000000000
|
||||
80000080000000808000800000008000800080800000C0C0C000808080000000
|
||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
|
||||
3333333333333333333333330000333333333333333333333333F33333333333
|
||||
00003333344333333333333333388F3333333333000033334224333333333333
|
||||
338338F3333333330000333422224333333333333833338F3333333300003342
|
||||
222224333333333383333338F3333333000034222A22224333333338F338F333
|
||||
8F33333300003222A3A2224333333338F3838F338F33333300003A2A333A2224
|
||||
33333338F83338F338F33333000033A33333A222433333338333338F338F3333
|
||||
0000333333333A222433333333333338F338F33300003333333333A222433333
|
||||
333333338F338F33000033333333333A222433333333333338F338F300003333
|
||||
33333333A222433333333333338F338F00003333333333333A22433333333333
|
||||
3338F38F000033333333333333A223333333333333338F830000333333333333
|
||||
333A333333333333333338330000333333333333333333333333333333333333
|
||||
0000}
|
||||
ModalResult = 1
|
||||
NumGlyphs = 2
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 0
|
||||
OnClick = bSaveClick
|
||||
ExplicitTop = 544
|
||||
end
|
||||
object bAbort: TBitBtn
|
||||
Left = 393
|
||||
Top = 656
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Abort'
|
||||
DoubleBuffered = True
|
||||
Kind = bkAbort
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 1
|
||||
OnClick = bAbortClick
|
||||
ExplicitTop = 544
|
||||
end
|
||||
object gbApache: TGroupBox
|
||||
Left = 8
|
||||
Top = 79
|
||||
Width = 541
|
||||
Height = 110
|
||||
Caption = 'Apache'
|
||||
TabOrder = 2
|
||||
object mConfigApache: TMemo
|
||||
Left = 9
|
||||
Top = 17
|
||||
Width = 261
|
||||
Height = 85
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 0
|
||||
end
|
||||
object mLogsApache: TMemo
|
||||
Left = 272
|
||||
Top = 17
|
||||
Width = 261
|
||||
Height = 85
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object gbMySQL: TGroupBox
|
||||
Left = 8
|
||||
Top = 195
|
||||
Width = 541
|
||||
Height = 110
|
||||
Caption = 'MySQL'
|
||||
TabOrder = 3
|
||||
object mConfigMySQL: TMemo
|
||||
Left = 9
|
||||
Top = 17
|
||||
Width = 261
|
||||
Height = 85
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 0
|
||||
end
|
||||
object mLogsMySQL: TMemo
|
||||
Left = 272
|
||||
Top = 17
|
||||
Width = 261
|
||||
Height = 85
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object gbFileZilla: TGroupBox
|
||||
Left = 8
|
||||
Top = 311
|
||||
Width = 541
|
||||
Height = 110
|
||||
Caption = 'FileZilla'
|
||||
TabOrder = 4
|
||||
object mConfigFilezilla: TMemo
|
||||
Left = 9
|
||||
Top = 17
|
||||
Width = 261
|
||||
Height = 85
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 0
|
||||
end
|
||||
object mLogsFileZilla: TMemo
|
||||
Left = 272
|
||||
Top = 17
|
||||
Width = 261
|
||||
Height = 85
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object gbMercury: TGroupBox
|
||||
Left = 8
|
||||
Top = 427
|
||||
Width = 541
|
||||
Height = 110
|
||||
Caption = 'Mercury'
|
||||
TabOrder = 5
|
||||
object mConfigMercury: TMemo
|
||||
Left = 9
|
||||
Top = 17
|
||||
Width = 261
|
||||
Height = 85
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 0
|
||||
end
|
||||
object mLogsMercury: TMemo
|
||||
Left = 272
|
||||
Top = 17
|
||||
Width = 261
|
||||
Height = 85
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object gbTomcat: TGroupBox
|
||||
Left = 8
|
||||
Top = 543
|
||||
Width = 541
|
||||
Height = 110
|
||||
Caption = 'Mercury'
|
||||
TabOrder = 6
|
||||
object mConfigTomcat: TMemo
|
||||
Left = 9
|
||||
Top = 17
|
||||
Width = 261
|
||||
Height = 85
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 0
|
||||
end
|
||||
object mLogsTomcat: TMemo
|
||||
Left = 272
|
||||
Top = 17
|
||||
Width = 261
|
||||
Height = 85
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,115 +0,0 @@
|
||||
unit uConfigUserDefined;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
GnuGettext, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, Buttons, uTools;
|
||||
|
||||
type
|
||||
TfConfigUserDefined = class(TForm)
|
||||
lHeader1: TLabel;
|
||||
bSave: TBitBtn;
|
||||
bAbort: TBitBtn;
|
||||
gbApache: TGroupBox;
|
||||
mConfigApache: TMemo;
|
||||
mLogsApache: TMemo;
|
||||
lHeader2: TLabel;
|
||||
lConfig: TLabel;
|
||||
lLogs: TLabel;
|
||||
gbMySQL: TGroupBox;
|
||||
mConfigMySQL: TMemo;
|
||||
mLogsMySQL: TMemo;
|
||||
gbFileZilla: TGroupBox;
|
||||
mConfigFilezilla: TMemo;
|
||||
mLogsFileZilla: TMemo;
|
||||
gbMercury: TGroupBox;
|
||||
mConfigMercury: TMemo;
|
||||
mLogsMercury: TMemo;
|
||||
gbTomcat: TGroupBox;
|
||||
mConfigTomcat: TMemo;
|
||||
mLogsTomcat: TMemo;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure bAbortClick(Sender: TObject);
|
||||
procedure bSaveClick(Sender: TObject);
|
||||
procedure FormKeyPress(Sender: TObject; var Key: Char);
|
||||
private
|
||||
procedure Memo2Config;
|
||||
procedure Config2Memo;
|
||||
public
|
||||
{ Public-Deklarationen }
|
||||
end;
|
||||
|
||||
var
|
||||
fConfigUserDefined: TfConfigUserDefined;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
{ TfConfigUserDefined }
|
||||
|
||||
procedure TfConfigUserDefined.bAbortClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfConfigUserDefined.bSaveClick(Sender: TObject);
|
||||
begin
|
||||
Memo2Config;
|
||||
SaveSettings;
|
||||
end;
|
||||
|
||||
procedure TfConfigUserDefined.Memo2Config;
|
||||
begin
|
||||
Config.UserConfig.Apache.Text:=mConfigApache.Text;
|
||||
Config.UserConfig.MySQL.Text:=mConfigMySQL.Text;
|
||||
Config.UserConfig.FileZilla.Text:=mConfigFilezilla.Text;
|
||||
Config.UserConfig.Mercury.Text:=mConfigMercury.Text;
|
||||
Config.UserConfig.Tomcat.Text:=mConfigTomcat.Text;
|
||||
|
||||
Config.UserLogs.Apache.Text:=mLogsApache.Text;
|
||||
Config.UserLogs.MySQL.Text:=mLogsMySQL.Text;
|
||||
Config.UserLogs.FileZilla.Text:=mLogsFileZilla.Text;
|
||||
Config.UserLogs.Mercury.Text:=mLogsMercury.Text;
|
||||
Config.UserLogs.Tomcat.Text:=mLogsTomcat.Text;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfConfigUserDefined.Config2Memo;
|
||||
begin
|
||||
mConfigApache.Text:=Config.UserConfig.Apache.Text;
|
||||
mConfigMySQL.Text:=Config.UserConfig.MySQL.Text;
|
||||
mConfigFilezilla.Text:=Config.UserConfig.FileZilla.Text;
|
||||
mConfigMercury.Text:=Config.UserConfig.Mercury.Text;
|
||||
mConfigTomcat.Text:=Config.UserConfig.Tomcat.Text;
|
||||
|
||||
mLogsApache.Text:=Config.UserLogs.Apache.Text;
|
||||
mLogsMySQL.Text:=Config.UserLogs.MySQL.Text;
|
||||
mLogsFileZilla.Text:=Config.UserLogs.FileZilla.Text;
|
||||
mLogsMercury.Text:=Config.UserLogs.Mercury.Text;
|
||||
mLogsTomcat.Text:=Config.UserLogs.Tomcat.Text;
|
||||
end;
|
||||
|
||||
procedure TfConfigUserDefined.FormCreate(Sender: TObject);
|
||||
begin
|
||||
TranslateComponent(self);
|
||||
end;
|
||||
|
||||
procedure TfConfigUserDefined.FormKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if key=#27 then begin
|
||||
key:=#0;
|
||||
close;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfConfigUserDefined.FormShow(Sender: TObject);
|
||||
begin
|
||||
Config2Memo;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
@@ -1,226 +0,0 @@
|
||||
unit uFileZilla;
|
||||
|
||||
interface
|
||||
|
||||
uses GnuGettext, uBaseModule, SysUtils, Classes, Windows, ExtCtrls, StdCtrls, Buttons,
|
||||
uNetstatTable, uTools, uProcesses;
|
||||
|
||||
type
|
||||
tFileZilla = class(tBaseModule)
|
||||
OldPIDs, OldPorts: string;
|
||||
procedure ServiceInstall; override;
|
||||
procedure ServiceUnInstall; override;
|
||||
procedure Start; override;
|
||||
procedure Stop; override;
|
||||
procedure Admin; override;
|
||||
procedure UpdateStatus; override;
|
||||
procedure CheckIsService; reintroduce;
|
||||
procedure AddLog(Log: string; LogType: tLogType=ltDefault); reintroduce;
|
||||
constructor Create(pbbService: TBitBtn; pStatusPanel: tPanel; pPIDLabel, pPortLabel: tLabel; pStartStopButton, pAdminButton: tBitBtn);
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
const cServiceName = 'FileZilla Server';
|
||||
cModuleName = 'FileZilla';
|
||||
|
||||
{ tFileZilla }
|
||||
|
||||
procedure tFileZilla.AddLog(Log: string; LogType: tLogType);
|
||||
begin
|
||||
inherited AddLog('filezilla', Log, LogType);
|
||||
end;
|
||||
|
||||
procedure tFileZilla.Admin;
|
||||
var
|
||||
App: string;
|
||||
begin
|
||||
App:=BaseDir+'filezillaftp\filezilla server interface.exe';
|
||||
Addlog(Format(_('Executing "%s"'),[App]),ltDebug);
|
||||
ExecuteFile(App,'','',SW_SHOW);
|
||||
end;
|
||||
|
||||
procedure tFileZilla.CheckIsService;
|
||||
var
|
||||
s: string;
|
||||
begin
|
||||
inherited CheckIsService(cServiceName);
|
||||
if isService then s:=_('Service installed')
|
||||
else s:=_('Service not installed');
|
||||
AddLog(Format(_('Checking for service (name="%s"): %s'),[cServiceName,s]),ltDebug);
|
||||
end;
|
||||
|
||||
constructor tFileZilla.Create;
|
||||
var
|
||||
PortBlocker: string;
|
||||
ServerApp: string;
|
||||
ServerPort: Integer;
|
||||
begin
|
||||
inherited;
|
||||
ModuleName:=cModuleName;
|
||||
isService:=false;
|
||||
AddLog(_('Initializing module...'),ltDebug);
|
||||
ServerApp:=basedir+'FileZillaFTP\FileZillaServer.exe';
|
||||
ServerPort:=21;
|
||||
if not FileExists(ServerApp) then
|
||||
AddLog(Format(_('Possible problem detected: file "%s" not found - run this program from your XAMPP root directory!'),[ServerApp]),ltError);
|
||||
|
||||
CheckIsService;
|
||||
|
||||
if Config.CheckDefaultPorts then begin
|
||||
AddLog(_('Checking default ports...'),ltDebug);
|
||||
PortBlocker:=NetStatTable.isPortInUse(ServerPort);
|
||||
if (PortBlocker<>'') then begin
|
||||
if (LowerCase(PortBlocker)=LowerCase(ServerApp)) then begin
|
||||
AddLog(Format(_('"%s" seems to be running on port %d?'),[ServerApp,ServerPort]),ltError);
|
||||
end else begin
|
||||
AddLog(Format(_('Possible problem detected: Port %d in use by "%s"!'),[ServerPort,PortBlocker]),ltError);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor tFileZilla.Destroy;
|
||||
begin
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
procedure tFileZilla.ServiceInstall;
|
||||
var
|
||||
App, Param: string;
|
||||
RC: Integer;
|
||||
begin
|
||||
App:=BaseDir+'filezillaftp\filezillaserver.exe';
|
||||
AddLog(_('Installing service...'));
|
||||
Addlog(Format(_('Executing "%s"'),[App]),ltDebug);
|
||||
RC:=RunAsAdmin(App,Param,SW_HIDE);
|
||||
if RC=0 then AddLog(Format(_('Return code: %d'),[RC]),ltDebug)
|
||||
else AddLog(Format(_('There may be an error, return code: %d - %s'),[RC,SystemErrorMessage(RC)]),ltError);
|
||||
end;
|
||||
|
||||
procedure tFileZilla.ServiceUnInstall;
|
||||
var
|
||||
App, Param: string;
|
||||
RC: Cardinal;
|
||||
begin
|
||||
App:='sc';
|
||||
Param:='delete "'+cServiceName+'"';
|
||||
AddLog('Uninstalling service...');
|
||||
Addlog(Format(_('Executing "%s" "%s"'),[App,Param]),ltDebug);
|
||||
RC:=RunAsAdmin(App,Param,SW_HIDE);
|
||||
if RC=0 then AddLog(Format(_('Return code: %d'),[RC]),ltDebug)
|
||||
else AddLog(Format(_('There may be an error, return code: %d - %s'),[RC,SystemErrorMessage(RC)]),ltError);
|
||||
end;
|
||||
|
||||
|
||||
procedure tFileZilla.Start;
|
||||
var
|
||||
App: string;
|
||||
RC: Cardinal;
|
||||
begin
|
||||
if isService then begin
|
||||
AddLog(Format(_('Starting %s service...'),[cModuleName]));
|
||||
App:=Format('start "%s"',[cServiceName]);
|
||||
Addlog(Format(_('Executing "%s"'),['net '+App]),ltDebug);
|
||||
RC:=RunAsAdmin('net',App,SW_HIDE);
|
||||
if RC=0 then AddLog(Format(_('Return code: %d'),[RC]),ltDebug)
|
||||
else AddLog(Format(_('There may be an error, return code: %d - %s'),[RC,SystemErrorMessage(RC)]),ltError);
|
||||
end else begin
|
||||
AddLog(_('FileZilla must be run as service!'));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure tFileZilla.Stop;
|
||||
var
|
||||
App: string;
|
||||
RC: Cardinal;
|
||||
begin
|
||||
if isService then begin
|
||||
AddLog(Format(_('Stopping %s service...'),[cModuleName]));
|
||||
App:=Format('stop "%s"',[cServiceName]);
|
||||
Addlog(Format(_('Executing "%s"'),['net '+App]),ltDebug);
|
||||
RC:=RunAsAdmin('net',App,SW_HIDE);
|
||||
if RC=0 then AddLog(Format(_('Return code: %d'),[RC]),ltDebug)
|
||||
else AddLog(Format(_('There may be an error, return code: %d - %s'),[RC,SystemErrorMessage(RC)]),ltError);
|
||||
end else begin
|
||||
AddLog(_('FileZilla must be run as service!'));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure tFileZilla.UpdateStatus;
|
||||
var
|
||||
p: Integer;
|
||||
ProcInfo: TProcInfo;
|
||||
s: string;
|
||||
ports: string;
|
||||
begin
|
||||
isRunning:=false;
|
||||
PIDList.Clear;
|
||||
for p:=0 to Processes.ProcessList.Count-1 do begin
|
||||
ProcInfo:=Processes.ProcessList[p];
|
||||
if { (pos(BaseDir,ProcInfo.ExePath)=1) and } (pos('filezillaserver.exe',ProcInfo.Module)=1) then begin
|
||||
isRunning:=true;
|
||||
PIDList.Add(Pointer(ProcInfo.PID));
|
||||
end;
|
||||
end;
|
||||
|
||||
// Checking processes
|
||||
s:='';
|
||||
for p:=0 to PIDList.Count-1 do begin
|
||||
if p=0 then s:=IntToStr(Integer(PIDList[p]))
|
||||
else s:=s+#13+IntToStr(Integer(PIDList[p]));
|
||||
end;
|
||||
if s<>OldPIDs then begin
|
||||
lPID.Caption:=s;
|
||||
OldPIDs:=s;
|
||||
end;
|
||||
|
||||
// Checking netstats
|
||||
s:='';
|
||||
for p:=0 to PIDList.Count-1 do begin
|
||||
ports:=NetStatTable.GetPorts4PID(Integer(PIDList[p]));
|
||||
if ports<>'' then begin
|
||||
if s='' then s:=ports
|
||||
else s:=s+', '+ports;
|
||||
end;
|
||||
end;
|
||||
if s<>OldPorts then begin
|
||||
lPort.Caption:=s;
|
||||
OldPorts:=s;
|
||||
end;
|
||||
|
||||
if byte(isRunning)<>oldIsRunningByte then begin
|
||||
|
||||
if oldIsRunningByte<>2 then begin
|
||||
if isRunning then s:=_('running')
|
||||
else s:=_('stopped');
|
||||
AddLog(_('Status change detected:')+' '+s);
|
||||
end;
|
||||
|
||||
oldIsRunningByte:=byte(isRunning);
|
||||
if isRunning then begin
|
||||
pStatus.Color:=cRunningColor;
|
||||
bStartStop.Caption:=_('Stop');
|
||||
bAdmin.Enabled:=true;
|
||||
end else begin
|
||||
pStatus.Color:=cStoppedColor;
|
||||
bStartStop.Caption:=_('Start');
|
||||
bAdmin.Enabled:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
if AutoStart then begin
|
||||
AutoStart:=false;
|
||||
if isRunning then begin
|
||||
AddLog(_('Autostart active: modul is already running - aborted'),ltError);
|
||||
end else begin
|
||||
AddLog(_('Autostart active: starting...'));
|
||||
Start;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -1,53 +0,0 @@
|
||||
object fHelp: TfHelp
|
||||
Left = 356
|
||||
Top = 94
|
||||
Caption = 'Help'
|
||||
ClientHeight = 116
|
||||
ClientWidth = 256
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnCreate = FormCreate
|
||||
DesignSize = (
|
||||
256
|
||||
116)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object lAbout: TLabel
|
||||
Left = 8
|
||||
Top = 12
|
||||
Width = 233
|
||||
Height = 19
|
||||
Caption = 'programmed by Steffen Strueber'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Top = 64
|
||||
Width = 105
|
||||
Height = 13
|
||||
Caption = 'Uhm, did this help? :-)'
|
||||
end
|
||||
object BitBtn1: TBitBtn
|
||||
Left = 173
|
||||
Top = 83
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Close'
|
||||
DoubleBuffered = True
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 0
|
||||
OnClick = BitBtn1Click
|
||||
end
|
||||
end
|
||||
@@ -1,39 +0,0 @@
|
||||
unit uHelp;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
GnuGettext, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, Buttons;
|
||||
|
||||
type
|
||||
TfHelp = class(TForm)
|
||||
lAbout: TLabel;
|
||||
Label1: TLabel;
|
||||
BitBtn1: TBitBtn;
|
||||
procedure BitBtn1Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ Private-Deklarationen }
|
||||
public
|
||||
{ Public-Deklarationen }
|
||||
end;
|
||||
|
||||
var
|
||||
fHelp: TfHelp;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfHelp.BitBtn1Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfHelp.FormCreate(Sender: TObject);
|
||||
begin
|
||||
TranslateComponent(Self);
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -1,205 +0,0 @@
|
||||
object fLanguage: TfLanguage
|
||||
Left = 471
|
||||
Top = 128
|
||||
BorderStyle = bsToolWindow
|
||||
Caption = 'Language'
|
||||
ClientHeight = 136
|
||||
ClientWidth = 213
|
||||
Color = clWhite
|
||||
DoubleBuffered = True
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
KeyPreview = True
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnCreate = FormCreate
|
||||
OnKeyPress = FormKeyPress
|
||||
OnShow = FormShow
|
||||
DesignSize = (
|
||||
213
|
||||
136)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 197
|
||||
Height = 89
|
||||
TabOrder = 0
|
||||
object ImgEn: TImage
|
||||
Left = 12
|
||||
Top = 16
|
||||
Width = 80
|
||||
Height = 42
|
||||
AutoSize = True
|
||||
Picture.Data = {
|
||||
0A544A504547496D6167654A070000FFD8FFE000104A46494600010101004800
|
||||
480000FFDB0043000503040404030504040405050506070C08070707070F0B0B
|
||||
090C110F1212110F111113161C1713141A1511111821181A1D1D1F1F1F131722
|
||||
24221E241C1E1F1EFFDB0043010505050706070E08080E1E1411141E1E1E1E1E
|
||||
1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E
|
||||
1E1E1E1E1E1E1E1E1E1E1E1E1EFFC0001108002A005003012200021101031101
|
||||
FFC4001F0000010501010101010100000000000000000102030405060708090A
|
||||
0BFFC400B5100002010303020403050504040000017D01020300041105122131
|
||||
410613516107227114328191A1082342B1C11552D1F02433627282090A161718
|
||||
191A25262728292A3435363738393A434445464748494A535455565758595A63
|
||||
6465666768696A737475767778797A838485868788898A92939495969798999A
|
||||
A2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6
|
||||
D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F01000301
|
||||
01010101010101010000000000000102030405060708090A0BFFC400B5110002
|
||||
0102040403040705040400010277000102031104052131061241510761711322
|
||||
328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728
|
||||
292A35363738393A434445464748494A535455565758595A636465666768696A
|
||||
737475767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7
|
||||
A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3
|
||||
E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFDA000C03010002110311003F00F13B
|
||||
3B589EC7497BBB2B48E764CE9EB185617EFF0068C1170778D800C8CF1C01F5A9
|
||||
CD9D9E752FF46B6CFF00CC57089FF12FFF00490BFE8DF3FEF38C0EFC13F5A6E8
|
||||
E863D1E348EDA7B44BB8156E2290B16D5C7DA06120F90ED2300707F84FAE2AD9
|
||||
1266118907D8B3F651F37FC48BFD2BFE5E7E4F9FBF5F51E9B6BED9B77FEBFAFE
|
||||
BE47CE25FD7F5FD7E656167679D3716D6D9FF9856513FE261FE9257FD27E7FDD
|
||||
F191DB803EB505E5AC4963AB3DA595A493AA67505902A8B07FB4600B73BCEF04
|
||||
60679E09FAD688126661890FDB71F6A1F37FC4F7FD2BFE5DFE4F93B74F43EB8A
|
||||
A7AC2193489124B69EED2D2065B78A32C1B4806E0E527F906E2724727F887A62
|
||||
84DDFF00AFEBFAF9034BFAFEBFAFC4F7FF00F857FF00017FE8A7DE7FDF49FF00
|
||||
C6E8FF00857FF017FE8A7DE7FDF49FFC6E9FFF00099FECFDFF0044EB51FF00BE
|
||||
7FFB6D1FF099FECFDFF44EB51FFBE7FF00B6D7E7DEEF91FBB7363BFE9FFF00E5
|
||||
319FF0AFFE02FF00D14FBCFF00BE93FF008DD1FF000AFF00E02FFD14FBCFFBE9
|
||||
3FF8DD3FFE133FD9FBFE89D6A3FF007CFF00F6DA3FE133FD9FBFE89D6A3FF7CF
|
||||
FF006DA3DDF20E6C77FD3FFF00CA633FE15FFC05FF00A29F79FF007D27FF001B
|
||||
A3FE15FF00C05FFA29F79FF7D27FF1BA7FFC267FB3F7FD13AD47FEF9FF00EDB4
|
||||
7FC267FB3F7FD13AD47FEF9FFEDB47BBE41CD8EFFA7FFF0094CF27B3F867F106
|
||||
DACACEDFFE109F13CC658C25C3CBA6B3358E26DDBAD8E78240C9E9C923DEA63F
|
||||
0EBE20667FF8A0FC49FE8DFF001EFF00F12C6FF898FEFF007FFA573CFCBE99E8
|
||||
07BD7D11FF0008BFED17FF0043DE93F927FF0019A3FE117FDA2FFE87BD27F24F
|
||||
FE335EF7F6DD5FE43F3BFF0055F0FF00F4170FBDFF00F227CEE3E1D7C40CC19F
|
||||
01F893FD27FE3E3FE258DFF12EFDFEFF00F45E78F97D71D48F7A86F3E19FC41B
|
||||
9B2BCB7FF8423C4F098A3296EF169ACAD7D99B76EB939E480723AF200F7AFA3B
|
||||
FE117FDA2FFE87BD27F24FFE3347FC22FF00B45FFD0F7A4FE49FFC668FEDBABF
|
||||
C81FEABE1FFE82E1F7BFFE4487FE13FF008C1FF44760FF00BF0FFE347FC27FF1
|
||||
83FE88EC1FF7E1FF00C6A6FF00845FF68BFF00A1EF49FC93FF008CD1FF0008BF
|
||||
ED17FF0043DE93F927FF0019AF13DEF3FC0FABB60BFE9C7FE055087FE13FF8C1
|
||||
FF0044760FFBF0FF00E347FC27FF00183FE88EC1FF007E1FFC6A6FF845FF0068
|
||||
BFFA1EF49FC93FF8CD1FF08BFED17FF43DE93F927FF19A3DEF3FC02D82FF00A7
|
||||
1FF815421FF84FFE307FD11D83FEFC3FF8D1FF0009FF00C60FFA23B07FDF87FF
|
||||
001A9BFE117FDA2FFE87BD27F24FFE3347FC22FF00B45FFD0F7A4FE49FFC668F
|
||||
7BCFF00B60BFE9C7FE0550E4FF00E15FFC36FF00A2E47FF02E3FFE2A8FF857FF
|
||||
000DBFE8B91FFC0B8FFF008AAF9EA8AC39D763ECBFB1F13FF4152FFC061FE47D
|
||||
0BFF000AFF00E1B7FD1723FF008171FF00F1547FC2BFF86DFF0045C8FF00E05C
|
||||
7FFC557CF5451CEBB07F63E27FE82A5FF80C3FC8FA17FE15FF00C36FFA2E47FF
|
||||
0002E3FF00E2A8FF00857FF0DBFE8B91FF00C0B8FF00F8AAF9EA8A39D760FEC7
|
||||
C4FF00D054BFF0187F91F42FFC2BFF0086DFF45C8FFE05C7FF00C551FF000AFF
|
||||
00E1B7FD1723FF008171FF00F155F3D51473AEC1FD8F89FF00A0A97FE030FF00
|
||||
23E85FF857FF000DBFE8B91FFC0B8FFF008AA3FE15FF00C36FFA2E47FF0002E3
|
||||
FF00E2ABE7AA28E75D83FB1F13FF004152FF00C061FE47FFD9}
|
||||
OnClick = RadioGroup1Click
|
||||
end
|
||||
object ImgDe: TImage
|
||||
Left = 104
|
||||
Top = 16
|
||||
Width = 80
|
||||
Height = 42
|
||||
AutoSize = True
|
||||
Picture.Data = {
|
||||
0A544A504547496D6167658F040000FFD8FFE000104A46494600010101004800
|
||||
480000FFDB0043000503040404030504040405050506070C08070707070F0B0B
|
||||
090C110F1212110F111113161C1713141A1511111821181A1D1D1F1F1F131722
|
||||
24221E241C1E1F1EFFDB0043010505050706070E08080E1E1411141E1E1E1E1E
|
||||
1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E
|
||||
1E1E1E1E1E1E1E1E1E1E1E1E1EFFC0001108002A005003012200021101031101
|
||||
FFC4001F0000010501010101010100000000000000000102030405060708090A
|
||||
0BFFC400B5100002010303020403050504040000017D01020300041105122131
|
||||
410613516107227114328191A1082342B1C11552D1F02433627282090A161718
|
||||
191A25262728292A3435363738393A434445464748494A535455565758595A63
|
||||
6465666768696A737475767778797A838485868788898A92939495969798999A
|
||||
A2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6
|
||||
D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F01000301
|
||||
01010101010101010000000000000102030405060708090A0BFFC400B5110002
|
||||
0102040403040705040400010277000102031104052131061241510761711322
|
||||
328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728
|
||||
292A35363738393A434445464748494A535455565758595A636465666768696A
|
||||
737475767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7
|
||||
A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3
|
||||
E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFDA000C03010002110311003F00F8CA
|
||||
8ADBFF0084575FFF009F0FFC8C9FFC551FF08AEBFF00F3E1FF009193FF008AAC
|
||||
3EB543F9D7DE8F5BFB0335FF00A06A9FF804BFC8C4A2B6FF00E115D7FF00E7C3
|
||||
FF002327FF001547FC22BAFF00FCF87FE464FF00E2A8FAD50FE75F7A0FEC0CD7
|
||||
FE81AA7FE012FF0023128ADBFF0084575FFF009F0FFC8C9FFC551FF08AEBFF00
|
||||
F3E1FF009193FF008AA3EB543F9D7DE83FB0335FFA06A9FF00804BFC8C4A2B6F
|
||||
FE115D7FFE7C3FF2327FF1547FC22BAFFF00CF87FE464FFE2A8FAD50FE75F7A0
|
||||
FEC0CD7FE81AA7FE012FF23128ADBFF84575FF00F9F0FF00C8C9FF00C551FF00
|
||||
08AEBFFF003E1FF9193FF8AA3EB543F9D7DE83FB0335FF00A06A9FF804BFC8F4
|
||||
FA2BDA7FE1447FD4D5FF0094FF00FED947FC288FFA9ABFF29FFF00DB2BF2DFF5
|
||||
9B2BFF009FBF84BFC8FDFBFD63CB7FE7E7E12FF23C5A8AF69FF8511FF5357FE5
|
||||
3FFF00B651FF000A23FEA6AFFCA7FF00F6CA3FD66CAFFE7EFE12FF0020FF0058
|
||||
F2DFF9F9F84BFC8F16A2BDA7FE1447FD4D5FF94FFF00ED947FC288FF00A9ABFF
|
||||
0029FF00FDB28FF59B2BFF009FBF84BFC83FD63CB7FE7E7E12FF0023C5A8AF69
|
||||
FF008511FF005357FE53FF00FB651FF0A23FEA6AFF00CA7FFF006CA3FD66CAFF
|
||||
00E7EFE12FF20FF58F2DFF009F9F84BFC8F16A2BDA7FE1447FD4D5FF0094FF00
|
||||
FED947FC288FFA9ABFF29FFF00DB28FF0059B2BFF9FBF84BFC83FD63CB7FE7E7
|
||||
E12FF23DA28A28AFC98FCB428A28A0028A28A0028A28A0028A28A00FFFD9}
|
||||
OnClick = RadioGroup1Click
|
||||
end
|
||||
object rbEn: TRadioButton
|
||||
Left = 46
|
||||
Top = 64
|
||||
Width = 30
|
||||
Height = 17
|
||||
TabOrder = 0
|
||||
end
|
||||
object rbDe: TRadioButton
|
||||
Left = 138
|
||||
Top = 64
|
||||
Width = 30
|
||||
Height = 17
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object bOkay: TBitBtn
|
||||
Left = 130
|
||||
Top = 103
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'OK'
|
||||
DoubleBuffered = True
|
||||
Glyph.Data = {
|
||||
DE010000424DDE01000000000000760000002800000024000000120000000100
|
||||
0400000000006801000000000000000000001000000000000000000000000000
|
||||
80000080000000808000800000008000800080800000C0C0C000808080000000
|
||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
|
||||
3333333333333333333333330000333333333333333333333333F33333333333
|
||||
00003333344333333333333333388F3333333333000033334224333333333333
|
||||
338338F3333333330000333422224333333333333833338F3333333300003342
|
||||
222224333333333383333338F3333333000034222A22224333333338F338F333
|
||||
8F33333300003222A3A2224333333338F3838F338F33333300003A2A333A2224
|
||||
33333338F83338F338F33333000033A33333A222433333338333338F338F3333
|
||||
0000333333333A222433333333333338F338F33300003333333333A222433333
|
||||
333333338F338F33000033333333333A222433333333333338F338F300003333
|
||||
33333333A222433333333333338F338F00003333333333333A22433333333333
|
||||
3338F38F000033333333333333A223333333333333338F830000333333333333
|
||||
333A333333333333333338330000333333333333333333333333333333333333
|
||||
0000}
|
||||
ModalResult = 1
|
||||
NumGlyphs = 2
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 1
|
||||
OnClick = bOkClick
|
||||
end
|
||||
object bAbort: TBitBtn
|
||||
Left = 49
|
||||
Top = 104
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Abort'
|
||||
DoubleBuffered = True
|
||||
Kind = bkAbort
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 2
|
||||
OnClick = bAbortClick
|
||||
end
|
||||
end
|
||||
@@ -1,86 +0,0 @@
|
||||
unit uLanguage;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
GnuGettext, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, Buttons, jpeg, ExtCtrls, Registry;
|
||||
|
||||
type
|
||||
TfLanguage = class(TForm)
|
||||
GroupBox1: TGroupBox;
|
||||
ImgEn: TImage;
|
||||
ImgDe: TImage;
|
||||
rbEn: TRadioButton;
|
||||
rbDe: TRadioButton;
|
||||
bOkay: TBitBtn;
|
||||
bAbort: TBitBtn;
|
||||
procedure bOkClick(Sender: TObject);
|
||||
procedure FormKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure RadioGroup1Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure bAbortClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
OldLang: string;
|
||||
public
|
||||
end;
|
||||
|
||||
var
|
||||
fLanguage: TfLanguage;
|
||||
|
||||
implementation
|
||||
|
||||
uses uTools, uMain;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfLanguage.bAbortClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=mrAbort;
|
||||
end;
|
||||
|
||||
procedure TfLanguage.bOkClick(Sender: TObject);
|
||||
begin
|
||||
if rbEn.Checked then Config.Language:='en'
|
||||
else if rbde.Checked then Config.Language:='de'
|
||||
else Config.Language:='en';
|
||||
ModalResult:=mrOk;
|
||||
|
||||
if (OldLang<>'') and (OldLang<>Config.Language) then
|
||||
MessageDlg('Restart application to apply changes!',mtInformation,[mbOk],0);
|
||||
end;
|
||||
|
||||
|
||||
procedure TfLanguage.FormCreate(Sender: TObject);
|
||||
begin
|
||||
TranslateComponent(self);
|
||||
end;
|
||||
|
||||
procedure TfLanguage.FormKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if key=#27 then begin
|
||||
key:=#0;
|
||||
ModalResult:=mrAbort;
|
||||
Close;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfLanguage.FormShow(Sender: TObject);
|
||||
begin
|
||||
OldLang:=Config.Language;
|
||||
if Config.Language='en' then rbEn.Checked:=true
|
||||
else if Config.Language='de' then rbDe.Checked:=true
|
||||
else rbEn.Checked:=true;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfLanguage.RadioGroup1Click(Sender: TObject);
|
||||
begin
|
||||
if (Sender=rbEn) or (Sender=ImgEn) then rbEn.Checked:=true;
|
||||
if (Sender=rbDe) or (Sender=ImgDe) then rbDe.Checked:=true;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
@@ -1,909 +0,0 @@
|
||||
(*
|
||||
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or
|
||||
send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
|
||||
Programmed by Steffen Strueber,
|
||||
|
||||
Updates:
|
||||
3.0.2: May 10th 2011, Steffen Strueber
|
||||
*)
|
||||
|
||||
unit uMain;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
GnuGettext, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, Buttons, uTools, uTomcat,
|
||||
uApache, uMySQL, uFileZilla, uMercury, uNetstat, uNetstatTable, Menus,
|
||||
IniFiles, uProcesses, AppEvnts, ImgList, JCLDebug ;
|
||||
|
||||
|
||||
type
|
||||
TfMain = class(TForm)
|
||||
imgXAMPP: TImage;
|
||||
lHeader: TLabel;
|
||||
bConfig: TBitBtn;
|
||||
bSCM: TBitBtn;
|
||||
gbModules: TGroupBox;
|
||||
bApacheAction: TBitBtn;
|
||||
bApacheAdmin: TBitBtn;
|
||||
bMySQLAction: TBitBtn;
|
||||
bMySQLAdmin: TBitBtn;
|
||||
bFileZillaAction: TBitBtn;
|
||||
bFileZillaAdmin: TBitBtn;
|
||||
bMercuryAction: TBitBtn;
|
||||
bMercuryAdmin: TBitBtn;
|
||||
sbMain: TStatusBar;
|
||||
bQuit: TBitBtn;
|
||||
bHelp: TBitBtn;
|
||||
bExplorer: TBitBtn;
|
||||
pApacheStatus: TPanel;
|
||||
TimerUpdateStatus: TTimer;
|
||||
TrayIcon1: TTrayIcon;
|
||||
bNetstat: TBitBtn;
|
||||
puSystray: TPopupMenu;
|
||||
miShowHide: TMenuItem;
|
||||
miTerminate: TMenuItem;
|
||||
N1: TMenuItem;
|
||||
bApacheConfig: TBitBtn;
|
||||
lPIDs: TLabel;
|
||||
lPorts: TLabel;
|
||||
lApachePIDs: TLabel;
|
||||
bApacheLogs: TBitBtn;
|
||||
lApachePorts: TLabel;
|
||||
bMySQLConfig: TBitBtn;
|
||||
bMySQLLogs: TBitBtn;
|
||||
bFileZillaConfig: TBitBtn;
|
||||
bFileZillaLogs: TBitBtn;
|
||||
bMercuryConfig: TBitBtn;
|
||||
reLog: TRichEdit;
|
||||
lMySQLPIDs: TLabel;
|
||||
lMySQLPorts: TLabel;
|
||||
lFileZillaPorts: TLabel;
|
||||
lFileZillaPIDs: TLabel;
|
||||
lMercuryPorts: TLabel;
|
||||
lMercuryPIDs: TLabel;
|
||||
pMySQLStatus: TPanel;
|
||||
pFileZillaStatus: TPanel;
|
||||
pMercuryStatus: TPanel;
|
||||
ApplicationEvents1: TApplicationEvents;
|
||||
ImageList: TImageList;
|
||||
bMySQLService: TBitBtn;
|
||||
bFileZillaService: TBitBtn;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
bApacheService: TBitBtn;
|
||||
bMercurylogs: TBitBtn;
|
||||
puGeneral: TPopupMenu;
|
||||
lTomcatPorts: TLabel;
|
||||
lTomcatPIDs: TLabel;
|
||||
bTomcatAction: TBitBtn;
|
||||
bTomcatAdmin: TBitBtn;
|
||||
bTomcatConfig: TBitBtn;
|
||||
pTomcatStatus: TPanel;
|
||||
bTomcatLogs: TBitBtn;
|
||||
bTomcatService: TBitBtn;
|
||||
bMercuryService: TBitBtn;
|
||||
bXamppShell: TBitBtn;
|
||||
puTomcatAction: TPopupMenu;
|
||||
miActionTomcatAuto: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
Statuserkennungnichtsicher1: TMenuItem;
|
||||
miActionTomcatStop: TMenuItem;
|
||||
miActionTomcatStart: TMenuItem;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure bApacheActionClick(Sender: TObject);
|
||||
procedure TimerUpdateStatusTimer(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure bNetstatClick(Sender: TObject);
|
||||
procedure miTerminateClick(Sender: TObject);
|
||||
procedure bQuitClick(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
procedure miShowHideClick(Sender: TObject);
|
||||
procedure TrayIcon1DblClick(Sender: TObject);
|
||||
procedure bExplorerClick(Sender: TObject);
|
||||
procedure bSCMClick(Sender: TObject);
|
||||
procedure bApacheAdminClick(Sender: TObject);
|
||||
procedure bApacheConfigClick(Sender: TObject);
|
||||
procedure miGeneralClick(Sender: TObject);
|
||||
procedure bConfigClick(Sender: TObject);
|
||||
procedure bApacheLogsClick(Sender: TObject);
|
||||
procedure miApacheLogsAccessClick(Sender: TObject);
|
||||
procedure miApacheLogsErrorClick(Sender: TObject);
|
||||
procedure bMySQLActionClick(Sender: TObject);
|
||||
procedure bMySQLAdminClick(Sender: TObject);
|
||||
procedure bMySQLConfigClick(Sender: TObject);
|
||||
procedure bMySQLLogsClick(Sender: TObject);
|
||||
procedure bFileZillaActionClick(Sender: TObject);
|
||||
procedure bFileZillaAdminClick(Sender: TObject);
|
||||
procedure bFileZillaConfigClick(Sender: TObject);
|
||||
procedure bFileZillaLogsClick(Sender: TObject);
|
||||
procedure bMercuryActionClick(Sender: TObject);
|
||||
procedure bMercuryAdminClick(Sender: TObject);
|
||||
procedure bMercuryConfigClick(Sender: TObject);
|
||||
procedure bHelpClick(Sender: TObject);
|
||||
procedure bApacheServiceClick(Sender: TObject);
|
||||
procedure bMySQLServiceClick(Sender: TObject);
|
||||
procedure bFileZillaServiceClick(Sender: TObject);
|
||||
procedure bMercuryServiceClick(Sender: TObject);
|
||||
procedure bMercurylogsClick(Sender: TObject);
|
||||
procedure bXamppShellClick(Sender: TObject);
|
||||
procedure bTomcatConfigClick(Sender: TObject);
|
||||
procedure bTomcatLogsClick(Sender: TObject);
|
||||
procedure bTomcatActionClick(Sender: TObject);
|
||||
procedure bTomcatAdminClick(Sender: TObject);
|
||||
procedure miActionTomcatAutoClick(Sender: TObject);
|
||||
procedure miActionTomcatStopClick(Sender: TObject);
|
||||
procedure miActionTomcatStartClick(Sender: TObject);
|
||||
procedure ApplicationEvents1Exception(Sender: TObject; E: Exception);
|
||||
private
|
||||
Apache: tApache;
|
||||
MySQL: tMySQL;
|
||||
FileZilla: tFileZilla;
|
||||
Mercury: tMercury;
|
||||
Tomcat: tTomcat;
|
||||
WindowsShutdownInProgress: boolean;
|
||||
procedure UpdateStatusAll;
|
||||
function TryGuessXamppVersion:string;
|
||||
procedure EditConfigLogs(ConfigFile: string);
|
||||
procedure GeneralPUClear;
|
||||
procedure GeneralPUAdd(text: string=''; hint: string=''; tag: integer=0);
|
||||
procedure GeneralPUAddUser(text: string; hint: string='');
|
||||
procedure GeneralPUAddUserFromSL(sl: tStringList);
|
||||
procedure WMQueryEndSession(var Msg: TWMQueryEndSession); message WM_QueryEndSession; // detect Windows shutdown message
|
||||
procedure SaveLogFile;
|
||||
public
|
||||
procedure AddLog(module,log: string; LogType: tLogType=ltDefault); overload;
|
||||
procedure AddLog(log: string; LogType: tLogType=ltDefault); overload;
|
||||
end;
|
||||
|
||||
var
|
||||
fMain: TfMain;
|
||||
|
||||
implementation
|
||||
|
||||
uses uConfig, uHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfMain.miShowHideClick(Sender: TObject);
|
||||
begin
|
||||
if Visible then begin
|
||||
Hide;
|
||||
if fMain.WindowState=wsMinimized then fMain.WindowState:=wsNormal;
|
||||
end else begin
|
||||
Show;
|
||||
if fMain.WindowState=wsMinimized then fMain.WindowState:=wsNormal;
|
||||
Application.BringToFront;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfMain.miGeneralClick(Sender: TObject);
|
||||
var
|
||||
mi: TMenuItem;
|
||||
App: string;
|
||||
begin
|
||||
if not (Sender is TMenuItem) then exit;
|
||||
mi:=Sender as tMenuItem;
|
||||
if mi.Tag=0 then
|
||||
EditConfigLogs(mi.Hint);
|
||||
if mi.Tag=1 then begin
|
||||
App:=BaseDir+mi.Hint;
|
||||
ExecuteFile(App,'','',SW_SHOW);
|
||||
Addlog(Format(_('Executing "%s"'),[App]));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfMain.AddLog(module, log: string; LogType: tLogType=ltDefault);
|
||||
begin
|
||||
if (not Config.ShowDebug) and (LogType=ltDebug) or (LogType=ltDebugDetails) then exit;
|
||||
if (LogType=ltDebugDetails) and (Config.DebugLevel=0) then exit;
|
||||
|
||||
with reLog do begin
|
||||
SelStart := GetTextLen;
|
||||
|
||||
SelAttributes.Color := clGray;
|
||||
SelText := TimeToStr(Now)+' ';
|
||||
|
||||
SelAttributes.Color := clBlack;
|
||||
SelText := '[';
|
||||
|
||||
SelAttributes.Color := clBlue;
|
||||
SelText := module;
|
||||
|
||||
SelAttributes.Color := clBlack;
|
||||
SelText := '] '+#9;
|
||||
|
||||
|
||||
case logtype of
|
||||
ltDefault: SelAttributes.Color := clBlack;
|
||||
ltInfo: SelAttributes.Color := clBlue;
|
||||
ltError: SelAttributes.Color := clRed;
|
||||
ltDebug: SelAttributes.Color := clGray;
|
||||
ltDebugDetails: SelAttributes.Color := clSilver;
|
||||
end;
|
||||
|
||||
SelText := Log+#13;
|
||||
|
||||
// SelStart := GetTextLen;
|
||||
SendMessage(Handle, EM_SCROLLCARET,0,0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfMain.AddLog(log: string; LogType: tLogType=ltDefault);
|
||||
begin
|
||||
AddLog('main',log,LogType);
|
||||
end;
|
||||
|
||||
procedure TfMain.ApplicationEvents1Exception(Sender: TObject; E: Exception);
|
||||
var ts:tSTringList;
|
||||
i:integer;
|
||||
begin
|
||||
// GlobalAddLog(Format('Exception in thread: %d / %s', [Thread.ThreadID, JclDebugThreadList.ThreadClassNames[Thread.ThreadID]]),0,'LogException');
|
||||
// Note: JclLastExceptStackList always returns list for *current* thread ID. To simplify getting the
|
||||
// stack of thread where an exception occured JclLastExceptStackList returns stack of the thread instead
|
||||
// of current thread when called *within* the JclDebugThreadList.OnSyncException handler. This is the
|
||||
// *only* exception to the behavior of JclLastExceptStackList described above.
|
||||
ts:=TStringList.Create;
|
||||
|
||||
AddLog('EXCEPTION',E.Message,ltError);
|
||||
|
||||
JclLastExceptStackList.AddToStrings(ts, True, True, True);
|
||||
for i:=0 to ts.count-1 do
|
||||
AddLog('EXCEPTION',ts[i],ltError);
|
||||
ts.Free;
|
||||
end;
|
||||
|
||||
procedure TfMain.miActionTomcatAutoClick(Sender: TObject);
|
||||
begin
|
||||
if Tomcat.isRunning then Tomcat.Stop
|
||||
else Tomcat.Start;
|
||||
end;
|
||||
|
||||
procedure TfMain.miActionTomcatStartClick(Sender: TObject);
|
||||
begin
|
||||
Tomcat.Start;
|
||||
end;
|
||||
|
||||
procedure TfMain.miActionTomcatStopClick(Sender: TObject);
|
||||
begin
|
||||
Tomcat.Stop
|
||||
end;
|
||||
|
||||
procedure TfMain.bApacheActionClick(Sender: TObject);
|
||||
begin
|
||||
if Apache.isRunning then Apache.Stop
|
||||
else Apache.Start;
|
||||
end;
|
||||
|
||||
procedure TfMain.miTerminateClick(Sender: TObject);
|
||||
begin
|
||||
Application.Terminate;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfMain.SaveLogFile;
|
||||
var
|
||||
en: string;
|
||||
LogFileName: string;
|
||||
f: TextFile;
|
||||
i: Integer;
|
||||
begin
|
||||
en:=ExtractFileName(Application.ExeName);
|
||||
while (length(en)>0) and (en[length(en)]<>'.') do en:=copy(en,1,length(en)-1);
|
||||
LogFileName:=Basedir+en+'log';
|
||||
AssignFile(f,LogFileName);
|
||||
if FileExists(LogFileName) then Append(f)
|
||||
else Rewrite(f);
|
||||
for i:=0 to reLog.Lines.Count-1 do
|
||||
Writeln(f,reLog.Lines[i]);
|
||||
Writeln(f,'');
|
||||
CloseFile(f);
|
||||
end;
|
||||
|
||||
procedure TfMain.miApacheLogsAccessClick(Sender: TObject);
|
||||
begin
|
||||
Apache.ShowLogs(altAccess);
|
||||
end;
|
||||
|
||||
procedure TfMain.miApacheLogsErrorClick(Sender: TObject);
|
||||
begin
|
||||
Apache.ShowLogs(altError);
|
||||
end;
|
||||
|
||||
procedure TfMain.bQuitClick(Sender: TObject);
|
||||
begin
|
||||
miTerminateClick(Sender);
|
||||
end;
|
||||
|
||||
procedure TfMain.bExplorerClick(Sender: TObject);
|
||||
var
|
||||
App: string;
|
||||
begin
|
||||
App:=BaseDir;
|
||||
ExecuteFile(App,'','',SW_SHOW);
|
||||
Addlog(Format(_('Executing "%s"'),[App]));
|
||||
end;
|
||||
|
||||
procedure TfMain.bFileZillaActionClick(Sender: TObject);
|
||||
begin
|
||||
if FileZilla.isService then begin
|
||||
if FileZilla.isRunning then FileZilla.Stop
|
||||
else FileZilla.Start;
|
||||
end else begin
|
||||
MessageDlg(_('FileZilla must be run as service!'),mtInformation,[mbOK],0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfMain.bFileZillaAdminClick(Sender: TObject);
|
||||
begin
|
||||
FileZilla.Admin;
|
||||
end;
|
||||
|
||||
procedure TfMain.bFileZillaConfigClick(Sender: TObject);
|
||||
begin
|
||||
GeneralPUClear;
|
||||
GeneralPUAdd('FileZilla Server.xml','FileZillaFTP\FileZilla Server.xml');
|
||||
GeneralPUAddUserFromSL(Config.UserConfig.FileZilla);
|
||||
GeneralPUAdd();
|
||||
GeneralPUAdd(_('<Browse>'),'FileZillaFTP',1);
|
||||
puGeneral.Popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
|
||||
end;
|
||||
|
||||
procedure TfMain.bFileZillaLogsClick(Sender: TObject);
|
||||
begin
|
||||
GeneralPUClear;
|
||||
// GeneralPUAdd('error.log','mysql\data\mysql_error.log');
|
||||
GeneralPUAddUserFromSL(Config.UserLogs.FileZilla);
|
||||
puGeneral.Popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
|
||||
end;
|
||||
|
||||
procedure TfMain.bFileZillaServiceClick(Sender: TObject);
|
||||
var oldIsService: boolean;
|
||||
begin
|
||||
oldIsService:=FileZilla.isService;
|
||||
|
||||
if FileZilla.isRunning then begin
|
||||
MessageDlg(_('Services cant be installed or uninstalled while service is running!'),mtError,[mbOk],0);
|
||||
exit;
|
||||
end;
|
||||
if FileZilla.isService then begin
|
||||
if MessageDlg(Format(_('Click Yes to uninstall the %s service'),[FileZilla.ModuleName]),mtConfirmation,[mbYes, mbNo],0)=mrYes then
|
||||
FileZilla.ServiceUnInstall
|
||||
else
|
||||
exit;
|
||||
end else begin
|
||||
if MessageDlg(Format(_('Click Yes to install the "%s" service'),[FileZilla.ModuleName]),mtConfirmation,[mbYes, mbNo],0)=mrYes then
|
||||
FileZilla.ServiceInstall
|
||||
else
|
||||
exit;
|
||||
end;
|
||||
FileZilla.CheckIsService;
|
||||
if (oldIsService=FileZilla.isService) then begin
|
||||
FileZilla.AddLog(_('Service was NOT (un)installed!'),ltError);
|
||||
if (WinVersion.Major=5) then // WinXP
|
||||
FileZilla.AddLog(_('One possible reason for failure: On windows security box you !!!MUST UNCHECK!!! that "Protect my computer and data from unauthorized program activity" checkbox!!!'),ltError);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfMain.bHelpClick(Sender: TObject);
|
||||
begin
|
||||
fHelp.Show;
|
||||
end;
|
||||
|
||||
procedure TfMain.bApacheServiceClick(Sender: TObject);
|
||||
var oldIsService: boolean;
|
||||
begin
|
||||
oldIsService:=Apache.isService;
|
||||
|
||||
if Apache.isRunning then begin
|
||||
MessageDlg(_('Services cant be installed or uninstalled while service is running!'),mtError,[mbOk],0);
|
||||
exit;
|
||||
end;
|
||||
|
||||
if Apache.isService then begin
|
||||
if MessageDlg(Format(_('Click Yes to uninstall the %s service'),[Apache.ModuleName]),mtConfirmation,[mbYes, mbNo],0)=mrYes then
|
||||
Apache.ServiceUnInstall
|
||||
else
|
||||
exit;
|
||||
end else begin
|
||||
if MessageDlg(Format(_('Click Yes to install the "%s" service'),[Apache.ModuleName]),mtConfirmation,[mbYes, mbNo],0)=mrYes then
|
||||
Apache.ServiceInstall
|
||||
else
|
||||
exit;
|
||||
end;
|
||||
Apache.CheckIsService;
|
||||
if (oldIsService=Apache.isService) then begin
|
||||
Apache.AddLog(_('Service was NOT (un)installed!'),ltError);
|
||||
if (WinVersion.Major=5) then // WinXP
|
||||
Apache.AddLog(_('One possible reason for failure: On windows security box you !!!MUST UNCHECK!!! that "Protect my computer and data from unauthorized program activity" checkbox!!!'),ltError);
|
||||
end else begin
|
||||
Apache.AddLog(_('Successful!'));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfMain.bMercuryActionClick(Sender: TObject);
|
||||
begin
|
||||
if Mercury.isRunning then Mercury.Stop
|
||||
else Mercury.Start;
|
||||
end;
|
||||
|
||||
procedure TfMain.bMercuryAdminClick(Sender: TObject);
|
||||
begin
|
||||
Mercury.Admin;
|
||||
end;
|
||||
|
||||
procedure TfMain.bMercuryConfigClick(Sender: TObject);
|
||||
begin
|
||||
GeneralPUClear;
|
||||
GeneralPUAdd('mercury.ini','MercuryMail\mercury.ini');
|
||||
GeneralPUAddUserFromSL(Config.UserConfig.Mercury);
|
||||
GeneralPUAdd();
|
||||
GeneralPUAdd(_('<Browse>'),'MercuryMail',1);
|
||||
puGeneral.Popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
|
||||
end;
|
||||
|
||||
procedure TfMain.bMercurylogsClick(Sender: TObject);
|
||||
begin
|
||||
GeneralPUClear;
|
||||
// GeneralPUAdd('error.log','mysql\data\mysql_error.log');
|
||||
GeneralPUAddUserFromSL(Config.UserLogs.Mercury);
|
||||
puGeneral.Popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
|
||||
end;
|
||||
|
||||
procedure TfMain.bMercuryServiceClick(Sender: TObject);
|
||||
begin
|
||||
MessageDlg(_('Mercury cant be run as service!'),mtError,[mbOk],0);
|
||||
end;
|
||||
|
||||
procedure TfMain.bMySQLActionClick(Sender: TObject);
|
||||
begin
|
||||
if MySQL.isRunning then MySQL.Stop
|
||||
else MySQL.Start;
|
||||
end;
|
||||
|
||||
procedure TfMain.bMySQLAdminClick(Sender: TObject);
|
||||
begin
|
||||
MySQL.Admin;
|
||||
end;
|
||||
|
||||
procedure TfMain.bMySQLConfigClick(Sender: TObject);
|
||||
begin
|
||||
GeneralPUClear;
|
||||
GeneralPUAdd('my.ini','mysql\bin\my.ini');
|
||||
GeneralPUAddUserFromSL(Config.UserConfig.MySQL);
|
||||
GeneralPUAdd();
|
||||
GeneralPUAdd(_('<Browse>'),'mysql',1);
|
||||
puGeneral.Popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
|
||||
end;
|
||||
|
||||
procedure TfMain.bMySQLLogsClick(Sender: TObject);
|
||||
begin
|
||||
GeneralPUClear;
|
||||
GeneralPUAdd('error.log','mysql\data\mysql_error.log');
|
||||
GeneralPUAddUserFromSL(Config.UserLogs.MySQL);
|
||||
GeneralPUAdd();
|
||||
GeneralPUAdd(_('<Browse>'),'mysql\data',1);
|
||||
puGeneral.Popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
|
||||
end;
|
||||
|
||||
procedure TfMain.bMySQLServiceClick(Sender: TObject);
|
||||
var oldIsService: boolean;
|
||||
begin
|
||||
oldIsService:=Apache.isService;
|
||||
|
||||
if MySQL.isRunning then begin
|
||||
MessageDlg(_('Services cant be installed or uninstalled while service is running!'),mtError,[mbOk],0);
|
||||
exit;
|
||||
end;
|
||||
if MySQL.isService then begin
|
||||
if MessageDlg(Format(_('Click Yes to uninstall the %s service'),[MySQL.ModuleName]),mtConfirmation,[mbYes, mbNo],0)=mrYes then
|
||||
MySQL.ServiceUnInstall
|
||||
else
|
||||
exit;
|
||||
end else begin
|
||||
if MessageDlg(Format(_('Click Yes to install the "%s" service'),[MySQL.ModuleName]),mtConfirmation,[mbYes, mbNo],0)=mrYes then
|
||||
MySQL.ServiceInstall
|
||||
else
|
||||
exit;
|
||||
end;
|
||||
MySQL.CheckIsService;
|
||||
if (oldIsService=MySQL.isService) then begin
|
||||
MySQL.AddLog(_('Service was NOT (un)installed!'),ltError);
|
||||
if (WinVersion.Major=5) then // WinXP
|
||||
MySQL.AddLog(_('One possible reason for failure: On windows security box you !!!MUST UNCHECK!!! that "Protect my computer and data from unauthorized program activity" checkbox!!!'),ltError);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfMain.bConfigClick(Sender: TObject);
|
||||
begin
|
||||
fConfig.Show;
|
||||
end;
|
||||
|
||||
procedure TfMain.bSCMClick(Sender: TObject);
|
||||
var
|
||||
App: string;
|
||||
begin
|
||||
App:='services.msc';
|
||||
ExecuteFile(App,'','',SW_SHOW);
|
||||
Addlog(Format(_('Executing "%s"'),[App]));
|
||||
end;
|
||||
|
||||
procedure TfMain.bTomcatActionClick(Sender: TObject);
|
||||
begin
|
||||
if Tomcat.isRunning then begin
|
||||
miActionTomcatAuto.Caption:='Stop';
|
||||
miActionTomcatStop.Visible:=false;
|
||||
miActionTomcatStart.Visible:=true;
|
||||
end else begin
|
||||
miActionTomcatAuto.Caption:='Start';
|
||||
miActionTomcatStop.Visible:=true;
|
||||
miActionTomcatStart.Visible:=false;
|
||||
end;
|
||||
|
||||
puTomcatAction.Popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
|
||||
// if Tomcat.isRunning then Tomcat.Stop
|
||||
// else Tomcat.Start;
|
||||
end;
|
||||
|
||||
procedure TfMain.bTomcatAdminClick(Sender: TObject);
|
||||
begin
|
||||
Tomcat.Admin;
|
||||
end;
|
||||
|
||||
procedure TfMain.bTomcatConfigClick(Sender: TObject);
|
||||
begin
|
||||
GeneralPUClear;
|
||||
GeneralPUAdd('server.xml','Tomcat\conf\server.xml');
|
||||
GeneralPUAdd('tomcat-users.xml','Tomcat\conf\tomcat-users.xml');
|
||||
GeneralPUAdd('web.xml','Tomcat\conf\web.xml');
|
||||
GeneralPUAdd('context.xml','Tomcat\conf\context.xml');
|
||||
GeneralPUAddUserFromSL(Config.UserConfig.Tomcat);
|
||||
GeneralPUAdd();
|
||||
GeneralPUAdd(_('<Browse>'),'Tomcat\conf',1);
|
||||
puGeneral.Popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
|
||||
end;
|
||||
|
||||
procedure TfMain.bTomcatLogsClick(Sender: TObject);
|
||||
begin
|
||||
GeneralPUClear;
|
||||
GeneralPUAddUserFromSL(Config.UserLogs.Tomcat);
|
||||
GeneralPUAdd();
|
||||
GeneralPUAdd(_('<Browse>'),'tomcat\logs',1);
|
||||
puGeneral.Popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
|
||||
end;
|
||||
|
||||
procedure TfMain.bXamppShellClick(Sender: TObject);
|
||||
const
|
||||
cBatchFileContents=
|
||||
'@ECHO OFF'+cr+
|
||||
''+cr+
|
||||
'GOTO weiter'+cr+
|
||||
':setenv'+cr+
|
||||
'SET "MIBDIRS=%~dp0php\extras\mibs"'+cr+
|
||||
'SET "MIBDIRS=%MIBDIRS:\=/%"'+cr+
|
||||
'SET "MYSQL_HOME=%~dp0mysql\bin"'+cr+
|
||||
'SET "OPENSSL_CONF=%~dp0apache\bin\openssl.cnf"'+cr+
|
||||
'SET "OPENSSL_CONF=%OPENSSL_CONF:\=/%"'+cr+
|
||||
'SET "PHP_PEAR_SYSCONF_DIR=%~dp0php"'+cr+
|
||||
'SET "PHPRC=%~dp0php"'+cr+
|
||||
'SET "TMP=%~dp0tmp"'+cr+
|
||||
'SET "PERL5LIB="'+cr+
|
||||
'SET "Path=%~dp0;%~dp0php;%~dp0perl\site\bin;%~dp0perl\bin;%~dp0apache\bin;%~dp0mysql\bin;%~dp0FileZillaFTP;%~dp0MercuryMail;%~dp0sendmail;%~dp0webalizer;%~dp0tomcat\bin;%Path%"'+cr+
|
||||
'GOTO :EOF'+cr+
|
||||
':weiter'+cr+
|
||||
''+cr+
|
||||
'IF "%1" EQU "setenv" ('+cr+
|
||||
' ECHO.'+cr+
|
||||
' ECHO Setting environment for using XAMPP for Windows.'+cr+
|
||||
' CALL :setenv'+cr+
|
||||
') ELSE ('+cr+
|
||||
' SETLOCAL'+cr+
|
||||
' TITLE XAMPP for Windows'+cr+
|
||||
' PROMPT %username%@%computername%$S$P$_#$S'+cr+
|
||||
' START "" /B %COMSPEC% /K "%~f0" setenv'+cr+
|
||||
')';
|
||||
cFilename = 'xampp_shell.bat';
|
||||
var
|
||||
ts: TStringList;
|
||||
batchfile: string;
|
||||
begin
|
||||
batchfile:=BaseDir+cFilename;
|
||||
if not fileexists(BatchFile) then begin
|
||||
if MessageDlg(Format(_('File "%s" not found. Should it be created now?'),[BatchFile]),mtConfirmation,[mbYes, mbAbort],0)<>mrYes then exit;
|
||||
ts:=TStringList.Create;
|
||||
ts.Text:=cBatchFileContents;
|
||||
try
|
||||
ts.SaveToFile(batchfile);
|
||||
except
|
||||
on e:exception do begin
|
||||
MessageDlg(_('Error')+': '+E.Message,mtError,[mbOK],0);
|
||||
end;
|
||||
end;
|
||||
ts.Free;
|
||||
end;
|
||||
ExecuteFile(batchfile,'','',SW_SHOW);
|
||||
end;
|
||||
|
||||
procedure TfMain.GeneralPUAdd(text: string=''; hint: string=''; tag: integer=0);
|
||||
var
|
||||
mi: TMenuItem;
|
||||
begin
|
||||
mi:=TMenuItem.Create(puGeneral);
|
||||
mi.Caption:=text;
|
||||
if text='' then begin
|
||||
mi.Caption:='-';
|
||||
end else begin
|
||||
mi.Hint:=hint;
|
||||
mi.Tag:=tag;
|
||||
mi.OnClick:=miGeneralClick;
|
||||
end;
|
||||
puGeneral.Items.Add(mi);
|
||||
end;
|
||||
|
||||
procedure TfMain.GeneralPUAddUser(text: string; hint: string='');
|
||||
var
|
||||
myCaption: TranslatedUnicodeString;
|
||||
mi, miMain: TMenuItem;
|
||||
begin
|
||||
myCaption:=_('User defined');
|
||||
miMain:=puGeneral.Items.Find(myCaption);
|
||||
if miMain=nil then begin
|
||||
GeneralPUAdd();
|
||||
miMain:=TMenuItem.Create(puGeneral);
|
||||
miMain.Caption:=myCaption;
|
||||
puGeneral.Items.Add(miMain);
|
||||
end;
|
||||
|
||||
mi:=TMenuItem.Create(miMain);
|
||||
mi.Caption:=text;
|
||||
if hint<>'' then mi.Hint:=hint
|
||||
else mi.Hint:=text;
|
||||
mi.OnClick:=miGeneralClick;
|
||||
miMain.Add(mi);
|
||||
end;
|
||||
|
||||
procedure TfMain.GeneralPUAddUserFromSL(sl: tStringList);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
for i:=0 to sl.Count-1 do
|
||||
GeneralPUAddUser(sl[i]);
|
||||
end;
|
||||
|
||||
procedure TfMain.GeneralPUClear;
|
||||
begin
|
||||
puGeneral.Items.Clear;
|
||||
end;
|
||||
|
||||
procedure TfMain.EditConfigLogs(ConfigFile: string);
|
||||
var
|
||||
App, Param: string;
|
||||
begin
|
||||
App:=Config.EditorApp;
|
||||
Param:=BaseDir+ConfigFile;
|
||||
Addlog(Format(_('Executing %s %s'),[App,Param]),ltDebug);
|
||||
ExecuteFile(app,param,'',SW_SHOW);
|
||||
end;
|
||||
|
||||
procedure TfMain.bNetstatClick(Sender: TObject);
|
||||
begin
|
||||
fNetStat.Show;
|
||||
fNetstat.RefreshTable(true);
|
||||
end;
|
||||
|
||||
procedure TfMain.bApacheAdminClick(Sender: TObject);
|
||||
begin
|
||||
Apache.Admin;
|
||||
end;
|
||||
|
||||
procedure TfMain.bApacheConfigClick(Sender: TObject);
|
||||
begin
|
||||
GeneralPUClear;
|
||||
GeneralPUAdd('Apache (httpd.conf)','apache/conf/httpd.conf');
|
||||
GeneralPUAdd('PHP (php.ini)','php/php.ini');
|
||||
GeneralPUAddUserFromSL(Config.UserConfig.Apache);
|
||||
GeneralPUAdd();
|
||||
GeneralPUAdd(_('<Browse>')+' [Apache]','apache',1);
|
||||
GeneralPUAdd(_('<Browse>')+' [PHP]','php',1);
|
||||
puGeneral.Popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
|
||||
end;
|
||||
|
||||
procedure TfMain.bApacheLogsClick(Sender: TObject);
|
||||
begin
|
||||
GeneralPUClear;
|
||||
GeneralPUAdd('access.log','apache\logs\access.log');
|
||||
GeneralPUAdd('error.log','apache\logs\access.log');
|
||||
GeneralPUAddUserFromSL(Config.UserLogs.Apache);
|
||||
GeneralPUAdd();
|
||||
GeneralPUAdd(_('<Browse>'),'apache\logs',1);
|
||||
puGeneral.Popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
|
||||
end;
|
||||
|
||||
procedure TfMain.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caHide;
|
||||
end;
|
||||
|
||||
procedure TfMain.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
begin
|
||||
if WindowsShutdownInProgress then begin
|
||||
CanClose:=true;
|
||||
end else begin
|
||||
CanClose:=false;
|
||||
Hide;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfMain.FormCreate(Sender: TObject);
|
||||
var
|
||||
isAdmin: Boolean;
|
||||
xamppVersion: string;
|
||||
CCVersion: string;
|
||||
begin
|
||||
TranslateComponent(Self);
|
||||
|
||||
BaseDir:=LowerCase(ExtractFilePath(Application.ExeName));
|
||||
if GetComputerName='STRUEBER' then BaseDir:='c:\xampp';
|
||||
|
||||
AddLog(_('Initializing main'));
|
||||
|
||||
left:=screen.WorkAreaWidth-Width;
|
||||
top:=screen.WorkAreaHeight-Height;
|
||||
|
||||
WinVersion:=GetWinVersion;
|
||||
WindowsShutdownInProgress:=false;
|
||||
AddLog(Format(_('Windows version: %s'),[WinVersion.WinVersion]));
|
||||
xamppVersion:=TryGuessXamppVersion;
|
||||
AddLog('Xampp version: '+xamppVersion);
|
||||
|
||||
if cCompileDate<>'' then CCVersion:=GlobalProgramversion+Format(' [ Compiled: %s ]',[cCompileDate])
|
||||
else CCVersion:=GlobalProgramversion;
|
||||
AddLog('Control center version: '+CCVersion);
|
||||
|
||||
Caption:='XAMPP Control Panel v'+GlobalProgramversion+Format(' [ Compiled: %s ]',[cCompileDate]);
|
||||
lHeader.Caption:='XAMPP Control Panel v'+GlobalProgramversion;
|
||||
|
||||
CurrentUser:=GetCurrentUserName;
|
||||
isAdmin:=IsWindowsAdmin;
|
||||
if isAdmin then begin
|
||||
AddLog(_('Running as admin - good!'));
|
||||
end else begin
|
||||
AddLog(_('Running not as admin! This will work for all application stuff, but whenever you do'),ltInfo);
|
||||
AddLog(_('something with services there will be a security dialogue! So think about running'),ltInfo);
|
||||
AddLog(_('this application with administrator rights!'),ltInfo);
|
||||
end;
|
||||
|
||||
AddLog(Format(_('Working with basedir: "%s"'),[BaseDir]));
|
||||
|
||||
if BaseDir[length(BaseDir)]<>'\' then BaseDir:=BaseDir+'\';
|
||||
|
||||
NetStatTable.UpdateTable;
|
||||
Processes.Update;
|
||||
|
||||
AddLog(_('Initializing moduls'));
|
||||
Apache:=tApache.Create( bApacheService, pApacheStatus, lApachePIDs, lApachePorts, bApacheAction, bApacheAdmin);
|
||||
MySQL:=tMySQL.Create( bMySQLService, pMySQLStatus, lMySQLPIDs, lMySQLPorts, bMySQLAction, bMySQLAdmin);
|
||||
FileZilla:=tFileZilla.Create( bFileZillaService, pFileZillaStatus, lFileZillaPIDs, lFileZillaPorts, bFileZillaAction, bFileZillaAdmin);
|
||||
Mercury:=tMercury.Create( bMercuryService, pMercuryStatus, lMercuryPIDs, lMercuryPorts, bMercuryAction, bMercuryAdmin);
|
||||
Tomcat:=tTomcat.Create( bTomcatService, pTomcatStatus, lTomcatPIDs, lTomcatPorts, bTomcatAction, bTomcatAdmin);
|
||||
|
||||
if Config.ASApache then begin
|
||||
Apache.AutoStart:=true;
|
||||
AddLog(Format(_('Enabling autostart for module "%s"'),[Apache.ModuleName]));
|
||||
end;
|
||||
if Config.ASMySQL then begin
|
||||
MySQL.AutoStart:=true;
|
||||
AddLog(Format(_('Enabling autostart for module "%s"'),[MySQL.ModuleName]));
|
||||
end;
|
||||
if Config.ASFileZilla then begin
|
||||
FileZilla.AutoStart:=true;
|
||||
AddLog(Format(_('Enabling autostart for module "%s"'),[FileZilla.ModuleName]));
|
||||
end;
|
||||
if Config.ASMercury then begin
|
||||
Mercury.AutoStart:=true;
|
||||
AddLog(Format(_('Enabling autostart for module "%s"'),[Mercury.ModuleName]));
|
||||
end;
|
||||
if Config.ASTomcat then begin
|
||||
Tomcat.AutoStart:=true;
|
||||
AddLog(Format(_('Enabling autostart for module "%s"'),[Tomcat.ModuleName]));
|
||||
end;
|
||||
|
||||
|
||||
AddLog(_('Starting')+' check-timer');
|
||||
TimerUpdateStatus.Enabled:=true;
|
||||
// UpdateStatusAll;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfMain.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
AddLog(_('Deinitializing moduls'));
|
||||
Apache.Free;
|
||||
MySQL.Free;
|
||||
FileZilla.Free;
|
||||
Mercury.Free;
|
||||
AddLog(_('Deinitializing main'));
|
||||
SaveLogFile;
|
||||
end;
|
||||
|
||||
procedure TfMain.TimerUpdateStatusTimer(Sender: TObject);
|
||||
begin
|
||||
UpdateStatusAll;
|
||||
end;
|
||||
|
||||
procedure TfMain.TrayIcon1DblClick(Sender: TObject);
|
||||
begin
|
||||
miShowHideClick(nil);
|
||||
end;
|
||||
|
||||
|
||||
function TfMain.TryGuessXamppVersion: string;
|
||||
var ts: TStringList;
|
||||
s: string;
|
||||
p: Integer;
|
||||
begin
|
||||
result:='???';
|
||||
ts:=TStringList.Create;
|
||||
try
|
||||
ts.LoadFromFile(BaseDir+'\readme_de.txt');
|
||||
if ts.Count<1 then exit;
|
||||
s:=LowerCase(ts[0]);
|
||||
p:=pos('version',s);
|
||||
if p=0 then exit;
|
||||
delete(s,1,p+7);
|
||||
p:=pos(' ',s);
|
||||
if p=0 then exit;
|
||||
result:=copy(s,1,p-1);
|
||||
except
|
||||
end;
|
||||
ts.Free;
|
||||
end;
|
||||
|
||||
procedure DumpProcesses;
|
||||
var ProcInfo: TProcInfo;
|
||||
p: Integer;
|
||||
s: string;
|
||||
begin
|
||||
for p:=0 to Processes.ProcessList.Count-1 do begin
|
||||
ProcInfo:=Processes.ProcessList[p];
|
||||
s:=Format('%d %s',[ProcInfo.PID,ProcInfo.ExePath]);
|
||||
fMain.reLog.Lines.Add(s)
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfMain.UpdateStatusAll;
|
||||
begin
|
||||
Processes.Update;
|
||||
NetStatTable.UpdateTable;
|
||||
// DumpProcesses;
|
||||
|
||||
// 1. Check Apache
|
||||
Apache.UpdateStatus;
|
||||
|
||||
// 2. Check MySql
|
||||
MySQL.UpdateStatus;
|
||||
|
||||
// 3. Check Filezilla
|
||||
FileZilla.UpdateStatus;
|
||||
|
||||
// 4. Check Mercury
|
||||
Mercury.UpdateStatus;
|
||||
|
||||
// 5. Check Mercury
|
||||
Tomcat.UpdateStatus;
|
||||
end;
|
||||
|
||||
procedure TfMain.WMQueryEndSession(var Msg: TWMQueryEndSession);
|
||||
begin
|
||||
WindowsShutdownInProgress:=true;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -1,233 +0,0 @@
|
||||
unit uMercury;
|
||||
|
||||
interface
|
||||
|
||||
uses GnuGettext, uBaseModule, SysUtils, Classes, Windows, ExtCtrls, StdCtrls, Buttons,
|
||||
uNetstatTable, uTools, uProcesses;
|
||||
|
||||
type
|
||||
tMercury = class(tBaseModule)
|
||||
OldPIDs, OldPorts: string;
|
||||
procedure ServiceInstall; override;
|
||||
procedure ServiceUnInstall; override;
|
||||
procedure Start; override;
|
||||
procedure Stop; override;
|
||||
procedure Admin; override;
|
||||
procedure UpdateStatus; override;
|
||||
procedure AddLog(Log: string; LogType: tLogType=ltDefault); reintroduce;
|
||||
constructor Create(pbbService: TBitBtn; pStatusPanel: tPanel; pPIDLabel, pPortLabel: tLabel; pStartStopButton, pAdminButton: tBitBtn);
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses uMain;
|
||||
|
||||
const
|
||||
// cServiceName = 'Mercury';
|
||||
cModuleName = 'Mercury';
|
||||
|
||||
|
||||
var hWindow: HWND;
|
||||
|
||||
{ tMercury }
|
||||
|
||||
procedure tMercury.AddLog(Log: string; LogType: tLogType);
|
||||
begin
|
||||
inherited AddLog('mercury', Log, LogType);
|
||||
end;
|
||||
|
||||
function EnumProcess(hHwnd: HWND; lParam : integer): boolean; stdcall;
|
||||
var
|
||||
pPid : DWORD;
|
||||
title, ClassName : string;
|
||||
begin
|
||||
if (hHwnd=0) then begin
|
||||
result := false;
|
||||
end else begin
|
||||
GetWindowThreadProcessId(hHwnd,pPid);
|
||||
SetLength(ClassName, 255);
|
||||
SetLength(ClassName, GetClassName(hHwnd, PChar(className), Length(className)));
|
||||
SetLength(title, 255);
|
||||
SetLength(title, GetWindowText(hHwnd, PChar(title), Length(title)));
|
||||
// fMain.Addlog(
|
||||
// 'Class Name = ' + className +
|
||||
// '; Title = ' + title +
|
||||
// '; HWND = ' + IntToStr(hHwnd) +
|
||||
// '; Pid = ' + IntToStr(pPid)
|
||||
// );
|
||||
if title='Mercury/32' then begin
|
||||
hWindow:=hHwnd;
|
||||
end;
|
||||
|
||||
Result := true;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure tMercury.Admin;
|
||||
begin
|
||||
hWindow:=0;
|
||||
EnumWindows(@EnumProcess,0);
|
||||
if hWindow<>0 then
|
||||
ShowWindow(hWindow,SW_SHOW);
|
||||
end;
|
||||
|
||||
constructor tMercury.Create;
|
||||
const Ports:array[0..6] of integer=(25,79,105,106,110,143,2224);
|
||||
var
|
||||
PortBlocker: string;
|
||||
ServerApp: string;
|
||||
p: Integer;
|
||||
// DidShowRunningWarn: Boolean;
|
||||
BlockedPorts: string;
|
||||
begin
|
||||
inherited;
|
||||
ModuleName:=cModuleName;
|
||||
isService:=false;
|
||||
// DidShowRunningWarn:=false;
|
||||
AddLog(_('Initializing module...'),ltDebug);
|
||||
ServerApp:=basedir+'MercuryMail\mercury.exe';
|
||||
if not FileExists(ServerApp) then
|
||||
AddLog(Format(_('Possible problem detected: file "%s" not found - run this program from your XAMPP root directory!'),[ServerApp]),ltError);
|
||||
|
||||
if Config.CheckDefaultPorts then begin
|
||||
AddLog(_('Checking default ports...'),ltDebug);
|
||||
for p:=Low(Ports) to High(Ports) do begin
|
||||
|
||||
PortBlocker:=NetStatTable.isPortInUse(Ports[p]);
|
||||
if (PortBlocker<>'') then begin
|
||||
if (LowerCase(PortBlocker)=LowerCase(ServerApp)) then begin
|
||||
// if NOT DidShowRunningWarn then
|
||||
// AddLog(Format(_('"%s" seems to be running on port %d?'),[ServerApp,Ports[p]]),ltError);
|
||||
// DidShowRunningWarn:=true;
|
||||
if BlockedPorts='' then BlockedPorts:=InttoStr(Ports[p])
|
||||
else BlockedPorts:=BlockedPorts+', '+InttoStr(Ports[p]);
|
||||
end else begin
|
||||
AddLog('Possible problem detected: Port '+IntToStr(Ports[p])+' in use by "'+PortBlocker+'"!',ltError);
|
||||
AddLog(Format(_('Possible problem detected: Port %d in use by "%s"!'),[Ports[p],PortBlocker]),ltError);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if BlockedPorts<>'' then
|
||||
AddLog(Format(_('"%s" seems to be running on port(s) %s?'),[ServerApp,BlockedPorts]),ltError);
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor tMercury.Destroy;
|
||||
begin
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure tMercury.ServiceInstall;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
end;
|
||||
|
||||
procedure tMercury.ServiceUnInstall;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
end;
|
||||
|
||||
procedure tMercury.Start;
|
||||
var
|
||||
App: string;
|
||||
begin
|
||||
App:=BaseDir+'MercuryMail\mercury.exe';
|
||||
AddLog(Format(_('Starting %s app...'),[cModuleName]));
|
||||
Addlog(Format(_('Executing "%s"'),[App]),ltDebug);
|
||||
RunProcess(App,SW_HIDE,false);
|
||||
AddLog('Starting Mercury...');
|
||||
end;
|
||||
|
||||
procedure tMercury.Stop;
|
||||
var
|
||||
App: string;
|
||||
begin
|
||||
AddLog('Stopping Mercury');
|
||||
Admin;
|
||||
AddLog(_('Stopping')+' '+cModuleName);
|
||||
App:=BaseDir+'apache\bin\pv.exe -f -c mercury.exe -q -e';
|
||||
Addlog(Format(_('Executing "%s"'),[App]),ltDebug);
|
||||
RunProcess(App,SW_HIDE,false);
|
||||
end;
|
||||
|
||||
procedure tMercury.UpdateStatus;
|
||||
var
|
||||
p: Integer;
|
||||
ProcInfo: TProcInfo;
|
||||
s: string;
|
||||
ports: string;
|
||||
begin
|
||||
if IsService then begin
|
||||
end else begin
|
||||
isRunning:=false;
|
||||
PIDList.Clear;
|
||||
for p:=0 to Processes.ProcessList.Count-1 do begin
|
||||
ProcInfo:=Processes.ProcessList[p];
|
||||
if (pos(BaseDir,ProcInfo.ExePath)=1) and (pos('mercury.exe',ProcInfo.Module)=1) then begin
|
||||
isRunning:=true;
|
||||
PIDList.Add(Pointer(ProcInfo.PID));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
s:='';
|
||||
// Checking processes
|
||||
for p:=0 to PIDList.Count-1 do begin
|
||||
if p=0 then s:=IntToStr(Integer(PIDList[p]))
|
||||
else s:=s+#13+IntToStr(Integer(PIDList[p]));
|
||||
end;
|
||||
if s<>OldPIDs then begin
|
||||
lPID.Caption:=s;
|
||||
OldPIDs:=s;
|
||||
end;
|
||||
// Checking netstats
|
||||
s:='';
|
||||
for p:=0 to PIDList.Count-1 do begin
|
||||
ports:=NetStatTable.GetPorts4PID(Integer(PIDList[p]));
|
||||
if ports<>'' then begin
|
||||
if s='' then s:=ports
|
||||
else s:=s+', '+ports;
|
||||
end;
|
||||
end;
|
||||
if s<>OldPorts then begin
|
||||
lPort.Caption:=s;
|
||||
OldPorts:=s;
|
||||
end;
|
||||
|
||||
|
||||
if byte(isRunning)<>oldIsRunningByte then begin
|
||||
|
||||
if oldIsRunningByte<>2 then begin
|
||||
if isRunning then s:=_('running')
|
||||
else s:=_('stopped');
|
||||
AddLog(_('Status change detected:')+' '+s);
|
||||
end;
|
||||
|
||||
oldIsRunningByte:=byte(isRunning);
|
||||
if isRunning then begin
|
||||
pStatus.Color:=cRunningColor;
|
||||
bStartStop.Caption:=_('Stop');
|
||||
bAdmin.Enabled:=true;
|
||||
end else begin
|
||||
pStatus.Color:=cStoppedColor;
|
||||
bStartStop.Caption:=_('Start');
|
||||
bAdmin.Enabled:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
if AutoStart then begin
|
||||
AutoStart:=false;
|
||||
if isRunning then begin
|
||||
AddLog(_('Autostart active: modul is already running - aborted'),ltError);
|
||||
end else begin
|
||||
AddLog(_('Autostart active: starting...'));
|
||||
Start;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -1,245 +0,0 @@
|
||||
unit uMySQL;
|
||||
|
||||
interface
|
||||
|
||||
uses GnuGettext, uBaseModule, SysUtils, Classes, Windows, ExtCtrls, StdCtrls, Buttons,
|
||||
uNetstatTable, uTools, uProcesses;
|
||||
|
||||
type
|
||||
tMySQL = class(tBaseModule)
|
||||
OldPIDs, OldPorts: string;
|
||||
procedure ServiceInstall; override;
|
||||
procedure ServiceUnInstall; override;
|
||||
procedure Start; override;
|
||||
procedure Stop; override;
|
||||
procedure Admin; override;
|
||||
procedure UpdateStatus; override;
|
||||
procedure CheckIsService; reintroduce;
|
||||
procedure AddLog(Log: string; LogType: tLogType=ltDefault); reintroduce;
|
||||
constructor Create(pbbService: TBitBtn; pStatusPanel: tPanel; pPIDLabel, pPortLabel: tLabel; pStartStopButton, pAdminButton: tBitBtn);
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
const cServiceName = 'mysql';
|
||||
cModuleName = 'mysql';
|
||||
|
||||
{ tMySQL }
|
||||
|
||||
procedure tMySQL.AddLog(Log: string; LogType: tLogType);
|
||||
begin
|
||||
inherited AddLog('mysql', Log, LogType);
|
||||
end;
|
||||
|
||||
procedure tMySQL.Admin;
|
||||
var
|
||||
App, Param: string;
|
||||
begin
|
||||
Param:='http://localhost/phpmyadmin/';
|
||||
if Config.BrowserApp<>'' then begin
|
||||
App:=Config.BrowserApp;
|
||||
ExecuteFile(App,Param,'',SW_SHOW);
|
||||
Addlog(Format(_('Executing "%s" "%s"'),[App,Param]),ltDebug);
|
||||
end else begin
|
||||
ExecuteFile(Param,'','',SW_SHOW);
|
||||
Addlog(Format(_('Executing "%s"'),[Param]),ltDebug);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure tMySQL.CheckIsService;
|
||||
var
|
||||
s: string;
|
||||
begin
|
||||
inherited CheckIsService(cServiceName);
|
||||
if isService then s:=_('Service installed')
|
||||
else s:=_('Service not installed');
|
||||
AddLog(Format(_('Checking for service (name="%s"): %s'),[cServiceName,s]),ltDebug);
|
||||
end;
|
||||
|
||||
constructor tMySQL.Create;
|
||||
var
|
||||
PortBlocker: string;
|
||||
ServerApp: string;
|
||||
ServerPort: Integer;
|
||||
begin
|
||||
inherited;
|
||||
ModuleName:=cModuleName;
|
||||
AddLog(_('Initializing module...'),ltDebug);
|
||||
ServerApp:=basedir+'mysql\bin\mysqld.exe';
|
||||
if not FileExists(ServerApp) then
|
||||
AddLog(Format(_('Possible problem detected: file "%s" not found - run this program from your XAMPP root directory!'),[ServerApp]),ltError);
|
||||
|
||||
CheckIsService;
|
||||
|
||||
if Config.CheckDefaultPorts then begin
|
||||
ServerPort:=3306;
|
||||
AddLog(_('Checking default ports...'),ltDebug);
|
||||
PortBlocker:=NetStatTable.isPortInUse(ServerPort);
|
||||
if (PortBlocker<>'') then begin
|
||||
if (LowerCase(PortBlocker)=LowerCase(ServerApp)) then begin
|
||||
AddLog(Format(_('"%s" seems to be running on port %d?'),[ServerApp,ServerPort]),ltError);
|
||||
end else begin
|
||||
AddLog(Format(_('Possible problem detected: Port %d in use by "%s"!'),[ServerPort,PortBlocker]),ltError);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor tMySQL.Destroy;
|
||||
begin
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure tMySQL.ServiceInstall;
|
||||
var
|
||||
App, Param: string;
|
||||
RC: Integer;
|
||||
begin
|
||||
App:=BaseDir+'\mysql\bin\mysqld.exe';
|
||||
Param:='--install mysql --defaults-file='+BaseDir+'\mysql\bin\my.ini';
|
||||
AddLog(_('Installing service...'));
|
||||
Addlog(Format(_('Executing %s %s'),[App,Param]),ltDebug);
|
||||
RC:=RunAsAdmin(App,Param,SW_HIDE);
|
||||
if RC=0 then AddLog(Format(_('Return code: %d'),[RC]),ltDebug)
|
||||
else AddLog(Format(_('There may be an error, return code: %d - %s'),[RC,SystemErrorMessage(RC)]),ltError);
|
||||
end;
|
||||
|
||||
procedure tMySQL.ServiceUnInstall;
|
||||
var
|
||||
App, Param: string;
|
||||
RC: Cardinal;
|
||||
begin
|
||||
App:=BaseDir+'\mysql\bin\mysqld.exe';
|
||||
Param:='--remove mysql';
|
||||
AddLog('Uninstalling service...');
|
||||
Addlog(Format(_('Executing %s %s'),[App,Param]),ltDebug);
|
||||
RC:=RunAsAdmin(App,Param,SW_HIDE);
|
||||
if RC=0 then AddLog(Format(_('Return code: %d'),[RC]),ltDebug)
|
||||
else AddLog(Format(_('There may be an error, return code: %d - %s'),[RC,SystemErrorMessage(RC)]),ltError);
|
||||
end;
|
||||
|
||||
|
||||
procedure tMySQL.Start;
|
||||
var
|
||||
App: string;
|
||||
RC: Cardinal;
|
||||
begin
|
||||
if isService then begin
|
||||
AddLog(Format(_('Starting %s service...'),[cModuleName]));
|
||||
App:=Format('start "%s"',[cServiceName]);
|
||||
Addlog(Format(_('Executing "%s"'),['net '+App]),ltDebug);
|
||||
RC:=RunAsAdmin('net',App,SW_HIDE);
|
||||
if RC=0 then AddLog(Format(_('Return code: %d'),[RC]),ltDebug)
|
||||
else AddLog(Format(_('There may be an error, return code: %d - %s'),[RC,SystemErrorMessage(RC)]),ltError);
|
||||
end else begin
|
||||
AddLog(Format(_('Starting %s app...'),[cModuleName]));
|
||||
App:=BaseDir+'mysql\bin\mysqld.exe --defaults-file='+BaseDir+'mysql\bin\my.ini --standalone';
|
||||
Addlog(Format(_('Executing "%s"'),[App]),ltDebug);
|
||||
RunProcess(App,SW_HIDE,false);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure tMySQL.Stop;
|
||||
var
|
||||
i, pPID: Integer;
|
||||
App: string;
|
||||
RC: Cardinal;
|
||||
begin
|
||||
if isService then begin
|
||||
AddLog(Format(_('Stopping %s service...'),[cModuleName]));
|
||||
App:=Format('stop "%s"',[cServiceName]);
|
||||
Addlog(Format(_('Executing "%s"'),['net '+App]),ltDebug);
|
||||
RC:=RunAsAdmin('net',App,SW_HIDE);
|
||||
if RC=0 then AddLog(Format(_('Return code: %d'),[RC]),ltDebug)
|
||||
else AddLog(Format(_('There may be an error, return code: %d - %s'),[RC,SystemErrorMessage(RC)]),ltError);
|
||||
end else begin
|
||||
if PIDList.Count>0 then begin
|
||||
for i:=0 to PIDList.Count-1 do begin
|
||||
pPID:=Integer(PIDList[i]);
|
||||
AddLog(_('Stopping')+' '+cModuleName+' '+Format('(PID: %d)',[pPID]));
|
||||
App:=Format(BaseDir+'apache\bin\pv.exe -f -k -q -i %d',[pPID]);
|
||||
Addlog(Format(_('Executing "%s"'),[App]),ltDebug);
|
||||
RunProcess(App,SW_HIDE,false);
|
||||
end;
|
||||
end else begin
|
||||
AddLog(_('No PIDs found?!'));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure tMySQL.UpdateStatus;
|
||||
var
|
||||
p: Integer;
|
||||
ProcInfo: TProcInfo;
|
||||
s: string;
|
||||
ports: string;
|
||||
begin
|
||||
isRunning:=false;
|
||||
PIDList.Clear;
|
||||
for p:=0 to Processes.ProcessList.Count-1 do begin
|
||||
ProcInfo:=Processes.ProcessList[p];
|
||||
if { (pos(BaseDir,ProcInfo.ExePath)=1) and } (pos('mysqld.exe',ProcInfo.Module)=1) then begin
|
||||
isRunning:=true;
|
||||
PIDList.Add(Pointer(ProcInfo.PID));
|
||||
end;
|
||||
end;
|
||||
|
||||
// Checking processes
|
||||
s:='';
|
||||
for p:=0 to PIDList.Count-1 do begin
|
||||
if p=0 then s:=IntToStr(Integer(PIDList[p]))
|
||||
else s:=s+#13+IntToStr(Integer(PIDList[p]));
|
||||
end;
|
||||
if s<>OldPIDs then begin
|
||||
lPID.Caption:=s;
|
||||
OldPIDs:=s;
|
||||
end;
|
||||
|
||||
// Checking netstats
|
||||
s:='';
|
||||
for p:=0 to PIDList.Count-1 do begin
|
||||
ports:=NetStatTable.GetPorts4PID(Integer(PIDList[p]));
|
||||
if ports<>'' then begin
|
||||
if s='' then s:=ports
|
||||
else s:=s+', '+ports;
|
||||
end;
|
||||
end;
|
||||
if s<>OldPorts then begin
|
||||
lPort.Caption:=s;
|
||||
OldPorts:=s;
|
||||
end;
|
||||
|
||||
if byte(isRunning)<>oldIsRunningByte then begin
|
||||
|
||||
if oldIsRunningByte<>2 then begin
|
||||
if isRunning then s:=_('running')
|
||||
else s:=_('stopped');
|
||||
AddLog(_('Status change detected:')+' '+s);
|
||||
end;
|
||||
|
||||
oldIsRunningByte:=byte(isRunning);
|
||||
if isRunning then begin
|
||||
pStatus.Color:=cRunningColor;
|
||||
bStartStop.Caption:=_('Stop');
|
||||
bAdmin.Enabled:=true;
|
||||
end else begin
|
||||
pStatus.Color:=cStoppedColor;
|
||||
bStartStop.Caption:=_('Start');
|
||||
bAdmin.Enabled:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
if AutoStart then begin
|
||||
AutoStart:=false;
|
||||
if isRunning then begin
|
||||
AddLog(_('Autostart active: modul is already running - aborted'),ltError);
|
||||
end else begin
|
||||
AddLog(_('Autostart active: starting...'));
|
||||
Start;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -1,134 +0,0 @@
|
||||
object fNetstat: TfNetstat
|
||||
Left = 394
|
||||
Top = 196
|
||||
BorderStyle = bsSizeToolWin
|
||||
Caption = 'Netstat - TCP Listening sockets'
|
||||
ClientHeight = 580
|
||||
ClientWidth = 632
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
DesignSize = (
|
||||
632
|
||||
580)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object ListView1: TListView
|
||||
Left = 4
|
||||
Top = 28
|
||||
Width = 624
|
||||
Height = 529
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
Columns = <
|
||||
item
|
||||
Caption = 'Address'
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Caption = 'Port'
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Caption = 'PID'
|
||||
end
|
||||
item
|
||||
Caption = 'Name'
|
||||
Width = 400
|
||||
end>
|
||||
DoubleBuffered = True
|
||||
OwnerData = True
|
||||
ReadOnly = True
|
||||
RowSelect = True
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 0
|
||||
ViewStyle = vsReport
|
||||
OnColumnClick = ListView1ColumnClick
|
||||
OnCustomDrawItem = ListView1CustomDrawItem
|
||||
OnData = ListView1Data
|
||||
end
|
||||
object BitBtn1: TBitBtn
|
||||
Left = 549
|
||||
Top = 4
|
||||
Width = 75
|
||||
Height = 21
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Refresh'
|
||||
DoubleBuffered = True
|
||||
ModalResult = 4
|
||||
NumGlyphs = 2
|
||||
ParentDoubleBuffered = False
|
||||
TabOrder = 1
|
||||
OnClick = BitBtn1Click
|
||||
end
|
||||
object StatusBar1: TStatusBar
|
||||
Left = 0
|
||||
Top = 561
|
||||
Width = 632
|
||||
Height = 19
|
||||
Panels = <>
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 4
|
||||
Top = 4
|
||||
Width = 80
|
||||
Height = 18
|
||||
Caption = 'Active socket'
|
||||
Color = clWindow
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentBackground = False
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 176
|
||||
Top = 4
|
||||
Width = 80
|
||||
Height = 18
|
||||
Caption = 'Old socket'
|
||||
Color = clMaroon
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWhite
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentBackground = False
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 90
|
||||
Top = 4
|
||||
Width = 80
|
||||
Height = 18
|
||||
Caption = 'New socket'
|
||||
Color = clLime
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentBackground = False
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
end
|
||||
object TimerUpdate: TTimer
|
||||
Interval = 500
|
||||
OnTimer = TimerUpdateTimer
|
||||
Left = 20
|
||||
Top = 84
|
||||
end
|
||||
end
|
||||
@@ -1,255 +0,0 @@
|
||||
unit uNetstat;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
GnuGettext, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ComCtrls, StdCtrls, Buttons, uNetstatTable, uTools, ExtCtrls, uProcesses;
|
||||
|
||||
type
|
||||
tNetState = (nsActive, nsOld, nsNew, nsUpdatingActive, nsUpdatingNew);
|
||||
tNetEntry = class
|
||||
AddrStr: string;
|
||||
AddrR: Cardinal;
|
||||
Port: integer;
|
||||
PID: integer;
|
||||
ProcName: string;
|
||||
State:tNetState;
|
||||
end;
|
||||
|
||||
TfNetstat = class(TForm)
|
||||
ListView1: TListView;
|
||||
BitBtn1: TBitBtn;
|
||||
StatusBar1: TStatusBar;
|
||||
TimerUpdate: TTimer;
|
||||
Panel1: TPanel;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
procedure BitBtn1Click(Sender: TObject);
|
||||
procedure ListView1ColumnClick(Sender: TObject; Column: TListColumn);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TimerUpdateTimer(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure ListView1Data(Sender: TObject; Item: TListItem);
|
||||
procedure ListView1CustomDrawItem(Sender: TCustomListView; Item: TListItem;
|
||||
State: TCustomDrawState; var DefaultDraw: Boolean);
|
||||
procedure cbShowCSRSSClick(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
NetEntryList: tList;
|
||||
procedure ClearnetEntryList;
|
||||
function FindNetEntry(AddrR: Cardinal; Port,PID: integer; ProcName: string): tNetEntry;
|
||||
public
|
||||
procedure RefreshTable(ResetStates: boolean);
|
||||
end;
|
||||
|
||||
var
|
||||
fNetstat: TfNetstat;
|
||||
|
||||
implementation
|
||||
|
||||
uses uMain;
|
||||
|
||||
const cModuleName = 'netstat';
|
||||
|
||||
var LastSortID: integer;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfNetstat.BitBtn1Click(Sender: TObject);
|
||||
begin
|
||||
RefreshTable(true);
|
||||
end;
|
||||
|
||||
|
||||
procedure TfNetstat.cbShowCSRSSClick(Sender: TObject);
|
||||
begin
|
||||
RefreshTable(true);
|
||||
end;
|
||||
|
||||
procedure TfNetstat.ClearnetEntryList;
|
||||
var i:integer;
|
||||
NE: tNetEntry;
|
||||
begin
|
||||
ListView1.Items.Count:=0;
|
||||
for i:=0 to NetEntryList.Count-1 do begin
|
||||
NE:=NetEntryList[i];
|
||||
NE.Free;
|
||||
end;
|
||||
NetEntryList.Clear;
|
||||
end;
|
||||
|
||||
function TfNetstat.FindNetEntry(AddrR: Cardinal; Port, PID: integer; ProcName: string): tNetEntry;
|
||||
var i:integer;
|
||||
NE: tNetEntry;
|
||||
begin
|
||||
for i:=0 to NetEntryList.Count-1 do begin
|
||||
NE:=NetEntryList[i];
|
||||
if (NE.AddrR=AddrR) and (NE.Port=Port) and (NE.PID=PID) and (NE.ProcName=ProcName) then begin
|
||||
result:=NE;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
result:=nil;
|
||||
end;
|
||||
|
||||
procedure TfNetstat.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
ClearnetEntryList;
|
||||
end;
|
||||
|
||||
procedure TfNetstat.FormCreate(Sender: TObject);
|
||||
begin
|
||||
TranslateComponent(Self);
|
||||
NetEntryList:=TList.Create;
|
||||
LastSortID:=0;
|
||||
end;
|
||||
|
||||
procedure TfNetstat.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
NetEntryList.Free;
|
||||
end;
|
||||
|
||||
procedure TfNetstat.FormShow(Sender: TObject);
|
||||
begin
|
||||
TimerUpdate.Enabled:=true;
|
||||
end;
|
||||
|
||||
function smallnumber(i: Int64):integer;
|
||||
begin
|
||||
if i>0 then result:=1
|
||||
else if i<0 then result:=-1
|
||||
else result:=0;
|
||||
end;
|
||||
|
||||
function CustomSortProc(Item1, Item2: Pointer): integer; // stdcall;
|
||||
var NE1, NE2: tNetEntry;
|
||||
begin
|
||||
NE1:=Item1;
|
||||
NE2:=Item2;
|
||||
|
||||
case LastSortID of
|
||||
0: Result := smallnumber(Int64(NE1.AddrR)-Int64(NE2.AddrR))*4+smallnumber(NE1.Port-NE2.Port)*2+smallnumber(NE1.PID-NE2.PID)*1;
|
||||
1: Result := smallnumber(Int64(NE1.AddrR)-Int64(NE2.AddrR))*2+smallnumber(NE1.Port-NE2.Port)*4+smallnumber(NE1.PID-NE2.PID)*1;
|
||||
2: Result := smallnumber(Int64(NE1.AddrR)-Int64(NE2.AddrR))*2+smallnumber(NE1.Port-NE2.Port)*1+smallnumber(NE1.PID-NE2.PID)*4;
|
||||
3: Result := smallnumber(CompareText(NE1.ProcName, NE2.ProcName))*8+smallnumber(Int64(NE1.AddrR)-Int64(NE2.AddrR))*4+smallnumber(NE1.Port-NE2.Port)*2+smallnumber(NE1.PID-NE2.PID)*1;
|
||||
else Result:=0;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfNetstat.ListView1ColumnClick(Sender: TObject; Column: TListColumn);
|
||||
begin
|
||||
LastSortID:=Column.Index;
|
||||
NetEntryList.Sort(CustomSortProc);
|
||||
ListView1.Refresh;
|
||||
end;
|
||||
|
||||
procedure TfNetstat.ListView1CustomDrawItem(Sender: TCustomListView;
|
||||
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
|
||||
var NE: tNetEntry;
|
||||
begin
|
||||
NE:=NetEntryList[Item.Index];
|
||||
|
||||
case NE.State of
|
||||
nsActive: begin ListView1.Canvas.Font.Color := clWindowText; ListView1.Canvas.Brush.Color:=clWindow; end;
|
||||
// nsOld: begin ListView1.Canvas.Font.Color := clGrayText; ListView1.Canvas.Brush.Color:=clWindow; end;
|
||||
nsOld: begin ListView1.Canvas.Font.Color := clWhite; ListView1.Canvas.Brush.Color:=clMaroon; end;
|
||||
nsNew: begin ListView1.Canvas.Font.Color := clWindowText; ListView1.Canvas.Brush.Color:=clLime; end;
|
||||
nsUpdatingActive, nsUpdatingNew: begin ListView1.Canvas.Font.Color := clGrayText; ListView1.Canvas.Brush.Color:=clBlue; end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfNetstat.ListView1Data(Sender: TObject; Item: TListItem);
|
||||
var NE: tNetEntry;
|
||||
begin
|
||||
NE:=NetEntryList[Item.Index];
|
||||
Item.Caption:=NE.AddrStr;
|
||||
Item.SubItems.Add(IntToStr(NE.Port));
|
||||
Item.SubItems.Add(IntToStr(NE.PID));
|
||||
Item.SubItems.Add(NE.ProcName);
|
||||
end;
|
||||
|
||||
procedure TfNetstat.RefreshTable(ResetStates: boolean);
|
||||
var
|
||||
i: integer;
|
||||
NE: tNetEntry;
|
||||
ProcInfo: tProcInfo;
|
||||
PID, Addr, AddrR, Port: Cardinal;
|
||||
PIDName: string;
|
||||
AddrStr: string;
|
||||
begin
|
||||
NetStatTable.UpdateTable;
|
||||
|
||||
ListView1.Items.BeginUpdate;
|
||||
|
||||
if ResetStates then ClearnetEntryList;
|
||||
|
||||
for i:=0 to NetEntryList.Count-1 do begin
|
||||
NE:=NetEntryList[i];
|
||||
if NE.State=nsActive then NE.State:=nsUpdatingActive;
|
||||
if NE.State=nsNew then NE.State:=nsUpdatingNew;
|
||||
end;
|
||||
|
||||
for i:=0 to NetStatTable.pTcpTable.dwNumEntries-1 do begin
|
||||
if NetStatTable.pTcpTable.table[i].dwOwningPid<>0 then begin
|
||||
PID:=NetStatTable.pTcpTable.table[i].dwOwningPid;
|
||||
Addr:=NetStatTable.pTcpTable.table[i].dwLocalAddr;
|
||||
AddrR:=
|
||||
((Addr and $FF000000) shr 24) or
|
||||
((Addr and $00FF0000) shr 08) or
|
||||
((Addr and $0000FF00) shl 08) or
|
||||
((Addr and $000000FF) shl 24);
|
||||
|
||||
AddrStr:=Cardinal2IP(Addr);
|
||||
Port:=NetStatTable.pTcpTable.table[i].dwLocalPort;
|
||||
ProcInfo:=Processes.GetProcInfo(PID);
|
||||
if ProcInfo<>nil then begin
|
||||
PIDName:=ProcInfo.ExePath;
|
||||
NE:=FindNetEntry(AddrR, Port, PID, PIDName);
|
||||
if NE=nil then begin
|
||||
NE:=tNetEntry.Create;
|
||||
NE.AddrStr:=AddrStr;
|
||||
NE.AddrR:=AddrR;
|
||||
NE.Port:=Port;
|
||||
NE.PID:=PID;
|
||||
NE.ProcName:=PIDName;
|
||||
NE.State:=nsNew;
|
||||
NetEntryList.Add(NE);
|
||||
ListView1.Items.Count:=ListView1.Items.Count+1;
|
||||
|
||||
fMain.AddLog(cModuleName,Format(_('New listening socket: %s:%d'),[NE.AddrStr,NE.Port]),ltDebug);
|
||||
|
||||
end else begin
|
||||
if NE.State=nsUpdatingActive then NE.State:=nsActive;
|
||||
if NE.State=nsUpdatingNew then NE.State:=nsNew;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
for i:=0 to NetEntryList.Count-1 do begin
|
||||
NE:=NetEntryList[i];
|
||||
if ResetStates then NE.State:=nsActive;
|
||||
if (NE.State=nsUpdatingActive) or (NE.State=nsUpdatingNew) then begin
|
||||
NE.State:=nsOld;
|
||||
fMain.AddLog(cModuleName,Format(_('Listening socket closed: %s:%d'),[NE.AddrStr,NE.Port]),ltDebug);
|
||||
end;
|
||||
end;
|
||||
|
||||
NetEntryList.Sort(CustomSortProc);
|
||||
ListView1.Items.EndUpdate;
|
||||
ListView1.Refresh;
|
||||
end;
|
||||
|
||||
procedure TfNetstat.TimerUpdateTimer(Sender: TObject);
|
||||
begin
|
||||
if Visible then begin
|
||||
RefreshTable(false);
|
||||
end else begin
|
||||
TimerUpdate.Enabled:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -1,192 +0,0 @@
|
||||
unit uNetstatTable;
|
||||
|
||||
interface
|
||||
|
||||
uses GnuGettext, SysUtils, Classes, Windows, Dialogs, uProcesses;
|
||||
|
||||
const
|
||||
MIB_TCP_STATE_LISTEN = 2;
|
||||
|
||||
type
|
||||
MIB_TCPROW_OWNER_PID = packed record
|
||||
dwState: DWORD;
|
||||
dwLocalAddr: DWORD;
|
||||
dwLocalPort: DWORD;
|
||||
dwRemoteAddr: DWORD;
|
||||
dwRemotePort: DWORD;
|
||||
dwOwningPid: DWORD;
|
||||
end;
|
||||
// PMIB_TCPROW_OWNER_PID = ^MIB_TCPROW_OWNER_PID;
|
||||
|
||||
MIB_TCPTABLE_OWNER_PID = packed record
|
||||
dwNumEntries: DWord;
|
||||
table: array [0..99999] of MIB_TCPROW_OWNER_PID ;
|
||||
end;
|
||||
PMIB_TCPTABLE_OWNER_PID = ^MIB_TCPTABLE_OWNER_PID;
|
||||
|
||||
|
||||
tNetstatTable = class
|
||||
private
|
||||
hLibModule: THandle;
|
||||
DLLProcPointer: Pointer;
|
||||
procedure LoadExIpHelperProcedures;
|
||||
procedure UnLoadExIpHelperProcedures;
|
||||
public
|
||||
pTcpTable: PMIB_TCPTABLE_OWNER_PID;
|
||||
procedure UpdateTable;
|
||||
function GetPorts4PID(pid: integer):string;
|
||||
function GetPortCount4PID(pid: integer):integer;
|
||||
function isPortInUse(port: integer): string;
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
NetStatTable: tNetstatTable;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses uMain, uTools;
|
||||
|
||||
const
|
||||
TCP_TABLE_OWNER_PID_ALL = 5;
|
||||
AF_INET = 2;
|
||||
|
||||
type
|
||||
TCP_TABLE_CLASS = Integer;
|
||||
ULONG = Integer;
|
||||
TGetExtendedTcpTable = function(pTcpTable: Pointer; dwSize: PDWORD; bOrder: BOOL; lAf: ULONG; TableClass: TCP_TABLE_CLASS; Reserved: ULONG): DWord;stdcall;
|
||||
|
||||
|
||||
{ tNetStatTable }
|
||||
|
||||
constructor tNetstatTable.Create;
|
||||
begin
|
||||
DLLProcPointer:=nil;
|
||||
hLibModule:=0;
|
||||
pTCPTable:=nil;
|
||||
try
|
||||
LoadExIpHelperProcedures;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor tNetstatTable.Destroy;
|
||||
begin
|
||||
try
|
||||
UnLoadExIpHelperProcedures;
|
||||
except
|
||||
end;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function tNetstatTable.GetPortCount4PID(pid: integer): integer;
|
||||
var i: integer;
|
||||
port: string;
|
||||
begin
|
||||
result:=0;
|
||||
for i:=0 to NetStatTable.pTcpTable.dwNumEntries-1 do
|
||||
if NetStatTable.pTcpTable.table[i].dwOwningPid=Cardinal(pid) then
|
||||
result:=result+1;
|
||||
end;
|
||||
|
||||
function tNetstatTable.GetPorts4PID(pid: integer): string;
|
||||
var i: integer;
|
||||
port: string;
|
||||
begin
|
||||
result:='';
|
||||
for i:=0 to NetStatTable.pTcpTable.dwNumEntries-1 do begin
|
||||
if NetStatTable.pTcpTable.table[i].dwOwningPid=Cardinal(pid) then begin
|
||||
port:=IntToStr(NetStatTable.pTcpTable.table[i].dwLocalPort);
|
||||
if result='' then result:=port
|
||||
else result:=result+', '+port;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function tNetstatTable.isPortInUse(port: integer): string;
|
||||
var i: integer;
|
||||
ProcInfo: TProcInfo;
|
||||
pid: Cardinal;
|
||||
begin
|
||||
result:='';
|
||||
for i:=0 to NetStatTable.pTcpTable.dwNumEntries-1 do begin
|
||||
if NetStatTable.pTcpTable.table[i].dwLocalPort=Cardinal(port) then begin
|
||||
pid:=NetStatTable.pTcpTable.table[i].dwOwningPid;
|
||||
ProcInfo:=Processes.GetProcInfo(pid);
|
||||
if ProcInfo<>nil then result:=ProcInfo.ExePath
|
||||
else result:=_('unknown program');
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure tNetstatTable.LoadExIpHelperProcedures;
|
||||
begin
|
||||
hLibModule:=LoadLibrary('iphlpapi.dll');
|
||||
if hLibModule=0 then exit;
|
||||
DLLProcPointer:=GetProcAddress(hLibModule,'GetExtendedTcpTable');
|
||||
if not Assigned(DLLProcPointer) then begin
|
||||
ShowMessage(IntToStr(GetLastError));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure tNetstatTable.UnLoadExIpHelperProcedures;
|
||||
begin
|
||||
if hLibModule>HINSTANCE_ERROR then
|
||||
FreeLibrary(hLibModule);
|
||||
end;
|
||||
|
||||
procedure tNetstatTable.UpdateTable;
|
||||
var
|
||||
dwSize: DWord;
|
||||
Res: Dword;
|
||||
GetExtendedTcpTable: TGetExtendedTcpTable;
|
||||
i: integer;
|
||||
begin
|
||||
if pTcpTable<>nil then begin
|
||||
FreeMem(pTcpTable);
|
||||
pTCPTable:=nil;
|
||||
end;
|
||||
|
||||
if (DLLProcPointer=nil) or (hLibModule<HINSTANCE_ERROR) then begin
|
||||
exit;
|
||||
end;
|
||||
|
||||
GetExtendedTcpTable:=DLLProcPointer;
|
||||
Try
|
||||
dwSize:=0;
|
||||
Res := GetExtendedTcpTable(pTcpTable, @dwSize, False, AF_INET, TCP_TABLE_OWNER_PID_ALL, 0);
|
||||
If (Res = ERROR_INSUFFICIENT_BUFFER) Then Begin
|
||||
GetMem(pTCPTable,dwSize); // das API hat die "gew<65>nschte" Gr<47>sse gesetzt
|
||||
Res := GetExtendedTcpTable(pTcpTable, @dwSize, False, AF_INET, TCP_TABLE_OWNER_PID_ALL, 0);
|
||||
end;
|
||||
If (Res = NO_ERROR) then begin
|
||||
for i := 0 to pTcpTable.dwNumEntries-1 do begin
|
||||
pTcpTable.table[i].dwLocalPort:=
|
||||
((pTcpTable.table[i].dwLocalPort and $FF00) shr 8) or
|
||||
((pTcpTable.table[i].dwLocalPort and $00FF) shl 8);
|
||||
pTcpTable.table[i].dwRemotePort:=
|
||||
((pTcpTable.table[i].dwRemotePort and $FF00) shr 8) or
|
||||
((pTcpTable.table[i].dwRemotePort and $00FF) shl 8);
|
||||
end;
|
||||
|
||||
end else begin
|
||||
raiseLastOSError(); // Error-Handling
|
||||
end;
|
||||
Finally
|
||||
// If (pTcpTable <> Nil) Then FreeMem(pTcpTable);
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
NetStatTable:=tNetstatTable.Create;
|
||||
|
||||
finalization
|
||||
|
||||
NetStatTable.Free;
|
||||
|
||||
end.
|
||||
@@ -1,147 +0,0 @@
|
||||
unit uProcesses;
|
||||
|
||||
interface
|
||||
|
||||
uses GnuGettext, TlHelp32, uTools, Classes, SysUtils, Windows;
|
||||
|
||||
type
|
||||
TProcInfo = class
|
||||
PID: integer;
|
||||
Module, ExePath: String;
|
||||
CanDelete: boolean;
|
||||
end;
|
||||
|
||||
tProcesses = class
|
||||
public
|
||||
ProcessList: tList;
|
||||
function GetProcInfo(PID: integer):TProcInfo;
|
||||
procedure Update;
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
Processes: tProcesses;
|
||||
|
||||
implementation
|
||||
|
||||
uses uMain;
|
||||
|
||||
const cModuleName = 'procs';
|
||||
|
||||
{ tProcessList }
|
||||
|
||||
constructor tProcesses.Create;
|
||||
begin
|
||||
ProcessList:=TList.Create;
|
||||
end;
|
||||
|
||||
destructor tProcesses.Destroy;
|
||||
var
|
||||
ProcInfo: TProcInfo;
|
||||
p: Integer;
|
||||
begin
|
||||
for p:=0 to ProcessList.Count-1 do begin
|
||||
ProcInfo:=ProcessList[p];
|
||||
FreeAndNil(ProcInfo);
|
||||
end;
|
||||
FreeAndNil(ProcessList);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function tProcesses.GetProcInfo(PID: integer): TProcInfo;
|
||||
var
|
||||
ProcInfo: TProcInfo;
|
||||
p: Integer;
|
||||
begin
|
||||
for p:=0 to ProcessList.Count-1 do begin
|
||||
ProcInfo:=ProcessList[p];
|
||||
if ProcInfo.PID=pid then begin
|
||||
result:=ProcInfo;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
procedure tProcesses.Update;
|
||||
var hProcessSnap: tHandle;
|
||||
TProcessEntry: TProcessEntry32;
|
||||
ProcInfo: TProcInfo;
|
||||
hModuleSnap: tHandle;
|
||||
ModuleEntry: MODULEENTRY32;
|
||||
i: Integer;
|
||||
PID: Cardinal;
|
||||
begin
|
||||
// fMain.AddLog('processes', 'Checking processes...', ltDebugDetails);
|
||||
|
||||
for i:=0 to ProcessList.Count-1 do begin
|
||||
ProcInfo:=ProcessList[i];
|
||||
ProcInfo.CanDelete:=true;
|
||||
// FreeAndNil(ProcInfo);
|
||||
end;
|
||||
// ProcessList.Clear;
|
||||
|
||||
hProcessSnap := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
||||
if (hProcessSnap = INVALID_HANDLE_VALUE) then exit;
|
||||
TProcessEntry.dwSize := SizeOf(TProcessEntry);
|
||||
if (Process32First(hProcessSnap, TProcessEntry)) then begin
|
||||
repeat
|
||||
PID:=TProcessEntry.th32ProcessID;
|
||||
ProcInfo:=GetProcInfo(PID);
|
||||
if ProcInfo<>nil then begin
|
||||
ProcInfo.CanDelete:=false
|
||||
end else begin
|
||||
// hModuleSnap := INVALID_HANDLE_VALUE;
|
||||
hModuleSnap := CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, TProcessEntry.th32ProcessID );
|
||||
if (hModuleSnap <> INVALID_HANDLE_VALUE) then begin
|
||||
ModuleEntry.dwSize := sizeof(MODULEENTRY32);
|
||||
if (Module32First(hModuleSnap, &ModuleEntry)) then begin
|
||||
ProcInfo:=TProcInfo.Create;
|
||||
ProcInfo.Module:=LowerCase(ModuleEntry.szModule);
|
||||
ProcInfo.ExePath:=LowerCase(ModuleEntry.szExePath);
|
||||
ProcInfo.PID:=TProcessEntry.th32ProcessID;
|
||||
ProcInfo.CanDelete:=false;
|
||||
ProcessList.Add(ProcInfo);
|
||||
end else begin
|
||||
ProcInfo:=nil;
|
||||
end;
|
||||
end else begin
|
||||
ProcInfo:=TProcInfo.Create;
|
||||
ProcInfo.Module:=LowerCase(TProcessEntry.szExeFile);
|
||||
ProcInfo.ExePath:=LowerCase(TProcessEntry.szExeFile);
|
||||
ProcInfo.PID:=TProcessEntry.th32ProcessID;
|
||||
ProcInfo.CanDelete:=false;
|
||||
ProcessList.Add(ProcInfo);
|
||||
end;
|
||||
if ProcInfo<>nil then
|
||||
fMain.AddLog(cModuleName,Format(_('Creating PID-entry %d: %s'),[ProcInfo.PID,ProcInfo.ExePath]),ltDebugDetails);
|
||||
CloseHandle(hModuleSnap);
|
||||
end;
|
||||
until not (Process32Next(hProcessSnap, TProcessEntry));
|
||||
end;
|
||||
CloseHandle(hProcessSnap);
|
||||
|
||||
i:=0;
|
||||
while i<ProcessList.Count do begin
|
||||
ProcInfo:=ProcessList[i];
|
||||
if ProcInfo.CanDelete then begin
|
||||
fMain.AddLog(cModuleName,Format(_('Deleting PID-entry %d: %s'),[ProcInfo.PID,ProcInfo.ExePath]),ltDebugDetails);
|
||||
FreeAndNil(ProcInfo);
|
||||
ProcessList.Delete(i);
|
||||
end else begin
|
||||
inc(i);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
Processes:=tProcesses.Create;
|
||||
|
||||
finalization
|
||||
|
||||
Processes.Free;
|
||||
|
||||
end.
|
||||
@@ -1,78 +0,0 @@
|
||||
unit uServices;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
GnuGettext, WinSvc, Windows, uTools;
|
||||
|
||||
type
|
||||
TServiceStatus=(ssError, ssNotFound, ssUnknown, ssRunning, ssStopped);
|
||||
TStartStopService=(ssStart, ssStop);
|
||||
|
||||
|
||||
function GetServiceStatus(name: string):TServiceStatus;
|
||||
//function StartStopService(name: string; StartStopService: TStartStopService):boolean;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses uMain;
|
||||
|
||||
function GetServiceStatus(name: string):TServiceStatus;
|
||||
var
|
||||
hSCM: THandle;
|
||||
hService: THandle;
|
||||
ServiceStatus: _SERVICE_STATUS;
|
||||
begin
|
||||
hSCM:=OpenSCManager(nil,nil,SC_MANAGER_CONNECT);
|
||||
if (hSCM = 0) then begin
|
||||
result:=ssError;
|
||||
exit;
|
||||
end;
|
||||
|
||||
hService:=OpenService(hSCM, @name[1], SERVICE_QUERY_STATUS);;
|
||||
if (hService = 0) then begin
|
||||
CloseServiceHandle(hSCM);
|
||||
result:=ssNotFound;
|
||||
exit;
|
||||
end;
|
||||
|
||||
// The SERVICE exists and we have access
|
||||
|
||||
if (QueryServiceStatus(hService, ServiceStatus)) then begin
|
||||
result := ssUnknown;
|
||||
if (ServiceStatus.dwCurrentState = SERVICE_RUNNING) then result := ssRunning;
|
||||
if (ServiceStatus.dwCurrentState = SERVICE_STOPPED) then result := ssStopped;
|
||||
end else begin
|
||||
result := ssError;
|
||||
end;
|
||||
|
||||
CloseServiceHandle(hService);
|
||||
CloseServiceHandle(hSCM);
|
||||
end;
|
||||
|
||||
function ServiceDelete(name: string): boolean;
|
||||
var
|
||||
hSCM: THandle;
|
||||
hService: THandle;
|
||||
begin
|
||||
result:=false;
|
||||
hSCM:=OpenSCManager(nil,nil,SC_MANAGER_CONNECT);
|
||||
if (hSCM = 0) then exit;
|
||||
|
||||
hService:=OpenService(hSCM, @name[1], SERVICE_QUERY_STATUS);;
|
||||
if (hService = 0) then begin
|
||||
CloseServiceHandle(hSCM);
|
||||
exit;
|
||||
end;
|
||||
// The SERVICE exists and we have access
|
||||
|
||||
result:=(DeleteService(hService));
|
||||
|
||||
CloseServiceHandle(hService);
|
||||
CloseServiceHandle(hSCM);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
end.
|
||||
@@ -1,217 +0,0 @@
|
||||
unit uTomcat;
|
||||
|
||||
interface
|
||||
|
||||
uses GnuGettext, uBaseModule, SysUtils, Classes, Windows, ExtCtrls, StdCtrls, Buttons,
|
||||
uNetstatTable, uTools, uProcesses;
|
||||
|
||||
type
|
||||
tTomcat = class(tBaseModule)
|
||||
OldPIDs, OldPorts: string;
|
||||
procedure ServiceInstall; override;
|
||||
procedure ServiceUnInstall; override;
|
||||
procedure Start; override;
|
||||
procedure Stop; override;
|
||||
procedure Admin; override;
|
||||
procedure UpdateStatus; override;
|
||||
procedure CheckIsService; reintroduce;
|
||||
procedure AddLog(Log: string; LogType: tLogType=ltDefault); reintroduce;
|
||||
constructor Create(pbbService: TBitBtn; pStatusPanel: tPanel; pPIDLabel, pPortLabel: tLabel; pStartStopButton, pAdminButton: tBitBtn);
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
const cModuleName = 'tomcat';
|
||||
|
||||
{ tTomcat }
|
||||
|
||||
procedure tTomcat.AddLog(Log: string; LogType: tLogType);
|
||||
begin
|
||||
inherited AddLog(cModuleName, Log, LogType);
|
||||
end;
|
||||
|
||||
procedure tTomcat.Admin;
|
||||
var
|
||||
App, Param: string;
|
||||
begin
|
||||
Param:='http://localhost:8080/';
|
||||
if Config.BrowserApp<>'' then begin
|
||||
App:=Config.BrowserApp;
|
||||
ExecuteFile(App,Param,'',SW_SHOW);
|
||||
Addlog(Format(_('Executing "%s" "%s"'),[App,Param]),ltDebug);
|
||||
end else begin
|
||||
ExecuteFile(Param,'','',SW_SHOW);
|
||||
Addlog(Format(_('Executing "%s"'),[Param]),ltDebug);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure tTomcat.CheckIsService;
|
||||
begin
|
||||
isService:=false;
|
||||
end;
|
||||
|
||||
constructor tTomcat.Create(pbbService: TBitBtn; pStatusPanel: tPanel; pPIDLabel,
|
||||
pPortLabel: tLabel; pStartStopButton, pAdminButton: tBitBtn);
|
||||
const Ports:array[0..2] of integer=(1,2,3);
|
||||
var
|
||||
PortBlocker: string;
|
||||
ServerApp1, ServerApp2: string;
|
||||
p: integer;
|
||||
begin
|
||||
inherited;
|
||||
ModuleName:=cModuleName;
|
||||
AddLog(_('Initializing module...'),ltDebug);
|
||||
ServerApp1:=basedir+'tomcat\bin\tomcat6.exe';
|
||||
ServerApp2:=basedir+'tomcat\bin\tomcat7.exe';
|
||||
if ((not FileExists(ServerApp1)) and (not FileExists(ServerApp2))) then
|
||||
AddLog(Format(_('Possible problem detected: file "%s" not found - run this program from your XAMPP root directory!'),[ServerApp1+'/'+ServerApp2]),ltError);
|
||||
|
||||
|
||||
|
||||
CheckIsService;
|
||||
|
||||
if Config.CheckDefaultPorts then begin
|
||||
AddLog(_('Checking default ports...'),ltDebug);
|
||||
|
||||
for p:=Low(Ports) to High(Ports) do begin
|
||||
PortBlocker:=NetStatTable.isPortInUse(Ports[p]);
|
||||
if (PortBlocker<>'') then begin
|
||||
if (LowerCase(PortBlocker)=LowerCase(ServerApp1)) then begin
|
||||
AddLog(Format(_('"%s" seems to be running on port %d?'),[ServerApp1,Ports[p]]),ltError);
|
||||
end else if (LowerCase(PortBlocker)=LowerCase(ServerApp2)) then begin
|
||||
AddLog(Format(_('"%s" seems to be running on port %d?'),[ServerApp2,Ports[p]]),ltError);
|
||||
end else begin
|
||||
AddLog(Format(_('Possible problem detected: Port %d in use by "%s"!'),[Ports[p],PortBlocker]),ltError);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
destructor tTomcat.Destroy;
|
||||
begin
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure tTomcat.ServiceInstall;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
end;
|
||||
|
||||
procedure tTomcat.ServiceUnInstall;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
end;
|
||||
|
||||
procedure tTomcat.Start;
|
||||
var
|
||||
App, Param: string;
|
||||
begin
|
||||
AddLog(Format(_('Starting %s app...'),[cModuleName]));
|
||||
Param:='/c '+BaseDir+'catalina_start.bat';
|
||||
if FileExists('c:\Windows\sysnative\cmd.exe') then app:='c:\Windows\sysnative\cmd.exe' // 64 bit? dann DIESE shell starten!
|
||||
else app:='cmd';
|
||||
Addlog(Format(_('Executing "%s" "%s"'),[App,Param]),ltDebug);
|
||||
if Config.TomcatVisible then
|
||||
ExecuteFile(App,Param,BaseDir,SW_MINIMIZE)
|
||||
else
|
||||
ExecuteFile(App,Param,BaseDir,SW_HIDE)
|
||||
end;
|
||||
|
||||
procedure tTomcat.Stop;
|
||||
var
|
||||
App, Param: string;
|
||||
begin
|
||||
AddLog(_('Stopping'));
|
||||
Param:='/c '+BaseDir+'catalina_stop.bat';
|
||||
if FileExists('c:\Windows\sysnative\cmd.exe') then app:='c:\Windows\sysnative\cmd.exe' // 64 bit? dann DIESE shell starten!
|
||||
else app:='cmd';
|
||||
Addlog(Format(_('Executing "%s" "%s"'),[App,Param]),ltDebug);
|
||||
ExecuteFile(App,Param,BaseDir,SW_HIDE);
|
||||
end;
|
||||
|
||||
procedure tTomcat.UpdateStatus;
|
||||
var
|
||||
p: Integer;
|
||||
ProcInfo: TProcInfo;
|
||||
s: string;
|
||||
ports: string;
|
||||
begin
|
||||
isRunning:=false;
|
||||
PIDList.Clear;
|
||||
for p:=0 to Processes.ProcessList.Count-1 do begin
|
||||
ProcInfo:=Processes.ProcessList[p];
|
||||
if { (pos(BaseDir,ProcInfo.ExePath)=1) and } (pos('java.exe',ProcInfo.Module)=1) then begin
|
||||
|
||||
// Sind genau 3 Ports offen?
|
||||
if NetStatTable.GetPortCount4PID(ProcInfo.PID)=3 then begin
|
||||
isRunning:=true;
|
||||
PIDList.Add(Pointer(ProcInfo.PID));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
// Checking processes
|
||||
s:='';
|
||||
for p:=0 to PIDList.Count-1 do begin
|
||||
if p=0 then s:=IntToStr(Integer(PIDList[p]))
|
||||
else s:=s+#13+IntToStr(Integer(PIDList[p]));
|
||||
end;
|
||||
if s<>OldPIDs then begin
|
||||
lPID.Caption:=s;
|
||||
OldPIDs:=s;
|
||||
end;
|
||||
|
||||
// Checking netstats
|
||||
s:='';
|
||||
for p:=0 to PIDList.Count-1 do begin
|
||||
ports:=NetStatTable.GetPorts4PID(Integer(PIDList[p]));
|
||||
if ports<>'' then begin
|
||||
if s='' then s:=ports
|
||||
else s:=s+', '+ports;
|
||||
end;
|
||||
end;
|
||||
if s<>OldPorts then begin
|
||||
lPort.Caption:=s;
|
||||
OldPorts:=s;
|
||||
end;
|
||||
|
||||
if byte(isRunning)<>oldIsRunningByte then begin
|
||||
|
||||
if oldIsRunningByte<>2 then begin
|
||||
if isRunning then s:=_('running')
|
||||
else s:=_('stopped');
|
||||
AddLog(_('Status change detected:')+' '+s);
|
||||
end;
|
||||
|
||||
oldIsRunningByte:=byte(isRunning);
|
||||
if isRunning then begin
|
||||
pStatus.Color:=cRunningColor;
|
||||
bStartStop.Caption:=_('Stop');
|
||||
bAdmin.Enabled:=true;
|
||||
end else begin
|
||||
pStatus.Color:=cStoppedColor;
|
||||
bStartStop.Caption:=_('Start');
|
||||
bAdmin.Enabled:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
if AutoStart then begin
|
||||
AutoStart:=false;
|
||||
if isRunning then begin
|
||||
AddLog(_('Autostart active: modul is already running - aborted'),ltError);
|
||||
end else begin
|
||||
AddLog(_('Autostart active: starting...'));
|
||||
Start;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -1,437 +0,0 @@
|
||||
unit uTools;
|
||||
|
||||
interface
|
||||
|
||||
uses GnuGettext, Classes, Graphics, Windows, SysUtils, TlHelp32, ShellAPI, Forms, Dialogs, IniFiles, VersInfo;
|
||||
|
||||
const
|
||||
// cIdxApache = 1;
|
||||
// cIdxMySQL = 2;
|
||||
// cIdxFileZilla = 3;
|
||||
// cIdxMercury = 4;
|
||||
cRunningColor = 200 * $10000 + 255*$100 + 200;
|
||||
cStoppedColor = clBtnFace;
|
||||
// SW_HIDE = Windows.SW_HIDE;
|
||||
|
||||
cCompileDate='May 14th 2011 - build #1';
|
||||
cr=#13#10;
|
||||
|
||||
|
||||
type
|
||||
tLogType = (ltDefault, ltInfo, ltError, ltDebug, ltDebugDetails);
|
||||
|
||||
TWinVersion = record
|
||||
WinPlatForm: Byte; // VER_PLATFORM_WIN32_NT, VER_PLATFORM_WIN32_WINDOWS
|
||||
WinVersion: string;
|
||||
Major: Cardinal;
|
||||
Minor: Cardinal;
|
||||
end;
|
||||
|
||||
tConfig = class
|
||||
EditorApp: string;
|
||||
BrowserApp: string;
|
||||
ShowDebug: boolean;
|
||||
DebugLevel: integer;
|
||||
CheckDefaultPorts: boolean;
|
||||
Language: string;
|
||||
TomcatVisible: boolean;
|
||||
|
||||
ASApache: boolean;
|
||||
ASMySQL: boolean;
|
||||
ASFileZilla: boolean;
|
||||
ASMercury: boolean;
|
||||
ASTomcat: boolean;
|
||||
|
||||
UserLogs: record
|
||||
Apache: tStringList;
|
||||
MySQL: tStringList;
|
||||
FileZilla: tStringList;
|
||||
Mercury: tStringList;
|
||||
Tomcat: tStringList;
|
||||
end;
|
||||
UserConfig: record
|
||||
Apache: tStringList;
|
||||
MySQL: tStringList;
|
||||
FileZilla: tStringList;
|
||||
Mercury: tStringList;
|
||||
Tomcat: tStringList;
|
||||
end;
|
||||
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
var
|
||||
WinVersion: TWinVersion;
|
||||
CurrentUser: string;
|
||||
BaseDir: string;
|
||||
CachedComputerName: string;
|
||||
Config: tConfig;
|
||||
IniFileName: string;
|
||||
dfsVersionInfoResource1: TdfsVersionInfoResource;
|
||||
GlobalProgramversion: string;
|
||||
|
||||
procedure LoadSettings;
|
||||
procedure SaveSettings;
|
||||
function IsWindowsAdmin: Boolean;
|
||||
function IntToServiceApp(b: boolean):string;
|
||||
function GetCurrentUserName: string;
|
||||
function GetWinVersion: TWinVersion;
|
||||
function RunProcess(FileName: string; ShowCmd: DWORD; wait: Boolean; ProcID: PCardinal=nil): Longword;
|
||||
function ExecuteFile(FileName, Params, DefaultDir: string; ShowCmd: Integer): THandle;
|
||||
function RunAsAdmin(filename, parameters: string; ShowCmd: Integer): Cardinal;
|
||||
function Cardinal2IP(C: Cardinal):string;
|
||||
function GetComputerName:string;
|
||||
function SystemErrorMessage(WinErrorCode: Cardinal): string;
|
||||
function GetSystemLangShort:string;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
procedure LoadSettings;
|
||||
var mi: TMemIniFile;
|
||||
begin
|
||||
// fMain.AddLog('Loading settings from configurationfile: "'+IniFileName+'"',ltDebug);
|
||||
|
||||
mi:=nil;
|
||||
try
|
||||
mi:=TMemIniFile.Create(IniFileName);
|
||||
Config.EditorApp:=mi.ReadString('Common','Editor','notepad.exe');
|
||||
Config.BrowserApp:=mi.ReadString('Common','Browser','');
|
||||
Config.ShowDebug:=mi.ReadBool('Common','Debug',false);
|
||||
Config.DebugLevel:=mi.ReadInteger('Common','Debuglevel',0);
|
||||
Config.CheckDefaultPorts:=mi.ReadBool('Common','CheckDefaultPorts',true);
|
||||
Config.Language:=mi.ReadString('Common','Language','');
|
||||
Config.TomcatVisible:=mi.ReadBool('Common','TomcatVisible',true);
|
||||
|
||||
Config.ASApache:=mi.ReadBool('Autostart','Apache',false);
|
||||
Config.ASMySQL:=mi.ReadBool('Autostart','MySQL',false);
|
||||
Config.ASFileZilla:=mi.ReadBool('Autostart','FileZilla',false);
|
||||
Config.ASMercury:=mi.ReadBool('Autostart','Mercury',false);
|
||||
Config.ASTomcat:=mi.ReadBool('Autostart','Tomcat',false);
|
||||
|
||||
Config.UserConfig.Apache.DelimitedText:=mi.ReadString('UserConfigs','Apache','');
|
||||
Config.UserConfig.MySQL.DelimitedText:=mi.ReadString('UserConfigs','MySQL','');
|
||||
Config.UserConfig.FileZilla.DelimitedText:=mi.ReadString('UserConfigs','FileZilla','');
|
||||
Config.UserConfig.Mercury.DelimitedText:=mi.ReadString('UserConfigs','Mercury','');
|
||||
Config.UserConfig.Tomcat.DelimitedText:=mi.ReadString('UserConfigs','Tomcat','');
|
||||
|
||||
Config.UserLogs.Apache.DelimitedText:=mi.ReadString('UserLogs','Apache','');
|
||||
Config.UserLogs.MySQL.DelimitedText:=mi.ReadString('UserLogs','MySQL','');
|
||||
Config.UserLogs.FileZilla.DelimitedText:=mi.ReadString('UserLogs','FileZilla','');
|
||||
Config.UserLogs.Mercury.DelimitedText:=mi.ReadString('UserLogs','Mercury','');
|
||||
Config.UserLogs.Tomcat.DelimitedText:=mi.ReadString('UserLogs','Tomcat','');
|
||||
except
|
||||
on e:exception do begin
|
||||
MessageDlg(_('Error')+': '+E.Message,mtError,[mbOK],0);
|
||||
end;
|
||||
end;
|
||||
mi.Free;
|
||||
end;
|
||||
|
||||
procedure SaveSettings;
|
||||
var mi: TMemIniFile;
|
||||
begin
|
||||
mi:=nil;
|
||||
try
|
||||
mi:=TMemIniFile.Create(IniFileName);
|
||||
mi.WriteString('Common','Editor',Config.EditorApp);
|
||||
mi.WriteString('Common','Browser',Config.BrowserApp);
|
||||
mi.WriteBool('Common','Debug',Config.ShowDebug);
|
||||
mi.WriteInteger('Common','Debuglevel',Config.DebugLevel);
|
||||
mi.WriteBool('Common','CheckDefaultPorts',Config.CheckDefaultPorts);
|
||||
mi.WriteString('Common','Language',Config.Language);
|
||||
mi.WriteBool('Common','TomcatVisible',Config.TomcatVisible);
|
||||
|
||||
mi.WriteBool('Autostart','Apache',Config.ASApache);
|
||||
mi.WriteBool('Autostart','MySQL',Config.ASMySQL);
|
||||
mi.WriteBool('Autostart','FileZilla',Config.ASFileZilla);
|
||||
mi.WriteBool('Autostart','Mercury',Config.ASMercury);
|
||||
mi.WriteBool('Autostart','Tomcat',Config.ASTomcat);
|
||||
|
||||
mi.WriteString('UserConfigs','Apache',Config.UserConfig.Apache.DelimitedText);
|
||||
mi.WriteString('UserConfigs','MySQL',Config.UserConfig.MySQL.DelimitedText);
|
||||
mi.WriteString('UserConfigs','FileZilla',Config.UserConfig.FileZilla.DelimitedText);
|
||||
mi.WriteString('UserConfigs','Mercury',Config.UserConfig.Mercury.DelimitedText);
|
||||
mi.WriteString('UserConfigs','Tomcat',Config.UserConfig.Tomcat.DelimitedText);
|
||||
|
||||
mi.WriteString('UserLogs','Apache',Config.UserLogs.Apache.DelimitedText);
|
||||
mi.WriteString('UserLogs','MySQL',Config.UserLogs.MySQL.DelimitedText);
|
||||
mi.WriteString('UserLogs','FileZilla',Config.UserLogs.FileZilla.DelimitedText);
|
||||
mi.WriteString('UserLogs','Mercury',Config.UserLogs.Mercury.DelimitedText);
|
||||
mi.WriteString('UserLogs','Tomcat',Config.UserLogs.Tomcat.DelimitedText);
|
||||
|
||||
mi.UpdateFile;
|
||||
except
|
||||
on e:exception do begin
|
||||
MessageDlg(_('Error')+': '+E.Message,mtError,[mbOK],0);
|
||||
end;
|
||||
end;
|
||||
mi.Free;
|
||||
end;
|
||||
|
||||
|
||||
function IsWindowsAdmin:boolean;
|
||||
type
|
||||
TIsUserAnAdminFunc = function (): BOOL; stdcall;
|
||||
var
|
||||
Shell32DLL: THandle;
|
||||
IsUserAnAdminFunc: TIsUserAnAdminFunc;
|
||||
begin
|
||||
result:=true;
|
||||
if WinVersion.Major<6 then exit; // older than vista? just return TRUE
|
||||
|
||||
Shell32DLL := LoadLibrary('shell32.dll');
|
||||
try
|
||||
if Shell32DLL <> 0 then begin
|
||||
@IsUserAnAdminFunc := GetProcAddress(Shell32DLL, 'IsUserAnAdmin');
|
||||
if Assigned(@IsUserAnAdminFunc) then
|
||||
result := IsUserAnAdminFunc();
|
||||
end;
|
||||
except
|
||||
end;
|
||||
FreeLibrary(Shell32DLL);
|
||||
end;
|
||||
|
||||
function IntToServiceApp(b: boolean):string;
|
||||
begin
|
||||
if b then result:=_('Service')
|
||||
else result:=_('Application')
|
||||
end;
|
||||
|
||||
function SystemErrorMessage(WinErrorCode: Cardinal): string;
|
||||
var
|
||||
P: PChar;
|
||||
begin
|
||||
if FormatMessage(Format_Message_Allocate_Buffer + Format_Message_From_System,
|
||||
nil,
|
||||
WinErrorCode,
|
||||
0,
|
||||
@P,
|
||||
0,
|
||||
nil) <> 0 then
|
||||
begin
|
||||
Result := trim(P);
|
||||
LocalFree(Integer(P));
|
||||
end else begin
|
||||
Result := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetCurrentUserName: string;
|
||||
const
|
||||
cnMaxUserNameLen = 254;
|
||||
var
|
||||
sUserName: string;
|
||||
dwUserNameLen: DWORD;
|
||||
begin
|
||||
dwUserNameLen := cnMaxUserNameLen - 1;
|
||||
SetLength(sUserName, cnMaxUserNameLen);
|
||||
GetUserName(PChar(sUserName), dwUserNameLen);
|
||||
SetLength(sUserName, dwUserNameLen);
|
||||
Result := sUserName;
|
||||
end;
|
||||
|
||||
function GetWinVersion: TWinVersion;
|
||||
var
|
||||
osVerInfo: TOSVersionInfo;
|
||||
s: string;
|
||||
begin
|
||||
osVerInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo) ;
|
||||
if GetVersionEx(osVerInfo) then
|
||||
begin
|
||||
result.WinPlatForm:=osVerInfo.dwPlatformId;
|
||||
result.Major:=osVerInfo.dwMajorVersion;
|
||||
result.Minor:=osVerInfo.dwMinorVersion;
|
||||
s:=osVerInfo.szCSDVersion;
|
||||
if s<>'' then s:=' - '+s;
|
||||
|
||||
result.WinVersion:=Format('%d.%d (build %d)%s',[osVerInfo.dwMajorVersion,osVerInfo.dwMinorVersion,osVerInfo.dwBuildNumber,s]);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function RunProcess(FileName: string; ShowCmd: DWORD; wait: Boolean; ProcID: PCardinal=nil): Longword;
|
||||
var
|
||||
StartupInfo: TStartupInfo;
|
||||
ProcessInfo: TProcessInformation;
|
||||
begin
|
||||
FillChar(StartupInfo, SizeOf(StartupInfo), #0);
|
||||
StartupInfo.cb := SizeOf(StartupInfo);
|
||||
StartupInfo.dwFlags := STARTF_USESHOWWINDOW or STARTF_FORCEONFEEDBACK;
|
||||
StartupInfo.wShowWindow := ShowCmd;
|
||||
if not CreateProcess(nil,
|
||||
@Filename[1],
|
||||
nil,
|
||||
nil,
|
||||
False,
|
||||
CREATE_NEW_CONSOLE or
|
||||
NORMAL_PRIORITY_CLASS,
|
||||
nil,
|
||||
nil,
|
||||
StartupInfo,
|
||||
ProcessInfo)
|
||||
then
|
||||
Result := WAIT_FAILED
|
||||
else
|
||||
begin
|
||||
if wait = FALSE then
|
||||
begin
|
||||
if ProcID <> nil then ProcID^ := ProcessInfo.dwProcessId;
|
||||
exit;
|
||||
end;
|
||||
WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
|
||||
GetExitCodeProcess(ProcessInfo.hProcess, Result);
|
||||
end;
|
||||
if ProcessInfo.hProcess <> 0 then
|
||||
CloseHandle(ProcessInfo.hProcess);
|
||||
if ProcessInfo.hThread <> 0 then
|
||||
CloseHandle(ProcessInfo.hThread);
|
||||
end;
|
||||
|
||||
function ExecuteFile(FileName, Params, DefaultDir: string; ShowCmd: Integer): THandle;
|
||||
var zFileName, zParams, zDir: array[0..255] of Char;
|
||||
begin
|
||||
if DefaultDir='' then DefaultDir:=BaseDir;
|
||||
Result := ShellExecute(Application.MainForm.Handle, 'open', StrPCopy(zFileName, FileName), StrPCopy(zParams, Params), StrPCopy(zDir, DefaultDir), ShowCmd);
|
||||
end;
|
||||
|
||||
function RunAsAdmin(filename, parameters: string; ShowCmd: Integer): Cardinal;
|
||||
var
|
||||
Info: TShellExecuteInfo;
|
||||
pInfo: PShellExecuteInfo;
|
||||
begin
|
||||
pInfo := @Info;
|
||||
with Info do
|
||||
begin
|
||||
cbSize := SizeOf(Info);
|
||||
fMask := SEE_MASK_NOCLOSEPROCESS;
|
||||
wnd := application.Handle;
|
||||
lpVerb := PChar('runas');
|
||||
lpFile := PChar(filename);
|
||||
lpParameters := PChar(parameters + #0);
|
||||
lpDirectory := NIL;
|
||||
nShow := ShowCmd;
|
||||
hInstApp := 0;
|
||||
end;
|
||||
if not ShellExecuteEx(pInfo) then begin
|
||||
result:=GetLastError;
|
||||
exit;
|
||||
end;
|
||||
{Wait to finish}
|
||||
repeat
|
||||
result := WaitForSingleObject(Info.hProcess, 500);
|
||||
Application.ProcessMessages;
|
||||
until (result <> WAIT_TIMEOUT);
|
||||
end;
|
||||
|
||||
|
||||
function Cardinal2IP(C: Cardinal):string;
|
||||
begin
|
||||
result:=
|
||||
inttostr((c and $000000FF) )+'.'+
|
||||
inttostr((c and $0000FF00) shr 08)+'.'+
|
||||
inttostr((c and $00FF0000) shr 16)+'.'+
|
||||
inttostr((c and $FF000000) shr 24);
|
||||
end;
|
||||
|
||||
function GetComputerName:string;
|
||||
const MAX_COMPUTERNAME_LENGTH=100;
|
||||
var ComputerName: array[0..MAX_COMPUTERNAME_LENGTH + 1] of Char;
|
||||
//var ComputerName: array[0..50 + 1] of Char;
|
||||
size:cardinal;
|
||||
LE: Cardinal;
|
||||
begin
|
||||
try
|
||||
if CachedComputerName='' then begin
|
||||
size:=MAX_COMPUTERNAME_LENGTH;
|
||||
if Windows.GetComputerName(ComputerName, size) then begin
|
||||
result:=ComputerName;
|
||||
CachedComputerName:=ComputerName;
|
||||
end else begin
|
||||
LE:=GetLastError;
|
||||
MessageDlg(Format('GetComputerName failed, Code: %d - %s',[LE,SystemErrorMessage(LE)]),mtError,[mbOK],0);
|
||||
result:='';
|
||||
end;
|
||||
end else begin
|
||||
result:=CachedComputerName;
|
||||
end;
|
||||
except
|
||||
result:='';
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function GetSystemLangShort:string;
|
||||
var bla:array[0..1023] of Char;
|
||||
s: string;
|
||||
|
||||
begin
|
||||
GetLocaleInfo(GetSystemDefaultLCID, LOCALE_SENGLANGUAGE, @bla, sizeof(bla));
|
||||
s:=uppercase(bla);
|
||||
if s='GERMAN' then result:='de'
|
||||
else if s='ENGLISH' then result:='en'
|
||||
else if s='FRENCH' then result:='fr'
|
||||
else if s='ITALIAN' then result:='it'
|
||||
else result:='en';
|
||||
end;
|
||||
|
||||
|
||||
{ tConfig }
|
||||
|
||||
constructor tConfig.Create;
|
||||
begin
|
||||
UserLogs.Apache:=TStringList.Create;
|
||||
UserLogs.MySQL:=TStringList.Create;
|
||||
UserLogs.FileZilla:=TStringList.Create;
|
||||
UserLogs.Mercury:=TStringList.Create;
|
||||
UserLogs.Tomcat:=TStringList.Create;
|
||||
|
||||
UserConfig.Apache:=TStringList.Create;
|
||||
UserConfig.MySQL:=TStringList.Create;
|
||||
UserConfig.FileZilla:=TStringList.Create;
|
||||
UserConfig.Mercury:=TStringList.Create;
|
||||
UserConfig.Tomcat:=TStringList.Create;
|
||||
|
||||
UserLogs.Apache.Delimiter:='|';
|
||||
UserLogs.MySQL.Delimiter:='|';
|
||||
UserLogs.FileZilla.Delimiter:='|';
|
||||
UserLogs.Mercury.Delimiter:='|';
|
||||
UserLogs.Tomcat.Delimiter:='|';
|
||||
|
||||
UserConfig.Apache.Delimiter:='|';
|
||||
UserConfig.MySQL.Delimiter:='|';
|
||||
UserConfig.FileZilla.Delimiter:='|';
|
||||
UserConfig.Mercury.Delimiter:='|';
|
||||
UserConfig.Tomcat.Delimiter:='|';
|
||||
end;
|
||||
|
||||
destructor tConfig.Destroy;
|
||||
begin
|
||||
FreeAndNil(UserLogs.Apache);
|
||||
FreeAndNil(UserLogs.MySQL);
|
||||
FreeAndNil(UserLogs.FileZilla);
|
||||
FreeAndNil(UserLogs.Mercury);
|
||||
FreeAndNil(UserLogs.Tomcat);
|
||||
|
||||
FreeAndNil(UserConfig.Apache);
|
||||
FreeAndNil(UserConfig.MySQL);
|
||||
FreeAndNil(UserConfig.FileZilla);
|
||||
FreeAndNil(UserConfig.Mercury);
|
||||
FreeAndNil(UserConfig.Tomcat);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
initialization
|
||||
Config:=tConfig.Create;
|
||||
CachedComputerName:='';
|
||||
dfsVersionInfoResource1:=TdfsVersionInfoResource.Create();
|
||||
dfsVersionInfoResource1.Filename:=Application.ExeName;
|
||||
with dfsVersionInfoResource1.FileVersion do
|
||||
GlobalProgramversion:=IntToStr(Major)+'.'+IntToStr(Minor)+'.'+IntToStr(Release);
|
||||
dfsVersionInfoResource1.Free;
|
||||
finalization
|
||||
Config.Free;
|
||||
end.
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
program xampp_control3;
|
||||
|
||||
uses
|
||||
Forms,
|
||||
ExtCtrls,
|
||||
Controls,
|
||||
Graphics,
|
||||
uMain in 'uMain.pas' {fMain},
|
||||
uApache in 'uApache.pas',
|
||||
uBaseModule in 'uBaseModule.pas',
|
||||
uTools in 'uTools.pas',
|
||||
uNetstatTable in 'uNetstatTable.pas',
|
||||
uNetstat in 'uNetstat.pas' {fNetstat},
|
||||
uConfig in 'uConfig.pas' {fConfig},
|
||||
uMySQL in 'uMySQL.pas',
|
||||
uFileZilla in 'uFileZilla.pas',
|
||||
uMercury in 'uMercury.pas',
|
||||
uProcesses in 'uProcesses.pas',
|
||||
uHelp in 'uHelp.pas' {fHelp},
|
||||
uServices in 'uServices.pas',
|
||||
gnugettext in 'gnugettext.pas',
|
||||
uLanguage in 'uLanguage.pas' {fLanguage},
|
||||
VersInfo in 'VersInfo.pas',
|
||||
uConfigUserDefined in 'uConfigUserDefined.pas' {fConfigUserDefined},
|
||||
uTomcat in 'uTomcat.pas';
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
AddDomainForResourceString ('delphi2006_de_en');
|
||||
AddDomainForResourceString('xampp_control');
|
||||
gnugettext.textdomain('xampp_control');
|
||||
|
||||
TP_GlobalIgnoreClassProperty(TControl,'HelpKeyword');
|
||||
TP_GlobalIgnoreClassProperty(TNotebook,'Pages');
|
||||
TP_GlobalIgnoreClassProperty(TControl,'ImeName');
|
||||
TP_GlobalIgnoreClass(TFont);
|
||||
|
||||
IniFileName:=Application.ExeName;
|
||||
IniFileName:=copy(IniFileName,1,length(IniFileName)-3)+'ini';
|
||||
|
||||
LoadSettings;
|
||||
|
||||
if Config.Language='' then begin
|
||||
Config.Language:=GetSystemLangShort;
|
||||
Application.CreateForm(TfLanguage, fLanguage);
|
||||
fLanguage.ShowModal;
|
||||
fLanguage.Free;
|
||||
SaveSettings;
|
||||
end;
|
||||
UseLanguage(Config.Language);
|
||||
|
||||
|
||||
Application.Initialize;
|
||||
Application.MainFormOnTaskbar := True;
|
||||
Application.CreateForm(TfMain, fMain);
|
||||
Application.CreateForm(TfNetstat, fNetstat);
|
||||
Application.CreateForm(TfConfig, fConfig);
|
||||
Application.CreateForm(TfHelp, fHelp);
|
||||
Application.CreateForm(TfLanguage, fLanguage);
|
||||
Application.CreateForm(TfConfigUserDefined, fConfigUserDefined);
|
||||
Application.Run;
|
||||
end.
|
||||
@@ -1,29 +0,0 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__202939CE_5B83_453D_A1C9_63457E43CBB0__INCLUDED_)
|
||||
#define AFX_STDAFX_H__202939CE_5B83_453D_A1C9_63457E43CBB0__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
//#define STRICT
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef UNICODE
|
||||
#define stristr stristrW
|
||||
#else
|
||||
#define stristr stristrA
|
||||
#endif
|
||||
|
||||
char* __fastcall stristrA(const char* psz1, const char* psz2);
|
||||
WCHAR* __fastcall stristrW(const WCHAR* pszMain, const WCHAR* pszSub);
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__202939CE_5B83_453D_A1C9_63457E43CBB0__INCLUDED_)
|
||||
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 30 KiB |
@@ -1,19 +0,0 @@
|
||||
[START]
|
||||
hide = 1
|
||||
apache = 1
|
||||
mysql = 1
|
||||
tomcat = 1
|
||||
|
||||
[EXIT]
|
||||
apache = 1
|
||||
mysql = 1
|
||||
tomcat = 1
|
||||
|
||||
[PORTS]
|
||||
apache = 80
|
||||
mysql = 3306
|
||||
tomcat = 8080
|
||||
|
||||
[XAMPP]
|
||||
setup = 1
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
name="CompanyName.ProductName.XAMPP"
|
||||
type="win32"
|
||||
/>
|
||||
<description>XAMPP Control Utility</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
@@ -1,2 +0,0 @@
|
||||
zip xampp.zip *.exe
|
||||
move xampp.zip c:\ftproot
|
||||
@@ -1,2 +0,0 @@
|
||||
zip c:\ftproot\xampp25.zip *.*
|
||||
|
||||
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,139 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="xampp_control" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=xampp_control - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "xampp_control.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "xampp_control.mak" CFG="xampp_control - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "xampp_control - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "xampp_control - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "xampp_control - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0xc09 /d "NDEBUG"
|
||||
# ADD RSC /l 0xc09 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /machine:I386
|
||||
# Begin Special Build Tool
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Cmds=copy release\xampp_control.exe C:\xampp1\xampp\xampp.exe copy release\xampp_control.exe C:\xampp2\xampp\xampp.exe copy release\xampp_control.exe xampp.exe
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "xampp_control - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0xc09 /d "_DEBUG"
|
||||
# ADD RSC /l 0xc09 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# Begin Special Build Tool
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Cmds=copy debug\xampp_control.exe C:\xampp1\xampp\xampp.exe
|
||||
# End Special Build Tool
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "xampp_control - Win32 Release"
|
||||
# Name "xampp_control - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XAMPP.C
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XAMPP.H
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TRAY.ICO
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\xampp.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\xampp.gif
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XAMPP.ICO
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XAMPP.RC
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -1,29 +0,0 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "xampp_control"=.\xampp_control.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Erstellungsprotokoll</h1>
|
||||
<h3>
|
||||
--------------------Konfiguration: xampp_control - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Befehlszeilen</h3>
|
||||
Creating command line "rc.exe /l 0xc09 /fo"Release/XAMPP.res" /d "NDEBUG" "G:\xampp-dev\tomcat-control-panel\in-work\xampp-control-panel\XAMPP.RC""
|
||||
Erstellen der tempor<6F>ren Datei "c:\temp\RSP5C.tmp" mit Inhalten
|
||||
[
|
||||
/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"Release/xampp_control.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
|
||||
"G:\xampp-dev\tomcat-control-panel\in-work\xampp-control-panel\XAMPP.C"
|
||||
]
|
||||
Creating command line "cl.exe @c:\temp\RSP5C.tmp"
|
||||
Erstellen der tempor<6F>ren Datei "c:\temp\RSP5D.tmp" mit Inhalten
|
||||
[
|
||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /incremental:no /pdb:"Release/xampp_control.pdb" /machine:I386 /out:"Release/xampp_control.exe"
|
||||
".\Release\XAMPP.OBJ"
|
||||
".\Release\XAMPP.res"
|
||||
]
|
||||
Erstellen der Befehlzeile "link.exe @c:\temp\RSP5D.tmp"
|
||||
<h3>Ausgabefenster</h3>
|
||||
Ressourcen werden kompiliert...
|
||||
Kompilierung l<>uft...
|
||||
XAMPP.C
|
||||
G:\xampp-dev\tomcat-control-panel\in-work\xampp-control-panel\XAMPP.C(990) : warning C4013: 'GetJavaSDKState' undefiniert; Annahme: extern mit Rueckgabetyp int
|
||||
G:\xampp-dev\tomcat-control-panel\in-work\xampp-control-panel\XAMPP.C(1396) : warning C4013: 'file_exists' undefiniert; Annahme: extern mit Rueckgabetyp int
|
||||
G:\xampp-dev\tomcat-control-panel\in-work\xampp-control-panel\XAMPP.C(3304) : warning C4101: 'RegType' : Unreferenzierte lokale Variable
|
||||
Linker-Vorgang l<>uft...
|
||||
Erstellen der tempor<6F>ren Datei "c:\temp\RSP5F.bat" mit Inhalten
|
||||
[
|
||||
@echo off
|
||||
copy release\xampp_control.exe C:\xampp1\xampp\xampp.exe
|
||||
copy release\xampp_control.exe C:\xampp2\xampp\xampp.exe
|
||||
copy release\xampp_control.exe xampp.exe
|
||||
]
|
||||
Erstellen der Befehlzeile "c:\temp\RSP5F.bat"
|
||||
|
||||
Das System kann den angegebenen Pfad nicht finden.
|
||||
0 Datei(en) kopiert.
|
||||
Das System kann den angegebenen Pfad nicht finden.
|
||||
0 Datei(en) kopiert.
|
||||
1 Datei(en) kopiert.
|
||||
|
||||
|
||||
|
||||
<h3>Ergebnisse</h3>
|
||||
xampp_control.exe - 0 Fehler, 3 Warnung(en)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,23 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xampp_control", "xampp_control.vcproj", "{038C5A0C-969D-4F21-8CE6-358CAABC0A37}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectDependencies) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{038C5A0C-969D-4F21-8CE6-358CAABC0A37}.Debug.ActiveCfg = Debug|Win32
|
||||
{038C5A0C-969D-4F21-8CE6-358CAABC0A37}.Debug.Build.0 = Debug|Win32
|
||||
{038C5A0C-969D-4F21-8CE6-358CAABC0A37}.Release.ActiveCfg = Release|Win32
|
||||
{038C5A0C-969D-4F21-8CE6-358CAABC0A37}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,201 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="xampp_control"
|
||||
SccProjectName=""
|
||||
SccLocalPath="">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Release/xampp_control.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
|
||||
OutputFile=".\Release/xampp_control.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ProgramDatabaseFile=".\Release/xampp_control.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/xampp_control.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy release\xampp_control.exe C:\xampp1\xampp\xampp.exe
|
||||
copy release\xampp_control.exe C:\xampp2\xampp\xampp.exe
|
||||
copy release\xampp_control.exe xampp.exe
|
||||
"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="3081"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Debug/xampp_control.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
|
||||
OutputFile=".\Debug/xampp_control.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile=".\Debug/xampp_control.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/xampp_control.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy debug\xampp_control.exe C:\xampp1\xampp\xampp.exe"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="3081"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath="XAMPP.C">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath="XAMPP.H">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
<File
|
||||
RelativePath="TRAY.ICO">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xampp.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xampp.gif">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="XAMPP.ICO">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="XAMPP.RC">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 30 KiB |
@@ -1,144 +0,0 @@
|
||||
; Author: Kay Vogelgesang for ApacheFriends XAMPP win32
|
||||
|
||||
SetCompressor /SOLID lzma
|
||||
XPStyle on
|
||||
|
||||
RequestExecutionLevel admin
|
||||
|
||||
; HM NIS Edit Wizard helper defines
|
||||
!define PRODUCT_NAME "(Mod) Perl Addon"
|
||||
!define PRODUCT_VERSION "5.10.0 (Apache 2.2.11)"
|
||||
!define PRODUCT_PUBLISHER "Kay Vogelgesang, Kai Oswald Seidler, ApacheFriends"
|
||||
!define PRODUCT_WEB_SITE "http://www.apachefriends.org"
|
||||
|
||||
; MUI 1.67 compatible ------
|
||||
!include "MUI.nsh"
|
||||
BGGradient f87820 FFFFFF FFFFFF
|
||||
InstallColors FF8080 000030
|
||||
CheckBitmap "${NSISDIR}\Contrib\Graphics\Checks\classic-cross.bmp"
|
||||
|
||||
; MUI Settings
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_ICON "C:\xamppdev\NSI\icons\xampp-icon.ico"
|
||||
!define MUI_UNICON "C:\xamppdev\NSI\icons\xampp-icon-uninstall.ico"
|
||||
!define MUI_WELCOMEPAGE
|
||||
!define MUI_CUSTOMPAGECOMMANDS
|
||||
!define MUI_COMPONENTSPAGE
|
||||
!define MUI_COMPONENTSPAGE_NODESC
|
||||
|
||||
; Welcome page
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
; License page
|
||||
; !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\license.txt"
|
||||
; Directory page
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
; Instfiles page
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
; Finish page
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
; Default LANGUAGE
|
||||
;!insertmacro MUI_LANGUAGE "German"
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||
!insertmacro MUI_LANGUAGE "TradChinese"
|
||||
!insertmacro MUI_LANGUAGE "Japanese"
|
||||
!insertmacro MUI_LANGUAGE "Korean"
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
!insertmacro MUI_LANGUAGE "Dutch"
|
||||
!insertmacro MUI_LANGUAGE "Danish"
|
||||
!insertmacro MUI_LANGUAGE "Swedish"
|
||||
!insertmacro MUI_LANGUAGE "Norwegian"
|
||||
!insertmacro MUI_LANGUAGE "Finnish"
|
||||
!insertmacro MUI_LANGUAGE "Greek"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "Portuguese"
|
||||
!insertmacro MUI_LANGUAGE "PortugueseBR"
|
||||
!insertmacro MUI_LANGUAGE "Polish"
|
||||
!insertmacro MUI_LANGUAGE "Ukrainian"
|
||||
!insertmacro MUI_LANGUAGE "Czech"
|
||||
!insertmacro MUI_LANGUAGE "Slovak"
|
||||
!insertmacro MUI_LANGUAGE "Croatian"
|
||||
!insertmacro MUI_LANGUAGE "Bulgarian"
|
||||
!insertmacro MUI_LANGUAGE "Hungarian"
|
||||
!insertmacro MUI_LANGUAGE "Thai"
|
||||
!insertmacro MUI_LANGUAGE "Romanian"
|
||||
!insertmacro MUI_LANGUAGE "Latvian"
|
||||
!insertmacro MUI_LANGUAGE "Macedonian"
|
||||
!insertmacro MUI_LANGUAGE "Estonian"
|
||||
!insertmacro MUI_LANGUAGE "Turkish"
|
||||
!insertmacro MUI_LANGUAGE "Lithuanian"
|
||||
!insertmacro MUI_LANGUAGE "Catalan"
|
||||
!insertmacro MUI_LANGUAGE "Slovenian"
|
||||
!insertmacro MUI_LANGUAGE "Serbian"
|
||||
!insertmacro MUI_LANGUAGE "Arabic"
|
||||
!insertmacro MUI_LANGUAGE "Farsi"
|
||||
!insertmacro MUI_LANGUAGE "Hebrew"
|
||||
!insertmacro MUI_LANGUAGE "Indonesian"
|
||||
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||
; MUI end ------
|
||||
|
||||
Function .onInit
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
|
||||
ReadRegStr $INSTDIR HKLM "Software\xampp" "Install_Dir"
|
||||
StrCmp $INSTDIR "" 0 NoAbort
|
||||
MessageBox MB_OK "XAMPP win32 not found. Unable to get install path."
|
||||
Abort ; causes installer to quit.
|
||||
NoAbort:
|
||||
ReadRegStr $1 HKLM "Software\xampp" "apache"
|
||||
StrCmp $1 "2211" NoMessage
|
||||
MessageBox MB_YESNO "Warning: Cannot found Apache httpd 2.2.11 for mod_perl (recommended)! Continue?" IDNO NoMessage
|
||||
Abort
|
||||
NoMessage:
|
||||
|
||||
ReadRegStr $8 HKLM "Software\xampp" "perl"
|
||||
StrCmp $8 "" 0 isPerl
|
||||
Goto newPerl
|
||||
isPerl:
|
||||
IntCmp $8 5100001 is51 lessthan51 morethan51
|
||||
is51:
|
||||
MessageBox MB_OKCANCEL "Found XAMPP Perl Add-On! Try to upgrade this Add-On?" IDOK true IDCANCEL false
|
||||
false:
|
||||
abort
|
||||
true:
|
||||
Goto newPerl
|
||||
lessthan51:
|
||||
morethan51:
|
||||
MessageBox MB_OK "Sorry, but no upgrade possible with your old Add-On (Perl version $8)!"
|
||||
abort
|
||||
newPerl:
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||
Icon "C:\xamppdev\NSI\icons\xampp-icon.ico"
|
||||
OutFile "C:\xamppdev\NSI\output\xampp-win32-perl-addon-5.10.0-2.2.11-pl2-installer.exe"
|
||||
InstallDir $INSTDIR
|
||||
ShowInstDetails show
|
||||
|
||||
|
||||
Section "Hauptgruppe" SEC01
|
||||
SectionIn RO
|
||||
ReadRegStr $8 HKLM "Software\xampp" "perl"
|
||||
|
||||
SetOutPath $INSTDIR
|
||||
SetOverwrite on
|
||||
File /r "H:\xamppdev\installer\xampp-win32-perl-addon-5.10.0-2.2.11-pl2\*.*"
|
||||
WriteRegStr HKLM "Software\xampp" "perl" "510000101"
|
||||
WriteRegStr HKLM "Software\xampp" "modperl" "204000"
|
||||
ExecWait '"$INSTDIR\php\php.exe" -n -d output_buffering=0 "$INSTDIR\install\install.php"' $9
|
||||
|
||||
# WriteRegStr HKLM "Software\xampp" "perl" "5100001"
|
||||
# WriteRegStr HKLM "Software\xampp" "modperl" "203000"
|
||||
# ExecWait '"$INSTDIR\php\php.exe" -n -d output_buffering=0 "$INSTDIR\install\install.php"' $4
|
||||
SectionEnd
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
; Author: Kay Vogelgesang for ApacheFriends XAMPP win32
|
||||
|
||||
SetCompressor /solid lzma
|
||||
XPStyle on
|
||||
|
||||
RequestExecutionLevel admin
|
||||
|
||||
; HM NIS Edit Wizard helper defines
|
||||
!define PRODUCT_NAME "Tomcat Addon pl1"
|
||||
!define PRODUCT_VERSION "6.0.18 (mod_jk/1.2.27)"
|
||||
!define PRODUCT_PUBLISHER "Kay Vogelgesang, Kai Oswald Seidler, ApacheFriends"
|
||||
!define PRODUCT_WEB_SITE "http://www.apachefriends.org"
|
||||
|
||||
; MUI 1.67 compatible ------
|
||||
!include "MUI.nsh"
|
||||
BGGradient f87820 FFFFFF FFFFFF
|
||||
InstallColors FF8080 000030
|
||||
CheckBitmap "${NSISDIR}\Contrib\Graphics\Checks\classic-cross.bmp"
|
||||
|
||||
; MUI Settings
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_ICON "C:\xamppdev\NSI\icons\xampp-icon.ico"
|
||||
!define MUI_UNICON "C:\xamppdev\NSI\icons\xampp-icon-uninstall.ico"
|
||||
!define MUI_WELCOMEPAGE
|
||||
!define MUI_CUSTOMPAGECOMMANDS
|
||||
!define MUI_COMPONENTSPAGE
|
||||
!define MUI_COMPONENTSPAGE_NODESC
|
||||
|
||||
; Welcome page
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
; License page
|
||||
; !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\license.txt"
|
||||
; Directory page
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
; Instfiles page
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
; Finish page
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
; Default LANGUAGE
|
||||
;!insertmacro MUI_LANGUAGE "German"
|
||||
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||
!insertmacro MUI_LANGUAGE "TradChinese"
|
||||
!insertmacro MUI_LANGUAGE "Japanese"
|
||||
!insertmacro MUI_LANGUAGE "Korean"
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
!insertmacro MUI_LANGUAGE "Dutch"
|
||||
!insertmacro MUI_LANGUAGE "Danish"
|
||||
!insertmacro MUI_LANGUAGE "Swedish"
|
||||
!insertmacro MUI_LANGUAGE "Norwegian"
|
||||
!insertmacro MUI_LANGUAGE "Finnish"
|
||||
!insertmacro MUI_LANGUAGE "Greek"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "Portuguese"
|
||||
!insertmacro MUI_LANGUAGE "PortugueseBR"
|
||||
!insertmacro MUI_LANGUAGE "Polish"
|
||||
!insertmacro MUI_LANGUAGE "Ukrainian"
|
||||
!insertmacro MUI_LANGUAGE "Czech"
|
||||
!insertmacro MUI_LANGUAGE "Slovak"
|
||||
!insertmacro MUI_LANGUAGE "Croatian"
|
||||
!insertmacro MUI_LANGUAGE "Bulgarian"
|
||||
!insertmacro MUI_LANGUAGE "Hungarian"
|
||||
!insertmacro MUI_LANGUAGE "Thai"
|
||||
!insertmacro MUI_LANGUAGE "Romanian"
|
||||
!insertmacro MUI_LANGUAGE "Latvian"
|
||||
!insertmacro MUI_LANGUAGE "Macedonian"
|
||||
!insertmacro MUI_LANGUAGE "Estonian"
|
||||
!insertmacro MUI_LANGUAGE "Turkish"
|
||||
!insertmacro MUI_LANGUAGE "Lithuanian"
|
||||
!insertmacro MUI_LANGUAGE "Catalan"
|
||||
!insertmacro MUI_LANGUAGE "Slovenian"
|
||||
!insertmacro MUI_LANGUAGE "Serbian"
|
||||
!insertmacro MUI_LANGUAGE "Arabic"
|
||||
!insertmacro MUI_LANGUAGE "Farsi"
|
||||
!insertmacro MUI_LANGUAGE "Hebrew"
|
||||
!insertmacro MUI_LANGUAGE "Indonesian"
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||
; MUI end ------
|
||||
|
||||
|
||||
|
||||
|
||||
Function .onInit
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
ReadRegStr $INSTDIR HKLM "Software\xampp" "Install_Dir"
|
||||
StrCmp $INSTDIR "" 0 NoAbort
|
||||
MessageBox MB_OK "XAMPP win32 not found. Unable to get install path."
|
||||
Abort ; causes installer to quit.
|
||||
NoAbort:
|
||||
|
||||
ReadRegStr $1 HKLM "Software\xampp" "apache"
|
||||
IntCmp $1 2211 is2211 lessthan2211 morethan2211
|
||||
lessthan2211:
|
||||
morethan2211:
|
||||
MessageBox MB_OK "In this package mod_jk/1.2.27 is only tested with apache version 2.2.11. It seems you a using a lower version!"
|
||||
MessageBox MB_OKCANCEL "Do you want to continue this installation?" IDOK true IDCANCEL false
|
||||
false:
|
||||
Abort
|
||||
true:
|
||||
is2211:
|
||||
|
||||
ReadRegStr $2 HKLM "Software\xampp" "java"
|
||||
StrCmp $2 "" NoAddon 0
|
||||
MessageBox MB_OK "XAMPP Java Add-on is installed already!"
|
||||
Abort ; causes installer to quit.
|
||||
NoAddon:
|
||||
|
||||
ReadRegStr $4 HKLM "Software\JavaSoft\Java Development Kit\1.5" "JavaHome"
|
||||
StrCmp $4 "" 0 YesJava
|
||||
ReadRegStr $5 HKLM "Software\JavaSoft\Java Development Kit\1.6" "JavaHome"
|
||||
StrCmp $5 "" 0 YesJava
|
||||
ReadRegStr $6 HKLM "SOFTWARE\Sun Microsystems\Application Server\9PE" "INSTALLPATH"
|
||||
StrCmp $6 "" 0 YesJava
|
||||
|
||||
MessageBox MB_OK "SUN Java 5 or 6 SDK win32 not found. Unable to get install path."
|
||||
Abort ; causes installer to quit.
|
||||
YesJava:
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||
Icon "C:\xamppdev\NSI\icons\xampp-icon.ico"
|
||||
OutFile "C:\xamppdev\NSI\output\xampp-win32-tomcat-addon-6.0.18-2.2.11-pl1-installer.exe"
|
||||
|
||||
InstallDir $INSTDIR
|
||||
ShowInstDetails show
|
||||
|
||||
Section "Hauptgruppe" SEC01
|
||||
SectionIn RO
|
||||
WriteRegStr HKLM "Software\xampp" "java" "1227"
|
||||
SetOutPath $INSTDIR
|
||||
SetOverwrite on
|
||||
File /r "H:\xamppdev\installer\xampp-win32-tomcat-addon-6.0.18-2.2.11-pl1\*.*"
|
||||
;WriteINIStr "$INSTDIR\javapath.ini" "JavaPath" "JavaHome" $3
|
||||
;ExecWait '"$INSTDIR\install\phpcli.exe" -n -d output_buffering=0 "$INSTDIR\install\javaaddon.php"' $9
|
||||
ExecWait '"$INSTDIR\php\php.exe" -n -d output_buffering=0 "$INSTDIR\install\install.php"' $9
|
||||
SectionEnd
|
||||
|
||||
; Section "Start Menu Shortcuts"
|
||||
Function .onInstSuccess
|
||||
ReadRegStr $1 HKLM "Software\xampp" "programfiles"
|
||||
StrCmp $1 "0" no_pfiles
|
||||
CreateShortCut "$SMPROGRAMS\Apache Friends\XAMPP\Tomcat start.lnk" "$INSTDIR\tomcat_start.bat" "" "$INSTDIR\install\tomcat.ico"
|
||||
CreateShortCut "$SMPROGRAMS\Apache Friends\XAMPP\Tomcat stop.lnk" "$INSTDIR\tomcat_stop.bat" "" "$INSTDIR\install\tomcatstop.ico"
|
||||
no_pfiles:
|
||||
FunctionEnd
|
||||
|
||||
|
||||
;SectionEnd
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
[Settings]
|
||||
NumFields=9
|
||||
|
||||
[Field 1]
|
||||
Type=label
|
||||
Text=XAMPP DESKTOP
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=0
|
||||
Bottom=10
|
||||
|
||||
[Field 2]
|
||||
Type=checkbox
|
||||
Text=XAMPP als Desktop-Icon
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=10
|
||||
Bottom=25
|
||||
State=1
|
||||
|
||||
[Field 3]
|
||||
Type=label
|
||||
Text=XAMPP START MEN<45>
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=30
|
||||
Bottom=40
|
||||
|
||||
[Field 4]
|
||||
Type=checkbox
|
||||
Text=Apache Friends XAMPP Eintrag unter Start/Programme
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=40
|
||||
Bottom=55
|
||||
State=1
|
||||
|
||||
[Field 5]
|
||||
Type=label
|
||||
Text=DIENSTE
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=60
|
||||
Bottom=70
|
||||
|
||||
[Field 6]
|
||||
Type=checkbox
|
||||
Text=Installation des Apache2 als Dienst
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=72
|
||||
Bottom=82
|
||||
State=0
|
||||
|
||||
[Field 7]
|
||||
Type=checkbox
|
||||
Text=Installation von MySQL als Dienst
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=82
|
||||
Bottom=92
|
||||
State=0
|
||||
|
||||
[Field 8]
|
||||
Type=checkbox
|
||||
Text=Installation des Filezilla FTPD als Dienst
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=92
|
||||
Bottom=102
|
||||
State=0
|
||||
|
||||
[Field 9]
|
||||
Type=link
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=115
|
||||
Bottom=125
|
||||
State=http://www.apachefriends.org/en/faq-xampp-windows.html
|
||||
Text=Bitte besuchen Sie auch die XAMPP Windows FAQ Website
|
||||
@@ -1,80 +0,0 @@
|
||||
[Settings]
|
||||
NumFields=9
|
||||
|
||||
[Field 1]
|
||||
Type=label
|
||||
Text=XAMPP <20>f<EFBFBD>X<EFBFBD>N<EFBFBD>g<EFBFBD>b<EFBFBD>v
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=0
|
||||
Bottom=10
|
||||
|
||||
[Field 2]
|
||||
Type=checkbox
|
||||
Text=<EFBFBD>f<EFBFBD>X<EFBFBD>N<EFBFBD>g<EFBFBD>b<EFBFBD>v<EFBFBD><EFBFBD>Xampp<EFBFBD>A<EFBFBD>C<EFBFBD>R<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>쐬
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=10
|
||||
Bottom=25
|
||||
State=1
|
||||
|
||||
[Field 3]
|
||||
Type=label
|
||||
Text=XAMPP <20>X<EFBFBD>^<5E>[<5B>g<EFBFBD><67><EFBFBD>j<EFBFBD><6A><EFBFBD>[
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=30
|
||||
Bottom=40
|
||||
|
||||
[Field 4]
|
||||
Type=checkbox
|
||||
Text=<EFBFBD>X<EFBFBD>^<5E>[<5B>g<EFBFBD><67><EFBFBD>j<EFBFBD><6A><EFBFBD>[<5B><>Apache Friends XAMPP <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>_<EFBFBD>[<5B><><EFBFBD>쐬
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=40
|
||||
Bottom=55
|
||||
State=1
|
||||
|
||||
[Field 5]
|
||||
Type=label
|
||||
Text=<EFBFBD>T<EFBFBD>[<5B>r<EFBFBD>X
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=60
|
||||
Bottom=70
|
||||
|
||||
[Field 6]
|
||||
Type=checkbox
|
||||
Text=Apache<EFBFBD><EFBFBD><EFBFBD>T<EFBFBD>[<5B>r<EFBFBD>X<EFBFBD>Ƃ<EFBFBD><C682>ăC<C483><43><EFBFBD>X<EFBFBD>g<EFBFBD>[<5B><>
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=72
|
||||
Bottom=82
|
||||
State=0
|
||||
|
||||
[Field 7]
|
||||
Type=checkbox
|
||||
Text=MySQL<EFBFBD><EFBFBD><EFBFBD>T<EFBFBD>[<5B>r<EFBFBD>X<EFBFBD>Ƃ<EFBFBD><C682>ăC<C483><43><EFBFBD>X<EFBFBD>g<EFBFBD>[<5B><>
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=82
|
||||
Bottom=92
|
||||
State=0
|
||||
|
||||
[Field 8]
|
||||
Type=checkbox
|
||||
Text=FileZilla<EFBFBD><EFBFBD><EFBFBD>T<EFBFBD>[<5B>r<EFBFBD>X<EFBFBD>Ƃ<EFBFBD><C682>ăC<C483><43><EFBFBD>X<EFBFBD>g<EFBFBD>[<5B><>
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=92
|
||||
Bottom=102
|
||||
State=0
|
||||
|
||||
[Field 9]
|
||||
Type=link
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=115
|
||||
Bottom=125
|
||||
State=http://www.apachefriends.org/en/faq-xampp-windows.html
|
||||
Text=XAMPP Windows<77>ł<EFBFBD>FAQ <20>y<EFBFBD>[<5B>W<EFBFBD><57><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
@@ -1,171 +0,0 @@
|
||||
; Author: Kay Vogelgesang for ApacheFriends XAMPP win32
|
||||
|
||||
SetCompressor /solid lzma
|
||||
XPStyle on
|
||||
SilentInstall normal
|
||||
|
||||
RequestExecutionLevel admin
|
||||
|
||||
; HM NIS Edit Wizard helper defines
|
||||
!define PRODUCT_NAME "XAMPP Upgrade"
|
||||
!define PRODUCT_VERSION "1.7.1"
|
||||
!define PRODUCT_PUBLISHER "Kay Vogelgesang, Kai Oswald Seidler, ApacheFriends"
|
||||
!define PRODUCT_WEB_SITE "http://www.apachefriends.org"
|
||||
|
||||
; MUI 1.67 compatible ------
|
||||
!include "MUI.nsh"
|
||||
BGGradient f87820 FFFFFF FFFFFF
|
||||
InstallColors FF8080 000030
|
||||
CheckBitmap "${NSISDIR}\Contrib\Graphics\Checks\classic-cross.bmp"
|
||||
|
||||
; MUI Settings
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_ICON "C:\xamppdev\NSI\icons\xampp-icon.ico"
|
||||
!define MUI_UNICON "C:\xamppdev\NSI\icons\xampp-icon-uninstall.ico"
|
||||
!define MUI_WELCOMEPAGE
|
||||
!define MUI_CUSTOMPAGECOMMANDS
|
||||
!define MUI_COMPONENTSPAGE
|
||||
!define MUI_COMPONENTSPAGE_NODESC
|
||||
|
||||
; Welcome page
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
; License page
|
||||
; !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\license.txt"
|
||||
; Directory page
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
; Instfiles page
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
; Finish page
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
; Default LANGUAGE
|
||||
;!insertmacro MUI_LANGUAGE "German"
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||
!insertmacro MUI_LANGUAGE "TradChinese"
|
||||
!insertmacro MUI_LANGUAGE "Japanese"
|
||||
!insertmacro MUI_LANGUAGE "Korean"
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
!insertmacro MUI_LANGUAGE "Dutch"
|
||||
!insertmacro MUI_LANGUAGE "Danish"
|
||||
!insertmacro MUI_LANGUAGE "Swedish"
|
||||
!insertmacro MUI_LANGUAGE "Norwegian"
|
||||
!insertmacro MUI_LANGUAGE "Finnish"
|
||||
!insertmacro MUI_LANGUAGE "Greek"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "Portuguese"
|
||||
!insertmacro MUI_LANGUAGE "PortugueseBR"
|
||||
!insertmacro MUI_LANGUAGE "Polish"
|
||||
!insertmacro MUI_LANGUAGE "Ukrainian"
|
||||
!insertmacro MUI_LANGUAGE "Czech"
|
||||
!insertmacro MUI_LANGUAGE "Slovak"
|
||||
!insertmacro MUI_LANGUAGE "Croatian"
|
||||
!insertmacro MUI_LANGUAGE "Bulgarian"
|
||||
!insertmacro MUI_LANGUAGE "Hungarian"
|
||||
!insertmacro MUI_LANGUAGE "Thai"
|
||||
!insertmacro MUI_LANGUAGE "Romanian"
|
||||
!insertmacro MUI_LANGUAGE "Latvian"
|
||||
!insertmacro MUI_LANGUAGE "Macedonian"
|
||||
!insertmacro MUI_LANGUAGE "Estonian"
|
||||
!insertmacro MUI_LANGUAGE "Turkish"
|
||||
!insertmacro MUI_LANGUAGE "Lithuanian"
|
||||
!insertmacro MUI_LANGUAGE "Catalan"
|
||||
!insertmacro MUI_LANGUAGE "Slovenian"
|
||||
!insertmacro MUI_LANGUAGE "Serbian"
|
||||
!insertmacro MUI_LANGUAGE "Arabic"
|
||||
!insertmacro MUI_LANGUAGE "Farsi"
|
||||
!insertmacro MUI_LANGUAGE "Hebrew"
|
||||
!insertmacro MUI_LANGUAGE "Indonesian"
|
||||
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||
; MUI end ------
|
||||
|
||||
Function .onInit
|
||||
SetSilent normal
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
ReadRegStr $INSTDIR HKLM "Software\xampp" "Install_Dir"
|
||||
StrCmp $INSTDIR "" 0 NoAbort
|
||||
MessageBox MB_OK "XAMPP win32 not found. Unable to get install path."
|
||||
Abort ; causes installer to quit.
|
||||
NoAbort:
|
||||
ReadRegStr $2 HKLM "Software\xampp" "version"
|
||||
StrCmp $2 "1700" NoVersionAbort
|
||||
MessageBox MB_OK "Need XAMPP version 1.7.0 but cannot find this version. Stop installation."
|
||||
Abort ; causes no correct version found
|
||||
NoVersionAbort:
|
||||
|
||||
; ReadRegStr $2 HKLM "Software\xampp" "apache"
|
||||
; StrCmp $2 "2240" NoversionAbort
|
||||
; MessageBox MB_OK "Need XAMPP with Apache 2.2.4 for this Update!"
|
||||
; Abort ; causes installer to quit.
|
||||
; NoversionAbort:
|
||||
|
||||
ReadRegStr $R0 HKCU "Control Panel\International" Locale
|
||||
StrCmp $R0 "00000407" detection_de
|
||||
GOTO no_de
|
||||
detection_de:
|
||||
MessageBox MB_OK "Bitte alle Apache, MySQL, FileZilla, Mercury Prozesse im XAMPP vor dem Upgrading beenden. Diese Prozesse k<>nnen nach dem Upgrade wieder gestartet werden."
|
||||
GOTO end_box
|
||||
no_de:
|
||||
MessageBox MB_OK "Please stop all Apache, MySQL, FileZilla, Mercury processes in XAMPP before upgrading! After upgrade you can (re)start these services."
|
||||
end_box:
|
||||
FunctionEnd
|
||||
|
||||
|
||||
;Section desktopIcon
|
||||
;Section "XAMPP Desktop" desktopIcon
|
||||
;CreateShortCut "$DESKTOP\XAMPP Control Panel.lnk" "$INSTDIR\xampp-control.exe" ""
|
||||
;SectionEnd
|
||||
|
||||
|
||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||
Icon "C:\xamppdev\NSI\icons\xampp-icon.ico"
|
||||
OutFile "C:\xamppdev\NSI\output\xampp-win32-upgrade-1.7.0-1.7.1-installer.exe"
|
||||
; InstallDir "$PROGRAMFILES"
|
||||
|
||||
InstallDir $INSTDIR
|
||||
ShowInstDetails show
|
||||
|
||||
|
||||
Section "Hauptgruppe" SEC01
|
||||
AllowSkipFiles on
|
||||
SetOutPath $INSTDIR
|
||||
SetOverwrite on
|
||||
File /r "H:\xamppdev\installer\xampp-win32-upgrade\*.*"
|
||||
; ExecWait '"$INSTDIR\php\php.exe" -n -d output_buffering=0 "$INSTDIR\install\upgrade.php"' $4
|
||||
WriteRegStr HKLM "Software\xampp" "version" "1710"
|
||||
WriteRegStr HKLM "Software\xampp" "apache" "2211"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\xampp" "DisplayName" "XAMPP ${PRODUCT_VERSION}"
|
||||
SectionEnd
|
||||
|
||||
|
||||
Function .onInstSuccess
|
||||
ReadRegStr $4 HKLM "Software\xampp" "lang"
|
||||
Delete "$INSTDIR\xampp-control.exe"
|
||||
StrCmp $4 "1041" japanese
|
||||
Delete "$INSTDIR\xampp-control-jp.exe"
|
||||
Rename "$INSTDIR\xampp-control-default.exe" "$INSTDIR\xampp-control.exe"
|
||||
Goto xamppcontrol_out
|
||||
japanese:
|
||||
Delete "$INSTDIR\xampp-control-default.exe"
|
||||
Rename "$INSTDIR\xampp-control-jp.exe" "$INSTDIR\xampp-control.exe"
|
||||
xamppcontrol_out:
|
||||
FunctionEnd
|
||||
|
||||
;Section "Start Menu Shortcuts"
|
||||
;Delete "$SMPROGRAMS\apachefriends\xampp\*.*"
|
||||
;RMDir "$SMPROGRAMS\apachefriends\xampp"
|
||||
;RMDir "$SMPROGRAMS\apachefriends"
|
||||
;CreateDirectory "$SMPROGRAMS\apachefriends\xampp"
|
||||
; CreateShortCut "$SMPROGRAMS\apachefriends\xampp" "" ""
|
||||
; CreateShortCut "$SMPROGRAMS\apachefriends\xampp\CONTROL XAMPP SERVER PANEL.lnk" "$INSTDIR\xampp-control.exe" "" "$INSTDIR\install\xampp.ico"
|
||||
; CreateShortCut "$SMPROGRAMS\apachefriends\xampp\xampp httpdoc folder.lnk" "$INSTDIR\htdocs" "" "$INSTDIR\install\folder.ico"
|
||||
; CreateShortCut "$SMPROGRAMS\apachefriends\xampp\port checking.lnk" "$INSTDIR\xampp-portcheck.exe" "" "$INSTDIR\install\xamppcontrol.ico"
|
||||
; CreateShortCut "$SMPROGRAMS\apachefriends\xampp\php switch.lnk" "$INSTDIR\php-switch.bat" "" "$INSTDIR\install\php.ico"
|
||||
; CreateShortCut "$SMPROGRAMS\apachefriends\xampp\xampp uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\install\xampp-icon-uninstall.ico"
|
||||
;SectionEnd
|
||||
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
; Author: Kay Vogelgesang for ApacheFriends XAMPP win32
|
||||
|
||||
;---------------------
|
||||
;Include Modern UI
|
||||
!include "MUI.nsh"
|
||||
;--------------------------------
|
||||
|
||||
SetCompressor /solid lzma
|
||||
XPStyle on
|
||||
; HM NIS Edit Wizard helper defines
|
||||
!define PRODUCT_NAME "XAMPP (USB)"
|
||||
!define PRODUCT_VERSION "1.7.5"
|
||||
!define PRODUCT_PUBLISHER "Kay Vogelgesang, Kai Oswald Seidler, ApacheFriends"
|
||||
!define PRODUCT_WEB_SITE "http://www.apachefriends.org"
|
||||
Caption "XAMPP USB & Lite ${PRODUCT_VERSION} win32"
|
||||
; InstallDirRegKey HKCU "Software\xampp" ""
|
||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||
OutFile "F:\xampp-dev\xampp-win32-${PRODUCT_VERSION}-usb-lite.exe"
|
||||
;Vista redirects $SMPROGRAMS to all users without this
|
||||
RequestExecutionLevel admin
|
||||
BGGradient f87820 FFFFFF FFFFFF
|
||||
InstallColors FF8080 000030
|
||||
CheckBitmap "${NSISDIR}\Contrib\Graphics\Checks\classic-cross.bmp"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; MUI Settings
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_ICON "C:\xampp\src\xampp-nsi-installer\icons\xampp-icon.ico"
|
||||
!define MUI_WELCOMEPAGE
|
||||
!define MUI_CUSTOMPAGECOMMANDS
|
||||
!define MUI_COMPONENTSPAGE
|
||||
!define MUI_COMPONENTSPAGE_NODESC
|
||||
|
||||
; Welcome page
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
; Components
|
||||
; !insertmacro MUI_PAGE_COMPONENTS
|
||||
; License page
|
||||
;!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\license.txt"
|
||||
; Directory page
|
||||
; Instfiles page
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
; Finish page
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
;--------------------------------
|
||||
|
||||
;Languages
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English" # first language is the default language
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
; !insertmacro MUI_LANGUAGE "Japanese"
|
||||
|
||||
;--------------------------------
|
||||
;Reserve Files
|
||||
|
||||
;These files should be inserted before other files in the data block
|
||||
;Keep these lines before any File command
|
||||
;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
|
||||
|
||||
ReserveFile "xampp.ini"
|
||||
; ReserveFile "xampp-japanese.ini"
|
||||
ReserveFile "xampp_home.ini"
|
||||
; ReserveFile "xampp_home-japanese.ini"
|
||||
ReserveFile "xampp-german.ini"
|
||||
ReserveFile "xampp_home-german.ini"
|
||||
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
||||
|
||||
;--------------------------------
|
||||
;Variables
|
||||
|
||||
Var INI_VALUE
|
||||
Var INI_VALUE2
|
||||
Var INI_VALUE3
|
||||
Var INI_VALUE4
|
||||
Var INI_VALUE5
|
||||
Var INST_MESS
|
||||
Var INST_MESS1
|
||||
Var INST_MESS2
|
||||
Var INST_MESS3
|
||||
Var INST_MESS4
|
||||
Var MESS_INSTDIR1
|
||||
Var MESS_INSTDIR2
|
||||
Var FTP_INSTALL
|
||||
Var MAIL_INSTALL
|
||||
Var DB_DEL
|
||||
Var NO_DEL
|
||||
|
||||
InstallDir "c:\xampp"
|
||||
Icon "C:\xampp\src\xampp-nsi-installer\icons\xampp-icon.ico"
|
||||
ShowInstDetails show
|
||||
|
||||
|
||||
Section "XAMPP Files" SEC01
|
||||
SetOutPath "$INSTDIR"
|
||||
SetOverwrite ifnewer
|
||||
File /r "F:\release175\release_rc2\xampp-win32-1.7.5-usb-lite\xampp\*.*"
|
||||
ExecWait '"$INSTDIR\php\php.exe" -n -d output_buffering=0 "$INSTDIR\install\install.php" usb' $4
|
||||
|
||||
SectionEnd
|
||||
|
||||
; ---------------------------------------
|
||||
|
||||
Function .onInit
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "xampp.ini"
|
||||
; !insertmacro MUI_INSTALLOPTIONS_EXTRACT "xampp-japanese.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "xampp_home.ini"
|
||||
; !insertmacro MUI_INSTALLOPTIONS_EXTRACT "xampp_home-japanese.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "xampp-german.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "xampp_home-german.ini"
|
||||
|
||||
ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
|
||||
StrCmp $R1 "6.0" detection_VISTA
|
||||
StrCmp $R1 "6.1" detection_VISTA
|
||||
Goto no_vista
|
||||
detection_VISTA:
|
||||
ReadRegStr $R2 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" EnableLUA
|
||||
;ReadRegStr $R0 HKCU "Control Panel\International" Locale
|
||||
;StrCmp $R0 "00000407" detection_de
|
||||
StrCmp $LANGUAGE "1031" detection_de
|
||||
GOTO no_de
|
||||
detection_de:
|
||||
StrCmp $R2 "1" IS_UACDE
|
||||
MessageBox MB_OK "Die Windows Vista Benutzerkontensteuerung (UAC) ist auf Ihrem System deaktiviert (empfohlen!). Bitte beachten Sie, das eine nachtr<74>gliche Aktivierung des Benutzerkontenschutz die Funktionalit<69>t der XAMPP-Komponenten beeintr<74>chtigen kann."
|
||||
GOTO ISNO_UACDE
|
||||
IS_UACDE:
|
||||
MessageBox MB_OK "Wichtige MS Vista Warnung! Aufgrund der aktivierten Benutzerkontensteuerung (UAC) auf Ihrem System sind XAMPP-Komponenten und Funktionen ggf. nur eingeschr<68>nkt einsetzbar. Vermeiden Sie in diesem Fall die Installation von XAMPP unter $PROGRAMFILES oder deaktivieren Sie den Benutzerkontensteuerung <20>ber msconfig nach diesem Setup."
|
||||
ISNO_UACDE:
|
||||
GOTO no_vista
|
||||
no_de:
|
||||
StrCmp $R2 "1" IS_UACE
|
||||
MessageBox MB_OK "Windows Vista User Account Control (UAC) is deactivated on your system (recommended!). Please consider: A later activation of UAC can restrict the functionality of XAMPP!"
|
||||
GOTO no_vista
|
||||
IS_UACE:
|
||||
MessageBox MB_OK "Important MS Vista Note! Because an activated Windows Vista User Account Control (UAC) on your sytem some functions of xampp are possibly restricted. With UAC please avoid to install XAMPP to $PROGRAMFILES (because of not enough write permisssions). Or deactivate UAC (with msconfig) after this Setup."
|
||||
no_vista:
|
||||
|
||||
;ReadRegStr $R0 HKCU "Control Panel\International" Locale
|
||||
StrCmp $LANGUAGE "1031" detect_de
|
||||
GOTO non_de
|
||||
detect_de:
|
||||
MessageBox MB_OK "Bitte w<>hlen Sie im n<>chsten Schritt ihren Wechseldatentr<74>ger z.B. USB Stick aus. Alternativ k<>nnen Sie diese Version auch als XAMPP Lite auf ihre Festplatte installieren."
|
||||
GOTO usb_end
|
||||
non_de:
|
||||
MessageBox MB_OK "In the next step please choice your usb device for installation. Alternate you can take your hard disk for a lite installation."
|
||||
usb_end:
|
||||
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
[Settings]
|
||||
NumFields=9
|
||||
|
||||
[Field 1]
|
||||
Type=label
|
||||
Text=XAMPP DESKTOP
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=0
|
||||
Bottom=10
|
||||
|
||||
[Field 2]
|
||||
Type=checkbox
|
||||
Text=Create a XAMPP desktop icon
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=10
|
||||
Bottom=25
|
||||
State=1
|
||||
|
||||
[Field 3]
|
||||
Type=label
|
||||
Text=XAMPP START MENU
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=30
|
||||
Bottom=40
|
||||
|
||||
[Field 4]
|
||||
Type=checkbox
|
||||
Text=Create an Apache Friends XAMPP folder in the start menu
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=40
|
||||
Bottom=55
|
||||
State=1
|
||||
|
||||
[Field 5]
|
||||
Type=label
|
||||
Text=SERVICE SECTION
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=60
|
||||
Bottom=70
|
||||
|
||||
[Field 6]
|
||||
Type=checkbox
|
||||
Text=Install Apache as service
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=72
|
||||
Bottom=82
|
||||
State=0
|
||||
|
||||
[Field 7]
|
||||
Type=checkbox
|
||||
Text=Install MySQL as service
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=82
|
||||
Bottom=92
|
||||
State=0
|
||||
|
||||
[Field 8]
|
||||
Type=checkbox
|
||||
Text=Install Filezilla as service
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=92
|
||||
Bottom=102
|
||||
State=0
|
||||
|
||||
[Field 9]
|
||||
Type=link
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=115
|
||||
Bottom=125
|
||||
State=http://www.apachefriends.org/en/faq-xampp-windows.html
|
||||
Text=See also the XAMPP for Windows FAQ Page
|
||||
@@ -1,594 +0,0 @@
|
||||
; Author: Kay Vogelgesang for ApacheFriends XAMPP win32
|
||||
|
||||
;---------------------
|
||||
;Include Modern UI
|
||||
!include "MUI.nsh"
|
||||
;--------------------------------
|
||||
|
||||
SetCompressor /solid lzma
|
||||
XPStyle on
|
||||
; HM NIS Edit Wizard helper defines
|
||||
!define PRODUCT_NAME "XAMPP"
|
||||
!define PRODUCT_VERSION "1.7.5"
|
||||
!define PRODUCT_PUBLISHER "Kay Vogelgesang, Kai Oswald Seidler, ApacheFriends"
|
||||
!define PRODUCT_WEB_SITE "http://www.apachefriends.org"
|
||||
Caption "XAMPP ${PRODUCT_VERSION} win32"
|
||||
InstallDirRegKey HKLM "Software\xampp" "Install_Dir"
|
||||
; InstallDirRegKey HKCU "Software\xampp" ""
|
||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||
OutFile "F:\xampp-dev\xampp-win32-${PRODUCT_VERSION}-VC9-installer.exe"
|
||||
;Vista redirects $SMPROGRAMS to all users without this
|
||||
RequestExecutionLevel admin
|
||||
BGGradient f87820 FFFFFF FFFFFF
|
||||
InstallColors FF8080 000030
|
||||
CheckBitmap "${NSISDIR}\Contrib\Graphics\Checks\classic-cross.bmp"
|
||||
|
||||
;--------------------------------
|
||||
;Language Selection Dialog Settings
|
||||
|
||||
;Remember the installer language
|
||||
!define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
|
||||
!define MUI_LANGDLL_REGISTRY_KEY "Software\xampp"
|
||||
!define MUI_LANGDLL_REGISTRY_VALUENAME "lang"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; MUI Settings
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_ICON "C:\xampp\src\xampp-nsi-installer\icons\xampp-icon.ico"
|
||||
!define MUI_UNICON "C:\xampp\src\xampp-nsi-installer\icons\xampp-icon-uninstall.ico"
|
||||
!define MUI_WELCOMEPAGE
|
||||
!define MUI_CUSTOMPAGECOMMANDS
|
||||
!define MUI_COMPONENTSPAGE
|
||||
!define MUI_COMPONENTSPAGE_NODESC
|
||||
|
||||
; Welcome page
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
; Components
|
||||
; !insertmacro MUI_PAGE_COMPONENTS
|
||||
; License page
|
||||
;!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\license.txt"
|
||||
; Directory page
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
Page custom CustomPageC
|
||||
; Instfiles page
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
; Finish page
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
;--------------------------------
|
||||
|
||||
;Languages
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English" # first language is the default language
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
; !insertmacro MUI_LANGUAGE "Japanese"
|
||||
|
||||
;--------------------------------
|
||||
;Reserve Files
|
||||
|
||||
;These files should be inserted before other files in the data block
|
||||
;Keep these lines before any File command
|
||||
;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
|
||||
|
||||
ReserveFile "xampp.ini"
|
||||
; ReserveFile "xampp-japanese.ini"
|
||||
ReserveFile "xampp_home.ini"
|
||||
; ReserveFile "xampp_home-japanese.ini"
|
||||
ReserveFile "xampp-german.ini"
|
||||
ReserveFile "xampp_home-german.ini"
|
||||
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
||||
|
||||
;--------------------------------
|
||||
;Variables
|
||||
|
||||
Var INI_VALUE
|
||||
Var INI_VALUE2
|
||||
Var INI_VALUE3
|
||||
Var INI_VALUE4
|
||||
Var INI_VALUE5
|
||||
Var INST_MESS
|
||||
Var INST_MESS1
|
||||
Var INST_MESS2
|
||||
Var INST_MESS3
|
||||
Var INST_MESS4
|
||||
Var MESS_INSTDIR1
|
||||
Var MESS_INSTDIR2
|
||||
Var DB_DEL
|
||||
Var NO_DEL
|
||||
|
||||
InstallDir "c:\xampp"
|
||||
Icon "C:\xampp\src\xampp-nsi-installer\icons\xampp-icon.ico"
|
||||
UninstallIcon "C:\xampp\src\xampp-nsi-installer\icons\xampp-icon-uninstall.ico"
|
||||
ShowInstDetails show
|
||||
ShowUninstDetails show
|
||||
|
||||
Section "XAMPP Files" SEC01
|
||||
SetOutPath "$INSTDIR"
|
||||
SetOverwrite ifnewer
|
||||
File /r "F:\release175\release_rc2\xampp\*.*"
|
||||
ExecWait '"$INSTDIR\php\php.exe" -n -d output_buffering=0 "$INSTDIR\install\install.php"' $4
|
||||
|
||||
WriteRegStr HKLM "Software\xampp" "Install_Dir" "$INSTDIR"
|
||||
WriteRegStr HKLM "Software\xampp" "apache" "2217"
|
||||
WriteRegStr HKLM "Software\xampp" "version" "1750"
|
||||
WriteRegStr HKLM "Software\xampp" "apacheservice" "0"
|
||||
WriteRegStr HKLM "Software\xampp" "mysqlservice" "0"
|
||||
WriteRegStr HKLM "Software\xampp" "tomcatservice" "0"
|
||||
WriteRegStr HKLM "Software\xampp" "filezillainstall" "1"
|
||||
WriteRegStr HKLM "Software\xampp" "filezillaservice" "0"
|
||||
WriteRegStr HKLM "Software\xampp" "mercuryinstall" "1"
|
||||
WriteRegStr HKLM "Software\xampp" "addonperl" "1"
|
||||
WriteRegStr HKLM "Software\xampp" "addonpython" "0"
|
||||
WriteRegStr HKLM "Software\xampp" "addontomcat" "1"
|
||||
WriteRegStr HKLM "Software\xampp" "addoncocoon" "0"
|
||||
WriteRegStr HKLM "Software\xampp" "programfiles" "0"
|
||||
WriteRegStr HKLM "Software\xampp" "desktopicon" "0"
|
||||
WriteRegStr HKLM "Software\xampp" "services" "0"
|
||||
WriteRegStr HKLM "Software\xampp" "lang" "$LANGUAGE"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\xampp" "DisplayName" "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\xampp" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\xampp" "NoModify" 1
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\xampp" "NoRepair" 1
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
|
||||
StrCmp $R0 "" 0 NTsec
|
||||
MessageBox MB_OK "No Service Installation avaible on Windows 98/ME/Home"
|
||||
; StrCmp $LANGUAGE "1041" japanese1
|
||||
StrCmp $LANGUAGE "1031" german1
|
||||
;Read a value from an InstallOptions INI file
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "xampp_home.ini" "Field 2" "State"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE2 "xampp_home.ini" "Field 4" "State"
|
||||
Goto no_srv
|
||||
german1:
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "xampp_home-german.ini" "Field 2" "State"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE2 "xampp_home-german.ini" "Field 4" "State"
|
||||
Goto no_srv
|
||||
; japanese1:
|
||||
; !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "xampp_home-japanese.ini" "Field 2" "State"
|
||||
; !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE2 "xampp_home-japanese.ini" "Field 4" "State"
|
||||
; Goto no_srv
|
||||
NTsec:
|
||||
; FULL SERVICES --------------
|
||||
; StrCmp $LANGUAGE "1041" japanese2
|
||||
StrCmp $LANGUAGE "1031" german2
|
||||
;Read a value from an InstallOptions INI file
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "xampp.ini" "Field 2" "State"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE2 "xampp.ini" "Field 4" "State"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE3 "xampp.ini" "Field 6" "State"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE4 "xampp.ini" "Field 7" "State"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE5 "xampp.ini" "Field 8" "State"
|
||||
Goto defaultlang2
|
||||
german2:
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "xampp-german.ini" "Field 2" "State"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE2 "xampp-german.ini" "Field 4" "State"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE3 "xampp-german.ini" "Field 6" "State"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE4 "xampp-german.ini" "Field 7" "State"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE5 "xampp-german.ini" "Field 8" "State"
|
||||
Goto defaultlang2
|
||||
; japanese2:
|
||||
; !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "xampp-japanese.ini" "Field 2" "State"
|
||||
; !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE2 "xampp-japanese.ini" "Field 4" "State"
|
||||
; !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE3 "xampp-japanese.ini" "Field 6" "State"
|
||||
; !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE4 "xampp-japanese.ini" "Field 7" "State"
|
||||
; !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE5 "xampp-japanese.ini" "Field 8" "State"
|
||||
defaultlang2:
|
||||
|
||||
|
||||
StrCmp $INI_VALUE3 "1" "" noapache2
|
||||
WriteRegStr HKLM "Software\xampp" "apacheservice" "1"
|
||||
WriteRegStr HKLM "Software\xampp" "services" "1"
|
||||
noapache2:
|
||||
StrCmp $INI_VALUE4 "1" "" nomysql5
|
||||
WriteRegStr HKLM "Software\xampp" "mysqlservice" "1"
|
||||
WriteRegStr HKLM "Software\xampp" "services" "1"
|
||||
nomysql5:
|
||||
StrCmp $INI_VALUE5 "1" "" noftp2
|
||||
WriteRegStr HKLM "Software\xampp" "filezillaservice" "1"
|
||||
WriteRegStr HKLM "Software\xampp" "services" "1"
|
||||
noftp2:
|
||||
no_srv:
|
||||
|
||||
StrCmp $INI_VALUE "1" "" nodesktop
|
||||
WriteRegStr HKLM "Software\xampp" "desktopicon" "1"
|
||||
nodesktop:
|
||||
StrCmp $INI_VALUE2 "1" "" noprofiles
|
||||
WriteRegStr HKLM "Software\xampp" "programfiles" "1"
|
||||
noprofiles:
|
||||
|
||||
SectionEnd
|
||||
|
||||
; ---------------------------------------
|
||||
|
||||
Function .onInit
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "xampp.ini"
|
||||
; !insertmacro MUI_INSTALLOPTIONS_EXTRACT "xampp-japanese.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "xampp_home.ini"
|
||||
; !insertmacro MUI_INSTALLOPTIONS_EXTRACT "xampp_home-japanese.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "xampp-german.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "xampp_home-german.ini"
|
||||
|
||||
ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
|
||||
StrCmp $R1 "6.0" detection_VISTA
|
||||
StrCmp $R1 "6.1" detection_VISTA
|
||||
Goto no_vista
|
||||
detection_VISTA:
|
||||
ReadRegStr $R2 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" EnableLUA
|
||||
ReadRegStr $R0 HKCU "Control Panel\International" Locale
|
||||
StrCmp $R0 "00000407" detection_de
|
||||
GOTO no_de
|
||||
detection_de:
|
||||
StrCmp $R2 "1" IS_UACDE
|
||||
MessageBox MB_OK "Die Benutzerkontensteuerung unter Windows (UAC) ist auf Ihrem System deaktiviert (empfohlen). Bitte beachten Sie, das eine nachtr<74>gliche Aktivierung des Benutzerkontenschutz die Funktionalit<69>t der XAMPP-Komponenten beeintr<74>chtigen kann."
|
||||
GOTO ISNO_UACDE
|
||||
IS_UACDE:
|
||||
MessageBox MB_OK "Warnung! Aufgrund der aktivierten Windows Benutzerkontensteuerung (UAC) auf Ihrem System sind XAMPP-Komponenten und Funktionen ggf. nur eingeschr<68>nkt einsetzbar. Vermeiden Sie die Installation von XAMPP unter $PROGRAMFILES oder deaktivieren Sie den Benutzerkontensteuerung <20>ber msconfig nach diesem Setup."
|
||||
ISNO_UACDE:
|
||||
GOTO no_vista
|
||||
no_de:
|
||||
StrCmp $R2 "1" IS_UACE
|
||||
MessageBox MB_OK "The User Account Control (UAC) is deactivated on your system (recommended). Please note: A later activation of UAC can restrict the functionality of XAMPP."
|
||||
GOTO no_vista
|
||||
IS_UACE:
|
||||
MessageBox MB_OK "Important! Because an activated User Account Control (UAC) on your sytem some functions of XAMPP are possibly restricted. With UAC please avoid to install XAMPP to $PROGRAMFILES (missing write permisssions). Or deactivate UAC with msconfig after this setup."
|
||||
no_vista:
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function CustomPageC
|
||||
ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
|
||||
StrCmp $R1 "" 0 NTsrv
|
||||
; StrCmp $LANGUAGE "1041" japanesehome
|
||||
StrCmp $LANGUAGE "1031" germanhome
|
||||
!insertmacro MUI_HEADER_TEXT "XAMPP Options" "Install options on Windows Home systems."
|
||||
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "xampp_home.ini"
|
||||
Goto no_srv
|
||||
germanhome:
|
||||
!insertmacro MUI_HEADER_TEXT "XAMPP Optionen" "Konfiguration f<>r Windows Home Systeme."
|
||||
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "xampp_home-german.ini"
|
||||
Goto no_srv
|
||||
; japanesehome:
|
||||
; !insertmacro MUI_HEADER_TEXT "XAMPP Options" "Windows<77>̃V<CC83>X<EFBFBD>e<EFBFBD><65><EFBFBD>̃I<CC83>v<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>C<EFBFBD><43><EFBFBD>X<EFBFBD>g<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B"
|
||||
; !insertmacro MUI_INSTALLOPTIONS_DISPLAY "xampp_home-japanese.ini"
|
||||
; Goto no_srv
|
||||
NTsrv:
|
||||
; StrCmp $LANGUAGE "1041" japanese
|
||||
StrCmp $LANGUAGE "1031" german
|
||||
!insertmacro MUI_HEADER_TEXT "XAMPP Options" "Install options on NT/2000/XP Professional systems."
|
||||
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "xampp.ini"
|
||||
Goto no_srv
|
||||
german:
|
||||
!insertmacro MUI_HEADER_TEXT "XAMPP Optionen" "Konfiguration f<>r NT/2000/XP Professional Systeme."
|
||||
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "xampp-german.ini"
|
||||
Goto no_srv
|
||||
; japanese:
|
||||
; !insertmacro MUI_HEADER_TEXT "XAMPP Options" "Windows NT/2000/XP/2003<30>ɃV<C983>X<EFBFBD>e<EFBFBD><65><EFBFBD>I<EFBFBD>v<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>C<EFBFBD><43><EFBFBD>X<EFBFBD>g<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD>"
|
||||
; !insertmacro MUI_INSTALLOPTIONS_DISPLAY "xampp-japanese.ini"
|
||||
no_srv:
|
||||
|
||||
FunctionEnd
|
||||
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "SERVICES:"
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
Function .onInstSuccess
|
||||
|
||||
; SERVICE INSTALLATION
|
||||
ReadRegStr $4 HKLM "Software\xampp" "lang"
|
||||
ReadRegStr $0 HKLM "Software\xampp" "services"
|
||||
StrCmp $0 "0" no_srv
|
||||
ExecWait 'cmd /C cd "$INSTDIR\install" & portcheck.bat' $7
|
||||
ReadRegStr $1 HKLM "Software\xampp" "apacheservice"
|
||||
StrCmp $1 "0" no_httpd
|
||||
ReadINIStr $R0 "$INSTDIR\install\portcheck.ini" "Ports" "Port80"
|
||||
StrCmp $R0 "BLOCKED" Port80Abort
|
||||
ReadINIStr $R1 "$INSTDIR\install\portcheck.ini" "Ports" "Port443"
|
||||
StrCmp $R1 "BLOCKED" Port80Abort
|
||||
ExecWait 'cmd /C cd "$INSTDIR\apache\bin" & httpd.exe -k install & net start Apache2.2' $9
|
||||
Goto no_httpd
|
||||
Port80Abort:
|
||||
StrCmp $4 "1031" german
|
||||
; StrCmp $4 "1041" japan
|
||||
StrCpy $INST_MESS1 "Ports 80 or 443 (SSL) already in use! Installing Apache2.2 service failed!"
|
||||
Goto mess1
|
||||
; japan:
|
||||
; StrCpy $INST_MESS1 "<22>|<7C>[<5B>g 80 <20>܂<EFBFBD><DC82><EFBFBD> 443 (SSL) <20>͂<EFBFBD><CD82>łɗ<C582><C997>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82>BApache2.2<EFBFBD><EFBFBD><EFBFBD>T<EFBFBD>[<5B>r<EFBFBD>X<EFBFBD>Ƃ<EFBFBD><C682>ăC<C483><43><EFBFBD>X<EFBFBD>g<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̂Ɏ<CC82><C98E>s<EFBFBD><73><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B"
|
||||
; Goto mess1
|
||||
german:
|
||||
StrCpy $INST_MESS1 "Ports 80 oder 443 (SSL) bereits in Nutzung! Apache2.2-Dienst konnte nicht eingerichtet werden."
|
||||
mess1:
|
||||
WriteRegStr HKLM "Software\xampp" "apacheservice" "0"
|
||||
MessageBox MB_OK "$INST_MESS1"
|
||||
|
||||
no_httpd:
|
||||
ReadRegStr $2 HKLM "Software\xampp" "mysqlservice"
|
||||
StrCmp $2 "0" no_mysql
|
||||
ReadINIStr $R0 "$INSTDIR\install\portcheck.ini" "Ports" "Port3306"
|
||||
StrCmp $R0 "BLOCKED" Port3306Abort
|
||||
ExecWait 'cmd /C cd "$INSTDIR\mysql\bin" & mysqld.exe --install mysql --defaults-file="$INSTDIR\mysql\bin\my.ini" & net start mysql' $9
|
||||
Goto no_mysql
|
||||
Port3306Abort:
|
||||
StrCmp $4 "1031" german1
|
||||
;StrCmp $4 "1041" japan1
|
||||
StrCpy $INST_MESS2 "Port 3306 already in use! Installing MySQL service failed!"
|
||||
Goto mess2
|
||||
; japan1:
|
||||
; StrCpy $INST_MESS2 "<22>|<7C>[<5B>g3306 <20>͂<EFBFBD><CD82>łɎg<C98E>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82>BMySQL<51><4C><EFBFBD>T<EFBFBD>[<5B>r<EFBFBD>X<EFBFBD>Ƃ<EFBFBD><C682>ăC<C483><43><EFBFBD>X<EFBFBD>g<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̂Ɏ<CC82><C98E>s<EFBFBD><73><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B"
|
||||
; Goto mess2
|
||||
german1:
|
||||
StrCpy $INST_MESS2 "Port 3306 bereits in Nutzung! MySQL-Dienst kann nicht eingerichtet werden."
|
||||
mess2:
|
||||
WriteRegStr HKLM "Software\xampp" "mysqlservice" "0"
|
||||
MessageBox MB_OK "$INST_MESS2"
|
||||
|
||||
no_mysql:
|
||||
ReadRegStr $3 HKLM "Software\xampp" "filezillaservice"
|
||||
StrCmp $3 "0" no_ftp
|
||||
ReadINIStr $R0 "$INSTDIR\install\portcheck.ini" "Ports" "Port21"
|
||||
StrCmp $R0 "BLOCKED" Port21Abort
|
||||
ExecWait '"$INSTDIR\FileZillaFTP\FileZillaServer.exe" /install' $9
|
||||
ExecWait '"$INSTDIR\FileZillaFTP\FileZillaServer.exe" /start' $9
|
||||
Goto no_ftp
|
||||
Port21Abort:
|
||||
StrCmp $4 "1031" german2
|
||||
; StrCmp $4 "1041" japan2
|
||||
StrCpy $INST_MESS3 "Port 21 already in use! Installing FileZilla FTPD service failed!"
|
||||
Goto mess3
|
||||
; japan2:
|
||||
; StrCpy $INST_MESS3 "<22>|<7C>[<5B>g 21 <20>͂<EFBFBD><CD82>łɎg<C98E>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82>BFileZilla FTPD <20><><EFBFBD>T<EFBFBD>[<5B>r<EFBFBD>X<EFBFBD>Ƃ<EFBFBD><C682>ăC<C483><43><EFBFBD>X<EFBFBD>g<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>邱<EFBFBD>ƂɎ<C682><C98E>s<EFBFBD><73><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B"
|
||||
; Goto mess3
|
||||
german2:
|
||||
StrCpy $INST_MESS3 "Port 21 bereits in Nutzung! FileZilla-Dienst kann nicht eingerichtet werden!"
|
||||
mess3:
|
||||
WriteRegStr HKLM "Software\xampp" "filezillaservice" "0"
|
||||
MessageBox MB_OK "$INST_MESS3"
|
||||
|
||||
no_ftp:
|
||||
StrCmp $4 "1031" german3
|
||||
; StrCmp $4 "1041" japan3
|
||||
StrCpy $INST_MESS4 "Service installation finished! Hint: Use also the XAMPP Control Panel to manage services."
|
||||
Goto mess4
|
||||
; japan3:
|
||||
; StrCpy $INST_MESS4 "<22>T<EFBFBD>[<5B>r<EFBFBD>X<EFBFBD>Ƃ<EFBFBD><C682>ăC<C483><43><EFBFBD>X<EFBFBD>g<EFBFBD>[<5B><><EFBFBD>ɐ<EFBFBD><C990><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>BXampp<70>R<EFBFBD><52><EFBFBD>g<EFBFBD><67><EFBFBD>[<5B><><EFBFBD>p<EFBFBD>l<EFBFBD><6C><EFBFBD><EFBFBD><EFBFBD>m<EFBFBD>F<EFBFBD><46><EFBFBD>A<EFBFBD>T<EFBFBD>[<5B>r<EFBFBD>X<EFBFBD><58><EFBFBD>Ǘ<EFBFBD><C797><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B"
|
||||
; Goto mess4
|
||||
german3:
|
||||
StrCpy $INST_MESS4 "Dienste-Installation abgeschlossen! Tipp: Dienste k<>nnen Sie auch mit XAMPP Control Panel verwalten."
|
||||
mess4:
|
||||
MessageBox MB_OK "$INST_MESS4"
|
||||
|
||||
no_srv:
|
||||
; DESKTOP & START MENU SECTION
|
||||
ReadRegStr $0 HKLM "Software\xampp" "desktopicon"
|
||||
StrCmp $0 "0" no_icon
|
||||
CreateShortCut "$DESKTOP\XAMPP Control Panel.lnk" "$INSTDIR\xampp-control.exe" ""
|
||||
|
||||
no_icon:
|
||||
ReadRegStr $1 HKLM "Software\xampp" "programfiles"
|
||||
StrCmp $1 "0" no_pfiles
|
||||
CreateDirectory "$SMPROGRAMS\Apache Friends\XAMPP"
|
||||
CreateShortCut "$SMPROGRAMS\Apache Friends\XAMPP" "" ""
|
||||
CreateShortCut "$SMPROGRAMS\Apache Friends\XAMPP\XAMPP Control Panel.lnk" "$INSTDIR\xampp-control.exe" "" "$INSTDIR\install\xampp.ico"
|
||||
CreateShortCut "$SMPROGRAMS\Apache Friends\XAMPP\XAMPP htdocs folder.lnk" "$INSTDIR\htdocs" "" "$INSTDIR\install\folder.ico"
|
||||
;CreateShortCut "$SMPROGRAMS\Apache Friends\XAMPP\Port check.lnk" "$INSTDIR\xampp-portcheck.exe" "" "$INSTDIR\install\xamppcontrol.ico"
|
||||
;CreateShortCut "$SMPROGRAMS\Apache Friends\XAMPP\PHP switch.lnk" "$INSTDIR\php-switch.bat" "" "$INSTDIR\install\php.ico"
|
||||
CreateShortCut "$SMPROGRAMS\Apache Friends\XAMPP\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\install\xampp-icon-uninstall.ico"
|
||||
|
||||
no_pfiles:
|
||||
; StrCmp $4 "1041" japanese
|
||||
; Delete "$INSTDIR\xampp-control-jp.exe"
|
||||
; Rename "$INSTDIR\xampp-control-default.exe" "$INSTDIR\xampp-control.exe"
|
||||
; Goto xamppcontrol_out
|
||||
; japanese:
|
||||
; Delete "$INSTDIR\xampp-control-default.exe"
|
||||
; Rename "$INSTDIR\xampp-control-jp.exe" "$INSTDIR\xampp-control.exe"
|
||||
xamppcontrol_out:
|
||||
|
||||
StrCmp $4 "1031" german4
|
||||
; StrCmp $4 "1041" japan4
|
||||
StrCpy $INST_MESS "Congratulations! The installation was successful! Start the XAMPP Control Panel now?"
|
||||
GOTO Xcontrol
|
||||
german4:
|
||||
StrCpy $INST_MESS "Herzlichen Gl<47>ckwunsch! Die Installation war erfolgreich! Das XAMPP Control Panel jetzt starten?"
|
||||
GOTO Xcontrol
|
||||
; japan4:
|
||||
; StrCpy $INST_MESS "<22><><EFBFBD>߂łƂ<C582><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>C<EFBFBD><43><EFBFBD>X<EFBFBD>g<EFBFBD>[<5B><><EFBFBD>ɐ<EFBFBD><C990><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>BXampp<70>R<EFBFBD><52><EFBFBD>g<EFBFBD><67><EFBFBD>[<5B><><EFBFBD>p<EFBFBD>l<EFBFBD><6C><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD><4E><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>H"
|
||||
Xcontrol:
|
||||
MessageBox MB_YESNO "$INST_MESS" IDNO NoXcontrol
|
||||
Exec '"$INSTDIR\xampp-control.exe"'
|
||||
NoXcontrol:
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Section "Uninstall"
|
||||
Exec '"$INSTDIR\apache\bin\pv.exe" -f -k xampp-control.exe'
|
||||
|
||||
ReadRegStr $9 HKLM "Software\xampp" "lang"
|
||||
; StrCmp $9 "1041" japanese0
|
||||
StrCmp $9 "1031" german0
|
||||
StrCpy $INST_MESS "Really uninstall XAMPP with all services?"
|
||||
GOTO mess_box
|
||||
german0:
|
||||
StrCpy $INST_MESS "XAMPP mit allen Server-Diensten wirklich deinstallieren?"
|
||||
GOTO mess_box
|
||||
; japanese0:
|
||||
; StrCpy $INST_MESS "<22>{<7B><><EFBFBD><EFBFBD>Xampp<70><70><EFBFBD>T<EFBFBD>[<5B>r<EFBFBD>X<EFBFBD><58><EFBFBD>܂߂<DC82><DF82>ăA<C483><41><EFBFBD>C<EFBFBD><43><EFBFBD>X<EFBFBD>g<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>H"
|
||||
mess_box:
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION "$INST_MESS" IDNO ExitDel
|
||||
|
||||
ReadRegStr $5 HKLM "Software\xampp" "services"
|
||||
StrCmp $5 "0" srv_Abort
|
||||
ReadRegStr $2 HKLM "Software\xampp" "apacheservice"
|
||||
StrCmp $2 "0" no_httpd
|
||||
ExecWait 'cmd /C net stop Apache2.2 & "$INSTDIR\apache\bin\httpd.exe" -k uninstall' $9
|
||||
no_httpd:
|
||||
ReadRegStr $3 HKLM "Software\xampp" "mysqlservice"
|
||||
StrCmp $3 "0" no_mysql
|
||||
ExecWait 'cmd /C net stop mysql & "$INSTDIR\mysql\bin\mysqld.exe" --remove mysql' $9
|
||||
no_mysql:
|
||||
ReadRegStr $4 HKLM "Software\xampp" "filezillaservice"
|
||||
StrCmp $4 "0" no_ftpd
|
||||
; Starte: "F:\temp\program files\xampp\FileZillaFTP\FileZillaServer.exe" /stop
|
||||
; Starte: "F:\temp\program files\xampp\FileZillaFTP\FileZillaServer.exe" /uninstall
|
||||
; net stop "FileZilla Server FTP server"
|
||||
ExecWait '"$INSTDIR\FileZillaFTP\FileZillaServer.exe" /stop' $8
|
||||
ExecWait '"$INSTDIR\FileZillaFTP\FileZillaServer.exe" /uninstall' $8
|
||||
no_ftpd:
|
||||
|
||||
ReadRegStr $6 HKLM "Software\xampp" "tomcatservice"
|
||||
StrCmp $6 "0" NoJavaAddon
|
||||
ReadRegStr $7 HKLM "SYSTEM\CurrentControlSet\Services\Tomcat7" "ImagePath"
|
||||
StrCmp $7 "$INSTDIR\tomcat\bin\tomcat6.exe //RS//Tomcat7" Tomcat5Uninstall
|
||||
Goto Tomcat5Abort
|
||||
Tomcat5Uninstall:
|
||||
MessageBox MB_OK "Service detected! Uninstall Tomcat 7 as service!"
|
||||
ExecWait 'cmd /C net stop Tomcat7 & cd "$INSTDIR\tomcat\bin" & service.bat remove Tomcat7' $9
|
||||
Tomcat5Abort:
|
||||
NoJavaAddon:
|
||||
|
||||
srv_Abort:
|
||||
|
||||
ReadRegStr $0 HKLM "Software\xampp" "desktopicon"
|
||||
StrCmp $0 "0" no_icon
|
||||
Delete "$DESKTOP\XAMPP Control Panel.lnk"
|
||||
no_icon:
|
||||
ReadRegStr $8 HKLM "Software\xampp" "programfiles"
|
||||
StrCmp $8 "0" no_pfiles
|
||||
Delete "$SMPROGRAMS\Apache Friends\xampp\*.*"
|
||||
RMDir "$SMPROGRAMS\Apache Friends\xampp"
|
||||
RMDir "$SMPROGRAMS\Apache Friends"
|
||||
no_pfiles:
|
||||
|
||||
|
||||
|
||||
RMDir /r "$INSTDIR\anonymous"
|
||||
RMDir /r "$INSTDIR\apache"
|
||||
RMDir /r "$INSTDIR\cgi-bin"
|
||||
RMDir /r "$INSTDIR\FileZillaFTP"
|
||||
RMDir /r "$INSTDIR\install"
|
||||
RMDir /r "$INSTDIR\licenses"
|
||||
RMDir /r "$INSTDIR\MercuryMail"
|
||||
RMDir /r "$INSTDIR\perl"
|
||||
RMDir /r "$INSTDIR\php"
|
||||
RMDir /r "$INSTDIR\phpMyAdmin"
|
||||
RMDir /r "$INSTDIR\python"
|
||||
RMDir /r "$INSTDIR\security"
|
||||
RMDir /r "$INSTDIR\sendmail"
|
||||
RMDir /r "$INSTDIR\tmp"
|
||||
RMDir /r "$INSTDIR\tomcat"
|
||||
RMDir /r "$INSTDIR\webalizer"
|
||||
RMDir /r "$INSTDIR\webdav"
|
||||
RMDir /r "$INSTDIR\nsis"
|
||||
RMDir /r "$INSTDIR\contrib"
|
||||
RMDir /r "$INSTDIR\src"
|
||||
|
||||
Delete "$INSTDIR\apache_start.bat"
|
||||
Delete "$INSTDIR\apache_stop.bat"
|
||||
Delete "$INSTDIR\filezilla_setup.bat"
|
||||
Delete "$INSTDIR\filezilla_start.bat"
|
||||
Delete "$INSTDIR\filezilla_stop.bat"
|
||||
Delete "$INSTDIR\mercury_start.bat"
|
||||
Delete "$INSTDIR\mercury_stop.bat"
|
||||
Delete "$INSTDIR\mysql_start.bat"
|
||||
Delete "$INSTDIR\mysql_stop.bat"
|
||||
Delete "$INSTDIR\php-switch.bat"
|
||||
Delete "$INSTDIR\readme_de.txt"
|
||||
Delete "$INSTDIR\readme_en.txt"
|
||||
Delete "$INSTDIR\service.exe"
|
||||
Delete "$INSTDIR\setup_xampp.bat"
|
||||
Delete "$INSTDIR\xampp_restart.exe"
|
||||
Delete "$INSTDIR\xampp_start.exe"
|
||||
Delete "$INSTDIR\xampp_stop.exe"
|
||||
Delete "$INSTDIR\xampp-changes.txt"
|
||||
Delete "$INSTDIR\xampp-portcheck.exe"
|
||||
Delete "$INSTDIR\xampp-control.exe"
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
Delete "$INSTDIR\javapath.ini"
|
||||
Delete "$INSTDIR\readme-addon-perl.txt"
|
||||
Delete "$INSTDIR\readme-addon-tomcat.txt"
|
||||
Delete "$INSTDIR\tomcat_start.bat"
|
||||
Delete "$INSTDIR\tomcat_stop.bat"
|
||||
Delete "$INSTDIR\passwords.txt"
|
||||
Delete "$INSTDIR\xampp_cli.exe"
|
||||
Delete "$INSTDIR\xampp_chkdll.exe"
|
||||
Delete "$INSTDIR\xampp_service_mercury.exe"
|
||||
Delete "$INSTDIR\catalina_start.bat"
|
||||
Delete "$INSTDIR\catalina_stop.bat"
|
||||
Delete "$INSTDIR\xampp-control-3-beta.exe"
|
||||
;Delete "$INSTDIR\msvcr71.dll"
|
||||
|
||||
DeleteRegKey HKLM "Software\xampp"
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\xampp"
|
||||
|
||||
; StrCmp $LANGUAGE "1041" japanese1
|
||||
StrCmp $LANGUAGE "1031" german1
|
||||
StrCpy $INST_MESS1 "Remove all MySQL data bases from $INSTDIR\mysql\data?"
|
||||
GOTO messa1
|
||||
german1:
|
||||
StrCpy $INST_MESS1 "Alle MySQL Datenbanken in $INSTDIR\mysql\data l<>schen?"
|
||||
GOTO messa1
|
||||
; japanese1:
|
||||
; StrCpy $INST_MESS1 "MySQL<51>f<EFBFBD>[<5B>^<5E>x<EFBFBD>[<5B>X<EFBFBD><58> $INSTDIR\mysql\data <20><><EFBFBD><EFBFBD><EFBFBD>폜<EFBFBD><ED8F9C><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>H"
|
||||
messa1:
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION "$INST_MESS1" IDYES NoMysql
|
||||
Delete "$INSTDIR\mysql\*.*"
|
||||
RMDir /r "$INSTDIR\mysql\bin"
|
||||
RMDir /r "$INSTDIR\mysql\scripts"
|
||||
RMDir /r "$INSTDIR\mysql\share"
|
||||
StrCpy $DB_DEL "0"
|
||||
Goto DeleteHtdocs
|
||||
NoMysql:
|
||||
RMDir /r "$INSTDIR\mysql"
|
||||
DeleteHtdocs:
|
||||
|
||||
; StrCmp $LANGUAGE "1041" japanese2
|
||||
StrCmp $LANGUAGE "1031" german2
|
||||
StrCpy $INST_MESS2 "Remove the $INSTDIR\htdocs folder too?"
|
||||
StrCpy $MESS_INSTDIR1 "Shall the installer try to remove $INSTDIR?"
|
||||
StrCpy $MESS_INSTDIR2 "Note: $INSTDIR could not be removed!"
|
||||
GOTO messa2
|
||||
german2:
|
||||
StrCpy $INST_MESS2 "Auch das Verzeichnis $INSTDIR\htdocs l<>schen?"
|
||||
StrCpy $MESS_INSTDIR1 "Soll der Installer (versuchen) das Verzeichnis $INSTDIR (zu) l<>schen?"
|
||||
StrCpy $MESS_INSTDIR2 "Achtung: K<>nnte $INSTDIR nicht l<>schen!"
|
||||
GOTO messa2
|
||||
; japanese2:
|
||||
; StrCpy $INST_MESS2 "$INSTDIR\htdocs <20>̃t<CC83>H<EFBFBD><48><EFBFBD>_<EFBFBD>[<5B><><EFBFBD>폜<EFBFBD><ED8F9C><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>H"
|
||||
; StrCpy $MESS_INSTDIR1 "Shall the installer try to remove $INSTDIR?"
|
||||
; StrCpy $MESS_INSTDIR2 "Note: $INSTDIR could not be removed!"
|
||||
messa2:
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION "$INST_MESS2" IDYES noHtdocs
|
||||
Goto NoDelete
|
||||
noHtdocs:
|
||||
RMDir /r "$INSTDIR\htdocs"
|
||||
GOTO NoDocs
|
||||
NoDelete:
|
||||
GOTO ExitDel
|
||||
NoDocs:
|
||||
StrCmp $DB_DEL "0" NoXaDir
|
||||
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION "$MESS_INSTDIR1" IDYES noIDIR
|
||||
Goto yesIDIR
|
||||
noIDIR:
|
||||
RMDir "$INSTDIR"
|
||||
IfFileExists "$INSTDIR\*.*" ErrorMsg
|
||||
Goto yesIDIR
|
||||
ErrorMsg:
|
||||
MessageBox MB_OK "$MESS_INSTDIR2" ; skipped if file doesn't exist
|
||||
yesIDIR:
|
||||
|
||||
NoXaDir:
|
||||
ExitDel:
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Uninstaller Functions
|
||||
Function un.onInit
|
||||
!insertmacro MUI_UNGETLANGUAGE
|
||||
FunctionEnd
|
||||
@@ -1,45 +0,0 @@
|
||||
[Settings]
|
||||
NumFields=5
|
||||
|
||||
[Field 1]
|
||||
Type=label
|
||||
Text=XAMPP DESKTOP
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=0
|
||||
Bottom=10
|
||||
|
||||
[Field 2]
|
||||
Type=checkbox
|
||||
Text=XAMPP als Desktop Icon
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=10
|
||||
Bottom=25
|
||||
State=1
|
||||
|
||||
[Field 3]
|
||||
Type=label
|
||||
Text=XAMPP START MEN<45>
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=30
|
||||
Bottom=40
|
||||
|
||||
[Field 4]
|
||||
Type=checkbox
|
||||
Text=Apache Friends XAMPP Eintrag unter Start/Programme
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=40
|
||||
Bottom=55
|
||||
State=1
|
||||
|
||||
[Field 5]
|
||||
Type=link
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=115
|
||||
Bottom=125
|
||||
State=http://www.apachefriends.org/en/faq-xampp-windows.html
|
||||
Text=Bitte besuchen Sie auch die XAMPP Windows FAQ Website
|
||||
@@ -1,45 +0,0 @@
|
||||
[Settings]
|
||||
NumFields=5
|
||||
|
||||
[Field 1]
|
||||
Type=label
|
||||
Text=XAMPP <20>f<EFBFBD>X<EFBFBD>N<EFBFBD>g<EFBFBD>b<EFBFBD>v
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=0
|
||||
Bottom=10
|
||||
|
||||
[Field 2]
|
||||
Type=checkbox
|
||||
Text=<EFBFBD>f<EFBFBD>X<EFBFBD>N<EFBFBD>g<EFBFBD>b<EFBFBD>v<EFBFBD><EFBFBD>Xampp<EFBFBD>A<EFBFBD>C<EFBFBD>R<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>쐬
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=10
|
||||
Bottom=25
|
||||
State=1
|
||||
|
||||
[Field 3]
|
||||
Type=label
|
||||
Text=XAMPP <20>X<EFBFBD>^<5E>[<5B>g<EFBFBD><67><EFBFBD>j<EFBFBD><6A><EFBFBD>[
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=30
|
||||
Bottom=40
|
||||
|
||||
[Field 4]
|
||||
Type=checkbox
|
||||
Text=<EFBFBD>X<EFBFBD>^<5E>[<5B>g<EFBFBD><67><EFBFBD>j<EFBFBD><6A><EFBFBD>[<5B><>Apache Friends XAMPP <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>_<EFBFBD>[<5B><><EFBFBD>쐬
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=40
|
||||
Bottom=55
|
||||
State=1
|
||||
|
||||
[Field 5]
|
||||
Type=link
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=115
|
||||
Bottom=125
|
||||
State=http://www.apachefriends.org/en/faq-xampp-windows.html
|
||||
Text=XAMPP Windows<77>ł<EFBFBD>FAQ <20>y<EFBFBD>[<5B>W<EFBFBD><57><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
@@ -1,45 +0,0 @@
|
||||
[Settings]
|
||||
NumFields=5
|
||||
|
||||
[Field 1]
|
||||
Type=label
|
||||
Text=XAMPP DESKTOP
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=0
|
||||
Bottom=10
|
||||
|
||||
[Field 2]
|
||||
Type=checkbox
|
||||
Text=Create a XAMPP desktop icon
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=10
|
||||
Bottom=25
|
||||
State=1
|
||||
|
||||
[Field 3]
|
||||
Type=label
|
||||
Text=XAMPP START MENU
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=30
|
||||
Bottom=40
|
||||
|
||||
[Field 4]
|
||||
Type=checkbox
|
||||
Text=Create an Apache Friends XAMPP folder in the start menu
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=40
|
||||
Bottom=55
|
||||
State=1
|
||||
|
||||
[Field 5]
|
||||
Type=link
|
||||
Left=40
|
||||
Right=-1
|
||||
Top=115
|
||||
Bottom=125
|
||||
State=http://www.apachefriends.org/en/faq-xampp-windows.html
|
||||
Text=See also the XAMPP for Windows FAQ Page
|
||||
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,5 +0,0 @@
|
||||
@echo off
|
||||
echo "Checking necessary ports! Please wait ..."
|
||||
set PHP_BIN=..\php\php.exe
|
||||
set CONFIG_PHP=portcheck.php -80,443,3306,21,14147,8080
|
||||
%PHP_BIN% -n -d output_buffering=0 %CONFIG_PHP%
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
@@ -1,28 +0,0 @@
|
||||
all: checkdll.exe xampp_start.exe xampp_stop.exe xamppcli.exe
|
||||
|
||||
clean:
|
||||
rm checkdll.exe xampp_start.exe xampp_stop.exe wrapper.exe xamppcli.exe
|
||||
rm *.obj
|
||||
|
||||
checkdll.exe: checkdll.c
|
||||
cl /nologo checkdll.c
|
||||
cp checkdll.exe /c/XAMPP/bin
|
||||
|
||||
xampp_util.obj: xampp_util.c
|
||||
cl /nologo /c xampp_util.c
|
||||
|
||||
xampp.res: xampp.rc
|
||||
rc xampp.rc
|
||||
|
||||
xampp_start.exe: xampp_start.c xampp_util.obj xampp_util.h xampp.res
|
||||
cl /nologo xampp_start.c xampp_util.obj xampp.res
|
||||
cp xampp_start.exe /c/XAMPP/start.exe
|
||||
|
||||
xampp_stop.exe: xampp_stop.c xampp_util.obj xampp_util.h xampp.res
|
||||
cl /nologo xampp_stop.c xampp_util.obj xampp.res
|
||||
cp xampp_stop.exe /c/XAMPP/stop.exe
|
||||
|
||||
xamppcli.exe: xamppcli.c xampp_util.obj xampp_util.h xampp.res
|
||||
cl /nologo xamppcli.c xampp_util.obj xampp.res
|
||||
cp xamppcli.exe /c/XAMPP/bin
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Copyright (C) 2007-2010 Kai Seidler, oswald@apachefriends.org, GPL-licensed
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if(argc!=2)
|
||||
{
|
||||
printf("Usage: %s <library name>\n",argv[0]);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if(LoadLibrary(argv[1]))
|
||||
{
|
||||
printf("OK\n");
|
||||
exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("NOK\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef _RC_H_INCLUDED
|
||||
#define _RC_H_INCLUDED
|
||||
|
||||
#define XAMPP_ICON 300
|
||||
|
||||
|
||||
#endif // _RC_H_INCLUDED
|
||||
|
Before Width: | Height: | Size: 30 KiB |
@@ -1,42 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include "rc.h"
|
||||
|
||||
XAMPP_ICON ICON xampp.ico
|
||||
|
||||
#define VER_FILEVERSION 1,0
|
||||
#define VER_FILEVERSION_STR "1.0"
|
||||
#define VER_PRODUCTVERSION 1,0,0,0
|
||||
#define VER_PRODUCTVERSION_STR "1.0.0.0"
|
||||
|
||||
// -------------------------------------------------------
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_FILEVERSION
|
||||
PRODUCTVERSION VER_PRODUCTVERSION
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Apache Friends"
|
||||
VALUE "FileDescription", "Start and stop XAMPP"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2010 Kai Seidler, Apache Friends"
|
||||
VALUE "ProductName", "XAMPPcli"
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
@@ -1,33 +0,0 @@
|
||||
// Copyright (C) 2007-2010 Kai Seidler, oswald@apachefriends.org, GPL-licensed
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
|
||||
#include "xampp_util.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char buffer[200];
|
||||
char *start[10][10] = {
|
||||
{"apache\\bin\\httpd.exe", "-f conf\\httpd.conf", NULL},
|
||||
{"mysql\\bin\\mysqld.exe", "--defaults-file=mysql\\bin\\my.ini", "--standalone", NULL},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
printf("\nXAMPP now starts as a console application.\n\n");
|
||||
|
||||
printf("Instead of pressing Control-C in this console window, please use xampp_stop.exe\n");
|
||||
printf("to stop XAMPP, because it lets XAMPP end any current transactions and cleanup\n");
|
||||
printf("gracefully.\n\n");
|
||||
|
||||
|
||||
xampp_cdx();
|
||||
|
||||
xampp_call(start);
|
||||
|
||||
Sleep(10000);
|
||||
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
// Copyright (C) 2007-2010 Kai Seidler, oswald@apachefriends.org, GPL-licensed
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "xampp_util.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
long pid;
|
||||
HANDLE shutdownEvent;
|
||||
char shutdownEventName[32];
|
||||
FILE *fp;
|
||||
char *pidfile;
|
||||
|
||||
printf("Stopping XAMPP...\n\n");
|
||||
|
||||
xampp_cdx();
|
||||
|
||||
pidfile="apache\\logs\\httpd.pid";
|
||||
fp=fopen(pidfile,"r");
|
||||
if(!fp)
|
||||
{
|
||||
printf("Can't find %s.\n", pidfile);
|
||||
Sleep(10000);
|
||||
}
|
||||
else
|
||||
{
|
||||
fscanf(fp,"%d", &pid);
|
||||
fclose(fp);
|
||||
|
||||
sprintf_s(shutdownEventName, sizeof(shutdownEventName), "ap%d_shutdown", pid);
|
||||
shutdownEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, shutdownEventName);
|
||||
if (shutdownEvent != NULL)
|
||||
{
|
||||
SetEvent(shutdownEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Can't find Apache process #%d.\n", pid);
|
||||
Sleep(10000);
|
||||
}
|
||||
}
|
||||
|
||||
pidfile="mysql\\data\\mysql.pid";
|
||||
fp=fopen(pidfile,"r");
|
||||
if(!fp)
|
||||
{
|
||||
printf("Can't find %s.\n", pidfile);
|
||||
Sleep(10000);
|
||||
return(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
fscanf(fp,"%d", &pid);
|
||||
fclose(fp);
|
||||
|
||||
sprintf_s(shutdownEventName, sizeof(shutdownEventName), "MySQLShutdown%d", pid);
|
||||
shutdownEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, shutdownEventName);
|
||||
if (shutdownEvent != NULL)
|
||||
{
|
||||
SetEvent(shutdownEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Can't find MySQL process #%d.\n", pid);
|
||||
Sleep(10000);
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
Sleep(10000);
|
||||
return(0);
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
// Copyright (C) 2007-2010 Kai Seidler, oswald@apachefriends.org, GPL-licensed
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "xampp_util.h"
|
||||
|
||||
void xampp_call(char *start[10][10])
|
||||
{
|
||||
int s;
|
||||
int i;
|
||||
char buffer[200];
|
||||
|
||||
i=0;
|
||||
s=0;
|
||||
while(1)
|
||||
{
|
||||
if(start[i][0]==NULL)
|
||||
break;
|
||||
sprintf(buffer,"%s",start[i][0]);
|
||||
s=_spawnvp(P_NOWAIT,buffer, start[i]);
|
||||
if(s==-1)
|
||||
{
|
||||
printf("Error while calling %s...\n",buffer);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void xampp_stop(char *pidfile,char *eventformat)
|
||||
{
|
||||
HANDLE shutdownEvent;
|
||||
char shutdownEventName[32];
|
||||
FILE *fp;
|
||||
long pid;
|
||||
|
||||
fp=fopen(pidfile,"r");
|
||||
if(!fp)
|
||||
{
|
||||
printf("Can't find %s.\n", pidfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
fscanf(fp,"%d", &pid);
|
||||
fclose(fp);
|
||||
|
||||
sprintf_s(shutdownEventName, sizeof(shutdownEventName), eventformat, pid);
|
||||
shutdownEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, shutdownEventName);
|
||||
if (shutdownEvent != NULL)
|
||||
{
|
||||
SetEvent(shutdownEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Can't find process #%d.\n", pid);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void xampp_cdx()
|
||||
{
|
||||
char path[1000];
|
||||
char *ptr;
|
||||
|
||||
//path[ sizeof(path) -1] = 0;
|
||||
|
||||
GetModuleFileName( NULL, path, sizeof( path ) -1 );
|
||||
ptr=strrchr(path,'\\');
|
||||
*ptr='\0';
|
||||
|
||||
chdir(path);
|
||||
//printf("chdir(%s)\n", path);
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// Copyright (C) 2007-2010 Kai Seidler, oswald@apachefriends.org, GPL-licensed
|
||||
|
||||
void xampp_call(char *start[10][10]);
|
||||
void xampp_cdx();
|
||||
@@ -1,107 +0,0 @@
|
||||
// Copyright (C) 2007-2010 Kai Seidler, oswald@apachefriends.org, GPL-licensed
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "xampp_util.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
long pid;
|
||||
HANDLE shutdownEvent;
|
||||
char shutdownEventName[32];
|
||||
FILE *fp;
|
||||
char *pidfile;
|
||||
char *startapache[10][10] = { {"httpd.exe", "-DPHP5", NULL}, {NULL} };
|
||||
char *startmysql[10][10] = { {"mysqld.exe", "--standalone", NULL}, {NULL} };
|
||||
|
||||
if(argc!=2)
|
||||
{
|
||||
printf("Usage: %s <command>\n",argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
xampp_cdx();
|
||||
chdir("..");
|
||||
|
||||
if(!strcmp(argv[1],"stopapache"))
|
||||
{
|
||||
xampp_stop("logs\\httpd.pid","ap%d_shutdown");
|
||||
}
|
||||
else if(!strcmp(argv[1],"startapache"))
|
||||
{
|
||||
xampp_call(startapache);
|
||||
}
|
||||
else if(!strcmp(argv[1],"startmysql"))
|
||||
{
|
||||
xampp_call(startmysql);
|
||||
}
|
||||
else if(!strcmp(argv[1],"stopmysql"))
|
||||
{
|
||||
xampp_stop("var\\mysql\\mysql.pid","MySQLShutdown%d");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Unknown command %s\n",argv[1]);
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
|
||||
printf("Stopping XAMPP...\n");
|
||||
|
||||
Sleep(1000);
|
||||
|
||||
xampp_cdx();
|
||||
|
||||
pidfile="logs\\httpd.pid";
|
||||
fp=fopen(pidfile,"r");
|
||||
if(!fp)
|
||||
{
|
||||
printf("Can't find %s.\n", pidfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
fscanf(fp,"%d", &pid);
|
||||
fclose(fp);
|
||||
|
||||
sprintf_s(shutdownEventName, sizeof(shutdownEventName), "ap%d_shutdown", pid);
|
||||
shutdownEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, shutdownEventName);
|
||||
if (shutdownEvent != NULL)
|
||||
{
|
||||
SetEvent(shutdownEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Can't find Apache process #%d.\n", pid);
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
|
||||
pidfile="var\\mysql\\mysql.pid";
|
||||
fp=fopen(pidfile,"r");
|
||||
if(!fp)
|
||||
{
|
||||
printf("Can't find %s.\n", pidfile);
|
||||
return(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
fscanf(fp,"%d", &pid);
|
||||
fclose(fp);
|
||||
|
||||
pidfile="var\\mysql\\mysql.pid";
|
||||
sprintf_s(shutdownEventName, sizeof(shutdownEventName), "MySQLShutdown%d", pid);
|
||||
shutdownEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, shutdownEventName);
|
||||
if (shutdownEvent != NULL)
|
||||
{
|
||||
SetEvent(shutdownEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Can't find MySQL process #%d.\n", pid);
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
@ECHO OFF
|
||||
|
||||
rmdir /S/Q MercuryMail
|
||||
rmdir /S/Q tomcat
|
||||
rmdir /S/Q FileZillaFTP
|
||||
rmdir /S/Q anonymous
|
||||
rmdir /S/Q webalizer
|
||||
rmdir /S/Q perl\site
|
||||
rmdir /S/Q perl\lib
|
||||
rmdir /S/Q perl\bin\.cpan
|
||||
rmdir /S/Q perl\bin\.cpanplus
|
||||
rmdir /S/Q perl\bin\.ppm
|
||||
rmdir /S/Q mysql\mysql-test
|
||||
rmdir /S/Q php\PEAR
|
||||
del /F/Q perl\bin\libeay32.dll
|
||||
del /F/Q perl\bin\ssleay32.dll
|
||||
del /F/Q perl\bin\libmysql.dll
|
||||
del /F/Q catalina_start.bat
|
||||
del /F/Q catalina_stop.bat
|
||||
del /F/Q filezilla_setup.bat
|
||||
del /F/Q filezilla_start.bat
|
||||
del /F/Q filezilla_stop.bat
|
||||
del /F/Q mercury_start.bat
|
||||
del /F/Q mercury_stop.bat
|
||||
del /F/Q service.exe
|
||||
del /F/Q apache\apache_installservice.bat
|
||||
del /F/Q apache\apache_uninstallservice.bat
|
||||
del /F/Q mysql\mysql_installservice.bat
|
||||
del /F/Q mysql\mysql_uninstallservice.bat
|
||||
del /F/Q htdocs\xampp\navitools.inc
|
||||
del /F/Q htdocs\xampp\naviperl.inc
|
||||
del /F/Q htdocs\xampp\navijava.inc
|
||||
del /F/Q htdocs\xampp\.modell
|
||||
del /F/Q apache\conf\extra\httpd-perl.conf
|
||||
del /F/Q setup_xampp.bat
|
||||
del /F/Q xampp-control.exe
|
||||
copy src\xampp-usb-lite\setup_xampp.bat .
|
||||
copy src\xampp-usb-lite\usb-control-panel\Release\xampp-control.exe .
|
||||
mv htdocs\xampp\navitools-usb.inc htdocs\xampp\navitools.inc
|
||||
mv htdocs\xampp\naviperl-usb.inc htdocs\xampp\naviperl.inc
|
||||
mv htdocs\xampp\navijava-usb.inc htdocs\xampp\navijava.inc
|
||||
mv apache\conf\extra\httpd-perl-usb.conf apache\conf\extra\httpd-perl.conf
|
||||
mv htdocs\xampp\.modell-usb htdocs\xampp\.modell
|
||||
|
||||