From 61b7f89e3bfc881d9422736d43aba3bdc4b8b968 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Tue, 28 Aug 2012 16:45:25 +0200 Subject: [PATCH] Fixed source code for building and installing the ISE Wizard --- tools/ise_wizard/custom/ewf.dsc | 4 ++ .../ise_wizard/custom/resources/template.ecf | 21 +++++++ tools/ise_wizard/ewf.dsc | 2 +- tools/ise_wizard/ewf_ise_wizard-safe.ecf | 7 ++- ...tall_wizard.bat => install_ise_wizard.bat} | 4 +- .../ise_wizard/install_ise_wizard_custom.bat | 21 +++++++ tools/ise_wizard/src/ewf_custom_wizard.e | 55 +++++++++++++++++++ tools/ise_wizard/src/ewf_wizard.e | 10 ++-- 8 files changed, 113 insertions(+), 11 deletions(-) create mode 100644 tools/ise_wizard/custom/ewf.dsc create mode 100644 tools/ise_wizard/custom/resources/template.ecf rename tools/ise_wizard/{install_wizard.bat => install_ise_wizard.bat} (69%) create mode 100644 tools/ise_wizard/install_ise_wizard_custom.bat create mode 100644 tools/ise_wizard/src/ewf_custom_wizard.e diff --git a/tools/ise_wizard/custom/ewf.dsc b/tools/ise_wizard/custom/ewf.dsc new file mode 100644 index 00000000..2524dfd6 --- /dev/null +++ b/tools/ise_wizard/custom/ewf.dsc @@ -0,0 +1,4 @@ +NAME="EWF: Eiffel Web Framework application, multi-platform, with EWF source code" +DESCRIPTION="Create a web server application based on the cross-platform library EWF. Using the original source code of EWF (i.e: not the one in $ISE_LIBRARY)" +LOCATION="ewf_custom" +PLATFORM="all" diff --git a/tools/ise_wizard/custom/resources/template.ecf b/tools/ise_wizard/custom/resources/template.ecf new file mode 100644 index 00000000..0fe0b5e3 --- /dev/null +++ b/tools/ise_wizard/custom/resources/template.ecf @@ -0,0 +1,21 @@ + + + + + + /EIFGENs$ + /CVS$ + /.svn$ + + + + + + + + + + + diff --git a/tools/ise_wizard/ewf.dsc b/tools/ise_wizard/ewf.dsc index 85b6a364..cf62696d 100644 --- a/tools/ise_wizard/ewf.dsc +++ b/tools/ise_wizard/ewf.dsc @@ -1,4 +1,4 @@ -NAME="Eiffel Web Framework application, multi-platform, with EWF" +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" diff --git a/tools/ise_wizard/ewf_ise_wizard-safe.ecf b/tools/ise_wizard/ewf_ise_wizard-safe.ecf index aede67cd..fa4c6cd1 100644 --- a/tools/ise_wizard/ewf_ise_wizard-safe.ecf +++ b/tools/ise_wizard/ewf_ise_wizard-safe.ecf @@ -1,6 +1,6 @@ - - + + /.git$ @@ -15,4 +15,7 @@ + + + diff --git a/tools/ise_wizard/install_wizard.bat b/tools/ise_wizard/install_ise_wizard.bat similarity index 69% rename from tools/ise_wizard/install_wizard.bat rename to tools/ise_wizard/install_ise_wizard.bat index 61c27d84..3aa39e7c 100644 --- a/tools/ise_wizard/install_wizard.bat +++ b/tools/ise_wizard/install_ise_wizard.bat @@ -2,10 +2,10 @@ setlocal rd /q/s tmp mkdir tmp -ecb -config ewf_ise_wizard-safe.ecf -finalize -c_compile -project_path tmp +ecb -config ewf_ise_wizard-safe.ecf -target wizard -finalize -c_compile -project_path tmp mkdir spec mkdir spec\%ISE_PLATFORM% -move tmp\EIFGENs\ewf_ise_wizard\F_code\ewf_ise_wizard.exe spec\%ISE_PLATFORM%\wizard.exe +move tmp\EIFGENs\wizard\F_code\wizard.exe spec\%ISE_PLATFORM%\wizard.exe rd /q/s tmp set WIZ_TARGET=%ISE_EIFFEL%\studio\wizards\new_projects\ewf diff --git a/tools/ise_wizard/install_ise_wizard_custom.bat b/tools/ise_wizard/install_ise_wizard_custom.bat new file mode 100644 index 00000000..f1b46778 --- /dev/null +++ b/tools/ise_wizard/install_ise_wizard_custom.bat @@ -0,0 +1,21 @@ +setlocal + +rd /q/s tmp +mkdir tmp +ecb -config ewf_ise_wizard-safe.ecf -target custom_wizard -finalize -c_compile -project_path tmp +mkdir custom +mkdir custom\spec +mkdir custom\spec\%ISE_PLATFORM% +move tmp\EIFGENs\custom_wizard\F_code\wizard.exe custom\spec\%ISE_PLATFORM%\wizard.exe +rd /q/s tmp + +set WIZ_TARGET=%ISE_EIFFEL%\studio\wizards\new_projects\ewf_custom +rd /q/s %WIZ_TARGET% +mkdir %WIZ_TARGET% +xcopy /I /E /Y %~dp0\pixmaps %WIZ_TARGET%\pixmaps +xcopy /I /E /Y %~dp0\resources %WIZ_TARGET%\resources +copy %~dp0\custom\resources\* %WIZ_TARGET%\resources +xcopy /I /E /Y %~dp0\custom\spec %WIZ_TARGET%\spec +copy %~dp0custom\ewf.dsc %WIZ_TARGET%\..\ewf_custom.dsc + +endlocal diff --git a/tools/ise_wizard/src/ewf_custom_wizard.e b/tools/ise_wizard/src/ewf_custom_wizard.e new file mode 100644 index 00000000..4141da07 --- /dev/null +++ b/tools/ise_wizard/src/ewf_custom_wizard.e @@ -0,0 +1,55 @@ +note + description : "Objects that ..." + author : "$Author$" + date : "$Date$" + revision : "$Revision$" + +class + EWF_CUSTOM_WIZARD + +inherit + EWF_WIZARD + redefine + get_information, + generate_project + end + +create + make + +feature -- Form + + get_information + do + if attached string_question ("Location of EWF source code (by default $EWF_DIR)?", Void, Void, False) as pn then + ewf_dir := pn.string + else + ewf_dir := "$EWF_DIR" + end + Precursor + end + +feature -- Generation + + generate_project (a_layout: WIZARD_LAYOUT) + do + if attached ewf_dir as d then + variables.force (d, "EWF_DIR") + Precursor (a_layout) + else + die (-1) + end + end + +feature -- Access + + ewf_dir: detachable READABLE_STRING_8 + +feature -- Change + +feature {NONE} -- Implementation + +invariant +-- invariant_clause: True + +end diff --git a/tools/ise_wizard/src/ewf_wizard.e b/tools/ise_wizard/src/ewf_wizard.e index 0967bd66..8e4cc8fa 100644 --- a/tools/ise_wizard/src/ewf_wizard.e +++ b/tools/ise_wizard/src/ewf_wizard.e @@ -25,8 +25,6 @@ feature {NONE} -- Initialization end end -feature -- Status - feature -- Access project_directory_name: detachable READABLE_STRING_8 @@ -65,7 +63,7 @@ feature -- Form projet_name := "ewf" end - if boolean_question ("Do you want to use router (Y|n) ? ", <<["y", True], ["Y", True]>>, "Y") then + if boolean_question ("Do you want to use WSF_ROUTER (Y|n) ? ", <<["y", True], ["Y", True]>>, "Y") then use_router := True router_type := "uri-template" else @@ -131,13 +129,13 @@ feature -- Form d.recursive_create_dir end create tfn.make_from_string (dn.string) - tfn.set_file_name ("ewb_application") + tfn.set_file_name ("ewf_application") tfn.add_extension ("e") if attached router_type as rt then check rt.same_string ("uri-template") end - copy_resource_template ("ewb_application-"+ rt +".e", tfn.string) + copy_resource_template ("ewf_application-"+ rt +".e", tfn.string) else - copy_resource_template ("ewb_application.e", tfn.string) + copy_resource_template ("ewf_application.e", tfn.string) end create tfn.make_from_string (dn.string)