From 27687e8c9686c63f39ec58d712e1145cdbaa81fc Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 23 May 2023 17:58:05 +0200 Subject: [PATCH] Initial commit / setup. --- .clang-format | 189 +++++++++++++++++++++++++++++++++++++ .gitignore | 36 +++++++ HEADS | 1 + LICENSE | 19 ++++ README.md | 218 +++++++++++++++++++++++++++++++++++++++++++ SConstruct | 173 ++++++++++++++++++++++++++++++++++ build.config.example | 45 +++++++++ editor.bat | 6 ++ editor.sh | 6 ++ export_all.sh | 4 + ged.sh | 6 ++ leditor.sh | 6 ++ lged.sh | 6 ++ make_release.sh | 4 + module_config.py | 157 +++++++++++++++++++++++++++++++ play.sh | 6 ++ 16 files changed, 882 insertions(+) create mode 100644 .clang-format create mode 100644 .gitignore create mode 100644 HEADS create mode 100644 LICENSE create mode 100644 README.md create mode 100644 SConstruct create mode 100644 build.config.example create mode 100644 editor.bat create mode 100755 editor.sh create mode 100755 export_all.sh create mode 100755 ged.sh create mode 100755 leditor.sh create mode 100755 lged.sh create mode 100755 make_release.sh create mode 100644 module_config.py create mode 100755 play.sh diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..aca46f2 --- /dev/null +++ b/.clang-format @@ -0,0 +1,189 @@ +# Commented out parameters are those with the same value as base LLVM style. +# We can uncomment them if we want to change their value, or enforce the +# chosen value in case the base style changes (last sync: Clang 13.0). +--- +### General config, applies to all languages ### +BasedOnStyle: LLVM +AccessModifierOffset: -4 +AlignAfterOpenBracket: DontAlign +# AlignArrayOfStructures: None +# AlignConsecutiveMacros: None +# AlignConsecutiveAssignments: None +# AlignConsecutiveBitFields: None +# AlignConsecutiveDeclarations: None +# AlignEscapedNewlines: Right +AlignOperands: DontAlign +AlignTrailingComments: false +# AllowAllArgumentsOnNextLine: true +# AllowAllConstructorInitializersOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: false +# AllowShortEnumsOnASingleLine: true +# AllowShortBlocksOnASingleLine: Never +# AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: Inline +# AllowShortLambdasOnASingleLine: All +# AllowShortIfStatementsOnASingleLine: Never +# AllowShortLoopsOnASingleLine: false +# AlwaysBreakAfterDefinitionReturnType: None +# AlwaysBreakAfterReturnType: None +# AlwaysBreakBeforeMultilineStrings: false +# AlwaysBreakTemplateDeclarations: MultiLine +# AttributeMacros: +# - __capability +# BinPackArguments: true +# BinPackParameters: true +# BraceWrapping: +# AfterCaseLabel: false +# AfterClass: false +# AfterControlStatement: Never +# AfterEnum: false +# AfterFunction: false +# AfterNamespace: false +# AfterObjCDeclaration: false +# AfterStruct: false +# AfterUnion: false +# AfterExternBlock: false +# BeforeCatch: false +# BeforeElse: false +# BeforeLambdaBody: false +# BeforeWhile: false +# IndentBraces: false +# SplitEmptyFunction: true +# SplitEmptyRecord: true +# SplitEmptyNamespace: true +# BreakBeforeBinaryOperators: None +# BreakBeforeConceptDeclarations: true +# BreakBeforeBraces: Attach +# BreakBeforeInheritanceComma: false +# BreakInheritanceList: BeforeColon +# BreakBeforeTernaryOperators: true +# BreakConstructorInitializersBeforeComma: false +BreakConstructorInitializers: AfterColon +# BreakStringLiterals: true +ColumnLimit: 0 +# CommentPragmas: '^ IWYU pragma:' +# CompactNamespaces: false +ConstructorInitializerAllOnOneLineOrOnePerLine: true +ConstructorInitializerIndentWidth: 8 +ContinuationIndentWidth: 8 +Cpp11BracedListStyle: false +# DeriveLineEnding: true +# DerivePointerAlignment: false +# DisableFormat: false +# EmptyLineAfterAccessModifier: Never +# EmptyLineBeforeAccessModifier: LogicalBlock +# ExperimentalAutoDetectBinPacking: false +# FixNamespaceComments: true +# ForEachMacros: +# - foreach +# - Q_FOREACH +# - BOOST_FOREACH +# IfMacros: +# - KJ_IF_MAYBE +# IncludeBlocks: Preserve +IncludeCategories: + - Regex: '".*"' + Priority: 1 + - Regex: '^<.*\.h>' + Priority: 2 + - Regex: '^<.*' + Priority: 3 +# IncludeIsMainRegex: '(Test)?$' +# IncludeIsMainSourceRegex: '' +# IndentAccessModifiers: false +IndentCaseLabels: true +# IndentCaseBlocks: false +# IndentGotoLabels: true +# IndentPPDirectives: None +# IndentExternBlock: AfterExternBlock +# IndentRequires: false +IndentWidth: 4 +# IndentWrappedFunctionNames: false +# InsertTrailingCommas: None +# JavaScriptQuotes: Leave +# JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: false +# LambdaBodyIndentation: Signature +# MacroBlockBegin: '' +# MacroBlockEnd: '' +# MaxEmptyLinesToKeep: 1 +# NamespaceIndentation: None +# PenaltyBreakAssignment: 2 +# PenaltyBreakBeforeFirstCallParameter: 19 +# PenaltyBreakComment: 300 +# PenaltyBreakFirstLessLess: 120 +# PenaltyBreakString: 1000 +# PenaltyBreakTemplateDeclaration: 10 +# PenaltyExcessCharacter: 1000000 +# PenaltyReturnTypeOnItsOwnLine: 60 +# PenaltyIndentedWhitespace: 0 +# PointerAlignment: Right +# PPIndentWidth: -1 +# ReferenceAlignment: Pointer +# ReflowComments: true +# ShortNamespaceLines: 1 +# SortIncludes: CaseSensitive +# SortJavaStaticImport: Before +# SortUsingDeclarations: true +# SpaceAfterCStyleCast: false +# SpaceAfterLogicalNot: false +# SpaceAfterTemplateKeyword: true +# SpaceBeforeAssignmentOperators: true +# SpaceBeforeCaseColon: false +# SpaceBeforeCpp11BracedList: false +# SpaceBeforeCtorInitializerColon: true +# SpaceBeforeInheritanceColon: true +# SpaceBeforeParens: ControlStatements +# SpaceAroundPointerQualifiers: Default +# SpaceBeforeRangeBasedForLoopColon: true +# SpaceInEmptyParentheses: false +# SpacesBeforeTrailingComments: 1 +# SpaceInEmptyBlock: false +# SpaceInEmptyParentheses: false +# SpacesBeforeTrailingComments: 1 +# SpacesInAngles: Never +# SpacesInContainerLiterals: true +# SpacesInConditionalStatement: false +# SpacesInContainerLiterals: true +# SpacesInCStyleCastParentheses: false +## Pandemonium TODO: We'll want to use a min of 1, but we need to see how to fix +## our comment capitalization at the same time. +SpacesInLineCommentPrefix: + Minimum: 0 + Maximum: -1 +# SpacesInParentheses: false +# SpacesInSquareBrackets: false +# SpaceBeforeSquareBrackets: false +# BitFieldColonSpacing: Both +# StatementAttributeLikeMacros: +# - Q_EMIT +# StatementMacros: +# - Q_UNUSED +# - QT_REQUIRE_VERSION +TabWidth: 4 +# UseCRLF: false +UseTab: Always +# WhitespaceSensitiveMacros: +# - STRINGIZE +# - PP_STRINGIZE +# - BOOST_PP_STRINGIZE +# - NS_SWIFT_NAME +# - CF_SWIFT_NAME +--- +### C++ specific config ### +Language: Cpp +Standard: c++14 +--- +### ObjC specific config ### +Language: ObjC +# ObjCBinPackProtocolList: Auto +ObjCBlockIndentWidth: 4 +# ObjCBreakBeforeNestedBlockParam: true +# ObjCSpaceAfterProperty: false +# ObjCSpaceBeforeProtocolList: true +--- +### Java specific config ### +Language: Java +# BreakAfterJavaFieldAnnotations: false +JavaImportGroups: ['net.relintai.pandemonium', 'android', 'androidx', 'com.android', 'com.google', 'java', 'javax'] +... diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6c20861 --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +engine +pandemonium_engine +modules/* +logs/* + +__pycache__/** + +*.pyc + +*.d +*.o +*.meta +game/.import/** +game/.prop_tool_temp/** +.sconsign.dblite +.DS_Store + +export/** +release/** + +.vs/* +.kdev4/* +.vscode/* + +TestRWTextures + +_build/* +_binaries/* +game/android/build/* + +*.blend1 +.dir-locals.el + +build.config + +__pycache__/* \ No newline at end of file diff --git a/HEADS b/HEADS new file mode 100644 index 0000000..91c9984 --- /dev/null +++ b/HEADS @@ -0,0 +1 @@ +{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "c4864a0e5f73a375259503ea1485794a6aad6df7"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3536f01bacf5f54cefb32b768cd020a1f94d0ade"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "voxelman": {"master": "65485930a20f65844d496b4ba47dec5b6ed70b91"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "mesh_data_resource": {"master": "a062d871d49d954c5466b9de54b4075cb61cbef4"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "983090d21a08ebed30a5ce06681269819ab12e48"}, "mesh_utils": {"master": "b52a261c31f04fad624e5cfbcdcc4a45d61136da"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "thread_pool": {"master": "0917511d04bb1aa308385b63ec88d3c182990628"}, "terraman": {"master": "c72d8fc03295588fc18c5168ce351bd0c321ec5f"}, "pandemonium_engine": {"master": "c465f18ee4a56b770ae426094e528a839f513084"}, "pmlpp": {"master": "11d10c5ca5124ca49c3ed269dfdcbe27b8769a3e"}, "mono": {"master": "5c461069b39150244d4d8f309bffbe6de6c60308"}} \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a46a18f --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2023-present Péter Magyar + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..c5a901a --- /dev/null +++ b/README.md @@ -0,0 +1,218 @@ +# Mono Sample Project + +Sample project / testbed for the https://github.com/Relintai/mono pandemonium engine module. + +## Opening the project + +Compile the engine itself, and then open the project inside the `game` folder. + +After the initial import it might need an editor restart, however everything should work after that. + +## Compiling + +First make sure, that you have everything installed to be able to compile the engine. +See the [official docs](https://github.com/Relintai/pandemonium_engine_docs/tree/master/development/compiling) or the [official Godot docs](https://docs.godotengine.org/en/3.4/development/compiling/index.html) for more info. + +My setup/compile script uses the same tools, so you don't need to install anything else. + +Even though the project doesn't use godot anymore, their docs are still sufficient. + +Now let's clone this repository: + +``` git clone https://github.com/Relintai/pmlpp_sample ``` + +cd into the new folder: + +``` cd pmlpp_sample ``` + +Now let's run the project's setup script, by calling scons without arguments. + +``` scons ``` + +This will clone and setup the engine, and all of the required modules into a new `pandemonium_engine` folder inside the project, using http. + +(If you want to use the github's ssh links append `repository_type=ssh` like ``` scons repository_type=ssh ```) + +Once it is done you can compile the engine. + +To build the editor on windows with 4 threads run the following command: + +``` scons bew -j4 ``` + +To build the editor on linux with 4 threads run the following command: + +``` scons bel -j4 ``` + +I call this feature of the setup script build words. [See](#build-words). + +Once the build finishes you can find the editor executable inside the `./engine/bin/` folder. + +For convenience there is a provided `editor.sh`, or `editor.bat` for running it from the project's folder. +These will create a copy, so you can even compile while the editor is running. + +Alternatively if you don't want to use build words, you can also just go into the engine folder: + +``` cd pandemonium_engine ``` + +And compile godot as per the [official docs](https://docs.godotengine.org/en/latest/development/compiling/index.html). + +### Build words + +The project's setup script contains support for "build words". These can be used from the root of this project. + +For example to build the editor for windows with 4 threads you can use: + +``` scons bew -j4 ``` + +The first argument must start with b (build), then it needs to be followed by a few abbreviations (the order does not matters) + +The rest of the arguments will be passed directly to godot's scons script. + +#### Editor + +Append `e` to build with `tools=yes` a.k.a. the editor. + +``` scons bew -j4 ``` + +if you omit `e`, the system will build the export template for you. For example: + +``` scons bw -j4 ``` + +This will be the `release_debug` windows export template. + +#### Platform abbreviations + +`l`: linux \ +`w`: windows \ +`a`: android \ +`j`: Javascript \ +`i`: iphone (Not yet finished, use `build_ios.sh`, and `build_ios_release.sh`) \ +Mac OSX: Not yet finished, use `build_osx.sh` + +#### Target abbreviations + +By default the system builds in release_debug. + +Append `d` for debug, or `r` for release. + +``` scons bewd -j4 ``` + +build editor windows debug + +``` scons bwr -j4 ``` + +build windows release (this will build the windows release export template) + +#### Shared modules + +Note: This only works on linux! + +append `s` to the build string. + +Optionally you can also make the build system only build a target module, by appending one of these: + +`E`: Entity Spell System \ +`T`: Texture Packer \ +`V`: Voxelman \ +`W`: World Generator \ +`P`: Procedural Animations + +Example: + +``` scons belsE -j4 ``` + +build editor linux shared (Entity Spell System) with 4 threads + +Note: to easily run the editor you can use the `editor.sh` or `editor.bat` in the root of the project. + +#### Other + +Append `v` to pass the `vsproj=yes` parameter to the build script. This will generate Visual Studio project files.\ +Append `c` to pass the `compiledb=yes` parameter to the build script. This is a new feature in 3.x to have this disabled by default to lessen compile times. + +#### Postfixes + +There are a few postfixes for the build words. These are more complex options. You have to append them to your build word with an underscore. + +You can use as many as you want. + +For example: + +``` scons bel_slim_latomic -j4 ``` + +##### slim + +With this postfix you can build a slimmed down version of the engine. This disables quite a few unneeded modules. + +``` scons bel_slim -j4 ``` + +##### latomic + +If you get linker errors while building the game/editor about undefined referenced with atomic related functions you can use this postfix. +It will add the ` -latomic ` command line switch to the linker flags. + +I ran into this issue while building on a raspberry pi 4 with the x11 platform. It might be related to the recent reworks to threading. + +``` scons bel_latomic -j4 ``` + +##### strip + +Appends `debug_symbols=no` to the build command, which will strip the resulting binary from debug symbols. + +``` scons bel_strip -j4 ``` + +##### threads + +Appends `threads_enabled=yes` to the build command. Useful for building the editor for html. + +``` scons bej_threads -j4 ``` + +#### Scons cache, and sdk locations + +In order to use scons cache and to tell the build system where some of the required sdks are located you usually +have to use environment variables. Most of the time you might just want to add them globally, +howewer this is sometimes unfeasible (e.g. you don't have administrator access, or you just want to have +multiple sdk versions installed). + +In order to solve this a build config file was added. + +If you want to use the config simply rename the provided `build.config.example` to `build.config`, and customize +the settings inside. + +### Manual Setup + +If you you don't want to use the setup script (or just want to know what it actually does), +this section will explain how to set everything up manually. + +First clone the engine: + +``` git clone https://github.com/Relintai/pandemonium_engine ``` + +Now if you look at the [HEADS file](https://github.com/Relintai/broken_seals/blob/master/HEADS). + +It contains the commit hashes for that particular revision for every module and the engine. +The engine now contains all the modules, so at the moment only worry about the engine's commit hash. + +You need to go and checkout the proper commit for it. + +Now you can go ahead and compile the engine normally. + +## Pulling upstream changes + +First pull the changes by calling + +``` git pull orgin master ``` + +Then just run `scons`, to will update the modules. + +## Upgrading the modules + +Note: this is how to update the HEADS file. Normally you don't need to do this. + +If you want to update the modules, and the engine to the latest, you can use (`action=update`): + +``` scons a=u ``` + +You can also update different targets: `all`, `engine`, `modules`, `all_addons`, `addons`, `third_party_addons` + +For example to update the engine to the latest: ``` scons a=u target=engine ``` diff --git a/SConstruct b/SConstruct new file mode 100644 index 0000000..e8fe36c --- /dev/null +++ b/SConstruct @@ -0,0 +1,173 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright (c) 2019-2021 Péter Magyar +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +import os +import subprocess +import json +import sys + +import module_config + +repository_index = 0 +clone_command = 'git clone {0} {1}' +target_commits = {} + +def setup_repository(data, clone_path, branch = 'master'): + cwd = os.getcwd() + + full_path = cwd + clone_path + data[1] + '/' + + if not os.path.isdir(full_path): + os.chdir(cwd + clone_path) + + subprocess.call(clone_command.format(data[0][repository_index], data[1]), shell=True) + + os.chdir(full_path) + + subprocess.call('git reset', shell=True) + subprocess.call('git reset --hard', shell=True) + subprocess.call('git clean -f -d', shell=True) + subprocess.call('git checkout -B ' + branch + ' origin/' + branch, shell=True) + subprocess.call('git pull origin ' + branch, shell=True) + subprocess.call('git reset', shell=True) + subprocess.call('git reset --hard', shell=True) + + target = "" + + if data[1] in target_commits: + target = target_commits[data[1]][branch] + + subprocess.call('git checkout -B ' + branch + ' ' + target, shell=True) + subprocess.call('git clean -f -d', shell=True) + subprocess.call('git reset', shell=True) + subprocess.call('git reset --hard', shell=True) + + os.chdir(cwd) + + +def update_repository(data, clone_path, branch = 'master'): + cwd = os.getcwd() + + full_path = cwd + clone_path + data[1] + '/' + + if not os.path.isdir(full_path): + os.chdir(cwd + clone_path) + + subprocess.call(clone_command.format(data[0][repository_index], data[1]), shell=True) + + os.chdir(full_path) + + subprocess.call('git reset', shell=True) + subprocess.call('git reset --hard', shell=True) + subprocess.call('git clean -f -d', shell=True) + subprocess.call('git checkout -B ' + branch + ' origin/' + branch, shell=True) + subprocess.call('git reset', shell=True) + subprocess.call('git reset --hard', shell=True) + subprocess.call('git clean -f -d', shell=True) + subprocess.call('git pull origin ' + branch, shell=True) + + process = subprocess.Popen('git rev-parse HEAD', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + output = process.communicate()[0].decode().strip() + + if data[1] not in target_commits: + target_commits[data[1]] = {} + + target_commits[data[1]][branch] = output + + os.chdir(cwd) + +def validate_repository_origin(data, clone_path, branch = 'master'): + full_path = os.path.abspath(clone_path) + + if not os.path.isdir(full_path): + return + + cwd = os.getcwd() + os.chdir(full_path) + + res = subprocess.run('git remote -v', shell=True, capture_output=True) + + resstr = res.stdout.decode('ascii') + resarr = resstr.split("\n") + res_orig = [] + + for l in resarr: + if "origin" in l: + res_orig.append(l) + + if len(res_orig) == 0: + print("The repository " + clone_path + " does not seem to have an origin remote. Adding it.") + + subprocess.call('git remote add origin ' + data[0][repository_index], shell=True) + + os.chdir(cwd) + + return + + for l in data[0]: + for ll in res_orig: + if l in ll: + os.chdir(cwd) + + return + + rind = 0 + + if 'git@' in res_orig[0]: + rind = 1 + + subprocess.call('git remote remove origin', shell=True) + subprocess.call('git remote add origin ' + data[0][rind], shell=True) + subprocess.call('git pull origin', shell=True) + subprocess.call('git checkout origin/' + branch, shell=True) + + print('Updated git remote origin in ' + clone_path) + + os.chdir(cwd) + +def update_engine(): + validate_repository_origin(module_config.engine_repository, './pandemonium_engine/', module_config.pandemonium_branch) + update_repository(module_config.engine_repository, '/', module_config.pandemonium_branch) + +engine_abspath = os.path.abspath(module_config.engine_repository[1]) + +if not os.path.isdir(engine_abspath): + if not os.path.isfile('./HEADS'): + print("Error! HEADS file doesn't exists! Exiting.") + exit() + + with open('./HEADS', 'r') as infile: + target_commits = json.load(infile) + + if 'repository_type=ssh' in sys.argv: + repository_index = 1 + + setup_repository(module_config.engine_repository, '/', module_config.pandemonium_branch) +else: + if not os.path.isfile('pandemonium_engine/misc/scripts_app/SConstruct'): + update_engine() + + +SConscript("pandemonium_engine/misc/scripts_app/SConstruct") + + diff --git a/build.config.example b/build.config.example new file mode 100644 index 0000000..f5ef65d --- /dev/null +++ b/build.config.example @@ -0,0 +1,45 @@ +# Copyright (c) 2019-2021 Péter Magyar +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# Rename this file to build.config to use it + +# Lines starting with # are comments. (Only works at the start of the line!) + +# Note: +# ~ will be converted to %userprofile% on windows +# / will be converted to \ on windows +# so you don't have to worry about it + +# Visual studio related setup: +visual_studio_call_vcvarsall True +visual_studio_vcvarsall_path C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvarsall.bat +visual_studio_arch amd64 + +# You can export variables with the export keyword +# You can run commands with the run keywords +# +# available export/run targets: global, linux, windows, android, javascript + +export global SCONS_CACHE=~/.scons_cache +export global SCONS_CACHE_LIMIT=5000 + +export android ANDROID_HOME=~/SDKs/Android/SDK + +run javascript source ~/SDKs/emsdk/emsdk_env.sh diff --git a/editor.bat b/editor.bat new file mode 100644 index 0000000..6259159 --- /dev/null +++ b/editor.bat @@ -0,0 +1,6 @@ + +copy "pandemonium_engine\bin\pandemonium.windows.opt.tools.64.exe" "pandemonium_engine\bin\run_pandemonium.windows.opt.tools.64.exe" /y +copy "pandemonium_engine\bin\pandemonium.windows.opt.tools.64.pdb" "pandemonium_engine\bin\run_pandemonium.windows.opt.tools.64.pdb" /y +copy "pandemonium_engine\bin\pandemonium.windows.opt.tools.64.exp" "pandemonium_engine\bin\run_pandemonium.windows.opt.tools.64.exp" /y + +cmd /c pandemonium_engine\bin\run_pandemonium.windows.opt.tools.64.exe \ No newline at end of file diff --git a/editor.sh b/editor.sh new file mode 100755 index 0000000..1aec724 --- /dev/null +++ b/editor.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cp -u ./pandemonium_engine/bin/pandemonium.x11.opt.tools.64 ./pandemonium_engine/bin/run.pandemonium.x11.opt.tools.64 + +export LD_LIBRARY_PATH=`pwd`/pandemonium_engine/bin/ +./pandemonium_engine/bin/run.pandemonium.x11.opt.tools.64 -v diff --git a/export_all.sh b/export_all.sh new file mode 100755 index 0000000..8281a07 --- /dev/null +++ b/export_all.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +./pandemonium_engine/misc/scripts_app/export_all.sh mono_sample monos $1 + diff --git a/ged.sh b/ged.sh new file mode 100755 index 0000000..51ef2eb --- /dev/null +++ b/ged.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cp -u ./pandemonium_engine/bin/pandemonium.x11.opt.tools.64 ./pandemonium_engine/bin/run.pandemonium.x11.opt.tools.64 + +export LD_LIBRARY_PATH=`pwd`/pandemonium_engine/bin/ +./pandemonium_engine/bin/run.pandemonium.x11.opt.tools.64 -e --path ./game/ diff --git a/leditor.sh b/leditor.sh new file mode 100755 index 0000000..4d49417 --- /dev/null +++ b/leditor.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cp -u ./pandemonium_engine/bin/pandemonium.x11.opt.tools.64.llvm ./pandemonium_engine/bin/run.pandemonium.x11.opt.tools.64.llvm + +export LD_LIBRARY_PATH=`pwd`/pandemonium_engine/bin/ +./pandemonium_engine/bin/run.pandemonium.x11.opt.tools.64.llvm diff --git a/lged.sh b/lged.sh new file mode 100755 index 0000000..8d6c525 --- /dev/null +++ b/lged.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cp -u ./pandemonium_engine/bin/pandemonium.x11.opt.tools.64.llvm ./pandemonium_engine/bin/run.pandemonium.x11.opt.tools.64.llvm + +export LD_LIBRARY_PATH=`pwd`/pandemonium_engine/bin/ +./pandemonium_engine/bin/run.pandemonium.x11.opt.tools.64.llvm -e --path ./game/ diff --git a/make_release.sh b/make_release.sh new file mode 100755 index 0000000..d94f640 --- /dev/null +++ b/make_release.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +./pandemonium_engine/misc/scripts_app/make_release.sh mono_sample monos $1 + diff --git a/module_config.py b/module_config.py new file mode 100644 index 0000000..75cef8c --- /dev/null +++ b/module_config.py @@ -0,0 +1,157 @@ + +pandemonium_branch = 'master' + +engine_repository = [ ['https://github.com/Relintai/pandemonium_engine.git', 'git@github.com:Relintai/pandemonium_engine.git'], 'pandemonium_engine', '' ] + +# Relative to this script's directory +module_install_folder = './pandemonium_engine/custom_modules/' + +module_repositories = [ + [ ['https://github.com/Relintai/mono.git', 'git@github.com:Relintai/mono.git'], 'mono', '' ], +] + +removed_modules = [ +] + +addon_repositories = [ +] + +third_party_addon_repositories = [ +] + +# Relative to the engine directory +custom_module_folders = 'custom_modules' + +slim_args = '' +slim_args += 'module_bmp_enabled=no ' +slim_args += 'module_broken_seals_module_enabled=no ' +slim_args += 'module_cscript_enabled=no ' +slim_args += 'module_database_enabled=no ' +slim_args += 'module_database_sqlite_enabled=no ' +slim_args += 'module_dds_enabled=no ' +slim_args += 'module_enet_enabled=no ' +slim_args += 'module_entity_spell_system_enabled=no ' +slim_args += 'module_fastnoise_enabled=no ' +slim_args += 'module_freetype_enabled=no ' +#slim_args += 'module_gdscript_enabled=no ' +slim_args += 'module_gridmap_enabled=no ' +slim_args += 'module_hdr_enabled=no ' +slim_args += 'module_http_server_simple_enabled=no ' +slim_args += 'module_jpg_enabled=no ' +slim_args += 'module_lz4_enabled=no ' +slim_args += 'module_material_maker_enabled=no ' +#slim_args += 'module_mbedtls_enabled=no ' +slim_args += 'module_mesh_data_resource_enabled=no ' +slim_args += 'module_mesh_utils_enabled=no ' +slim_args += 'module_minimp3_enabled=no ' +slim_args += 'module_navigation_enabled=no ' +#slim_args += 'module_navigation_dummy_enabled=no ' +slim_args += 'module_network_synchronizer_enabled=no ' +slim_args += 'module_ogg_enabled=no ' +slim_args += 'module_opensimplex_enabled=no ' +slim_args += 'module_opus_enabled=no ' +slim_args += 'module_paint_enabled=no ' +slim_args += 'module_props_enabled=no ' +slim_args += 'module_props_2d_enabled=no ' +slim_args += 'module_pvr_enabled=no ' +slim_args += 'module_regex_enabled=no ' +slim_args += 'module_skeleton_2d_enabled=no ' +slim_args += 'module_skeleton_3d_enabled=no ' +slim_args += 'module_squish_enabled=no ' +slim_args += 'module_stb_vorbis_enabled=no ' +slim_args += 'module_steering_ai_enabled=no ' +slim_args += 'module_svg_enabled=no ' +slim_args += 'module_terraman_enabled=no ' +slim_args += 'module_terraman_2d_enabled=no ' +slim_args += 'module_texture_packer_enabled=no ' +slim_args += 'module_tga_enabled=no ' +slim_args += 'module_theora_enabled=no ' +slim_args += 'module_tile_map_enabled=no ' +slim_args += 'module_ui_extensions_enabled=no ' +#slim_args += 'module_unit_test_enabled=no ' +slim_args += 'module_upnp_enabled=no ' +slim_args += 'module_users_enabled=no ' +slim_args += 'module_vhacd_enabled=no ' +slim_args += 'module_vorbis_enabled=no ' +slim_args += 'module_voxelman_enabled=no ' +slim_args += 'module_web_enabled=no ' +slim_args += 'module_websocket_enabled=no ' +slim_args += 'module_wfc_enabled=no ' +slim_args += 'module_cvtt_enabled=no ' +slim_args += 'module_editor_code_editor_enabled=no ' +slim_args += 'module_etc_enabled=no ' +slim_args += 'module_gltf_enabled=no ' +slim_args += 'module_plugin_refresher_enabled=no ' +slim_args += 'module_shader_editor_enabled=no ' +slim_args += 'module_text_editor_enabled=no ' +slim_args += 'module_tinyexr_enabled=no ' + +slim_args += 'disable_advanced_gui=yes ' +slim_args += 'disable_3d=yes ' + +slim_args_editor = '' +slim_args_editor += 'module_bmp_enabled=no ' +slim_args_editor += 'module_broken_seals_module_enabled=no ' +slim_args_editor += 'module_cscript_enabled=no ' +slim_args_editor += 'module_database_enabled=no ' +slim_args_editor += 'module_database_sqlite_enabled=no ' +slim_args_editor += 'module_dds_enabled=no ' +slim_args_editor += 'module_enet_enabled=no ' +slim_args_editor += 'module_entity_spell_system_enabled=no ' +slim_args_editor += 'module_fastnoise_enabled=no ' +#slim_args_editor += 'module_freetype_enabled=no ' +#slim_args_editor += 'module_gdscript_enabled=no ' +slim_args_editor += 'module_gridmap_enabled=no ' +slim_args_editor += 'module_hdr_enabled=no ' +slim_args_editor += 'module_http_server_simple_enabled=no ' +slim_args_editor += 'module_jpg_enabled=no ' +slim_args_editor += 'module_lz4_enabled=no ' +slim_args_editor += 'module_material_maker_enabled=no ' +#slim_args_editor += 'module_mbedtls_enabled=no ' +slim_args_editor += 'module_mesh_data_resource_enabled=no ' +slim_args_editor += 'module_mesh_utils_enabled=no ' +slim_args_editor += 'module_minimp3_enabled=no ' +slim_args_editor += 'module_navigation_enabled=no ' +#slim_args_editor += 'module_navigation_dummy_enabled=no ' +slim_args_editor += 'module_network_synchronizer_enabled=no ' +slim_args_editor += 'module_ogg_enabled=no ' +slim_args_editor += 'module_opensimplex_enabled=no ' +slim_args_editor += 'module_opus_enabled=no ' +slim_args_editor += 'module_paint_enabled=no ' +slim_args_editor += 'module_props_enabled=no ' +slim_args_editor += 'module_props_2d_enabled=no ' +slim_args_editor += 'module_pvr_enabled=no ' +#slim_args_editor += 'module_regex_enabled=no ' +slim_args_editor += 'module_skeleton_2d_enabled=no ' +slim_args_editor += 'module_skeleton_3d_enabled=no ' +slim_args_editor += 'module_squish_enabled=no ' +slim_args_editor += 'module_stb_vorbis_enabled=no ' +slim_args_editor += 'module_steering_ai_enabled=no ' +#slim_args_editor += 'module_svg_enabled=no ' +slim_args_editor += 'module_terraman_enabled=no ' +slim_args_editor += 'module_terraman_2d_enabled=no ' +slim_args_editor += 'module_texture_packer_enabled=no ' +slim_args_editor += 'module_tga_enabled=no ' +slim_args_editor += 'module_theora_enabled=no ' +slim_args_editor += 'module_tile_map_enabled=no ' +slim_args_editor += 'module_ui_extensions_enabled=no ' +#slim_args_editor += 'module_unit_test_enabled=no ' +slim_args_editor += 'module_upnp_enabled=no ' +slim_args_editor += 'module_users_enabled=no ' +slim_args_editor += 'module_vhacd_enabled=no ' +slim_args_editor += 'module_vorbis_enabled=no ' +slim_args_editor += 'module_voxelman_enabled=no ' +slim_args_editor += 'module_web_enabled=no ' +slim_args_editor += 'module_websocket_enabled=no ' +slim_args_editor += 'module_wfc_enabled=no ' +slim_args_editor += 'module_cvtt_enabled=no ' +#slim_args_editor += 'module_editor_code_editor_enabled=no ' +slim_args_editor += 'module_etc_enabled=no ' +slim_args_editor += 'module_gltf_enabled=no ' +slim_args_editor += 'module_plugin_refresher_enabled=no ' +slim_args_editor += 'module_shader_editor_enabled=no ' +#slim_args_editor += 'module_text_editor_enabled=no ' +slim_args_editor += 'module_tinyexr_enabled=no ' + +#slim_args_editor += 'disable_advanced_gui=yes ' +#slim_args_editor += 'disable_3d=yes ' \ No newline at end of file diff --git a/play.sh b/play.sh new file mode 100755 index 0000000..385f12b --- /dev/null +++ b/play.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cp -u ./pandemonium_engine/bin/pandemonium.x11.opt.tools.64 ./pandemonium_engine/bin/run.pandemonium.x11.opt.tools.64 + +export LD_LIBRARY_PATH=`pwd`/pandemonium_engine/bin/ +./pandemonium_engine/bin/run.pandemonium.x11.opt.tools.64 -v --path ./game/