Skip to content

Commit 5e2c20c

Browse files
committed
Update ModuleConversionSteps.md
1 parent 1dc13fc commit 5e2c20c

File tree

1 file changed

+46
-11
lines changed

1 file changed

+46
-11
lines changed

src/Documentation/Manuals/ModuleConversionSteps.md

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,54 @@ If you have an old batch of changed files (check with `git status`), you can `gi
2828
2. You also need CMake 2.8.12 (newer versions will run into problems while building externals)
2929
* https://cmake.org/files/v2.8/
3030
3. OSX/*nix instructions: Run `./build.sh` OR try this manual method:
31-
```
32-
cd SCIRun/bin
33-
cmake ../Superbuild
34-
make -j4
35-
# after first time success, you can
36-
cd SCIRun
37-
#(that's right, SCIRun/bin/SCIRun), and just
38-
make -j8
39-
```
31+
```
32+
cd SCIRun/bin
33+
cmake ../Superbuild
34+
make -j4
35+
# after first time success, you can
36+
cd SCIRun
37+
#(that's right, SCIRun/bin/SCIRun), and just
38+
make -j8
39+
```
4040
4. Windows:
4141
1. Use CMake to output Visual Studio 2013 (or newer) project files, with a binary directoy of short length.
42-
2. Open bin/Superbuild.sln and build it. This will take a long time initially, since it configures the SCIRun solution file and also builds it.
42+
2. Open bin/Superbuild.sln and build it. This will take a long time initially, since it configures the SCIRun solution file and also builds it. Remember to switch to Release mode if you want a faster build (both in build time and executable performance).
4343
3. Once that build finishes, you can close Superbuild.sln and just work with bin/SCIRun/SCIRun.sln in Visual Studio.
4444

45-
Initial builds will take some time. Subsequently, unless externals have changed (rare, and we'll alert everyone), incremental builds are usually quite fast.
45+
Initial builds will take some time. Subsequently, unless externals have changed (rare, and we'll alert everyone), incremental builds are usually quite fast.
4646

47+
5. Build output should produce `bin/SCIRun_test` and `bin/SCIRun` bundle on Mac, and `bin/Release/SCIRun.exe` on Windows.
48+
49+
## 4. Essential new/convert module changes
50+
1. Create a new `.module` file in `src/Modules/Factory/Config`. You can copy/paste an existing file and edit it in a text editor. Be careful to check every line.
51+
2. The format is JSON and it should be self-explanatory for those who know SCIRun. Essentially it contains bits of source code that help wire up the three components of a module: algorithm, module proper, and UI implementation.
52+
3. The "header" paths are relative to the `src` directory.
53+
4. The "status" and "description" strings are documentation and can be whatever you want; all the rest will turn into compiled code so you'll get a compile or link error if there is a mistake.
54+
55+
To convert an old module, find the v4 source code and make sure it's in a place that makes sense. Some of the module code directory tree has been simplified.
56+
57+
## 5. Edit CMakeLists.txt (between 1-5 of them, depending on layers needed and testing)
58+
* Some old modules are where they need to be and just need a line uncommented in the CMake file; others will need to be added to a new, existing library, or in a brand new library. Steps for this: contact @dcwhite.
59+
60+
## 6. Create Module header
61+
62+
## 7. Edit Module source file in order to compile
63+
64+
## 8. Once build is green, check if new module is present in module list (before proceeding to algo and UI layers)
65+
66+
## 9. Commit changes to your branch, and sync your branch.
67+
68+
## 10. Algo layer conversion
69+
70+
## 11. Commit changes to your branch, and sync your branch.
71+
72+
## 12. GUI layer conversion
73+
74+
## 13. Commit changes to your branch, and sync your branch.
75+
76+
## 14. Add test network for new module
77+
78+
## 15. Add test code for algo/module/UI
79+
80+
## 16. Create Pull request
81+
> https://help.github.com/articles/using-pull-requests/

0 commit comments

Comments
 (0)