Browse Source

Remove allocation of new console from Windows_HostConsole; server example improved and tested, documentation for example added

Ivan Denisov 11 years ago
parent
commit
cb8d9f1fc0

BIN
BlackBox/_Windows_/Host/Mod/Console.odc


+ 1 - 0
examples/server/Gtk2

@@ -0,0 +1 @@
+/home/ivan/oberon/freenix/BlackBox/_Linux_GUI/Gtk2

+ 28 - 0
examples/server/README

@@ -0,0 +1,28 @@
+# This example demonstrates simple server based on console version of BlackBox.
+
+# To run this example you need to build console version of BlackBox:
+
+# 1. Go to the BlackBox folder
+cd ../../BlackBox
+
+# 2. Clean previous
+./clean
+./switch-target none
+
+# 3. Switch to BlackBox Interp and compile
+./switch-target `uname -s` Interp
+./build
+
+# 4. Go to the example folder and compile the example
+cd ../examples/server
+../../run-BlackBox < buildExample
+
+# 5. Stop any other server that using 80 ports (apache, nginx, ...)
+# 6. Then you can start server using command:
+
+sudo ./bbserver
+
+# To check the work of the server open browsel and look the page http://localhost
+
+# There are scripts ./start and ./stop for the deamon start and stop mode
+

BIN
examples/server/System/Mod/Init.odc


BIN
examples/server/Tcp/Mod/Client.odc


BIN
examples/server/Tcp/Mod/Sender.odc


BIN
examples/server/Tcp/Mod/Server.odc


BIN
examples/server/Tcp/Mod/Service.odc


BIN
examples/server/Tcp/Mod/Unloader.odc


BIN
examples/server/Tcp/Rsrc/Server.odc


+ 1 - 1
examples/server/bbserver

@@ -6,4 +6,4 @@ unset GTK_MODULES
 export LIBOVERLAY_SCROLLBAR=0
 env \
   BB_PRIMARY_DIR="../../BlackBox" BB_SECONDARY_DIR="$PWD" \
-../../BlackBox/blackboxc
+  ../../BlackBox/blackboxc

+ 5 - 0
examples/server/buildExample

@@ -0,0 +1,5 @@
+DevCompiler.CompileThis TcpService TcpServer TcpBytes TcpTask
+
+DevCompiler.CompileThis Gtk2GLib Gtk2GObject Gtk2Pango Gtk2Gdk Gtk2Gtk
+
+DevCompiler.CompileThis Init

+ 0 - 18
examples/server/web/forms.html

@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-	<title>Oberon web server</title>
-</head>
-
-<body style="background: #EEEEBB; margin: 20px; font-family: Trebuchet MS; color: #330000">
-
-<br><a href='/'>На главную</a><br><br>
-
-POST form:<br>
-<form action='/forms.html' method='post' enctype='multipart/form-data' name='post_form'><input type='text' name='test_post'><input type='submit' value='post'></form><br>
-
-GET form:<br>
-<form action='/forms.html' method='get' name='post_form'><input type='text' name='test_get'><input type='submit' value='get'></form>
-
-</body>
-</html>

+ 2 - 3
examples/server/web/index.html

@@ -7,10 +7,9 @@
 <body style="background: #EEEEBB; margin: 20px; font-family: Trebuchet MS; color: #330000">
 <table width='100%'>
 <tr><td width='140px' valign='top' align='center'><img src='logo.png' style='margin-top: 7px'></td>
-<td valign='top' align='left'><h2>Cервер на <a href='http://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%BF%D0%BE%D0%BD%D0%B5%D0%BD%D1%82%D0%BD%D1%8B%D0%B9_%D0%9F%D0%B0%D1%81%D0%BA%D0%B0%D0%BB%D1%8C'>Компонентном паскале</a></h2>
-
-Серверное приложение основано на Linux версии BlackBox Component Builder 1.6.<br><br>
+<td valign='top' align='left'><h2>The server is based on <a href='http://blackboxframework.org'>BlackBox/Component Pascal</a></h2>
 
+This server application runs on <a href='http://gitlab.molpit.com/oberon/blackbox-freenix'>Linux version of BlackBox Component Builder 1.6</a>.
 </td></tr>
 </table>
 </body>

BIN
examples/server/web/logo.png