|
1 | | -WrapcUI |
| 1 | +# WrapcUI |
2 | 2 |
|
3 | | -This code depends on URI launcher a library that you will need to download at https://svn.eiffel.com/eiffelstudio/trunk/Src |
4 | | -To use this tool set the environment variable %EIFFEL_SRC% to the directory where you checkout the code. |
| 3 | +## Note |
| 4 | +> This code depends on URI launcher, a library you will need to download at https://svn.eiffel.com/eiffelstudio/trunk/Src. |
| 5 | +> To use this tool, ensure you have set the environment variable %EIFFEL_SRC% to the directory where you have checked out the code. |
| 6 | +
|
| 7 | +## Compiling |
| 8 | + |
| 9 | +The WrapC UI project consists of two targets: `wrapcui` and `test`. The `wrapcui` is the production target, where you will finalize an executable. The `test` target is dedicated to writing and executing tests against the production target code. Presently, there is but one test, which was used to prove the code that parses the wrapcui configuration "Save" file, which is just XML. |
| 10 | + |
| 11 | +To create a finalized executable, open the `wrapcui` target and compile (or clean compile if needed). With a successful compile, Ctrl-Shift-F7 or select `Finalize` from the `Project` menu option. The executable will be produced in the `F_code` folder under your EIFGENs folder in the project folder. Move the executable to a folder of your choice and ensure you have set a proper PATH to it for later. |
| 12 | + |
| 13 | +### Execution in Workbench |
| 14 | + |
| 15 | +If you run WrapCUI in EiffelStudio's Workbench mode, you may find that you encounter an error where the code is not creating the target output directory structure. This is a known limitation (bug perhaps). The code works in the finalized executable. |
| 16 | + |
| 17 | +## Using |
| 18 | + |
| 19 | +The UI code literally wraps the EWG code, which is the basis of the WrapC CLI project and executable. Therefore, the UI controls mimick the CLI options. When WrapCUI first opens, each of the text fields are blank (empty). From here, you have two choices. |
| 20 | + |
| 21 | +* Manually set each option as needed by your project. |
| 22 | +* Open options previously set and saved as an XML-based WrapCUI configuration file (named whatever you like, with whatever extension you like). |
| 23 | + |
| 24 | +### Manual Option Setting |
| 25 | + |
| 26 | +Before setting options for full-header and output-dir, you will need to: |
| 27 | + |
| 28 | +* Download your target C project, which will have your target header (*.h) file. |
| 29 | +* Create your target output directory. |
| 30 | + |
| 31 | +#### Full Header Option |
| 32 | + |
| 33 | +Manaully type the full or relative path (relative to your current directory) to your target header file. |
| 34 | + |
| 35 | +Alternatively, use the `...` button to set the full path using the file-open dialog that appears. |
| 36 | + |
| 37 | +#### Output Directory Option |
| 38 | + |
| 39 | +Manually type the full or relative path to your target output directory. |
| 40 | + |
| 41 | +Alternatively, use the `...` button to set the full path using the directory dialog that appears. |
| 42 | + |
| 43 | +#### C-compiler Options |
| 44 | + |
| 45 | +Manually enter any C compiler options as needed. |
| 46 | + |
| 47 | +#### Pre-process Script |
| 48 | + |
| 49 | +Manually enter the full or relative path to a pre-process script, as needed. |
| 50 | + |
| 51 | +#### Post-process Script |
| 52 | + |
| 53 | +Manually enter the full or relative path to a post-process script, as needed. |
| 54 | + |
| 55 | +#### Config XML File |
| 56 | + |
| 57 | +Manually type the full or relative path to a config.xml (or other name) file, as needed. |
| 58 | + |
| 59 | +Alternatively, use the `...` button to set the full path to a config.xml file using the file-open dialog that appears. |
| 60 | + |
| 61 | +## Next Steps |
| 62 | + |
| 63 | +Once all of the options are set, you have several steps available to you. |
| 64 | + |
| 65 | +* `Save` the configuration in an XML file. Do this if you desire to quickly and easily reload the configuration you've just created. |
| 66 | +* `Clean` the output directory (delete all files and folders in it) |
| 67 | +* `Run` WrapC with the configuration you have set up or loaded (`File->Open`) |
| 68 | + |
| 69 | +#### Note on Cleaning |
| 70 | + |
| 71 | +There is a bug in EWG we have not found yet where once you click `Run`, the code does not release its file handles. Attempting to run `Clean` after a `Run` will generate an error and the files and folders will not be deleted. In order to successfully `Clean`, you will need to ensure the configuration is `Save`d, close WrapCUI, re-open WrapCUI, `Open` the saved configuration, and then `Clean` it. |
| 72 | +# WrapcUI |
| 73 | + |
| 74 | +## Note |
| 75 | +> This code depends on URI launcher, a library you will need to download at https://svn.eiffel.com/eiffelstudio/trunk/Src. |
| 76 | +> To use this tool, ensure you have set the environment variable %EIFFEL_SRC% to the directory where you have checked out the code. |
| 77 | +
|
| 78 | +## Compiling |
| 79 | + |
| 80 | +The WrapC UI project consists of two targets: `wrapcui` and `test`. The `wrapcui` is the production target, where you will finalize an executable. The `test` target is dedicated to writing and executing tests against the production target code. Presently, there is but one test, which was used to prove the code that parses the wrapcui configuration "Save" file, which is just XML. |
| 81 | + |
| 82 | +To create a finalized executable, open the `wrapcui` target and compile (or clean compile if needed). With a successful compile, Ctrl-Shift-F7 or select `Finalize` from the `Project` menu option. The executable will be produced in the `F_code` folder under your EIFGENs folder in the project folder. Move the executable to a folder of your choice and ensure you have set a proper PATH to it for later. |
| 83 | + |
| 84 | +### Execution in Workbench |
| 85 | + |
| 86 | +If you run WrapCUI in EiffelStudio's Workbench mode, you may find that you encounter an error where the code is not creating the target output directory structure. This is a known limitation (bug perhaps). The code works in the finalized executable. |
| 87 | + |
| 88 | +## Using |
| 89 | + |
| 90 | +The UI code literally wraps the EWG code, which is the basis of the WrapC CLI project and executable. Therefore, the UI controls mimick the CLI options. When WrapCUI first opens, each of the text fields are blank (empty). From here, you have two choices. |
| 91 | + |
| 92 | +* Manually set each option as needed by your project. |
| 93 | +* Open options previously set and saved as an XML-based WrapCUI configuration file (named whatever you like, with whatever extension you like). |
| 94 | + |
| 95 | +### Manual Option Setting |
| 96 | + |
| 97 | +Before setting options for full-header and output-dir, you will need to: |
| 98 | + |
| 99 | +* Download your target C project, which will have your target header (*.h) file. |
| 100 | +* Create your target output directory. |
| 101 | + |
| 102 | +#### Full Header Option |
| 103 | + |
| 104 | +Manaully type the full or relative path (relative to your current directory) to your target header file. |
| 105 | + |
| 106 | +Alternatively, use the `...` button to set the full path using the file-open dialog that appears. |
| 107 | + |
| 108 | +#### Output Directory Option |
| 109 | + |
| 110 | +Manually type the full or relative path to your target output directory. |
| 111 | + |
| 112 | +Alternatively, use the `...` button to set the full path using the directory dialog that appears. |
| 113 | + |
| 114 | +#### C-compiler Options |
| 115 | + |
| 116 | +Manually enter any C compiler options as needed. |
| 117 | + |
| 118 | +#### Pre-process Script |
| 119 | + |
| 120 | +Manually enter the full or relative path to a pre-process script, as needed. |
| 121 | + |
| 122 | +#### Post-process Script |
| 123 | + |
| 124 | +Manually enter the full or relative path to a post-process script, as needed. |
| 125 | + |
| 126 | +#### Config XML File |
| 127 | + |
| 128 | +Manually type the full or relative path to a config.xml (or other name) file, as needed. |
| 129 | + |
| 130 | +Alternatively, use the `...` button to set the full path to a config.xml file using the file-open dialog that appears. |
| 131 | + |
| 132 | +## Next Steps |
| 133 | + |
| 134 | +Once all of the options are set, you have several steps available to you. |
| 135 | + |
| 136 | +* `Save` the configuration in an XML file. Do this if you desire to quickly and easily reload the configuration you've just created. |
| 137 | +* `Clean` the output directory (delete all files and folders in it) |
| 138 | +* `Run` WrapC with the configuration you have set up or loaded (`File->Open`) |
| 139 | + |
| 140 | +#### Note on Cleaning |
| 141 | + |
| 142 | +There is a bug in EWG we have not found yet where once you click `Run`, the code does not release its file handles. Attempting to run `Clean` after a `Run` will generate an error and the files and folders will not be deleted. In order to successfully `Clean`, you will need to ensure the configuration is `Save`d, close WrapCUI, re-open WrapCUI, `Open` the saved configuration, and then `Clean` it. |
0 commit comments