Browse Source

Update generating instructions to account for changes in 4.0 and also
make the dstep command line more generic.

Steven Schveighoffer 3 năm trước cách đây
mục cha
commit
0598eeac05
1 tập tin đã thay đổi với 9 bổ sung3 xóa
  1. 9 3
      generating.md

+ 9 - 3
generating.md

@@ -4,8 +4,10 @@ In order to update `raylib-d` to work with a newer version of `raylib`, the head
 
 Three modules should be regenerated: `raylib`, `raymath` and `rlgl`.
 
+Run the following command from the `raylib/src` directory. Note: path/to/raylib-d should be the path to the raylib-d repository that you have on your system.
+
 ```
-dstep raylib.h raymath.h rlgl.h -o ~/git/contrib/raylib-d/source --space-after-function-name=false --skip Vector2 \
+dstep raylib.h raymath.h rlgl.h -o path/to/raylib-d/source --space-after-function-name=false --skip Vector2 \
     --skip Vector3 --skip Vector4 --skip Quaternion --skip Matrix --skip Rectangle --skip RL_MALLOC --skip RL_CALLOC \
     --skip RL_REALLOC --skip RL_FREE
 ```
@@ -44,7 +46,9 @@ import raylib;
 Additionally, each of those modules will have an automatically generated `extern (C):` line. We need to find it and
 edit it to `extern (C) @nogc nothrow:`.
 
-dstep will also make a mistake in `raylib.d` and incorrectly define a couple `alias`es as `enums`. Those must be fixed.
+## For version 3.7.0 and possibly earlier versions
+
+dstep will also make a mistake in `raylib.d` and incorrectly define a few `alias`es as `enum`s. Those must be fixed.
 Look for a block of code similar to this:
 
 ```d
@@ -60,7 +64,9 @@ enum MAP_DIFFUSE = MATERIAL_MAP_DIFFUSE;
 enum PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = PixelFormat.PIXELFORMAT_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
 ```
 
-and replace each `enum` with `alias`.
+Change `enum` for each of the functions `FormatText`, `LoadText`, `GetExtension`, and `GetImageData` to `alias`. The others can remain `enum`s.
+
+These definitions are not present since 4.0.0
 
 This should be enough. Run `dub test` and see if it compiles.