moved wizard under tools/estudio_wizard
This commit is contained in:
4
tools/estudio_wizard/rootdir/ewf.dsc
Normal file
4
tools/estudio_wizard/rootdir/ewf.dsc
Normal file
@@ -0,0 +1,4 @@
|
||||
NAME="EWF: Eiffel Web Framework application, multi-platform, with EWF"
|
||||
DESCRIPTION="Create a web server application based on the cross-platform library EWF."
|
||||
LOCATION="ewf"
|
||||
PLATFORM="all"
|
||||
63
tools/estudio_wizard/rootdir/resources/${APP_NAME}-safe.ecf
Normal file
63
tools/estudio_wizard/rootdir/resources/${APP_NAME}-safe.ecf
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-10-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-10-0 http://www.eiffel.com/developers/xml/configuration-1-10-0.xsd" name="{$WIZ.project.name/}" uuid="{$UUID/}" library_target="{$WIZ.project.name/}">
|
||||
<target name="common" abstract="true">
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/CVS$</exclude>
|
||||
<exclude>/.svn$</exclude>
|
||||
</file_rule>
|
||||
<option warning="true" is_attached_by_default="true" void_safety="all" syntax="transitional">
|
||||
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
||||
</option>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||
<library name="http" location="$ISE_LIBRARY\contrib\library\network\protocol\http\http-safe.ecf"/>
|
||||
<library name="wsf" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\wsf-safe.ecf"/>
|
||||
</target>
|
||||
<target name="{$WIZ.project.name/}_any" extends="common">
|
||||
<root class="{$APP_ROOT/}" feature="make_and_launch"/>
|
||||
{if condition="$WIZ.connectors.use_cgi ~ $WIZ_YES"}<library name="cgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\connector\cgi-safe.ecf"/>{/if}
|
||||
{if condition="$WIZ.connectors.use_libfcgi ~ $WIZ_YES"}<library name="libfcgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\connector\libfcgi-safe.ecf"/>{/if}
|
||||
{if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}<library name="nino" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\connector\nino-safe.ecf"/>{/if}
|
||||
<cluster name="launcher" location=".\launcher\" recursive="true">
|
||||
<file_rule>
|
||||
<exclude>/default$</exclude>
|
||||
</file_rule>
|
||||
</cluster>
|
||||
<cluster name="src" location=".\src\" recursive="true"/>
|
||||
</target>
|
||||
{if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}
|
||||
<target name="{$WIZ.project.name/}_nino" extends="common">
|
||||
<root class="{$APP_ROOT/}" feature="make_and_launch"/>
|
||||
<library name="default_nino" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\default\nino-safe.ecf"/>
|
||||
<cluster name="launcher" location=".\launcher\" recursive="true">
|
||||
<file_rule>
|
||||
<exclude>/any$</exclude>
|
||||
</file_rule>
|
||||
</cluster>
|
||||
<cluster name="src" location=".\src\" recursive="true"/>
|
||||
</target>{/if}
|
||||
{if condition="$WIZ.connectors.use_cgi ~ $WIZ_YES"}
|
||||
<target name="{$WIZ.project.name/}_cgi" extends="common">
|
||||
<root class="{$APP_ROOT/}" feature="make_and_launch"/>
|
||||
<library name="default_cgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\default\cgi-safe.ecf"/>
|
||||
<cluster name="launcher" location=".\launcher\" recursive="true">
|
||||
<file_rule>
|
||||
<exclude>/any$</exclude>
|
||||
</file_rule>
|
||||
</cluster>
|
||||
<cluster name="src" location=".\src\" recursive="true"/>
|
||||
</target>{/if}
|
||||
{if condition="$WIZ.connectors.use_libfcgi ~ $WIZ_YES"}
|
||||
<target name="{$WIZ.project.name/}_libfcgi" extends="common">
|
||||
<root class="{$APP_ROOT/}" feature="make_and_launch"/>
|
||||
<library name="default_libfcgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\default\libfcgi-safe.ecf"/>
|
||||
<cluster name="launcher" location=".\launcher\" recursive="true">
|
||||
<file_rule>
|
||||
<exclude>/any$</exclude>
|
||||
</file_rule>
|
||||
</cluster>
|
||||
<cluster name="src" location=".\src\" recursive="true"/>
|
||||
</target>{/if}
|
||||
|
||||
<target name="{$WIZ.project.name/}" extends="{$WIZ.project.name/}_any"/>
|
||||
</system>
|
||||
6
tools/estudio_wizard/rootdir/resources/_vars.e
Normal file
6
tools/estudio_wizard/rootdir/resources/_vars.e
Normal file
@@ -0,0 +1,6 @@
|
||||
Wizard data values:
|
||||
{foreach key="k" item="v" from="$WIZ"}
|
||||
+ Page #{$k/}
|
||||
{foreach key="pk" item="pv" from="$v"}- {$pk/}={$pv/}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
4
tools/estudio_wizard/rootdir/resources/ewf.ini
Normal file
4
tools/estudio_wizard/rootdir/resources/ewf.ini
Normal file
@@ -0,0 +1,4 @@
|
||||
# For nino connector, use port {$WIZ.standalone_connector.port/}
|
||||
port={$WIZ.standalone_connector.port/}
|
||||
|
||||
#verbose=true
|
||||
@@ -0,0 +1,84 @@
|
||||
note
|
||||
description: "[
|
||||
Specific application launcher
|
||||
|
||||
DO NOT EDIT THIS CLASS
|
||||
|
||||
you can customize APPLICATION_LAUNCHER
|
||||
]"
|
||||
date: "$Date: 2013-06-12 13:55:42 +0200 (mer., 12 juin 2013) $"
|
||||
revision: "$Revision: 36 $"
|
||||
|
||||
deferred class
|
||||
APPLICATION_LAUNCHER_I
|
||||
|
||||
feature -- Execution
|
||||
|
||||
launch (a_service: WSF_SERVICE; opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS)
|
||||
-- Launch Web Server Application using `a_service' and optionals `opts'.
|
||||
local
|
||||
l_id: like launcher_id
|
||||
launcher: WSF_SERVICE_LAUNCHER
|
||||
do
|
||||
l_id := launcher_id
|
||||
if l_id = Void then
|
||||
{unless condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}{literal}
|
||||
io.error.put_string ("Application launcher not found!%N")
|
||||
(create {EXCEPTIONS}).die (-1){/literal}{/unless}
|
||||
{if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}{literal}
|
||||
-- Choose a default -> standalone
|
||||
create {WSF_NINO_SERVICE_LAUNCHER} launcher.make_and_launch (a_service, opts){/literal}{/if}
|
||||
{if condition="$WIZ.connectors.use_libfcgi ~ $WIZ_YES"}{literal}
|
||||
elseif is_libfcgi_launcher_id (l_id) then
|
||||
create {WSF_LIBFCGI_SERVICE_LAUNCHER} launcher.make_and_launch (a_service, opts){/literal}{/if}
|
||||
{if condition="$WIZ.connectors.use_cgi ~ $WIZ_YES"}{literal}
|
||||
elseif is_cgi_launcher_id (l_id) then
|
||||
create {WSF_CGI_SERVICE_LAUNCHER} launcher.make_and_launch (a_service, opts){/literal}{/if}
|
||||
{if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}{literal}
|
||||
elseif is_nino_launcher_id (l_id) then
|
||||
create {WSF_NINO_SERVICE_LAUNCHER} launcher.make_and_launch (a_service, opts){/literal}{/if}
|
||||
{literal}
|
||||
else
|
||||
io.error.put_string ("Application launcher not found!%N")
|
||||
(create {EXCEPTIONS}).die (-1)
|
||||
end
|
||||
end
|
||||
|
||||
launcher_id: detachable READABLE_STRING_GENERAL
|
||||
-- Launcher id based on the executable extension name if any.
|
||||
-- This can be redefine to customize for your application.
|
||||
--| ex: nino, cgi, libfcgi or Void.
|
||||
local
|
||||
sh_exec: SHARED_EXECUTION_ENVIRONMENT
|
||||
do
|
||||
create sh_exec
|
||||
if attached (create {PATH}.make_from_string (sh_exec.execution_environment.arguments.command_name)).extension as ext then
|
||||
Result := ext
|
||||
end
|
||||
end
|
||||
|
||||
feature -- Status report
|
||||
{/literal}
|
||||
{if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}
|
||||
is_nino_launcher_id (a_id: READABLE_STRING_GENERAL): BOOLEAN
|
||||
do
|
||||
Result := a_id.is_case_insensitive ("nino")
|
||||
or a_id.is_case_insensitive ("standalone")
|
||||
end{/if}
|
||||
|
||||
{if condition="$WIZ.connectors.use_cgi ~ $WIZ_YES"}
|
||||
is_cgi_launcher_id (a_id: READABLE_STRING_GENERAL): BOOLEAN
|
||||
do
|
||||
Result := a_id.is_case_insensitive ("cgi")
|
||||
end{/if}
|
||||
|
||||
{if condition="$WIZ.connectors.use_libfcgi ~ $WIZ_YES"}
|
||||
is_libfcgi_launcher_id (a_id: READABLE_STRING_GENERAL): BOOLEAN
|
||||
do
|
||||
Result := a_id.is_case_insensitive ("libfcgi")
|
||||
or a_id.is_case_insensitive ("fcgi")
|
||||
end{/if}
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
note
|
||||
description: "[
|
||||
Effective class for APPLICATION_LAUNCHER_I
|
||||
|
||||
You can put modification in this class
|
||||
]"
|
||||
date: "$Date: 2013-06-12 13:55:42 +0200 (mer., 12 juin 2013) $"
|
||||
revision: "$Revision: 36 $"
|
||||
|
||||
class
|
||||
APPLICATION_LAUNCHER
|
||||
|
||||
inherit
|
||||
APPLICATION_LAUNCHER_I
|
||||
|
||||
feature -- Custom
|
||||
|
||||
end
|
||||
@@ -0,0 +1,32 @@
|
||||
note
|
||||
description: "[
|
||||
Specific application launcher
|
||||
|
||||
DO NOT EDIT THIS CLASS
|
||||
|
||||
you can customize APPLICATION_LAUNCHER
|
||||
]"
|
||||
date: "$Date: 2013-06-12 13:55:42 +0200 (mer., 12 juin 2013) $"
|
||||
revision: "$Revision: 36 $"
|
||||
|
||||
deferred class
|
||||
APPLICATION_LAUNCHER_I
|
||||
|
||||
feature -- Execution
|
||||
|
||||
launch (a_service: WSF_SERVICE; opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS)
|
||||
-- Launch Web Server Application using `a_service' and optionals `opts'.
|
||||
local
|
||||
launcher: WSF_SERVICE_LAUNCHER
|
||||
do
|
||||
{literal}
|
||||
create {WSF_DEFAULT_SERVICE_LAUNCHER} launcher.make_and_launch (a_service, opts){/literal}
|
||||
end
|
||||
|
||||
launcher_id: detachable READABLE_STRING_GENERAL
|
||||
do
|
||||
-- Not used for default connector selection.
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
55
tools/estudio_wizard/rootdir/resources/src/${APP_ROOT}.e
Normal file
55
tools/estudio_wizard/rootdir/resources/src/${APP_ROOT}.e
Normal file
@@ -0,0 +1,55 @@
|
||||
note
|
||||
description: "[
|
||||
application service
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
{if isset="$APP_ROOT"}{$APP_ROOT/}{/if}
|
||||
{unless isset="$APP_ROOT"}APPLICATION{/unless}
|
||||
|
||||
inherit
|
||||
WSF_LAUNCHABLE_SERVICE
|
||||
redefine
|
||||
initialize
|
||||
end
|
||||
{if condition="$WIZ.routers.use_router ~ $WIZ_YES"}
|
||||
WSF_ROUTED_SERVICE{/if}
|
||||
|
||||
APPLICATION_LAUNCHER
|
||||
|
||||
{literal}create
|
||||
make_and_launch
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
{/literal}
|
||||
initialize
|
||||
-- Initialize current service.
|
||||
do
|
||||
Precursor
|
||||
set_service_option ("port", {$WIZ.standalone_connector.port/})
|
||||
{unless condition="$WIZ.routers.use_router ~ $WIZ_YES"}
|
||||
end
|
||||
|
||||
feature -- Execution
|
||||
|
||||
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
do
|
||||
end{/unless}
|
||||
{if condition="$WIZ.routers.use_router ~ $WIZ_YES"}{literal}
|
||||
initialize_router
|
||||
end
|
||||
|
||||
setup_router
|
||||
-- Setup `router'
|
||||
local
|
||||
fhdl: WSF_FILE_SYSTEM_HANDLER
|
||||
do
|
||||
router.handle_with_request_methods ("/doc", create {WSF_ROUTER_SELF_DOCUMENTATION_HANDLER}.make (router), router.methods_GET)
|
||||
create fhdl.make_hidden ("www")
|
||||
fhdl.set_directory_index (<<"index.html">>)
|
||||
router.handle_with_request_methods ("", fhdl, router.methods_GET)
|
||||
end{/literal}{/if}
|
||||
|
||||
end
|
||||
1
tools/estudio_wizard/rootdir/resources/www/index.html
Normal file
1
tools/estudio_wizard/rootdir/resources/www/index.html
Normal file
@@ -0,0 +1 @@
|
||||
Hello Eiffel Web Application!
|
||||
Reference in New Issue
Block a user