Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Treat all files in this repo as binary, with no git magic updating
# line endings. This produces predictable results in different environments.
#
# Windows users contributing to this repo will need to use a modern version
# of git and editors capable of LF line endings.
#
# Windows .bat files are known to have multiple bugs when run with LF
# endings, and so they are checked in with CRLF endings, with a test
# to catch problems. (See https://github.com/golang/go/issues/37791.)
#
# You can prevent accidental CRLF line endings from entering the repo
# via PR/MR checks.
#
# See https://github.com/golang/go/issues/9281.
# See https://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line.
* -text
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
*.app

# custom files and directories
third_party/_submodules
Comment thread
wenchy marked this conversation as resolved.
_out/
build/
bin/
Expand Down
2 changes: 2 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[submodule "third_party/_submodules/protobuf"]
path = third_party/_submodules/protobuf
url = https://github.com/protocolbuffers/protobuf
ignore = dirty
[submodule "third_party/_submodules/tableau"]
path = third_party/_submodules/tableau
url = https://github.com/tableauio/tableau
ignore = dirty
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,38 @@ The official config loader for [Tableau](https://github.com/tableauio/tableau).

> TODO: [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers)

- Supported OS: Windows, macOS, Linux
- Init protobuf: `bash init.sh`
- C++ standard: at least C++17
- Install: [CMake 3.22](https://github.com/Kitware/CMake/releases/tag/v3.31.8) or above
- Init protobuf:
- macOS or Linux: `bash init.sh`
- Windows:
- Install [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/)
- Environment Setup: Open the appropriate `Developer Command Prompt for VS 2022` from the *Start* menu to ensure `cl.exe` and other build tools are in your `PATH`.
- Change dir to **loader** repo
- Run: `.\init.bat`

## C++

### Dev at Linux

- Install: **CMake 3.22** or above
- Change dir: `cd test/cpp-tableau-loader`
- Generate protoconf: `bash ./gen.sh`
- Create build dir: `mkdir build && cd build`
- Run cmake:
- C++17: `cmake ../src/`
- C++20: `cmake ../src/ -DCMAKE_CXX_STANDARD=20`
- clang: `cmake ../src/ -DCMAKE_CXX_COMPILER=clang++`
- Build: `make -j8`, then the **bin** dir will be generated at `test/cpp-tableau-loader/bin`.
- CMake:
- C++17: `cmake -S . -B build`
- C++20: `cmake -S . -B build -DCMAKE_CXX_STANDARD=20`
- clang: `cmake -S . -B build -DCMAKE_CXX_COMPILER=clang++`
- Build: `cmake --build build --parallel 10`
- Run: `./bin/loader`

### Dev at Windows

- Change dir: `cd test\cpp-tableau-loader`
- Generate protoconf: `.\gen.bat`
- CMake:
- C++17: `cmake -S . -B build -G "NMake Makefiles"`
- C++20: `cmake -S . -B build -G "NMake Makefiles" -DCMAKE_CXX_STANDARD=20`
- Build: `cmake --build build --parallel 10`
- Run: `.\bin\loader.exe`

### References

Expand Down
Loading