diff --git a/.github/TextScript_Terminal.jpg b/.github/TextScript_Terminal.jpg new file mode 100755 index 0000000..d409883 Binary files /dev/null and b/.github/TextScript_Terminal.jpg differ diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 7f6c4bd..53ae654 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,8 @@ # Build files /bin /lib - +/.cache +/compile_commands.json # Engine folder /Engine/CMakeCache.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index d167a67..300d840 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.16) project(TextScript CXX) diff --git a/Editor/.gitignore b/Editor/.gitignore new file mode 100755 index 0000000..69c62a0 --- /dev/null +++ b/Editor/.gitignore @@ -0,0 +1,16 @@ +/.venv/ +.Python +build/ +develop-eggs/ +dist/ +eggs/ +*.egg-info/ +.installed.cfg +*.manifest +*.spec +pycache/ +*.py[cod] +*$py.class +*.so +*.pyd +*.dll diff --git a/Editor/.python-version b/Editor/.python-version new file mode 100755 index 0000000..e4fba21 --- /dev/null +++ b/Editor/.python-version @@ -0,0 +1 @@ +3.12 diff --git a/Editor/README.md b/Editor/README.md new file mode 100755 index 0000000..e69de29 diff --git a/Editor/app.py b/Editor/app.py new file mode 100755 index 0000000..1a0b6a9 --- /dev/null +++ b/Editor/app.py @@ -0,0 +1,13 @@ +from flask import Flask + +app = Flask(__name__) + +@app.route("/") +def index(): + return "" + +def main(): + app.run(debug=True) + +if __name__ == "__main__": + main() diff --git a/Editor/pyproject.toml b/Editor/pyproject.toml new file mode 100755 index 0000000..8657695 --- /dev/null +++ b/Editor/pyproject.toml @@ -0,0 +1,10 @@ +[project] +name = "editor" +version = "0.1.0" +description = "The editor for the TextScript game engine" +readme = "README.md" +requires-python = ">=3.12" +dependencies = [ + "flask==3.1.2", + "gunicorn>=23.0.0", +] diff --git a/Editor/templates/.gitkeep b/Editor/templates/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/Editor/uv.lock b/Editor/uv.lock new file mode 100644 index 0000000..6c61aa5 --- /dev/null +++ b/Editor/uv.lock @@ -0,0 +1,157 @@ +version = 1 +revision = 3 +requires-python = ">=3.12" + +[[package]] +name = "blinker" +version = "1.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz", hash = "sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf", size = 22460, upload-time = "2024-11-08T17:25:47.436Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc", size = 8458, upload-time = "2024-11-08T17:25:46.184Z" }, +] + +[[package]] +name = "click" +version = "8.2.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz", hash = "sha256:27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202", size = 286342, upload-time = "2025-05-20T23:19:49.832Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/85/32/10bb5764d90a8eee674e9dc6f4db6a0ab47c8c4d0d83c27f7c39ac415a4d/click-8.2.1-py3-none-any.whl", hash = "sha256:61a3265b914e850b85317d0b3109c7f8cd35a670f963866005d6ef1d5175a12b", size = 102215, upload-time = "2025-05-20T23:19:47.796Z" }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "editor" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "flask" }, + { name = "gunicorn" }, +] + +[package.metadata] +requires-dist = [ + { name = "flask", specifier = "==3.1.2" }, + { name = "gunicorn", specifier = ">=23.0.0" }, +] + +[[package]] +name = "flask" +version = "3.1.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "blinker" }, + { name = "click" }, + { name = "itsdangerous" }, + { name = "jinja2" }, + { name = "markupsafe" }, + { name = "werkzeug" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/dc/6d/cfe3c0fcc5e477df242b98bfe186a4c34357b4847e87ecaef04507332dab/flask-3.1.2.tar.gz", hash = "sha256:bf656c15c80190ed628ad08cdfd3aaa35beb087855e2f494910aa3774cc4fd87", size = 720160, upload-time = "2025-08-19T21:03:21.205Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/f9/7f9263c5695f4bd0023734af91bedb2ff8209e8de6ead162f35d8dc762fd/flask-3.1.2-py3-none-any.whl", hash = "sha256:ca1d8112ec8a6158cc29ea4858963350011b5c846a414cdb7a954aa9e967d03c", size = 103308, upload-time = "2025-08-19T21:03:19.499Z" }, +] + +[[package]] +name = "gunicorn" +version = "23.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "packaging" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/34/72/9614c465dc206155d93eff0ca20d42e1e35afc533971379482de953521a4/gunicorn-23.0.0.tar.gz", hash = "sha256:f014447a0101dc57e294f6c18ca6b40227a4c90e9bdb586042628030cba004ec", size = 375031, upload-time = "2024-08-10T20:25:27.378Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/7d/6dac2a6e1eba33ee43f318edbed4ff29151a49b5d37f080aad1e6469bca4/gunicorn-23.0.0-py3-none-any.whl", hash = "sha256:ec400d38950de4dfd418cff8328b2c8faed0edb0d517d3394e457c317908ca4d", size = 85029, upload-time = "2024-08-10T20:25:24.996Z" }, +] + +[[package]] +name = "itsdangerous" +version = "2.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173", size = 54410, upload-time = "2024-04-16T21:28:15.614Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/96/92447566d16df59b2a776c0fb82dbc4d9e07cd95062562af01e408583fc4/itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef", size = 16234, upload-time = "2024-04-16T21:28:14.499Z" }, +] + +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0", size = 20537, upload-time = "2024-10-18T15:21:54.129Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/09/d1f21434c97fc42f09d290cbb6350d44eb12f09cc62c9476effdb33a18aa/MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf", size = 14274, upload-time = "2024-10-18T15:21:13.777Z" }, + { url = "https://files.pythonhosted.org/packages/6b/b0/18f76bba336fa5aecf79d45dcd6c806c280ec44538b3c13671d49099fdd0/MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225", size = 12348, upload-time = "2024-10-18T15:21:14.822Z" }, + { url = "https://files.pythonhosted.org/packages/e0/25/dd5c0f6ac1311e9b40f4af06c78efde0f3b5cbf02502f8ef9501294c425b/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028", size = 24149, upload-time = "2024-10-18T15:21:15.642Z" }, + { url = "https://files.pythonhosted.org/packages/f3/f0/89e7aadfb3749d0f52234a0c8c7867877876e0a20b60e2188e9850794c17/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8", size = 23118, upload-time = "2024-10-18T15:21:17.133Z" }, + { url = "https://files.pythonhosted.org/packages/d5/da/f2eeb64c723f5e3777bc081da884b414671982008c47dcc1873d81f625b6/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c", size = 22993, upload-time = "2024-10-18T15:21:18.064Z" }, + { url = "https://files.pythonhosted.org/packages/da/0e/1f32af846df486dce7c227fe0f2398dc7e2e51d4a370508281f3c1c5cddc/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557", size = 24178, upload-time = "2024-10-18T15:21:18.859Z" }, + { url = "https://files.pythonhosted.org/packages/c4/f6/bb3ca0532de8086cbff5f06d137064c8410d10779c4c127e0e47d17c0b71/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22", size = 23319, upload-time = "2024-10-18T15:21:19.671Z" }, + { url = "https://files.pythonhosted.org/packages/a2/82/8be4c96ffee03c5b4a034e60a31294daf481e12c7c43ab8e34a1453ee48b/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48", size = 23352, upload-time = "2024-10-18T15:21:20.971Z" }, + { url = "https://files.pythonhosted.org/packages/51/ae/97827349d3fcffee7e184bdf7f41cd6b88d9919c80f0263ba7acd1bbcb18/MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30", size = 15097, upload-time = "2024-10-18T15:21:22.646Z" }, + { url = "https://files.pythonhosted.org/packages/c1/80/a61f99dc3a936413c3ee4e1eecac96c0da5ed07ad56fd975f1a9da5bc630/MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87", size = 15601, upload-time = "2024-10-18T15:21:23.499Z" }, + { url = "https://files.pythonhosted.org/packages/83/0e/67eb10a7ecc77a0c2bbe2b0235765b98d164d81600746914bebada795e97/MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd", size = 14274, upload-time = "2024-10-18T15:21:24.577Z" }, + { url = "https://files.pythonhosted.org/packages/2b/6d/9409f3684d3335375d04e5f05744dfe7e9f120062c9857df4ab490a1031a/MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430", size = 12352, upload-time = "2024-10-18T15:21:25.382Z" }, + { url = "https://files.pythonhosted.org/packages/d2/f5/6eadfcd3885ea85fe2a7c128315cc1bb7241e1987443d78c8fe712d03091/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094", size = 24122, upload-time = "2024-10-18T15:21:26.199Z" }, + { url = "https://files.pythonhosted.org/packages/0c/91/96cf928db8236f1bfab6ce15ad070dfdd02ed88261c2afafd4b43575e9e9/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396", size = 23085, upload-time = "2024-10-18T15:21:27.029Z" }, + { url = "https://files.pythonhosted.org/packages/c2/cf/c9d56af24d56ea04daae7ac0940232d31d5a8354f2b457c6d856b2057d69/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79", size = 22978, upload-time = "2024-10-18T15:21:27.846Z" }, + { url = "https://files.pythonhosted.org/packages/2a/9f/8619835cd6a711d6272d62abb78c033bda638fdc54c4e7f4272cf1c0962b/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a", size = 24208, upload-time = "2024-10-18T15:21:28.744Z" }, + { url = "https://files.pythonhosted.org/packages/f9/bf/176950a1792b2cd2102b8ffeb5133e1ed984547b75db47c25a67d3359f77/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca", size = 23357, upload-time = "2024-10-18T15:21:29.545Z" }, + { url = "https://files.pythonhosted.org/packages/ce/4f/9a02c1d335caabe5c4efb90e1b6e8ee944aa245c1aaaab8e8a618987d816/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c", size = 23344, upload-time = "2024-10-18T15:21:30.366Z" }, + { url = "https://files.pythonhosted.org/packages/ee/55/c271b57db36f748f0e04a759ace9f8f759ccf22b4960c270c78a394f58be/MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1", size = 15101, upload-time = "2024-10-18T15:21:31.207Z" }, + { url = "https://files.pythonhosted.org/packages/29/88/07df22d2dd4df40aba9f3e402e6dc1b8ee86297dddbad4872bd5e7b0094f/MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f", size = 15603, upload-time = "2024-10-18T15:21:32.032Z" }, + { url = "https://files.pythonhosted.org/packages/62/6a/8b89d24db2d32d433dffcd6a8779159da109842434f1dd2f6e71f32f738c/MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c", size = 14510, upload-time = "2024-10-18T15:21:33.625Z" }, + { url = "https://files.pythonhosted.org/packages/7a/06/a10f955f70a2e5a9bf78d11a161029d278eeacbd35ef806c3fd17b13060d/MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb", size = 12486, upload-time = "2024-10-18T15:21:34.611Z" }, + { url = "https://files.pythonhosted.org/packages/34/cf/65d4a571869a1a9078198ca28f39fba5fbb910f952f9dbc5220afff9f5e6/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c", size = 25480, upload-time = "2024-10-18T15:21:35.398Z" }, + { url = "https://files.pythonhosted.org/packages/0c/e3/90e9651924c430b885468b56b3d597cabf6d72be4b24a0acd1fa0e12af67/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d", size = 23914, upload-time = "2024-10-18T15:21:36.231Z" }, + { url = "https://files.pythonhosted.org/packages/66/8c/6c7cf61f95d63bb866db39085150df1f2a5bd3335298f14a66b48e92659c/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe", size = 23796, upload-time = "2024-10-18T15:21:37.073Z" }, + { url = "https://files.pythonhosted.org/packages/bb/35/cbe9238ec3f47ac9a7c8b3df7a808e7cb50fe149dc7039f5f454b3fba218/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5", size = 25473, upload-time = "2024-10-18T15:21:37.932Z" }, + { url = "https://files.pythonhosted.org/packages/e6/32/7621a4382488aa283cc05e8984a9c219abad3bca087be9ec77e89939ded9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a", size = 24114, upload-time = "2024-10-18T15:21:39.799Z" }, + { url = "https://files.pythonhosted.org/packages/0d/80/0985960e4b89922cb5a0bac0ed39c5b96cbc1a536a99f30e8c220a996ed9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9", size = 24098, upload-time = "2024-10-18T15:21:40.813Z" }, + { url = "https://files.pythonhosted.org/packages/82/78/fedb03c7d5380df2427038ec8d973587e90561b2d90cd472ce9254cf348b/MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6", size = 15208, upload-time = "2024-10-18T15:21:41.814Z" }, + { url = "https://files.pythonhosted.org/packages/4f/65/6079a46068dfceaeabb5dcad6d674f5f5c61a6fa5673746f42a9f4c233b3/MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f", size = 15739, upload-time = "2024-10-18T15:21:42.784Z" }, +] + +[[package]] +name = "packaging" +version = "25.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" }, +] + +[[package]] +name = "werkzeug" +version = "3.1.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746", size = 806925, upload-time = "2024-11-08T15:52:18.093Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/52/24/ab44c871b0f07f491e5d2ad12c9bd7358e527510618cb1b803a88e986db1/werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e", size = 224498, upload-time = "2024-11-08T15:52:16.132Z" }, +] diff --git a/Engine/CMakeLists.txt b/Engine/CMakeLists.txt index b85f849..71a0248 100755 --- a/Engine/CMakeLists.txt +++ b/Engine/CMakeLists.txt @@ -1,10 +1,10 @@ -file(GLOB_RECURSE SOURCES "src/*.cpp" "src/Objects/*.cpp") +file(GLOB_RECURSE SOURCES "src/*.cpp" "src/Objects/*.cpp" "src/Event/*.cpp") list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/pch.cpp") add_library(Engine-pch OBJECT "${CMAKE_CURRENT_SOURCE_DIR}/src/pch.cpp") target_include_directories(Engine-pch PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") -add_library(Engine SHARED ${SOURCES}) +add_library(Engine STATIC ${SOURCES}) target_link_libraries(Engine PRIVATE Engine-pch) target_link_libraries(Engine PUBLIC ncurses) diff --git a/Engine/include/Application.h b/Engine/include/Application.h old mode 100644 new mode 100755 index 706952f..b976f35 --- a/Engine/include/Application.h +++ b/Engine/include/Application.h @@ -1,16 +1,8 @@ #pragma once -#ifdef _WIN3 - #ifdef T_EXPORTS - #define TEXTSCRIPT_API __declspec(dllexport) - #else - #define TEXTSCRIPT_API __declspec(dllimport) - #endif -#else //Linux/macOS - #define TEXTSCRIPT_API -#endif - +#include "textscript_api.h" #include "pch.h" +#include "Event/Keyboard.h" namespace TextScript { class TEXTSCRIPT_API Application { @@ -24,12 +16,12 @@ namespace TextScript { virtual void OnStart(); virtual void OnUpdate(); - virtual void OnInput(const std::string& Key); + virtual void OnInput(KeyboardButtonPressEvent Key); private: bool m_IsRunning = true; std::string m_ApplicationName = ""; std::string m_CurrentKeyboardKey = ""; }; -}; // namespace TextScript +}; diff --git a/Engine/include/Event/Event.h b/Engine/include/Event/Event.h new file mode 100755 index 0000000..1c7ab59 --- /dev/null +++ b/Engine/include/Event/Event.h @@ -0,0 +1,17 @@ +#pragma once +#include "pch.h" + +namespace TextScript { + enum class EventType { + Base, + KeyboardKeyPress, + MouseMovement, + MouseButtonPress, + }; + + class BaseEvent { + public: + virtual std::string GetEventName(){ return "BaseEvent"; } + virtual EventType GetEventType(){ return EventType::Base; } + }; +} diff --git a/Engine/include/Event/Keyboard.h b/Engine/include/Event/Keyboard.h new file mode 100755 index 0000000..0cafd70 --- /dev/null +++ b/Engine/include/Event/Keyboard.h @@ -0,0 +1,26 @@ +#pragma once + +#include "pch.h" +#include "Event/Event.h" +#include + +namespace TextScript { + class KeyboardButtonPressEvent : BaseEvent { + public: + enum class ArrowKey{ + NONE, + UP, + DOWN, + LEFT, + RIGHT, + }; + + KeyboardButtonPressEvent(const std::string& Key); + ArrowKey GetArrowKeyPress(); + std::string GetEventName() override; + std::string GetKeyPress(); + private: + std::string m_Key = ""; + }; +} + diff --git a/Engine/include/Objects/BaseObject.h b/Engine/include/Objects/BaseObject.h old mode 100644 new mode 100755 index 70d82d2..8733b28 --- a/Engine/include/Objects/BaseObject.h +++ b/Engine/include/Objects/BaseObject.h @@ -1,9 +1,10 @@ #pragma once #include "pch.h" +#include "textscript_api.h" namespace TextScript { - class BaseObject { + class TEXTSCRIPT_API BaseObject { public: BaseObject(const std::string& name, int x=0, int y=0); unsigned short X = 0; diff --git a/Engine/include/Objects/TextObject.h b/Engine/include/Objects/TextObject.h old mode 100644 new mode 100755 index 0c135c8..fb02c93 --- a/Engine/include/Objects/TextObject.h +++ b/Engine/include/Objects/TextObject.h @@ -2,9 +2,10 @@ #include "pch.h" #include "Objects/BaseObject.h" +#include "textscript_api.h" namespace TextScript { - class TextObject : public TextScript::BaseObject { + class TEXTSCRIPT_API TextObject : public TextScript::BaseObject { public: TextObject(const std::string& name) : BaseObject(name) {} std::string Text = "█"; diff --git a/Engine/include/log.h b/Engine/include/log.h index 5c243f6..473fccd 100755 --- a/Engine/include/log.h +++ b/Engine/include/log.h @@ -1,17 +1,9 @@ #pragma once -#include -#ifdef _WIN32 - #ifdef T_EXPORTS - #define TEXTSCRIPT_API __declspec(dllexport) - #else - #define TEXTSCRIPT_API __declspec(dllimport) - #endif -#else // For Linux/macOS - #define TEXTSCRIPT_API -#endif +#include "pch.h" +#include "textscript_api.h" namespace TextScript { - namespace Logger { + namespace TEXTSCRIPT_API Logger { TEXTSCRIPT_API void log_info(std::string message); TEXTSCRIPT_API void log_warn(std::string message); TEXTSCRIPT_API void log_error(std::string message); diff --git a/Engine/include/textscript_api.h b/Engine/include/textscript_api.h new file mode 100755 index 0000000..8e1f8f8 --- /dev/null +++ b/Engine/include/textscript_api.h @@ -0,0 +1,11 @@ +#pragma once + +#ifdef _WIN32 + #ifdef T_EXPORTS + #define TEXTSCRIPT_API __declspec(dllexport) + #else + #define TEXTSCRIPT_API __declspec(dllimport) + #endif +#else // For Linux/macOS + #define TEXTSCRIPT_API +#endif diff --git a/Engine/src/Application.cpp b/Engine/src/Application.cpp old mode 100644 new mode 100755 index ea1ee6d..621dbea --- a/Engine/src/Application.cpp +++ b/Engine/src/Application.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "Application.h" #include "log.h" +#include "Event/Keyboard.h" namespace TextScript { Application::Application(std::string name) @@ -22,11 +23,11 @@ namespace TextScript { m_CurrentKeyboardKey = getch(); if (m_CurrentKeyboardKey == ""){} else { - OnInput(m_CurrentKeyboardKey); - m_CurrentKeyboardKey = ""; + KeyboardButtonPressEvent Key(m_CurrentKeyboardKey); + OnInput(Key); } - std::this_thread::sleep_for(std::chrono::milliseconds(100)); // sleep for 0.1 second + } } @@ -34,7 +35,7 @@ namespace TextScript { void Application::Close() { m_IsRunning = false; endwin(); - LOG_INFO("\033[48;5;208m\033[37m Engine \033[0m User exited Application"); + LOG_INFO("\033[48;5;208m\033[37m Engine \033[0m exited Application"); } void Application::RefreshScreen(){ @@ -48,7 +49,7 @@ namespace TextScript { void Application::OnUpdate() { // Override in derived class } - void Application::OnInput(const std::string& Key){ + void Application::OnInput(KeyboardButtonPressEvent Key){ // Override in derived class } } // namespace TextScript diff --git a/Engine/src/Event/Event.cpp b/Engine/src/Event/Event.cpp new file mode 100755 index 0000000..d2bb213 --- /dev/null +++ b/Engine/src/Event/Event.cpp @@ -0,0 +1,5 @@ +#include "pch.h" + +namespace TextScript { + +} diff --git a/Engine/src/Event/Keyboard.cpp b/Engine/src/Event/Keyboard.cpp new file mode 100755 index 0000000..f6b4ba6 --- /dev/null +++ b/Engine/src/Event/Keyboard.cpp @@ -0,0 +1,38 @@ +#include "Event/Keyboard.h" +#include "pch.h" + +namespace TextScript{ + KeyboardButtonPressEvent::KeyboardButtonPressEvent(const std::string& Key) + : m_Key(Key){ + + } + std::string KeyboardButtonPressEvent::GetEventName() { + return "KeyboardButtonPressEvent"; + } + KeyboardButtonPressEvent::ArrowKey KeyboardButtonPressEvent::GetArrowKeyPress() { + if (m_Key[0] >= 0 && m_Key[0] <= 255){ + return ArrowKey::NONE; + } + else{ + switch (m_Key[0]){ + case KEY_UP: + return ArrowKey::UP; + break; + case KEY_DOWN: + return ArrowKey::DOWN; + break; + case KEY_LEFT: + return ArrowKey::LEFT; + break; + case KEY_RIGHT: + return ArrowKey::RIGHT; + break; + } + } + } + std::string KeyboardButtonPressEvent::GetKeyPress(){ + if (m_Key[0] >= 0 && m_Key[0] <= 255) { + return m_Key; + } + } +} diff --git a/Engine/src/Objects/BaseObject.cpp b/Engine/src/Objects/BaseObject.cpp old mode 100644 new mode 100755 diff --git a/Engine/src/Objects/TextObject.cpp b/Engine/src/Objects/TextObject.cpp old mode 100644 new mode 100755 index 311ad25..928935a --- a/Engine/src/Objects/TextObject.cpp +++ b/Engine/src/Objects/TextObject.cpp @@ -4,7 +4,6 @@ namespace TextScript { void TextObject::Draw(){ clear(); - move(Y, X); - addstr(Text.c_str()); + mvprintw(Y, X, "%s", Text.c_str()); } } diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index ff2da49..9187bcb --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # TextScript a conosle base game engine made with C++(Ncurses) and Cmake + ## How to Run first clean any unwanted files ```bash @@ -23,6 +24,51 @@ int main() { return 0; } +``` + +sandbox.h: +```cpp +#pragma once +#include "TextScript.h" + +class Game : public TextScript::Application { +public: + Game(const std::string& name) + : TextScript::Application(name), player("player") {} + + void OnStart() override { + // This function is called once at the start of the application. + LOG_INFO("Application is working"); + LOG_INFO("Object name is " + player.GetName() + " and ID=" + player.GetObjectID()); + player.X = 0; + player.Y = 0; + LOG_INFO("Player position x:" + std::to_string(player.X) + " y:" + std::to_string(player.Y)); + } + + void OnUpdate() override { + // This function is called every frame. + player.Draw(); + RefreshScreen(); + } + + void OnInput(TextScript::KeyboardButtonPressEvent Key) override { + // This function handles keyboard input. + if (Key.GetKeyPress() == "d") { + player.X++; + } + if (Key.GetKeyPress() == "a") { + player.X--; + } + if (Key.GetKeyPress() == "q") { + Close(); // Quits the application. + } + } + +private: + TextScript::TextObject player; +}; + + ``` top level CMakeLists.txt: diff --git a/Sandbox/include/sandbox.h b/Sandbox/include/sandbox.h old mode 100644 new mode 100755 index 07b9eba..ea9f8c8 --- a/Sandbox/include/sandbox.h +++ b/Sandbox/include/sandbox.h @@ -1,6 +1,6 @@ #pragma once #include "TextScript.h" -#include + class Game : public TextScript::Application { public: @@ -11,6 +11,7 @@ class Game : public TextScript::Application { LOG_INFO("Application is working"); LOG_INFO("object name is " + player.GetName() + " and id=" + player.GetObjectID()); player.X = 0; + LOG_INFO("player position x:"+ std::to_string(player.X) + " y:"+ std::to_string(player.Y) ); } void OnUpdate() override { @@ -18,16 +19,21 @@ class Game : public TextScript::Application { RefreshScreen(); } - void OnInput(const std::string& Key) override { - if (Key == "d" ) { + void OnInput(TextScript::KeyboardButtonPressEvent Key) override { + if (Key.GetKeyPress() == "d" ) { player.X++; } - if (Key == "a") { + if (Key.GetKeyPress() == "a") { player.X--; } - if (Key == "q"){ - Close(); - + if (Key.GetKeyPress() == "q"){ + Close(); + } + if (Key.GetKeyPress() == "s"){ + player.Y--; + } + if (Key.GetKeyPress() == "w") { + player.Y++; } } private: diff --git a/clean.bat b/clean.bat new file mode 100755 index 0000000..8acc59c --- /dev/null +++ b/clean.bat @@ -0,0 +1,49 @@ +@echo off +setlocal + +:: Define the directories to clean +set "DIRECTORIES=.\ .\%~dp0Sandbox\ .\%~dp0Engine\" + +:: Define the files and directories to remove +set "REMOVE_TARGETS=CMakeCache.txt CMakeFiles cmake_install.cmake Makefile build bin lib install" + +:: A counter to track if anything was removed +set "CLEANED_SOMETHING=0" + +echo Starting CMake cleanup process... + +:: Loop through each specified directory +for %%d in (%DIRECTORIES%) do ( + echo. + echo Searching for files in: "%%d" + + :: Check if the directory exists + if exist "%%d" ( + :: Loop through each target to remove + for %%t in (%REMOVE_TARGETS%) do ( + :: Use 'if exist' to check for the file or directory before attempting to delete + if exist "%%d%%t" ( + echo - Removing %%d%%t + rd /s /q "%%d%%t" >nul 2>&1 + if not errorlevel 1 ( + set "CLEANED_SOMETHING=1" + ) + ) + ) + ) else ( + echo Warning: Directory not found: "%%d" + ) +) + +echo. +echo Cleanup complete. +echo. + +if %CLEANED_SOMETHING% equ 0 ( + echo No CMake files or directories were found to remove. +) else ( + echo Successfully removed specified CMake build artifacts. +) + +endlocal + diff --git a/compile_commands.json b/compile_commands.json new file mode 100755 index 0000000..b76f9e4 --- /dev/null +++ b/compile_commands.json @@ -0,0 +1,68 @@ +[ +{ + "directory": "/storage/FF45-1DF4/Projects/TextScript/Engine", + "command": "/data/data/com.termux/files/usr/bin/c++ -I/storage/FF45-1DF4/Projects/TextScript/Engine/include -O2 -g -DNDEBUG -o CMakeFiles/Engine-pch.dir/src/pch.cpp.o -c /storage/FF45-1DF4/Projects/TextScript/Engine/src/pch.cpp", + "file": "/storage/FF45-1DF4/Projects/TextScript/Engine/src/pch.cpp", + "output": "Engine/CMakeFiles/Engine-pch.dir/src/pch.cpp.o" +}, +{ + "directory": "/storage/FF45-1DF4/Projects/TextScript/Engine", + "command": "/data/data/com.termux/files/usr/bin/c++ -DT_EXPORTS -I/storage/FF45-1DF4/Projects/TextScript/Engine/include -O2 -g -DNDEBUG -Winvalid-pch -fpch-instantiate-templates -Xclang -emit-pch -Xclang -include -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx -x c++-header -o CMakeFiles/Engine.dir/cmake_pch.hxx.pch -c /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx.cxx", + "file": "/storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx.cxx", + "output": "Engine/CMakeFiles/Engine.dir/cmake_pch.hxx.pch" +}, +{ + "directory": "/storage/FF45-1DF4/Projects/TextScript/Engine", + "command": "/data/data/com.termux/files/usr/bin/c++ -DT_EXPORTS -I/storage/FF45-1DF4/Projects/TextScript/Engine/include -O2 -g -DNDEBUG -Winvalid-pch -Xclang -include-pch -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx -o CMakeFiles/Engine.dir/src/Application.cpp.o -c /storage/FF45-1DF4/Projects/TextScript/Engine/src/Application.cpp", + "file": "/storage/FF45-1DF4/Projects/TextScript/Engine/src/Application.cpp", + "output": "Engine/CMakeFiles/Engine.dir/src/Application.cpp.o" +}, +{ + "directory": "/storage/FF45-1DF4/Projects/TextScript/Engine", + "command": "/data/data/com.termux/files/usr/bin/c++ -DT_EXPORTS -I/storage/FF45-1DF4/Projects/TextScript/Engine/include -O2 -g -DNDEBUG -Winvalid-pch -Xclang -include-pch -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx -o CMakeFiles/Engine.dir/src/Event/Event.cpp.o -c /storage/FF45-1DF4/Projects/TextScript/Engine/src/Event/Event.cpp", + "file": "/storage/FF45-1DF4/Projects/TextScript/Engine/src/Event/Event.cpp", + "output": "Engine/CMakeFiles/Engine.dir/src/Event/Event.cpp.o" +}, +{ + "directory": "/storage/FF45-1DF4/Projects/TextScript/Engine", + "command": "/data/data/com.termux/files/usr/bin/c++ -DT_EXPORTS -I/storage/FF45-1DF4/Projects/TextScript/Engine/include -O2 -g -DNDEBUG -Winvalid-pch -Xclang -include-pch -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx -o CMakeFiles/Engine.dir/src/Event/Keyboard.cpp.o -c /storage/FF45-1DF4/Projects/TextScript/Engine/src/Event/Keyboard.cpp", + "file": "/storage/FF45-1DF4/Projects/TextScript/Engine/src/Event/Keyboard.cpp", + "output": "Engine/CMakeFiles/Engine.dir/src/Event/Keyboard.cpp.o" +}, +{ + "directory": "/storage/FF45-1DF4/Projects/TextScript/Engine", + "command": "/data/data/com.termux/files/usr/bin/c++ -DT_EXPORTS -I/storage/FF45-1DF4/Projects/TextScript/Engine/include -O2 -g -DNDEBUG -Winvalid-pch -Xclang -include-pch -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx -o CMakeFiles/Engine.dir/src/Objects/BaseObject.cpp.o -c /storage/FF45-1DF4/Projects/TextScript/Engine/src/Objects/BaseObject.cpp", + "file": "/storage/FF45-1DF4/Projects/TextScript/Engine/src/Objects/BaseObject.cpp", + "output": "Engine/CMakeFiles/Engine.dir/src/Objects/BaseObject.cpp.o" +}, +{ + "directory": "/storage/FF45-1DF4/Projects/TextScript/Engine", + "command": "/data/data/com.termux/files/usr/bin/c++ -DT_EXPORTS -I/storage/FF45-1DF4/Projects/TextScript/Engine/include -O2 -g -DNDEBUG -Winvalid-pch -Xclang -include-pch -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx -o CMakeFiles/Engine.dir/src/Objects/TextObject.cpp.o -c /storage/FF45-1DF4/Projects/TextScript/Engine/src/Objects/TextObject.cpp", + "file": "/storage/FF45-1DF4/Projects/TextScript/Engine/src/Objects/TextObject.cpp", + "output": "Engine/CMakeFiles/Engine.dir/src/Objects/TextObject.cpp.o" +}, +{ + "directory": "/storage/FF45-1DF4/Projects/TextScript/Engine", + "command": "/data/data/com.termux/files/usr/bin/c++ -DT_EXPORTS -I/storage/FF45-1DF4/Projects/TextScript/Engine/include -O2 -g -DNDEBUG -Winvalid-pch -Xclang -include-pch -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx -o CMakeFiles/Engine.dir/src/TextScript.cpp.o -c /storage/FF45-1DF4/Projects/TextScript/Engine/src/TextScript.cpp", + "file": "/storage/FF45-1DF4/Projects/TextScript/Engine/src/TextScript.cpp", + "output": "Engine/CMakeFiles/Engine.dir/src/TextScript.cpp.o" +}, +{ + "directory": "/storage/FF45-1DF4/Projects/TextScript/Engine", + "command": "/data/data/com.termux/files/usr/bin/c++ -DT_EXPORTS -I/storage/FF45-1DF4/Projects/TextScript/Engine/include -O2 -g -DNDEBUG -Winvalid-pch -Xclang -include-pch -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /storage/FF45-1DF4/Projects/TextScript/Engine/CMakeFiles/Engine.dir/cmake_pch.hxx -o CMakeFiles/Engine.dir/src/log.cpp.o -c /storage/FF45-1DF4/Projects/TextScript/Engine/src/log.cpp", + "file": "/storage/FF45-1DF4/Projects/TextScript/Engine/src/log.cpp", + "output": "Engine/CMakeFiles/Engine.dir/src/log.cpp.o" +}, +{ + "directory": "/storage/FF45-1DF4/Projects/TextScript/Sandbox", + "command": "/data/data/com.termux/files/usr/bin/c++ -DT_EXPORTS -I/storage/FF45-1DF4/Projects/TextScript/Sandbox/include -I/storage/FF45-1DF4/Projects/TextScript/Engine/include -O2 -g -DNDEBUG -Winvalid-pch -fpch-instantiate-templates -Xclang -emit-pch -Xclang -include -Xclang /storage/FF45-1DF4/Projects/TextScript/Sandbox/CMakeFiles/Sandbox.dir/cmake_pch.hxx -x c++-header -o CMakeFiles/Sandbox.dir/cmake_pch.hxx.pch -c /storage/FF45-1DF4/Projects/TextScript/Sandbox/CMakeFiles/Sandbox.dir/cmake_pch.hxx.cxx", + "file": "/storage/FF45-1DF4/Projects/TextScript/Sandbox/CMakeFiles/Sandbox.dir/cmake_pch.hxx.cxx", + "output": "Sandbox/CMakeFiles/Sandbox.dir/cmake_pch.hxx.pch" +}, +{ + "directory": "/storage/FF45-1DF4/Projects/TextScript/Sandbox", + "command": "/data/data/com.termux/files/usr/bin/c++ -DT_EXPORTS -I/storage/FF45-1DF4/Projects/TextScript/Sandbox/include -I/storage/FF45-1DF4/Projects/TextScript/Engine/include -O2 -g -DNDEBUG -Winvalid-pch -Xclang -include-pch -Xclang /storage/FF45-1DF4/Projects/TextScript/Sandbox/CMakeFiles/Sandbox.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /storage/FF45-1DF4/Projects/TextScript/Sandbox/CMakeFiles/Sandbox.dir/cmake_pch.hxx -o CMakeFiles/Sandbox.dir/src/main.cpp.o -c /storage/FF45-1DF4/Projects/TextScript/Sandbox/src/main.cpp", + "file": "/storage/FF45-1DF4/Projects/TextScript/Sandbox/src/main.cpp", + "output": "Sandbox/CMakeFiles/Sandbox.dir/src/main.cpp.o" +} +] \ No newline at end of file diff --git a/message.txt b/message.txt old mode 100644 new mode 100755 diff --git a/run b/run index 8f788f1..9e3e3c4 100755 --- a/run +++ b/run @@ -7,7 +7,7 @@ if [[ -d "$CMAKE_FILES" ]]; then echo "cmake files found" else echo "CMakeFiles not found. running cmake" - cmake . + cmake . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON fi diff --git a/run.bat b/run.bat new file mode 100755 index 0000000..14bbdfc --- /dev/null +++ b/run.bat @@ -0,0 +1,31 @@ +@echo off +setlocal + +set "CMAKE_FILES=.\CMakeFiles" + +if exist "%CMAKE_FILES%" ( + echo cmake files found +) else ( + echo CMakeFiles not found. running cmake + cmake . +) + +if "%~1"=="" ( + echo build and run + echo Usage: %~nx0 ^ + exit /b 1 +) + +set EXECUTABLE_NAME=%~1 + +cls + +type message.txt +echo %EXECUTABLE_NAME% + +cmake --build . + +echo. +echo running App +".\bin\%EXECUTABLE_NAME%.exe" + diff --git a/run_editor b/run_editor new file mode 100755 index 0000000..b186765 --- /dev/null +++ b/run_editor @@ -0,0 +1,6 @@ +#!/bin/bash + +echo "running Server" +cd Editor +uv sync +uv run gunicorn app:app