Updated EiffelWeb wizard.

This commit is contained in:
2018-11-19 19:10:26 +01:00
parent f1e8dfa40b
commit 19c14d28c7
9 changed files with 36 additions and 55 deletions

View File

@@ -1,8 +1,7 @@
note note
description : "Objects that ..." description: "Console wizard."
author : "$Author$" date: "$Date$"
date : "$Date$" revision: "$Revision$"
revision : "$Revision$"
deferred class deferred class
CONSOLE_WIZARD_APPLICATION CONSOLE_WIZARD_APPLICATION
@@ -140,9 +139,6 @@ feature -- Execution
end end
output_page_item (a_item: WIZARD_PAGE_ITEM) output_page_item (a_item: WIZARD_PAGE_ITEM)
local
b: BOOLEAN
s: detachable READABLE_STRING_32
do do
if attached {WIZARD_PAGE_TEXT_ITEM} a_item as txt then if attached {WIZARD_PAGE_TEXT_ITEM} a_item as txt then
localized_print (txt.text) localized_print (txt.text)
@@ -315,5 +311,4 @@ feature {NONE} -- Implementation
end end
end end
end end

View File

@@ -1,8 +1,7 @@
note note
description : "Objects that ..." description: "Abstract wizard application."
author : "$Author$" date: "$Date$"
date : "$Date$" revision: "$Revision$"
revision : "$Revision$"
deferred class deferred class
WIZARD_APPLICATION WIZARD_APPLICATION

View File

@@ -1,6 +1,5 @@
note note
description: "Summary description for {WIZARD_GENERATOR}." description: "Summary description for {WIZARD_GENERATOR}."
author: ""
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
@@ -31,7 +30,7 @@ feature -- Access
feature -- Access feature -- Access
variables: STRING_TABLE [READABLE_STRING_8] variables: STRING_TABLE [READABLE_STRING_32]
-- Variables used for template and file name resolved string. -- Variables used for template and file name resolved string.
--| i.e to expand ${varname} in file name or file content. --| i.e to expand ${varname} in file name or file content.
--| could be used for other purpose. --| could be used for other purpose.

View File

@@ -1,8 +1,7 @@
note note
description : "Objects that ..." description: "EiffelWeb console wizard application."
author : "$Author$" date: "$Date$"
date : "$Date$" revision: "$Revision$"
revision : "$Revision$"
class class
EWF_CONSOLE_WIZARD_APPLICATION EWF_CONSOLE_WIZARD_APPLICATION
@@ -10,8 +9,6 @@ class
inherit inherit
CONSOLE_WIZARD_APPLICATION CONSOLE_WIZARD_APPLICATION
SHARED_EXECUTION_ENVIRONMENT
create create
make make

View File

@@ -1,6 +1,5 @@
note note
description: "Summary description for {EWF_WIZARD}." description: "Wizard for EiffelWeb projects."
author: ""
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
@@ -30,14 +29,17 @@ feature -- Pages
once once
Result := new_page ("first") Result := new_page ("first")
Result.set_title ("Web Application Wizard") Result.set_title ("Web Application Wizard")
Result.set_subtitle ("Based on the EWF libraries...") Result.set_subtitle ("Based on the EiffelWeb framework...")
Result.add_section_text ("Create Web server application with EWF.") Result.add_section_text ("Create Web server application with EiffelWeb (Framework).")
Result.add_text ("[ Result.add_text ("[
Using the Eiffel Web Framework (EWF), the generated application Using the EiffelWeb Framework (EWF), build server application for any platforms.
will run on any platforms. Depending on the connector(s), there are dependencies on third-party httpd server.
Depending on the connector(s), you may need to use a (For instance libfcgi requires to setup apache, ...)
third-party httpd server (such as apache, nginx, ...)
More information at:
- http://www.eiffelweb.org/
- https://www.eiffel.org/projects/eiffel-web .
]") ]")
end end
@@ -55,8 +57,8 @@ Please fill in:
Result.extend (Result.new_string_question ("Project name:", "name", "ASCII name, without space")) Result.extend (Result.new_string_question ("Project name:", "name", "ASCII name, without space"))
Result.add_directory_question ("Project location:", "location", "Valid directory path, it will be created if missing") Result.add_directory_question ("Project location:", "location", "Valid directory path, it will be created if missing")
Result.data.force ("ewf_app", "name") Result.data.force ("new_app", "name")
Result.data.force (application.available_directory_path ("ewf_app", application.layout.default_projects_location.extended ("ewf")).name, "location") Result.data.force (application.available_directory_path ("new_app", application.layout.default_projects_location.extended ("eiffelweb")).name, "location")
Result.set_validation (agent (a_page: WIZARD_PAGE) Result.set_validation (agent (a_page: WIZARD_PAGE)
do do
@@ -84,9 +86,9 @@ Web application runs on top of connectors
Select connectors you want to support: Select connectors you want to support:
]") ]")
Result.add_boolean_question ("Standalone", "use_standalone", "Using the standalone Eiffel Web server") Result.add_boolean_question ("Standalone", "use_standalone", "Using the standalone Eiffel Web server")
Result.add_boolean_question ("CGI", "use_cgi", "Require a httpd server") Result.add_boolean_question ("CGI", "use_cgi", "Require to setup associated httpd server")
Result.add_boolean_question ("libFCGI", "use_libfcgi", "Require a httpd server") Result.add_boolean_question ("libFCGI", "use_libfcgi", "Require to setup associated httpd server, and have libfcgi dynamic libraries in the path")
Result.data.force ("yes", "use_standalone") Result.data.force ("yes", "use_standalone")
Result.data.force ("yes", "use_cgi") Result.data.force ("yes", "use_cgi")
Result.data.force ("yes", "use_libfcgi") Result.data.force ("yes", "use_libfcgi")
@@ -97,10 +99,10 @@ Select connectors you want to support:
Result := new_page ("standalone_connector") Result := new_page ("standalone_connector")
Result.set_title ("Standalone connector") Result.set_title ("Standalone connector")
Result.set_subtitle ("Set options .") Result.set_subtitle ("Set options .")
Result.add_integer_question ("Port number", "port", "It happens port 80 is already taken, thus choose another one.") Result.add_integer_question ("Port number", "port", "If port 8080 is already taken, then choose another one.")
Result.add_boolean_question ("Verbose", "verbose", "Verbose output") Result.add_boolean_question ("Verbose", "verbose", "Verbose output")
Result.data.force ("80", "port") Result.data.force ("8080", "port")
Result.data.force ("no", "verbose") Result.data.force ("no", "verbose")
end end

View File

@@ -1,6 +1,5 @@
note note
description: "Summary description for {EWF_WIZARD_GENERATOR}." description: "Summary description for {EWF_WIZARD_GENERATOR}."
author: ""
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
@@ -28,9 +27,6 @@ feature -- Execution
local local
d: DIRECTORY d: DIRECTORY
pdn, dn: PATH pdn, dn: PATH
tfn: PATH
res: WIZARD_SUCCEED_RESPONSE
-- k: STRING_32
do do
collection := a_collection collection := a_collection
if if
@@ -55,10 +51,7 @@ feature -- Execution
recursive_copy_templates (application.layout.resources_location, dn) recursive_copy_templates (application.layout.resources_location, dn)
tfn := dn.extended (pn).appended_with_extension ("ecf") send_response (create {WIZARD_SUCCEED_RESPONSE}.make (dn.extended (pn).appended_with_extension ("ecf"), d.path))
create res.make (tfn, d.path)
send_response (res)
else else
send_response (create {WIZARD_FAILED_RESPONSE}) send_response (create {WIZARD_FAILED_RESPONSE})
end end
@@ -111,8 +104,8 @@ feature -- Templates
end end
template_context.set_template_folder (application.layout.templates_location) template_context.set_template_folder (application.layout.templates_location)
create inspectors.make (2) create inspectors.make (2)
inspectors.force (create {WIZARD_DATA_TEMPLATE_INSPECTOR}.register ({detachable WIZARD_DATA})) inspectors.force (create {WIZARD_DATA_TEMPLATE_INSPECTOR}.register (({detachable WIZARD_DATA}).name))
inspectors.force (create {WIZARD_PAGE_DATA_TEMPLATE_INSPECTOR}.register ({detachable WIZARD_PAGE_DATA})) inspectors.force (create {WIZARD_PAGE_DATA_TEMPLATE_INSPECTOR}.register (({detachable WIZARD_PAGE_DATA}).name))
tpl.analyze tpl.analyze
tpl.get_output tpl.get_output
across across

View File

@@ -1,8 +1,5 @@
note note
description: "[ description: "Graphical wizard for EiffelWeb projects."
Objects that ...
]"
author: "$Author$"
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
@@ -28,6 +25,8 @@ feature {NONE} -- Initialization
cons: EWF_CONSOLE_WIZARD_APPLICATION cons: EWF_CONSOLE_WIZARD_APPLICATION
do do
default_create default_create
-- Initialize ISE_PROJECTS variable with expected EiffelStudio value.
if execution_environment.arguments.index_of_word_option ("-console") > 0 then if execution_environment.arguments.index_of_word_option ("-console") > 0 then
create cons.make create cons.make
else else

View File

@@ -29,7 +29,7 @@ feature -- Access
if a_page.page_id.is_case_insensitive_equal_general ("first") if a_page.page_id.is_case_insensitive_equal_general ("first")
or a_page.page_id.is_case_insensitive_equal_general ("final") or a_page.page_id.is_case_insensitive_equal_general ("final")
then then
create lab.make_with_text ("EWF") create lab.make_with_text ("EiffelWeb")
lab.set_foreground_color (colors.white) lab.set_foreground_color (colors.white)
Result.extend (create {GRAPHICAL_WIZARD_PAGE_WIDGET}.make_with_widget (lab)) Result.extend (create {GRAPHICAL_WIZARD_PAGE_WIDGET}.make_with_widget (lab))
end end

View File

@@ -10,17 +10,14 @@
<option warning="true"> <option warning="true">
</option> </option>
<setting name="console_application" value="false"/> <setting name="console_application" value="false"/>
<setting name="executable_name" value="wizard"/>
<capability> <capability>
<concurrency support="none" use="none"/> <concurrency support="none" use="none"/>
</capability> </capability>
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/> <library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
<library name="gui_wizard" location="lib\wizard\estudio_gui_wizard.ecf" readonly="false"/> <library name="gui_wizard" location="lib\wizard\estudio_gui_wizard.ecf" readonly="false"/>
<library name="template_smarty" location="$ISE_LIBRARY\contrib\library\text\template\smarty\smarty.ecf" readonly="false"/> <library name="template_smarty" location="$ISE_LIBRARY\contrib\library\text\template\smarty\smarty.ecf" readonly="false"/>
<library name="vision2" location="$ISE_LIBRARY\library\vision2\vision2.ecf"> <library name="vision2" location="$ISE_LIBRARY\library\vision2\vision2.ecf"/>
<option>
<assertions precondition="true"/>
</option>
</library>
<cluster name="graphical" location=".\src\gui\" recursive="true"/> <cluster name="graphical" location=".\src\gui\" recursive="true"/>
<cluster name="src" location=".\src\" recursive="true"> <cluster name="src" location=".\src\" recursive="true">
<file_rule> <file_rule>