diff --git a/Examples/test.cpp b/Examples/test.cpp old mode 100644 new mode 100755 index 1727c54..acf0c6b --- a/Examples/test.cpp +++ b/Examples/test.cpp @@ -1,3 +1,5 @@ +//bin/true;runcpp2 "$0" "$@"; exit; + /* runcpp2 PassScriptPath: true diff --git a/README.md b/README.md index 883112b..ed8ae5e 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,7 @@ ![runcpp2 logo](./Runcpp2Logo.png) -A cross-platform tool that can let you run any c++ files as a script, just like python! - -Run c++ files anytime, anywhere. +A cross-platform declarative and scriptable (WIP) build system for c++ with the addition of letting you run any c++ files as a script, just like python! ### 🛠️ Prerequisites - Any C++ compiler. The default user config only has g++ and msvc profiles. But feel free to @@ -34,8 +32,7 @@ runcpp2 ./script.cpp ``` > [!NOTE] -> When invoking a c++ file with runcpp2, the first argument (`argv[0]`) to `main()` is the path -> to the script, not the path to an executable. +> On Unix, if you have added runcpp2 to your PATH and add this line `//bin/true;runcpp2 "$0" "$@"; exit;` to the top of your script, you can run the script directly by `./script.cpp ` #### 2. Watch and give compile errors If you want to edit the script but want to have feedback for any error, you can use "watch" mode. diff --git a/TODO.md b/TODO.md index ba50616..8510ba6 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,4 @@ TODO: -- Track script info changes properly for either script change or dependency change - Track include files for compiling - Allow runcpp2 to be library - Ability to compile runcpp2 as single cpp @@ -12,6 +11,9 @@ TODO: - Where the path contains escape character which escaped the wrapping quotes - Use to handle potential segfaults - Separate git and local source options + - Add branch/tag option for git + - Add initialize submodule option for git +- Change "Default" to "DefaultProfile" and "DefaultPlatform" - Migrate to libyaml - Add wildcard support for filenames and extensions - Add tests and examples (On Windows as well)