Fixed the EiffelStudio EiffelWeb wizard.

This commit is contained in:
2016-10-21 19:40:13 +02:00
parent 53f4f64596
commit 2e49febca8
4 changed files with 45 additions and 37 deletions

View File

@@ -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