diff --git a/tools/estudio_wizard/rootdir/resources/${APP_NAME}.ecf b/tools/estudio_wizard/rootdir/resources/${APP_NAME}.ecf index e4ef2809..9b2044d4 100644 --- a/tools/estudio_wizard/rootdir/resources/${APP_NAME}.ecf +++ b/tools/estudio_wizard/rootdir/resources/${APP_NAME}.ecf @@ -15,10 +15,10 @@ + {if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}{/if} {if condition="$WIZ.connectors.use_cgi ~ $WIZ_YES"}{/if} {if condition="$WIZ.connectors.use_libfcgi ~ $WIZ_YES"}{/if} - {if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}{/if} - + diff --git a/tools/estudio_wizard/rootdir/resources/launcher/any/application_launcher_i.e b/tools/estudio_wizard/rootdir/resources/launcher/any/application_launcher_i.e index c6213e30..fe0ff855 100644 --- a/tools/estudio_wizard/rootdir/resources/launcher/any/application_launcher_i.e +++ b/tools/estudio_wizard/rootdir/resources/launcher/any/application_launcher_i.e @@ -20,28 +20,27 @@ feature -- Execution launch (opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS) -- Launch Web Server Application using optionals `opts'. local - launcher: WSF_SERVICE_LAUNCHER + launcher: WSF_SERVICE_LAUNCHER [G] do - l_id := launcher_id if not attached launcher_id as l_id 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_STANDALONE_SERVICE_LAUNCHER} launcher.make_and_launch (opts){/literal}{/if} + create {WSF_STANDALONE_SERVICE_LAUNCHER [G]} launcher.make_and_launch (opts){/literal}{/if} {if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}{literal} elseif is_standalone_launcher_id (l_id) then - create {WSF_STANDALONE_SERVICE_LAUNCHER} launcher.make_and_launch (opts){/literal}{/if} + create {WSF_STANDALONE_SERVICE_LAUNCHER [G]} launcher.make_and_launch (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 (opts){/literal}{/if} + create {WSF_LIBFCGI_SERVICE_LAUNCHER [G]} launcher.make_and_launch (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 (opts){/literal}{/if} + create {WSF_CGI_SERVICE_LAUNCHER [G]} launcher.make_and_launch (opts){/literal}{/if} {if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}{literal} elseif is_standalone_launcher_id (l_id) then - create {WSF_STANDALONE_SERVICE_LAUNCHER} launcher.make_and_launch (opts){/literal}{/if} + create {WSF_STANDALONE_SERVICE_LAUNCHER [G]} launcher.make_and_launch (opts){/literal}{/if} {literal} else io.error.put_string ("Application launcher not found!%N") @@ -53,31 +52,39 @@ feature -- Execution -- Launcher id based on the executable extension name if any. -- This can be redefine to customize for your application. --| ex: standalone, cgi, libfcgi or Void. + local + p: PATH + s: READABLE_STRING_32 do - if attached (create {PATH}.make_from_string (execution_environment.arguments.command_name)).extension as ext then - Result := ext + create p.make_from_string (execution_environment.arguments.command_name) + if attached p.extension as ext then + if ext.is_case_insensitive_equal_general ("exe") then + -- Windows + s := p.name + create p.make_from_string (s.head (s.count - 4)) + Result := p.extension + else + Result := ext + end end end -feature -- Status report -{/literal} +feature -- Status report{/literal} {if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"} is_standalone_launcher_id (a_id: READABLE_STRING_GENERAL): BOOLEAN do - Result := a_id.is_case_insensitive ("standalone") + Result := a_id.is_case_insensitive_equal ("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") + Result := a_id.is_case_insensitive_equal ("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") + Result := a_id.is_case_insensitive_equal ("libfcgi") + or a_id.is_case_insensitive_equal ("fcgi") end{/if} end diff --git a/tools/estudio_wizard/rootdir/resources/src/${APP_ROOT}.e b/tools/estudio_wizard/rootdir/resources/src/${APP_ROOT}.e index 0dab746f..70325bb9 100644 --- a/tools/estudio_wizard/rootdir/resources/src/${APP_ROOT}.e +++ b/tools/estudio_wizard/rootdir/resources/src/${APP_ROOT}.e @@ -14,10 +14,8 @@ inherit redefine initialize end -{if condition="$WIZ.routers.use_router ~ $WIZ_YES"} - WSF_ROUTED_SERVICE{/if} {if isset="$APP_ROOT"}APPLICATION_LAUNCHER [{$APP_ROOT/}_EXECUTION]{/if} - {unless isset="$APP_ROOT"}APPLICATION_LAUNCHER [APPLICATION_EXECUTION]{/if} + {unless isset="$APP_ROOT"}APPLICATION_LAUNCHER [APPLICATION_EXECUTION]{/unless} {literal}create make_and_launch @@ -29,6 +27,7 @@ feature {NONE} -- Initialization do Precursor set_service_option ("port", {$WIZ.standalone_connector.port/}) + set_service_option ("verbose", "{$WIZ.standalone_connector.verbose/}") end diff --git a/tools/estudio_wizard/rootdir/resources/src/${APP_ROOT}_EXECUTION.e b/tools/estudio_wizard/rootdir/resources/src/${APP_ROOT}_EXECUTION.e index 9baf8fe4..4929295a 100644 --- a/tools/estudio_wizard/rootdir/resources/src/${APP_ROOT}_EXECUTION.e +++ b/tools/estudio_wizard/rootdir/resources/src/${APP_ROOT}_EXECUTION.e @@ -11,15 +11,15 @@ class inherit {unless condition="$WIZ.routers.use_router ~ $WIZ_YES"} - {unless condition="$WIZ.routers.use_filter ~ $WIZ_YES"} + {unless condition="$WIZ.filters.use_filter ~ $WIZ_YES"} WSF_EXECUTION{/unless} - {if condition="$WIZ.routers.use_filter ~ $WIZ_YES"} + {if condition="$WIZ.filters.use_filter ~ $WIZ_YES"} WSF_FILTERED_EXECUTION{/if} {/unless} {if condition="$WIZ.routers.use_router ~ $WIZ_YES"} - {unless condition="$WIZ.routers.use_filter ~ $WIZ_YES"} + {unless condition="$WIZ.filters.use_filter ~ $WIZ_YES"} WSF_ROUTED_EXECUTION{/unless} - {if condition="$WIZ.routers.use_filter ~ $WIZ_YES"} + {if condition="$WIZ.filters.use_filter ~ $WIZ_YES"} WSF_FILTERED_ROUTED_EXECUTION{/if} {/if} @@ -28,7 +28,6 @@ inherit feature {NONE} -- Initialization {/literal} - {unless condition="$WIZ.routers.use_router ~ $WIZ_YES"}{literal} feature -- Execution @@ -42,9 +41,9 @@ feature -- Execution --| To send back easily a simple plaintext message. create mesg.make_with_body ("Hello Eiffel Web") response.send (mesg) - end{/unless} - -{if condition="$WIZ.routers.use_filter ~ $WIZ_YES"}{literal} + end +{/literal}{/unless} +{if condition="$WIZ.filters.use_filter ~ $WIZ_YES"}{literal} feature -- Filter create_filter @@ -56,15 +55,18 @@ feature -- Filter setup_filter -- Setup `filter' + local + f: like filter do - append_filters (<< - create {WSF_CORS_FILTER}, - create {WSF_LOGGING_FILTER} - >>) + create {WSF_CORS_FILTER} f + f.set_next (create {WSF_LOGGING_FILTER}) + --| Chain more filters like {WSF_CUSTOM_HEADER_FILTER}, ... --| and your owns filters. - end{/if} + filter.append (f) + end +{/literal}{/if} {if condition="$WIZ.routers.use_router ~ $WIZ_YES"}{literal} feature -- Router @@ -78,12 +80,12 @@ feature -- Router --| /* are dispatched to serve files/directories contained in "www" directory --| Self documentation - router.handle_with_request_methods ("/doc", create {WSF_ROUTER_SELF_DOCUMENTATION_HANDLER}.make (router), router.methods_GET) + router.handle ("/doc", create {WSF_ROUTER_SELF_DOCUMENTATION_HANDLER}.make (router), router.methods_GET) --| Files publisher create fhdl.make_hidden ("www") fhdl.set_directory_index (<<"index.html">>) - router.handle_with_request_methods ("", fhdl, router.methods_GET) + router.handle ("", fhdl, router.methods_GET) end{/literal}{/if} end