Ver Fonte

update docs

blueloveTH há 1 ano atrás
pai
commit
4997783488
2 ficheiros alterados com 23 adições e 16 exclusões
  1. 22 7
      README.md
  2. 1 9
      docs/quick-start/installation.md

+ 22 - 7
README.md

@@ -40,16 +40,31 @@ These platforms are officially tested.
 
 ## Quick Start
 
+You have two options to integrate pkpy into your project.
+
+#### Use the single header file
+
 Download the `pocketpy.h` on our [GitHub Release](https://github.com/pocketpy/pocketpy/releases) page.
-And `#include` it in your project.
+And `#include` it in your project. It is recommended to use the latest dev version.
+
+#### Use CMake
+
+Clone the whole repository as a submodule in your project,
+In your CMakelists.txt, add the following lines:
+
+```cmake
+add_subdirectory(pocketpy)
+target_link_libraries(your_target pocketpy)
+
+if(EMSCRIPTEN)
+    # exceptions must be enabled for emscripten
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fexceptions")
+endif()
+```
 
-You can also use cmake to build it from source. See [CMakeLists.txt](https://github.com/pocketpy/pocketpy/blob/main/CMakeLists.txt) for details.
-Some variables can be set to control the build process:
-+ `PK_BUILD_STATIC_LIB` - Build the static library (default, recommended)
-+ `PK_BUILD_SHARED_LIB` - Build the shared  (for C-APIs only)
-+ `PK_ENABLE_OS` - Enable OS related features (default mode is sandboxed)
+See [CMakeLists.txt](https://github.com/pocketpy/pocketpy/blob/main/CMakeLists.txt) for details.
 
-It is safe to use `main` branch in production if CI is green.
+It is safe to use `main` branch in production if CI badge is green.
 
 ### Compile Flags
 

+ 1 - 9
docs/quick-start/installation.md

@@ -14,13 +14,9 @@ And `#include` it in your project. It is recommended to use the latest dev versi
 #### Use CMake
 
 Clone the whole repository as a submodule in your project,
-You need **Python 3** installed on your system because CMakeLists.txt
-requires it to generate some files.
-
 In your CMakelists.txt, add the following lines:
 
 ```cmake
-option(PK_BUILD_STATIC_LIB "Build static library" ON)
 add_subdirectory(pocketpy)
 target_link_libraries(your_target pocketpy)
 
@@ -30,13 +26,9 @@ if(EMSCRIPTEN)
 endif()
 ```
 
-These variables can be set to control the build process:
-+ `PK_BUILD_STATIC_LIB` - Build the static library
-+ `PK_BUILD_SHARED_LIB` - Build the shared library
-
 See [CMakeLists.txt](https://github.com/pocketpy/pocketpy/blob/main/CMakeLists.txt) for details.
 
-It is safe to use `main` branch in production.
+It is safe to use `main` branch in production if CI badge is green.
 
 ### Compile flags