Compare commits

...

21 Commits
v1.0 ... master

Author SHA1 Message Date
cacba6bf37 Link to the now live html version on github.io. 2022-02-18 10:36:04 +01:00
b1db1a26c7 Fix typo. 2022-02-09 18:36:16 +01:00
60869dc2a3 One more small readme change. 2022-02-09 18:35:25 +01:00
f985553176 Small fix to the readme. 2022-02-09 18:34:39 +01:00
bb91f1e932 Small style fix to the readme. 2022-02-09 18:32:37 +01:00
900f5ed255 Mention that the project uses gles3. Also mention that it should work on all platforms. 2022-02-09 18:32:04 +01:00
2a24446741 Added screensots, and a description to the readme. 2022-02-09 18:26:42 +01:00
39b8719c36 Added the build/setup script instructions from broken seals to the readme, also reworkes some parts. 2022-02-09 18:16:38 +01:00
5f73faf11a Set project description. 2022-02-09 17:59:12 +01:00
af58d71106 Updated the example export presets. 2022-02-09 17:58:15 +01:00
dc2b5e62ed Commit the auto updated project file. 2022-02-09 17:34:24 +01:00
9eea52dc4e Commit missing changes from the previous commit. 2022-02-09 17:31:52 +01:00
4053d0e89d Update the name of the library's class. 2022-02-09 17:29:52 +01:00
64206d233b Small fixes to the example export presets. 2022-02-09 15:30:38 +01:00
f423497974 Replace broken seals to the tower in the release scripts. 2022-02-09 15:28:47 +01:00
e9d7f13af8 Update/setup the HEADS file. 2022-02-09 15:27:50 +01:00
d73b1a3bfc Remove build.config. 2022-02-09 15:22:35 +01:00
11247ccbaa Better gitignore setup. 2022-02-09 15:21:51 +01:00
d517289fc8 Removed the makefile. 2022-02-09 15:21:38 +01:00
f9a6f68ef9 Add the build tools from broken seals. 2022-02-09 15:19:59 +01:00
cdbe7247fc Move the game into the game folder. 2022-02-09 15:17:38 +01:00
108 changed files with 2762 additions and 36 deletions

32
.gitignore vendored
View File

@ -1,16 +1,34 @@
\exports/
\.import/
addons/scene_notes/
engine
modules/*
logs/*
addons/todo/
*.d
*.o
*.meta
game/.import/**
game/.prop_tool_temp/**
.sconsign.dblite
.DS_Store
scene-notes\.ini
export/**
release/**
todo\.cache\.ini
.vs/*
.kdev4/*
.vscode/*
todo\.config\.ini
TestRWTextures
export_presets\.cfg
_build/*
_binaries/*
game/android/build/*
export.cfg
*.blend1
.dir-locals.el
build.config
__pycache__/*

BIN
.sconsign.dblite Normal file

Binary file not shown.

1
HEADS Normal file
View File

@ -0,0 +1 @@
{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "cdd4f2722a7c16d9e36521d7180cc80715591554"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3c334566ff05a74e913cd5c5ff38ae45aba5f5d2"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "voxelman": {"master": "cb906e04e3ca4654fc6ef195d38a2b6679fa2ff1"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "mesh_data_resource": {"master": "2bf76b8d07c2821161886ea4ea6edc788ec2ee51"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "ce369408caee7ab4c83aa3235c7c1324bde424a6"}, "mesh_utils": {"master": "902dae29797789d406faf256a22aa73b7f6d5261"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "thread_pool": {"master": "c401b7a027248158dae3fbce20d637d34eaaedb9"}, "terraman": {"master": "e2a465a1abcef44f2600afc589a3e4a413e45049"}}

View File

@ -1,4 +1,4 @@
Copyright (c) 2019-2020 Péter Magyar
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

269
README.md
View File

@ -2,16 +2,21 @@
A really simple (and visually strange) demonstration project for Voxelman.
In order to open this, you need to have a Godot built with [voxelman](https://github.com/Relintai/voxelman)!
It is a first person parkour game. Reach the weird glowing teleporter at the end of each level.
Currently this will only work with [this revision](https://github.com/Relintai/voxelman/commit/52356411223144721fb1c68ccf1955c33bfec44b)
of voxelman. I'm hoping to update it soon to voxelman master.
In order to open this, you need to have a Godot built with [voxelman](https://github.com/Relintai/voxelman) added!
# Pre-built binaries
You can either just get an executable at the [releases tab](https://github.com/Relintai/the_tower/releases), or
you can build one yourself see [here](#compiling).
You can grab a pre-built editor binary from the releases tab [[here]](https://github.com/Relintai/the_tower/releases).
You can also try a live version running in the browser [here](https://relintai.github.io/the_tower/).
This project is also loadable with older binaries from the [Broken Seals](https://github.com/Relintai/broken_seals) repo.
Unfortunately the web editor needs custom http headers to work and I can't set that up from github.io, so right now I don't have a hosted version of that.
Uses GLES3, and is loaded with effects. It will likely make low powered devices (like phones) cry.
Should work on all platforms (even when there is no threading available).\
It does not have touchscreen controls tough.
## Controls
@ -21,6 +26,13 @@ This project is also loadable with older binaries from the [Broken Seals](https:
`r`: reload level \
`esc`: ingame menu
## Screenshots
![The menu](pictures/screenshot_menu.jpg)
![The game](pictures/screenshot_game.jpg)
![A teleporter](pictures/screenshot_teleporter.jpg)
![The editor](pictures/screenshot_editor.jpg)
## Assets
### The sound effect
@ -41,3 +53,248 @@ I did modify the effect I use from it.
### The font
The font is licensed under the Apache License. (it's next to it.)
## Editing the game
Grab an engine which has voxelman built in, and then open the project inside the `game` folder.
## The provided engine
Currently this project uses [my fork](https://github.com/Relintai/godot) of godot (3.x). \
This contains a port of [TokageItLab's SkeletonEditor pr](https://github.com/godotengine/godot/pull/45699).\
The original godot source will work, if you want to use that in your build.
Also, it doesn't just come with voxelman and it's optional dependencies, I decided to include (keep),
some of my more useful modules aswell.
here's the full list:
https://github.com/Relintai/entity_spell_system.git \
https://github.com/Relintai/ui_extensions.git \
https://github.com/Relintai/texture_packer.git \
https://github.com/Relintai/godot_fastnoise.git \
https://github.com/Relintai/mesh_data_resource.git \
https://github.com/Relintai/props.git \
https://github.com/Relintai/mesh_utils.git \
https://github.com/Relintai/thread_pool.git \
https://github.com/Relintai/voxelman.git
If you don't want some of these in your build, then you can remove them by editing the project's [module_config.py](https://github.com/Relintai/the_tower/blob/master/module_config.py) file.
## Compiling
First make sure, that you have everything installed to be able to compile the godot engine. See [the official docs for compiling Godot](https://docs.godotengine.org/en/latest/development/compiling/index.html) for more info. My setup/compile script uses the same tools, so
you don't need to install anything else.
Now let's clone this repository:
``` git clone https://github.com/Relintai/the_tower ```
cd into the new folder:
``` cd the_tower ```
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 `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 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.
#### 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 godot. Either my fork (recommended at the moment):
``` git clone https://github.com/Relintai/godot.git ```
or the official 3.x master:
``` git clone https://github.com/godotengine/godot.git -b 3.x ```
go into engine's modules fodler.
``` cd godot/modules/ ```
Now go ahead and get every single required engine module from [here](#the-required-engine-modules).
``` cd ../../ ```
Now if you look at the [HEADS file](https://github.com/Relintai/the_tower/blob/master/HEADS).
It contains the commit hashes for that particular revision for every module and the engine.
You need to go through them and checkout the proper commits.
Now you can go ahead and compile godot normally.
## Pulling upstream changes
First pull the changes by calling
``` git pull orgin master ```
Then just run `scons`, to 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 ```

644
SConstruct Normal file
View File

@ -0,0 +1,644 @@
#!/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.
EnsureSConsVersion(0, 98, 1)
import sys
import os
import subprocess
import json
import shutil
import traceback
import module_config
repository_index = 0
module_clone_path = '/modules/'
clone_command = 'git clone {0} {1}'
visual_studio_call_vcvarsall = False
visual_studio_vcvarsall_path = 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat'
visual_studio_arch = 'amd64'
exports = {
'global': [],
'linux': [],
'windows': [],
'android': [],
'javascript': [],
'osx': [],
'ios': [],
'server': [],
}
additional_commands = {
'global': [],
'linux': [],
'windows': [],
'android': [],
'javascript': [],
'osx': [],
'ios': [],
'server': [],
}
target_commits = {}
def onerror(func, path, exc_info):
"""
https://stackoverflow.com/questions/2656322/shutil-rmtree-fails-on-windows-with-access-is-denied
Because Windows.
Error handler for ``shutil.rmtree``.
If the error is due to an access error (read only file)
it attempts to add write permission and then retries.
If the error is for another reason it re-raises the error.
Usage : ``shutil.rmtree(path, onerror=onerror)``
"""
import stat
if not os.access(path, os.W_OK):
# Is the error an access error ?
os.chmod(path, stat.S_IWUSR)
func(path)
else:
raise
def load_target_commits_array():
global target_commits
if os.path.isfile('./HEADS'):
with open('./HEADS', 'r') as infile:
target_commits = json.load(infile)
else:
target_commits = {}
def save_target_commits_array():
with open('./HEADS', 'w') as outfile:
json.dump(target_commits, outfile)
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 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)
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 copy_repository(data, target_folder, clone_path):
copytree(os.path.abspath(clone_path + data[1] + '/' + data[2]), os.path.abspath(target_folder + data[1]))
def copytree(src, dst):
for item in os.listdir(src):
sp = os.path.join(src, item)
dp = os.path.join(dst, item)
if os.path.isdir(sp):
if os.path.isdir(dp):
shutil.rmtree(dp, onerror=onerror)
shutil.copytree(sp, dp)
else:
if not os.path.isdir(dst):
os.makedirs(dst)
shutil.copy2(sp, dp)
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 remove_repository(data, target_folder):
folder = os.path.abspath(target_folder + data[1])
if os.path.isdir(folder):
shutil.rmtree(folder)
def update_engine():
validate_repository_origin(module_config.engine_repository, './engine/', module_config.godot_branch)
update_repository(module_config.engine_repository, '/', module_config.godot_branch)
def update_modules():
for rep in module_config.module_repositories:
update_repository(rep, module_clone_path)
copy_repository(rep, './engine/modules/', '.' + module_clone_path)
def update_addons():
for rep in module_config.addon_repositories:
update_repository(rep, module_clone_path)
copy_repository(rep, './game/addons/', '.' + module_clone_path)
def update_addons_third_party_addons():
for rep in module_config.third_party_addon_repositories:
update_repository(rep, module_clone_path)
copy_repository(rep, './game/addons/', '.' + module_clone_path)
def update_all():
update_engine()
update_modules()
update_addons()
update_addons_third_party_addons()
save_target_commits_array()
def setup_engine():
validate_repository_origin(module_config.engine_repository, './engine/', module_config.godot_branch)
setup_repository(module_config.engine_repository, '/', module_config.godot_branch)
def setup_modules():
for rep in module_config.module_repositories:
setup_repository(rep, module_clone_path)
copy_repository(rep, './engine/modules/', '.' + module_clone_path)
for rep in module_config.removed_modules:
remove_repository(rep, './engine/modules/')
def setup_addons():
for rep in module_config.addon_repositories:
setup_repository(rep, module_clone_path)
copy_repository(rep, './game/addons/', '.' + module_clone_path)
def setup_addons_third_party_addons():
for rep in module_config.third_party_addon_repositories:
setup_repository(rep, module_clone_path)
copy_repository(rep, './game/addons/', '.' + module_clone_path)
def setup_all():
setup_engine()
setup_modules()
setup_addons()
setup_addons_third_party_addons()
def format_path(path):
if 'win' in sys.platform:
path = path.replace('/', '\\')
path = path.replace('~', '%userprofile%')
return path
def get_exports_for(platform):
export_command = 'export '
command_separator = ';'
if 'win' in sys.platform:
command_separator = '&'
export_command = 'set '
command = ''
for p in exports[platform]:
command += export_command + p + command_separator
return command
def get_additional_commands_for(platform):
command_separator = ';'
if 'win' in sys.platform:
command_separator = '&'
command = ''
for p in additional_commands[platform]:
command += p + command_separator
return command
def parse_config():
global visual_studio_vcvarsall_path
global visual_studio_arch
global visual_studio_call_vcvarsall
global exports
if not os.path.isfile('build.config'):
return
with open('build.config', 'r') as f:
for line in f:
ls = line.strip()
if ls == '' or ls.startswith('#'):
continue
words = line.split()
if (len(words) < 2):
print('This build.config line is malformed, and got ignored: ' + ls)
continue
if words[0] == 'visual_studio_vcvarsall_path':
visual_studio_vcvarsall_path = format_path(ls[29:])
elif words[0] == 'visual_studio_arch':
visual_studio_arch = format_path(ls[19:])
elif words[0] == 'visual_studio_call_vcvarsall':
visual_studio_call_vcvarsall = words[1].lower() in [ 'true', '1', 't', 'y', 'yes' ]
elif words[0] == 'export':
if (len(words) < 3) or not words[1] in exports:
print('This build.config line is malformed, and got ignored: ' + ls)
continue
export_path = format_path(ls[8 + len(words[1]):])
exports[words[1]].append(export_path)
elif words[0] == 'run':
if (len(words) < 3) or not words[1] in additional_commands:
print('This build.config line is malformed, and got ignored: ' + ls)
continue
final_cmd = format_path(ls[5 + len(words[1]):])
additional_commands[words[1]].append(final_cmd)
parse_config()
env = Environment()
if len(sys.argv) > 1:
arg = sys.argv[1]
arg_split = arg.split('_')
arg = arg_split[0]
arg_split = arg_split[1:]
if arg[0] == 'b':
build_string = get_exports_for('global') + get_additional_commands_for('global') + 'scons '
build_string += 'tools='
if 'e' in arg:
build_string += 'yes'
else:
build_string += 'no'
build_string += ' '
build_string += 'target='
if 'r' in arg:
build_string += 'release'
elif 'd' in arg:
build_string += 'debug'
else:
build_string += 'release_debug'
build_string += ' '
build_string += 'custom_modules_shared='
if 's' in arg:
build_string += 'yes'
else:
build_string += 'no'
build_string += ' '
if 'm' in arg:
build_string += 'use_mingw=yes'
else:
if 'win' in sys.platform and visual_studio_call_vcvarsall:
build_string = 'call "{0}" {1}&'.format(visual_studio_vcvarsall_path, visual_studio_arch) + build_string
if 'o' in arg:
build_string += 'use_llvm=yes'
if 'v' in arg:
build_string += 'vsproj=yes'
for i in range(2, len(sys.argv)):
build_string += ' ' + sys.argv[i] + ' '
if 'slim' in arg_split:
build_string += module_config.slim_args
build_string += ' '
if 'latomic' in arg_split:
build_string += 'LINKFLAGS="-latomic"'
build_string += ' '
if 'strip' in arg_split:
build_string += 'debug_symbols=no'
build_string += ' '
if 'threads' in arg_split:
build_string += 'threads_enabled=yes'
build_string += ' '
target = ' '
if 'E' in arg:
target += 'bin/libess.x11.opt.tools.64.so'
elif 'T' in arg:
target += 'bin/libtexture_packer.x11.opt.tools.64.so'
elif 'V' in arg:
target += 'bin/libvoxelman.x11.opt.tools.64.so'
elif 'W' in arg:
target += 'bin/libworld_generator.x11.opt.tools.64.so'
elif 'P' in arg:
target += 'bin/libprocedural_animations.x11.opt.tools.64.so'
cwd = os.getcwd()
full_path = cwd + '/engine/'
if not os.path.isdir(full_path):
print('engine directory doesnt exists.')
exit()
os.chdir(full_path)
if 'l' in arg:
build_string += 'platform=x11'
build_string = get_exports_for('linux') + get_additional_commands_for('linux') + build_string + target
print('Running command: ' + build_string)
subprocess.call(build_string, shell=True)
elif 'w' in arg:
build_string += 'platform=windows'
build_string = get_exports_for('windows') + get_additional_commands_for('windows') + build_string
print('Running command: ' + build_string)
subprocess.call(build_string, shell=True)
elif 'a' in arg:
build_string += 'platform=android'
build_string = get_exports_for('android') + get_additional_commands_for('android') + build_string
print('Running command: ' + build_string + ' android_arch=armv7')
subprocess.call(build_string + ' android_arch=armv7', shell=True)
print('Running command: ' + build_string + ' android_arch=arm64v8')
subprocess.call(build_string + ' android_arch=arm64v8', shell=True)
print('Running command: ' + build_string + ' android_arch=x86')
subprocess.call(build_string + ' android_arch=x86', shell=True)
os.chdir(full_path + 'platform/android/java/')
print('Running command: ' + get_exports_for('global') + get_additional_commands_for('global') + get_exports_for('android') + get_additional_commands_for('android') + './gradlew generateGodotTemplates')
subprocess.call(get_exports_for('global') + get_additional_commands_for('global') + get_exports_for('android') + get_additional_commands_for('android') + './gradlew generateGodotTemplates', shell=True)
elif 'j' in arg:
build_string += 'platform=javascript'
build_string = get_exports_for('javascript') + get_additional_commands_for('javascript') + build_string
print('Running command: ' + build_string)
subprocess.call(build_string, shell=True)
elif 'i' in arg:
build_string += 'platform=iphone'
print('Running command: ' + build_string)
subprocess.call(build_string, shell=True)
#print('Running command: ' + build_string + " arch=arm")
#subprocess.call(build_string + ' arch=arm', shell=True)
#print('Running command: ' + build_string + " arch=arm64")
#subprocess.call(build_string + ' arch=arm64', shell=True)
#print('Running command: ' + build_string + " arch=x86_64")
#subprocess.call(build_string + ' arch=x86_64', shell=True)
elif 'x' in arg:
build_string += 'platform=osx'
build_string = get_exports_for('osx') + get_additional_commands_for('osx') + build_string + target
print('Running command: ' + build_string)
subprocess.call(build_string, shell=True)
elif 'h' in arg:
#headless
build_string += 'platform=server'
build_string = get_exports_for('server') + get_additional_commands_for('server') + build_string
print('Running command: ' + build_string)
subprocess.call(build_string, shell=True)
else:
print('No platform specified')
exit()
exit()
# elif arg[0] == 'p':
# if arg == 'p':
# print("Applies a patch. No Patches right now.Append s for the skeleton editor patch. For example: ps ")
# exit()
#
# cwd = os.getcwd()
# full_path = cwd + '/engine/'
#
# if not os.path.isdir(full_path):
# print('engine directory does not exists.')
# exit()
#
# os.chdir(full_path)
#
# #apply the patch to just the working directory, without creating a commit
#
# if 's' in arg:
# subprocess.call('git apply --index ../patches/custom_skeleton_3d_editor_plugin.patch', shell=True)
#
# #unstage all files
# subprocess.call('git reset', shell=True)
#
# vman_full_path = cwd + '/engine/modules/voxelman/'
#
# #also patch voxelman as the plugin changes forward_spatial_gui_input's definition
# if os.path.isdir(vman_full_path):
# os.chdir(vman_full_path)
#
# subprocess.call('git apply --index ../../../patches/fix-voxel-editor-after-the-skeleton-editor-patch.patch', shell=True)
#
# #unstage all files
# subprocess.call('git reset', shell=True)
# else:
# print('Voxelman directory does not exists, skipping patch.')
#
# exit()
opts = Variables(args=ARGUMENTS)
opts.Add('a', 'What to do', '')
opts.Add(EnumVariable('action', 'What to do', 'setup', ('setup', 'update')))
opts.Add('t', 'Action target', '')
opts.Add(EnumVariable('target', 'Action target', 'all', ('all', 'engine', 'modules', 'all_addons', 'addons', 'third_party_addons')))
opts.Add(EnumVariable('repository_type', 'Type of repositories to clone from first', 'http', ('http', 'ssh')))
opts.Update(env)
Help(opts.GenerateHelpText(env))
load_target_commits_array()
rt = env['repository_type']
if rt == 'ssh':
repository_index = 1
action = env['action']
target = env['target']
if env['a']:
action = env['a']
if env['t']:
target = env['t']
if not os.path.isdir('./modules'):
os.mkdir('./modules')
if 'm' in action:
godot_branch = 'master'
if 'setup' in action or action[0] == 's':
if target == 'all':
setup_all()
elif target == 'engine':
setup_engine()
elif target == 'modules':
setup_modules()
elif target == 'all_addons':
setup_addons()
setup_addons_third_party_addons()
elif target == 'addons':
setup_addons()
elif target == 'third_party_addons':
setup_addons_third_party_addons()
elif 'update' in action or action[0] == 'u':
if target == 'all':
update_all()
elif target == 'engine':
update_engine()
save_target_commits_array()
elif target == 'modules':
update_modules()
save_target_commits_array()
elif target == 'all_addons':
update_addons()
update_addons_third_party_addons()
save_target_commits_array()
elif target == 'addons':
update_addons()
save_target_commits_array()
elif target == 'third_party_addons':
update_addons_third_party_addons()
save_target_commits_array()

45
build.config.example Normal file
View File

@ -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
# <export/run> <target platform> <exported variable/command>
# 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

19
build_ios.sh Executable file
View File

@ -0,0 +1,19 @@
export SCONS_CACHE=~/.scons_cache
export SCONS_CACHE_LIMIT=5000
cd ./engine
scons -j6 p=iphone tools=no target=release_debug arch=arm module_arkit_enabled=no game_center=no
scons -j6 p=iphone tools=no target=release_debug arch=arm64 module_arkit_enabled=no game_center=no
lipo -create bin/libgodot.iphone.opt.debug.arm.a bin/libgodot.iphone.opt.debug.arm64.a -output bin/libgodot.iphone.debug.fat.a
rm bin/ios_xcode/libgodot.iphone.debug.fat.a
cp bin/libgodot.iphone.debug.fat.a bin/ios_xcode/libgodot.iphone.debug.fat.a
rm bin/iphone.zip
cd bin/ios_xcode
zip -r -X ../iphone.zip .
cd ..
cd ..
cd ..

21
build_ios_release.sh Executable file
View File

@ -0,0 +1,21 @@
export SCONS_CACHE=~/.scons_cache
export SCONS_CACHE_LIMIT=5000
cd ./engine
scons -j6 p=iphone tools=no target=release arch=arm module_arkit_enabled=no game_center=no
scons -j6 p=iphone tools=no target=release arch=arm64 module_arkit_enabled=no game_center=no
lipo -create bin/libgodot.iphone.opt.arm.a bin/libgodot.iphone.opt.arm64.a -output bin/libgodot.iphone.release.fat.a
rm bin/ios_xcode/libgodot.iphone.release.fat.a
cp bin/libgodot.iphone.release.fat.a bin/ios_xcode/libgodot.iphone.release.fat.a
rm bin/iphone.zip
cd bin/ios_xcode
zip -r -X ../iphone.zip .
cd ..
cd ..
cd ..

15
build_osx.sh Executable file
View File

@ -0,0 +1,15 @@
export SCONS_CACHE=~/.scons_cache
export SCONS_CACHE_LIMIT=5000
cd ./engine
scons -j6 platform=osx target=release_debug
rm -Rf bin/Godot.app
cp -r misc/dist/osx_tools.app ./bin/Godot.app
mkdir -p ./bin/Godot.app/Contents/MacOS
cp bin/godot.osx.opt.tools.64 bin/Godot.app/Contents/MacOS/Godot
chmod +x bin/Godot.app/Contents/MacOS/Godot
cd ..

12
build_pi.sh Executable file
View File

@ -0,0 +1,12 @@
scons bel_latomic_strip_slim -j4
scons bl_latomic_strip_slim -j4
scons blr_latomic_strip_slim -j4
rm -f ./engine/bin/godot.x11.pi4.opt.32
rm -f ./engine/bin/godot.x11.pi4.opt.debug.32
rm -f ./engine/bin/godot.x11.pi4.opt.tools.32
mv ./engine/bin/godot.x11.opt.32 ./engine/bin/godot.x11.pi4.opt.32
mv ./engine/bin/godot.x11.opt.debug.32 ./engine/bin/godot.x11.pi4.opt.debug.32
mv ./engine/bin/godot.x11.opt.tools.32 ./engine/bin/godot.x11.pi4.opt.tools.32

14
build_uwp.bat Normal file
View File

@ -0,0 +1,14 @@
cd ./engine
if not defined DevEnvDir (
rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
)
call scons -j6 platform=uwp target=release
rem call scons -j6 platform=uwp target=release_debug
rem call scons -j6 platform=uwp target=release
cd ..

6
editor.bat Normal file
View File

@ -0,0 +1,6 @@
copy "engine\bin\godot.windows.opt.tools.64.exe" "engine\bin\run_godot.windows.opt.tools.64.exe" /y
copy "engine\bin\godot.windows.opt.tools.64.pdb" "engine\bin\run_godot.windows.opt.tools.64.pdb" /y
copy "engine\bin\godot.windows.opt.tools.64.exp" "engine\bin\run_godot.windows.opt.tools.64.exp" /y
cmd /c engine\bin\run_godot.windows.opt.tools.64.exe

6
editor.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
cp -u ./engine/bin/godot.x11.opt.tools.64 ./engine/bin/run.godot.x11.opt.tools.64
export LD_LIBRARY_PATH=`pwd`/engine/bin/
./engine/bin/run.godot.x11.opt.tools.64 -v

52
export_all.sh Executable file
View File

@ -0,0 +1,52 @@
#!/bin/bash
set -e
version=""
version_snake_cased=""
if [ ! -z $1 ]; then
version="."
version+=$1
version_snake_cased=${version//./_}
fi
project_root=$(pwd)
rm -Rf ./export
mkdir export
mkdir export/the_tower${version_snake_cased}_android_release
mkdir export/the_tower${version_snake_cased}_android_debug
mkdir export/the_tower${version_snake_cased}_linux
mkdir export/the_tower${version_snake_cased}_windows
mkdir export/the_tower${version_snake_cased}_javascript
mkdir export/the_tower${version_snake_cased}_pi4
mkdir export/the_tower${version_snake_cased}_osx
mkdir export/export_templates_tt${version_snake_cased}
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export-debug Android-Release ${project_root}/export/the_tower${version_snake_cased}_android_release/the_tower${version_snake_cased}.apk
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export-debug Android ${project_root}/export/the_tower${version_snake_cased}_android_debug/the_tower_debug${version_snake_cased}.apk
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export Linux/X11 ${project_root}/export/the_tower${version_snake_cased}_linux/the_tower${version_snake_cased}_x11
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export "Windows Desktop" ${project_root}/export/the_tower${version_snake_cased}_windows/the_tower${version_snake_cased}.exe
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export HTML5 ${project_root}/export/the_tower${version_snake_cased}_javascript/the_tower.html
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export PI4/X11 ${project_root}/export/the_tower${version_snake_cased}_pi4/the_tower${version_snake_cased}_pi4
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export "Mac OSX" ${project_root}/export/the_tower${version_snake_cased}_osx/the_tower${version_snake_cased}.app
cp ./engine/bin/godot.windows.opt.tools.64.exe ${project_root}/export/godot.tt${version}.windows.opt.tools.64.exe
cp ./engine/bin/godot.x11.opt.tools.64 ${project_root}/export/godot.tt${version}.x11.opt.tools.64
cp ./engine/bin/godot.x11.pi4.opt.tools.32 ${project_root}/export/godot.tt${version}.x11.pi4.opt.tools.32
cp ./engine/bin/godot.javascript.opt.tools.threads.zip ${project_root}/export/godot.tt${version}.javascript.opt.tools.zip
cp ./engine/bin/Godot.app.zip ${project_root}/export/godot.tt${version}.osx.opt.tools.zip
cp ./engine/bin/android_debug.apk ${project_root}/export/export_templates_tt${version_snake_cased}/android_debug.apk
cp ./engine/bin/android_release.apk ${project_root}/export/export_templates_tt${version_snake_cased}/android_release.apk
cp ./engine/bin/godot.javascript.opt.debug.zip ${project_root}/export/export_templates_tt${version_snake_cased}/godot.javascript.opt.debug.zip
cp ./engine/bin/godot.javascript.opt.zip ${project_root}/export/export_templates_tt${version_snake_cased}/godot.javascript.opt.zip
cp ./engine/bin/godot.windows.opt.64.exe ${project_root}/export/export_templates_tt${version_snake_cased}/godot.windows.opt.64.exe
cp ./engine/bin/godot.windows.opt.debug.64.exe ${project_root}/export/export_templates_tt${version_snake_cased}/godot.windows.opt.debug.64.exe
cp ./engine/bin/godot.x11.opt.64 ${project_root}/export/export_templates_tt${version_snake_cased}/godot.x11.opt.64
cp ./engine/bin/godot.x11.opt.debug.64 ${project_root}/export/export_templates_tt${version_snake_cased}/godot.x11.opt.debug.64
cp ./engine/bin/godot.x11.pi4.opt.32 ${project_root}/export/export_templates_tt${version_snake_cased}/godot.x11.pi4.opt.32
cp ./engine/bin/godot.x11.pi4.opt.debug.32 ${project_root}/export/export_templates_tt${version_snake_cased}/godot.x11.pi4.opt.debug.32
cp ./engine/bin/osx.zip ${project_root}/export/export_templates_tt${version_snake_cased}/osx.zip

16
game/.gitignore vendored Normal file
View File

@ -0,0 +1,16 @@
\exports/
\.import/
addons/scene_notes/
addons/todo/
scene-notes\.ini
todo\.cache\.ini
todo\.config\.ini
export_presets\.cfg
export.cfg

19
game/LICENSE Normal file
View File

@ -0,0 +1,19 @@
Copyright (c) 2019-2020 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.

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -2,7 +2,7 @@
[ext_resource path="res://environments/red_env.tres" type="Environment" id=1]
[ext_resource path="res://levels/Level0.gd" type="Script" id=2]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelmanLibrarySimple" id=3]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelLibrarySimple" id=3]
[ext_resource path="res://gi_probes/level2.tres" type="GIProbeData" id=4]
[ext_resource path="res://particles/flake.png" type="Texture" id=5]
[ext_resource path="res://areas/ExitPortal.tscn" type="PackedScene" id=6]

View File

@ -2,7 +2,7 @@
[ext_resource path="res://environments/red_env.tres" type="Environment" id=1]
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelmanLibrarySimple" id=3]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelLibrarySimple" id=3]
[ext_resource path="res://gi_probes/level2.tres" type="GIProbeData" id=4]
[ext_resource path="res://particles/flake.png" type="Texture" id=5]
[ext_resource path="res://areas/ExitPortal.tscn" type="PackedScene" id=6]
@ -245,6 +245,7 @@ editable = true
max_concurrent_generations = 5
library = ExtResource( 3 )
chunks = [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ]
num_lods = 5
__meta__ = {
"_edit_lock_": true
}

View File

@ -3,7 +3,7 @@
[ext_resource path="res://levels/title_font.tres" type="DynamicFont" id=1]
[ext_resource path="res://areas/ExitPortal.tscn" type="PackedScene" id=2]
[ext_resource path="res://environments/red_env.tres" type="Environment" id=3]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelmanLibrarySimple" id=4]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelLibrarySimple" id=4]
[ext_resource path="res://levels/Level10.gd" type="Script" id=5]
[ext_resource path="res://particles/flake.png" type="Texture" id=6]

View File

@ -2,7 +2,7 @@
[ext_resource path="res://levels/Level1.gd" type="Script" id=1]
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelmanLibrarySimple" id=3]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelLibrarySimple" id=3]
[ext_resource path="res://scripts/Ladder.gd" type="Script" id=4]
[ext_resource path="res://environments/red_env.tres" type="Environment" id=5]
[ext_resource path="res://gi_probes/level1.tres" type="GIProbeData" id=6]

View File

@ -3,7 +3,7 @@
[ext_resource path="res://gi_probes/level2.tres" type="GIProbeData" id=1]
[ext_resource path="res://areas/ExitPortal.tscn" type="PackedScene" id=2]
[ext_resource path="res://environments/red_env.tres" type="Environment" id=3]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelmanLibrarySimple" id=4]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelLibrarySimple" id=4]
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=5]
[ext_resource path="res://particles/flake.png" type="Texture" id=6]

View File

@ -2,7 +2,7 @@
[ext_resource path="res://areas/ExitPortal.tscn" type="PackedScene" id=2]
[ext_resource path="res://environments/red_env.tres" type="Environment" id=3]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelmanLibrarySimple" id=4]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelLibrarySimple" id=4]
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=5]
[ext_resource path="res://particles/flake.png" type="Texture" id=6]

View File

@ -2,7 +2,7 @@
[ext_resource path="res://areas/ExitPortal.tscn" type="PackedScene" id=2]
[ext_resource path="res://environments/red_env.tres" type="Environment" id=3]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelmanLibrarySimple" id=4]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelLibrarySimple" id=4]
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=5]
[ext_resource path="res://particles/flake.png" type="Texture" id=6]

View File

@ -2,7 +2,7 @@
[ext_resource path="res://areas/ExitPortal.tscn" type="PackedScene" id=2]
[ext_resource path="res://environments/red_env.tres" type="Environment" id=3]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelmanLibrarySimple" id=4]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelLibrarySimple" id=4]
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=5]
[ext_resource path="res://particles/flake.png" type="Texture" id=6]

View File

@ -2,7 +2,7 @@
[ext_resource path="res://areas/ExitPortal.tscn" type="PackedScene" id=2]
[ext_resource path="res://environments/red_env.tres" type="Environment" id=3]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelmanLibrarySimple" id=4]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelLibrarySimple" id=4]
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=5]
[ext_resource path="res://particles/flake.png" type="Texture" id=6]

View File

@ -2,7 +2,7 @@
[ext_resource path="res://areas/ExitPortal.tscn" type="PackedScene" id=2]
[ext_resource path="res://environments/red_env.tres" type="Environment" id=3]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelmanLibrarySimple" id=4]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelLibrarySimple" id=4]
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=5]
[ext_resource path="res://particles/flake.png" type="Texture" id=6]

View File

@ -2,7 +2,7 @@
[ext_resource path="res://areas/ExitPortal.tscn" type="PackedScene" id=2]
[ext_resource path="res://environments/red_env.tres" type="Environment" id=3]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelmanLibrarySimple" id=4]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelLibrarySimple" id=4]
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=5]
[ext_resource path="res://particles/flake.png" type="Texture" id=6]

View File

@ -2,7 +2,7 @@
[ext_resource path="res://areas/ExitPortal.tscn" type="PackedScene" id=2]
[ext_resource path="res://environments/red_env.tres" type="Environment" id=3]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelmanLibrarySimple" id=4]
[ext_resource path="res://library/MainLibrary.tres" type="VoxelLibrarySimple" id=4]
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=5]
[ext_resource path="res://particles/flake.png" type="Texture" id=6]

View File

@ -1,4 +1,4 @@
[gd_resource type="VoxelmanLibrarySimple" load_steps=7 format=2]
[gd_resource type="VoxelLibrarySimple" load_steps=7 format=2]
[ext_resource path="res://library/liquid_material.tres" type="Material" id=1]
[ext_resource path="res://library/surface_material.tres" type="Material" id=2]

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 541 B

View File

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 119 B

View File

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 630 B

View File

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 630 B

View File

@ -10,12 +10,12 @@ config_version=4
_global_script_classes=[ ]
_global_script_class_icons={
}
[application]
config/name="The Tower"
config/description="A really simple (and visually strange) demonstration project for Voxelman."
run/main_scene="res://scenes/Main.tscn"
config/icon="res://icon.png"
@ -27,37 +27,37 @@ window/size/fullscreen=true
move_left={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
move_right={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
move_forward={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
move_backward={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
move_sprint={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"unicode":0,"echo":false,"script":null)
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
move_jump={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
restart={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":82,"unicode":0,"echo":false,"script":null)
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":82,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}

6
ged.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
cp -u ./engine/bin/godot.x11.opt.tools.64 ./engine/bin/run.godot.x11.opt.tools.64
export LD_LIBRARY_PATH=`pwd`/engine/bin/
./engine/bin/run.godot.x11.opt.tools.64 -e --path ./game/

53
make_release.sh Executable file
View File

@ -0,0 +1,53 @@
#!/bin/bash
set -e
version=""
version_snake_cased=""
if [ ! -z $1 ]; then
version="."
version+=$1
version_snake_cased=${version//./_}
fi
project_root=$(pwd)
rm -Rf ./release
mkdir release
cd export
rm -Rf the_tower${version_snake_cased}_full_source
rm -Rf the_tower${version_snake_cased}_game_source
mkdir the_tower${version_snake_cased}_full_source
mkdir the_tower${version_snake_cased}_game_source
# Warn if a file is over a megabyte. Used to catch big temporary files that would slip through outherwise
python ../tools/copy_repos.py ../ ./the_tower${version_snake_cased}_full_source 1048576
python ../tools/copy_repos.py ../game/ ./the_tower${version_snake_cased}_game_source
zip -q ../release/the_tower${version_snake_cased}_android_debug.zip ./the_tower${version_snake_cased}_android_debug/*
zip -q ../release/the_tower${version_snake_cased}_android_release.zip ./the_tower${version_snake_cased}_android_release/*
zip -q ../release/the_tower${version_snake_cased}_javascript.zip ./the_tower${version_snake_cased}_javascript/*
zip -q ../release/the_tower${version_snake_cased}_linux.zip ./the_tower${version_snake_cased}_linux/*
zip -q ../release/the_tower${version_snake_cased}_windows.zip ./the_tower${version_snake_cased}_windows/*
zip -q ../release/the_tower${version_snake_cased}_pi4.zip ./the_tower${version_snake_cased}_pi4/*
zip -r -q ../release/the_tower${version_snake_cased}_osx.zip ./the_tower${version_snake_cased}_osx/*
# Editor
zip -q ../release/editor_windows_tt${version_snake_cased}.zip ./godot.tt${version}.windows.opt.tools.64.exe
zip -q ../release/editor_linux_tt${version_snake_cased}.zip ./godot.tt${version}.x11.opt.tools.64
zip -q ../release/editor_pi4_tt${version_snake_cased}.zip ./godot.tt${version}.x11.pi4.opt.tools.32
cp ./godot.tt${version}.javascript.opt.tools.zip ../release/editor_javascript_tt${version_snake_cased}.zip
zip -q ../release/editor_osx_tt${version_snake_cased}.zip ./godot.tt${version}.osx.opt.tools.zip
zip -q ../release/export_templates_tt${version_snake_cased}.zip ./export_templates_tt${version_snake_cased}/*
zip -q -r ../release/the_tower${version_snake_cased}_full_source.zip ./the_tower${version_snake_cased}_full_source/*
zip -q -r ../release/the_tower${version_snake_cased}_game_source.zip ./the_tower${version_snake_cased}_game_source/*
cd ..

27
module_config.py Normal file
View File

@ -0,0 +1,27 @@
godot_branch = '3.x'
engine_repository = [ ['https://github.com/Relintai/godot.git', 'git@github.com:Relintai/godot.git'], 'engine', '' ]
module_repositories = [
[ ['https://github.com/Relintai/entity_spell_system.git', 'git@github.com:Relintai/entity_spell_system.git'], 'entity_spell_system', '' ],
[ ['https://github.com/Relintai/ui_extensions.git', 'git@github.com:Relintai/ui_extensions.git'], 'ui_extensions', '' ],
[ ['https://github.com/Relintai/texture_packer.git', 'git@github.com:Relintai/texture_packer.git'], 'texture_packer', '' ],
[ ['https://github.com/Relintai/godot_fastnoise.git', 'git@github.com:Relintai/godot_fastnoise.git'], 'fastnoise', '' ],
[ ['https://github.com/Relintai/mesh_data_resource.git', 'git@github.com:Relintai/mesh_data_resource.git'], 'mesh_data_resource', '' ],
[ ['https://github.com/Relintai/props.git', 'git@github.com:Relintai/props.git'], 'props', '' ],
[ ['https://github.com/Relintai/mesh_utils.git', 'git@github.com:Relintai/mesh_utils.git'], 'mesh_utils', '' ],
[ ['https://github.com/Relintai/thread_pool.git', 'git@github.com:Relintai/thread_pool.git'], 'thread_pool', '' ],
[ ['https://github.com/Relintai/voxelman.git', 'git@github.com:Relintai/voxelman.git'], 'voxelman', '' ],
]
removed_modules = [
]
addon_repositories = [
]
third_party_addon_repositories = [
]
slim_args = 'module_webm_enabled=no module_arkit_enabled=no module_visual_script_enabled=no module_gdnative_enabled=no module_mobile_vr_enabled=no module_theora_enabled=no module_xatlas_unwrap_enabled=no'

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

6
play.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
cp -u ./engine/bin/godot.x11.opt.tools.64 ./engine/bin/run.godot.x11.opt.tools.64
export LD_LIBRARY_PATH=`pwd`/engine/bin/
./engine/bin/run.godot.x11.opt.tools.64 -v --path ./game/

126
podman_build_all.sh Executable file
View File

@ -0,0 +1,126 @@
#!/bin/bash
set -e
podman=`which podman || true`
if [ -z $podman ]; then
echo "podman needs to be in PATH for this script to work."
exit 1
fi
project_root=$(pwd)/
img_version=bs
mkdir -p logs
#sudo podman run -i -t -v $(pwd)/files:/root/files godot-osx:bs /bin/bash
#sudo podman run -i -t -v $(pwd)/:/root/project -w /root/project godot-osx:bs /bin/bash
#sudo podman run -v $(pwd)/:/root/project -w /root/project godot-osx:bs scons bex_strip arch=x86_64 -j4 osxcross_sdk=darwin20.4
#sudo podman run -i -t -v $(pwd)/:/root/project -w /root/project/tools/osx godot-osx:bs bash -c ./lipo.sh
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bew_strip -j4 . 2>&1 | tee logs/bew.log
rm -f engine/modules/modules_enabled.gen.h
#$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bewd_strip -j4 . 2>&1 | tee logs/bewd.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bw_strip -j4 . 2>&1 | tee logs/bw.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bwr_strip -j4 . 2>&1 | tee logs/bwr.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-linux:${img_version} scons bel_strip -j4 . 2>&1 | tee logs/bel.log
rm -f engine/modules/modules_enabled.gen.h
#$podman run -v ${project_root}:/root/project -w /root/project godot-linux:${img_version} scons beld_strip -j4 . 2>&1 | tee logs/beld.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-linux:${img_version} scons bl_strip -j4 . 2>&1 | tee logs/bl.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-linux:${img_version} scons blr_strip -j4 . 2>&1 | tee logs/blr.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-javascript:${img_version} bash -c 'source /root/emsdk_2.0.25/emsdk_env.sh;scons bj_strip -j4' . 2>&1 | tee logs/bj.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-javascript:${img_version} bash -c 'source /root/emsdk_2.0.25/emsdk_env.sh;scons bjr_strip -j4' . 2>&1 | tee logs/bjr.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-javascript:${img_version} bash -c 'source /root/emsdk_2.0.25/emsdk_env.sh;scons bej_strip_threads -j4' . 2>&1 | tee logs/bej.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-android:${img_version} scons ba_strip -j4 . 2>&1 | tee logs/ba.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-android:${img_version} scons bar_strip -j4 . 2>&1 | tee logs/bar.log
rm -f engine/modules/modules_enabled.gen.h
#osx
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bex_strip arch=x86_64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bex_x86_64.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bex_strip arch=arm64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bex_arm64.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bx_strip arch=x86_64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bx_x86_64.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bx_strip arch=arm64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bx_arm64.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bxr_strip arch=x86_64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bxr_x86_64.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bxr_strip arch=arm64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bxr_arm64.log
rm -f engine/modules/modules_enabled.gen.h
#lipo
$podman run -v ${project_root}:/root/project -w /root/project/tools/osx godot-osx:${img_version} bash -c ./lipo.sh
#ios
#$podman run -v ${project_root}:/root/project -w /root/project godot-ios:${img_version} scons bir_strip -j4 . 2>&1 | tee logs/bir.log
#rm -f engine/modules/modules_enabled.gen.h
# $podman run -v ${project_root}:/root/project -i -w /root/project -t godot-windows:${img_version} scons bew -j4
rm -f engine/modules/modules_enabled.gen.h
# Check files
cd ./engine/bin/
files=(
# Windows
"godot.windows.opt.64.exe"
"godot.windows.opt.debug.64.exe"
"godot.windows.opt.tools.64.exe"
# Linux
"godot.x11.opt.64"
"godot.x11.opt.debug.64"
"godot.x11.opt.tools.64"
# JS
"godot.javascript.opt.tools.threads.zip"
"godot.javascript.opt.zip"
# Android
"android_debug.apk"
"android_release.apk"
# OSX
"godot.osx.opt.arm64"
"godot.osx.opt.debug.arm64"
"godot.osx.opt.debug.universal"
"godot.osx.opt.debug.x86_64"
"godot.osx.opt.tools.arm64"
"godot.osx.opt.tools.universal"
"godot.osx.opt.tools.x86_64"
"godot.osx.opt.universal"
"godot.osx.opt.x86_64"
)
error=0
for f in ${files[*]}
do
if [ ! -e $f ]; then
error=1
echo "$f is not present!"
fi
done
if [ $error -eq 0 ]; then
echo "All files are present!"
fi
cd ../..

12
tools/build-containers/.gitignore vendored Normal file
View File

@ -0,0 +1,12 @@
*.tar
*.tar.gz
*.tar.bz2
*.tar.xz
*.exe
*.swp
*.dmg
*.zip
*.xip
files/mono-*/
logs/

View File

@ -0,0 +1,18 @@
ARG img_version
FROM godot-fedora:${img_version}
ENV ANDROID_SDK_ROOT=/root/sdk
ENV ANDROID_NDK_VERSION=21.4.7075529
ENV ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk/${ANDROID_NDK_VERSION}
RUN dnf -y install --setopt=install_weak_deps=False \
gcc gcc-c++ java-11-openjdk-devel ncurses-compat-libs && \
mkdir -p sdk && cd sdk && \
export CMDLINETOOLS=commandlinetools-linux-7302050_latest.zip && \
curl -LO https://dl.google.com/android/repository/${CMDLINETOOLS} && \
unzip ${CMDLINETOOLS} && \
rm ${CMDLINETOOLS} && \
yes | cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_SDK_ROOT}" --licenses && \
cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_SDK_ROOT}" "ndk;${ANDROID_NDK_VERSION}" 'cmdline-tools;latest' 'build-tools;30.0.3' 'platforms;android-30' 'cmake;3.18.1'
CMD /bin/bash

View File

@ -0,0 +1,10 @@
FROM fedora:34
WORKDIR /root
RUN dnf -y upgrade --setopt=install_weak_deps=False && \
dnf -y install --setopt=install_weak_deps=False \
bash bzip2 curl file findutils git make nano patch pkgconfig python3-pip unzip which xz yasm && \
pip install scons==4.1.0
CMD /bin/bash

View File

@ -0,0 +1,39 @@
ARG img_version
FROM godot-osx:${img_version}
ENV IOS_SDK=14.5
RUN dnf -y install --setopt=install_weak_deps=False \
automake autoconf clang gcc gcc-c++ gcc-objc gcc-objc++ cmake libicu-devel libtool libxml2-devel llvm-devel openssl-devel perl python yasm && \
git clone --progress https://github.com/tpoechtrager/cctools-port.git && \
cd /root/cctools-port && \
git checkout 236a426c1205a3bfcf0dbb2e2faf2296f0a100e5 && \
# arm64 device
usage_examples/ios_toolchain/build.sh /root/files/iPhoneOS${IOS_SDK}.sdk.tar.xz arm64 && \
mkdir -p /root/ioscross/arm64 && \
mv usage_examples/ios_toolchain/target/* /root/ioscross/arm64 && \
mkdir /root/ioscross/arm64/usr && \
ln -s /root/ioscross/arm64/bin /root/ioscross/arm64/usr/bin && \
# arm64 simulator
# Disabled for now as it doesn't work with cctools-port and current LLVM:
# Cf. https://github.com/tpoechtrager/cctools-port/issues/102
#sed -i 's/miphoneos-version-min/mios-simulator-version-min/g' usage_examples/ios_toolchain/wrapper.c && \
#usage_examples/ios_toolchain/build.sh /root/files/iPhoneSimulator${IOS_SDK}.sdk.tar.xz arm64 && \
#mkdir -p /root/ioscross/arm64_sim && \
#mv usage_examples/ios_toolchain/target/* /root/ioscross/arm64_sim && \
#mkdir /root/ioscross/arm64_sim/usr && \
#ln -s /root/ioscross/arm64_sim/bin /root/ioscross/arm64_sim/usr/bin && \
# x86_64 simulator
sed -i 's#^TRIPLE=.*#TRIPLE="x86_64-apple-darwin11"#' usage_examples/ios_toolchain/build.sh && \
usage_examples/ios_toolchain/build.sh /root/files/iPhoneSimulator${IOS_SDK}.sdk.tar.xz x86_64 && \
mkdir -p /root/ioscross/x86_64_sim && \
mv usage_examples/ios_toolchain/target/* /root/ioscross/x86_64_sim && \
mkdir /root/ioscross/x86_64_sim/usr && \
ln -s /root/ioscross/x86_64_sim/bin /root/ioscross/x86_64_sim/usr/bin
ENV OSXCROSS_IOS=not_nothing
ENV IOSCROSS_ROOT=/root/ioscross
ENV PATH="/root/ioscross/arm64/bin:/root/ioscross/arm64_sim/bin:/root/ioscross/x86_64_sim/bin:${PATH}"
CMD /bin/bash

View File

@ -0,0 +1,13 @@
ARG img_version
FROM godot-fedora:${img_version}
ENV EMSCRIPTEN_CLASSICAL=2.0.25
RUN dnf -y install --setopt=install_weak_deps=False \
java-openjdk && \
git clone --branch ${EMSCRIPTEN_CLASSICAL} --progress https://github.com/emscripten-core/emsdk emsdk_${EMSCRIPTEN_CLASSICAL} && \
emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk install ${EMSCRIPTEN_CLASSICAL} && \
emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk activate ${EMSCRIPTEN_CLASSICAL}
# echo "source /root/emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk_env.sh" >> /root/.bashrc
CMD /bin/bash

View File

@ -0,0 +1,7 @@
ARG img_version
FROM godot-fedora:${img_version}
RUN dnf -y install --setopt=install_weak_deps=False \
gcc-c++ libxcrypt-compat xorg-x11-server-Xvfb libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel alsa-lib-devel pulseaudio-libs-devel libudev-devel mesa-libGL-devel mesa-libGLU-devel mesa-dri-drivers yasm libstdc++ libstdc++-static
CMD /bin/bash

View File

@ -0,0 +1,29 @@
ARG img_version
FROM godot-fedora:${img_version}
ENV WINEDEBUG=-all
RUN dnf -y install --setopt=install_weak_deps=False \
wine winetricks xorg-x11-server-Xvfb p7zip-plugins findutils && \
curl -LO https://github.com/GodotBuilder/godot-builds/releases/download/_tools/angle.7z && \
curl -LO https://www.python.org/ftp/python/3.7.2/python-3.7.2-amd64.exe && \
xvfb-run sh -c "winetricks -q vcrun2017; wineserver -w" ;\
xvfb-run sh -c "winetricks -q dotnet461; wineserver -w" ;\
xvfb-run sh -c "wine /root/python-3.7.2-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0; wineserver -w" ;\
rm /root/python-3.7.2-amd64.exe && \
wine python -m pip install --upgrade pip ; wineserver -w ; \
wine pip install -U setuptools ; wineserver -w ; \
wine pip install -U wheel ; wineserver -w ; \
wine pip install scons pywin32 ; wineserver -w ; \
cd /root/.wine/drive_c && \
7z x /root/angle.7z && \
rm /root/angle.7z && \
cd "/root/.wine/drive_c/Program Files (x86)" && \
tar xf /root/files/msvc2017.tar && \
cd /root && \
bash /root/files/msvc-fixup.sh && \
find /root/.wine -name vctip.exe -delete && \
rm -rf /root/.wine/drive_c/users/root/Temp/* && \
rm -rf /root/.cache
CMD /bin/bash

View File

@ -0,0 +1,18 @@
ARG img_version
FROM godot-fedora:${img_version}
#cmake
RUN dnf -y install --setopt=install_weak_deps=False \
automake autoconf bzip2-devel clang libicu-devel libtool libxml2-devel llvm-devel openssl-devel yasm cmake && \
git clone --progress https://github.com/tpoechtrager/osxcross.git && \
cd /root/osxcross && \
git checkout 0f87f567dfaf98460244471ad6c0f4311d62079c && \
ln -s /root/files/MacOSX11.3.sdk.tar.xz /root/osxcross/tarballs && \
UNATTENDED=1 ./build.sh && \
./build_compiler_rt.sh
ENV OSXCROSS_ROOT=/root/osxcross
ENV PATH="/root/osxcross/target/bin:${PATH}"
CMD /bin/bash

View File

@ -0,0 +1,7 @@
ARG img_version
FROM godot-fedora:${img_version}
RUN dnf -y install --setopt=install_weak_deps=False \
mingw32-gcc mingw32-gcc-c++ mingw32-winpthreads-static mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static
CMD /bin/bash

View File

@ -0,0 +1,77 @@
ARG img_version
FROM godot-fedora:${img_version}
RUN dnf -y install --setopt=install_weak_deps=False \
clang xar xar-devel xz-devel cpio && \
git clone --progress https://github.com/NiklasRosenstein/pbzx && \
cd pbzx && \
git checkout 2a4d7c3300c826d918def713a24d25c237c8ed53 && \
clang -O3 -llzma -lxar -I /usr/local/include pbzx.c -o pbzx
CMD mkdir -p /root/xcode && \
cd /root/xcode && \
xar -xf /root/files/Xcode_12.4.xip && \
/root/pbzx/pbzx -n Content | cpio -i && \
export OSX_SDK=MacOSX11.1.sdk && \
cp -r Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /tmp/${OSX_SDK} && \
mkdir -p mkdir -p /tmp/${OSX_SDK}/usr/share/man && \
cp -rf Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man1 \
Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man3 \
Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man5 /tmp/${OSX_SDK}/usr/share/man/ && \
cd /tmp && \
tar -cJf /root/files/${OSX_SDK}.tar.xz ${OSX_SDK} && \
rm -rf ${OSX_SDK} && \
cd /root/xcode && \
export IOS_SDK=iPhoneOS14.4.sdk && \
export IOS_SIMULATOR_SDK=iPhoneSimulator14.4.sdk && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk /tmp/${IOS_SDK} && \
mkdir -p /tmp/${IOS_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${IOS_SDK}/usr/include/c++/ && \
cd /tmp && \
tar -cJf /root/files/${IOS_SDK}.tar.xz ${IOS_SDK} && \
rm -rf ${IOS_SDK} && \
cd /root/xcode && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk /tmp/${IOS_SDK} && \
mkdir -p /tmp/${IOS_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${IOS_SDK}/usr/include/c++/ && \
cd /tmp && \
tar -cJf /root/files/${IOS_SIMULATOR_SDK}.tar.xz ${IOS_SDK} && \
rm -rf ${IOS_SDK}
#XCODE_SDK=12.5.1
#OSX_SDK=11.3
#IOS_SDK=14.5
CMD mkdir -p /root/xcode && \
cd /root/xcode && \
xar -xf /root/files/Xcode_12.5.1.xip && \
/root/pbzx/pbzx -n Content | cpio -i && \
export OSX_SDK=MacOSX11.3.sdk && \
cp -r Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /tmp/${OSX_SDK} && \
mkdir -p /tmp/${OSX_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${OSX_SDK}/usr/include/c++/ && \
mkdir -p mkdir -p /tmp/${OSX_SDK}/usr/share/man && \
cp -rf Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man1 \
Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man3 \
Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man5 /tmp/${OSX_SDK}/usr/share/man/ && \
cd /tmp && \
tar -cJf /root/files/${OSX_SDK}.tar.xz ${OSX_SDK} && \
rm -rf ${OSX_SDK} && \
cd /root/xcode && \
export IOS_SDK=iPhoneOS14.5.sdk && \
export IOS_SIMULATOR_SDK=iPhoneSimulator14.5.sdk && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk /tmp/${IOS_SDK} && \
mkdir -p /tmp/${IOS_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${IOS_SDK}/usr/include/c++/ && \
cd /tmp && \
tar -cJf /root/files/${IOS_SDK}.tar.xz ${IOS_SDK} && \
rm -rf ${IOS_SDK} && \
cd /root/xcode && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk /tmp/${IOS_SDK} && \
mkdir -p /tmp/${IOS_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${IOS_SDK}/usr/include/c++/ && \
cd /tmp && \
tar -cJf /root/files/${IOS_SIMULATOR_SDK}.tar.xz ${IOS_SDK} && \
rm -rf ${IOS_SDK}

View File

@ -0,0 +1,10 @@
# Godot engine build containers
Based on https://github.com/godotengine/build-containers
This repository contains the Dockerfiles for the official Godot engine builds. These containers should help you build Godot for all platforms supported on any machine that can run Docker containers.
## Building
There is a 'build.sh' script included to build the containers themselves. The in-container build scripts will follow shortly.

View File

@ -0,0 +1,55 @@
#!/bin/bash
set -e
podman=`which podman || true`
if [ -z $podman ]; then
echo "podman needs to be in PATH for this script to work."
exit 1
fi
files_root=$(pwd)/files
img_version=bs
mkdir -p logs
export podman_build="$podman build --build-arg img_version=${img_version}"
$podman build -v ${files_root}:/root/files -t godot-fedora:${img_version} -f Dockerfile.base . 2>&1 | tee logs/base.log
$podman_build -t godot-linux:${img_version} -f Dockerfile.linux . 2>&1 | tee logs/linux.log
$podman_build -t godot-windows:${img_version} -f Dockerfile.windows --ulimit nofile=65536 . 2>&1 | tee logs/windows.log
$podman_build -t godot-javascript:${img_version} -f Dockerfile.javascript . 2>&1 | tee logs/javascript.log
$podman_build -t godot-android:${img_version} -f Dockerfile.android . 2>&1 | tee logs/android.log
XCODE_SDK=12.5.1
OSX_SDK=11.3
IOS_SDK=14.5
if [ ! -e files/MacOSX${OSX_SDK}.sdk.tar.xz ] || [ ! -e files/iPhoneOS${IOS_SDK}.sdk.tar.xz ] || [ ! -e files/iPhoneSimulator${IOS_SDK}.sdk.tar.xz ]; then
if [ ! -e files/Xcode_${XCODE_SDK}.xip ]; then
echo "files/Xcode_${XCODE_SDK}.xip is required. It can be downloaded from https://developer.apple.com/download/more/ with a valid apple ID."
exit 1
fi
echo "Building OSX and iOS SDK packages. This will take a while"
$podman_build -t godot-xcode-packer:${img_version} -f Dockerfile.xcode -v ${files_root}:/root/files . 2>&1 | tee logs/xcode.log
$podman run -it --rm -v ${files_root}:/root/files godot-xcode-packer:${img_version} 2>&1 | tee logs/xcode_packer.log
fi
$podman_build -t godot-osx:${img_version} -v ${files_root}:/root/files -f Dockerfile.osx . 2>&1 | tee logs/osx.log
$podman_build -t godot-ios:${img_version} -v ${files_root}:/root/files -f Dockerfile.ios . 2>&1 | tee logs/ios.log
if [ "${build_msvc}" != "0" ]; then
if [ ! -e files/msvc2017.tar ]; then
echo
echo "files/msvc2017.tar is missing. This file can be created on a Windows 7 or 10 machine by downloading the 'Visual Studio Tools' installer."
echo "here: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017"
echo "The required components can be installed by running"
echo "vs_buildtools.exe --add Microsoft.VisualStudio.Workload.UniversalBuildTools --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop --add Microsoft.VisualStudio.Component.Windows10SDK.16299.UWP.Native --passive"
echo "after that create a zipfile of C:/Program Files (x86)/Microsoft Visual Studio"
echo "tar -cf msvc2017.tar -C \"c:/Program Files (x86)/ Microsoft Visual Studio\""
echo
exit 1
fi
$podman_build -t godot-msvc:${img_version} -f Dockerfile.msvc -v ${files_root}:/root/files . 2>&1 | tee logs/msvc.log
fi

View File

@ -0,0 +1,24 @@
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/msobj140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/arm/
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/msobj140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x86/
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/mspdbcore.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/arm/
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/mspdbcore.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x86/
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/mspdb140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/mspdb140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/arm/
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/msobj140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/msobj140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/arm/
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/mspdbcore.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/mspdbcore.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/arm/
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/mspdbsrv.exe /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/mspdbsrv.exe /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/arm/
cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/msvcdis140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/arm/
pushd /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ SDKs/
rm -rf ClickOnce\ Bootstrapper/ Portable/ Windows NuGetPackages/ UWPNuGetPackages/
popd

View File

@ -0,0 +1,118 @@
From b875d7c1360c8ff2077463d7a5a12e1cff1cc683 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= <rverschelde@gmail.com>
Date: Mon, 12 Jul 2021 13:34:32 +0200
Subject: [PATCH] compiler-rt: Add option to automate install process
Also mention that compiler-rt can be needed to build code using
`__builtin_available()`.
Fixes #278.
---
README.COMPILER-RT.md | 4 ++++
README.md | 3 +++
build_compiler_rt.sh | 33 ++++++++++++++++++++++++---------
3 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/README.COMPILER-RT.md b/README.COMPILER-RT.md
index b2754dfcf..dced89686 100644
--- a/README.COMPILER-RT.md
+++ b/README.COMPILER-RT.md
@@ -10,6 +10,10 @@ Ensure you have finished `build.sh`,
then run: `./build_compiler_rt.sh`.
+By default, installation steps for compiler-rt will be printed to the terminal
+to run manually, but you can automate the installation process by defining
+`ENABLE_COMPILER_RT_INSTALL`.
+
You can verify compiler-rt is working by invoking the following command:
echo "int main(void){return 0;}" | xcrun clang -xc -o/dev/null -v - 2>&1 | \
diff --git a/README.md b/README.md
index 60d19f917..f32bf626c 100644
--- a/README.md
+++ b/README.md
@@ -33,6 +33,9 @@ It also includes scripts for optionally building
* the "compiler-rt" runtime library, and
* the `llvm-dsymutil` tool required for debugging.
+Note: The "compiler-rt" library can be needed to link code that uses the
+`__builtin_available()` runtime version check.
+
### WHAT CAN BE BUILT WITH IT? ###
diff --git a/build_compiler_rt.sh b/build_compiler_rt.sh
index 8f47262a2..508742cab 100755
--- a/build_compiler_rt.sh
+++ b/build_compiler_rt.sh
@@ -182,22 +182,39 @@ fi
rm -f $BUILD_DIR/.compiler-rt_build_complete
+# Installation. Can be either automated (ENABLE_COMPILER_RT_INSTALL) or will
+# print the commands that the user should run manually.
+
+function print_or_run() {
+ if [ -z "$ENABLE_COMPILER_RT_INSTALL" ]; then
+ echo "$@"
+ else
+ $@
+ fi
+}
+
echo ""
echo ""
echo ""
-echo "Please run the following commands by hand to install compiler-rt:"
+if [ -z "$ENABLE_COMPILER_RT_INSTALL" ]; then
+ echo "Please run the following commands by hand to install compiler-rt:"
+else
+ echo "Installing compiler-rt headers and libraries to the following paths:"
+ echo " ${CLANG_INCLUDE_DIR}"
+ echo " ${CLANG_DARWIN_LIB_DIR}"
+fi
echo ""
-echo "mkdir -p ${CLANG_INCLUDE_DIR}"
-echo "mkdir -p ${CLANG_DARWIN_LIB_DIR}"
-echo "cp -rv $BUILD_DIR/compiler-rt/compiler-rt/include/sanitizer ${CLANG_INCLUDE_DIR}"
+print_or_run mkdir -p ${CLANG_INCLUDE_DIR}
+print_or_run mkdir -p ${CLANG_DARWIN_LIB_DIR}
+print_or_run cp -rv $BUILD_DIR/compiler-rt/compiler-rt/include/sanitizer ${CLANG_INCLUDE_DIR}
if [ $USE_CMAKE -eq 1 ]; then
### CMAKE ###
- echo "cp -v $BUILD_DIR/compiler-rt/compiler-rt/build/lib/darwin/*.a ${CLANG_DARWIN_LIB_DIR}"
- echo "cp -v $BUILD_DIR/compiler-rt/compiler-rt/build/lib/darwin/*.dylib ${CLANG_DARWIN_LIB_DIR}"
+ print_or_run cp -v $BUILD_DIR/compiler-rt/compiler-rt/build/lib/darwin/*.a ${CLANG_DARWIN_LIB_DIR}
+ print_or_run cp -v $BUILD_DIR/compiler-rt/compiler-rt/build/lib/darwin/*.dylib ${CLANG_DARWIN_LIB_DIR}
### CMAKE END ###
@@ -209,7 +226,7 @@ else
function print_install_command() {
if [ -f "$1" ]; then
- echo "cp $PWD/compiler-rt/$1 ${CLANG_DARWIN_LIB_DIR}/$2"
+ print_or_run cp $PWD/compiler-rt/$1 ${CLANG_DARWIN_LIB_DIR}/$2
fi
}
@@ -219,14 +236,12 @@ else
print_install_command "cc_kext/libcompiler_rt.a" "libclang_rt.cc_kext.a"
print_install_command "profile_osx/libcompiler_rt.a" "libclang_rt.profile_osx.a"
-
print_install_command "ubsan_osx_dynamic/libcompiler_rt.dylib" \
"libclang_rt.ubsan_osx_dynamic.dylib"
print_install_command "asan_osx_dynamic/libcompiler_rt.dylib" \
"libclang_rt.asan_osx_dynamic.dylib"
-
popd &>/dev/null
### MAKE END ###

View File

@ -0,0 +1,27 @@
#!/bin/bash
set -e
podman=podman
if ! which $podman; then
podman=docker
fi
registry=$1
if [ -z "${registry}" ]; then
registry=registry.prehensile-tales.com
fi
$podman push godot-export:latest ${registry}/godot/export
$podman push godot-mono-glue:latest ${registry}/godot/mono-glue
$podman push godot-windows:latest ${registry}/godot/windows
$podman push godot-ubuntu-32:latest ${registry}/godot/ubuntu-32
$podman push godot-ubuntu-64:latest ${registry}/godot/ubuntu-64
$podman push godot-javascript:latest ${registry}/godot/javascript
$podman push godot-xcode-packer:latest ${registry}/godot/xcode-packer
$podman push godot-android:latest ${registry}/godot-private/android
$podman push godot-ios:latest ${registry}/godot-private/ios
$podman push godot-osx:latest ${registry}/godot-private/macosx
$podman push godot-msvc:latest ${registry}/godot-private/uwp

111
tools/copy_repos.py Normal file
View File

@ -0,0 +1,111 @@
#!/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 sys
import os
import subprocess
import json
import shutil
import traceback
def onerror(func, path, exc_info):
"""
https://stackoverflow.com/questions/2656322/shutil-rmtree-fails-on-windows-with-access-is-denied
Because Windows.
Error handler for ``shutil.rmtree``.
If the error is due to an access error (read only file)
it attempts to add write permission and then retries.
If the error is for another reason it re-raises the error.
Usage : ``shutil.rmtree(path, onerror=onerror)``
"""
import stat
if not os.access(path, os.W_OK):
# Is the error an access error ?
os.chmod(path, stat.S_IWUSR)
func(path)
else:
raise
def copytree(src, dst, warn = 0):
for item in os.listdir(src):
sp = os.path.join(src, item)
dp = os.path.join(dst, item)
if os.path.isdir(sp):
if item == ".git" or item == "bin" or item == "__pycache__" or item == ".import" or item == "logs" or item == "release" or item == "export" or item == "build" or item == "libs":
continue
#print(item)
if os.path.isdir(dp):
shutil.rmtree(dp, onerror=onerror)
copytree(sp, dp, warn)
else:
if item.endswith(".a") or item.endswith(".class") or item.endswith(".dex") or item.endswith(".pyc") or item.endswith(".o") or item.endswith(".bc") or item.endswith(".so") or item == "export_presets.cfg" or item.endswith(".gen.h") or item.endswith(".os") or item.endswith(".dblite") or item == ".scons_node_count" or item == ".scons_env.json" or item == "compile_commands.json" or item == "config.log" or item.endswith(".gen.inc") or item.endswith(".gen.cpp") :
continue
#print(item)
if not os.path.isdir(dst):
os.makedirs(dst)
file_size_bytes = os.path.getsize(sp)
if warn > 0 and file_size_bytes >= warn:
# Ignore assets, this is meant to catch temp / generated files
if not (item.endswith(".po") or item.endswith(".tres") or item.endswith(".ttf") or item.endswith(".tza") or item.endswith(".blend") or item.endswith(".blend1") or item.endswith(".pot")):
print("WARNING! File '", sp, "' (", file_size_bytes, "bytes) is over the warn threshold!")
shutil.copy2(sp, dp)
def copy_repository(data, target_folder, clone_path):
copytree(os.path.abspath(clone_path + data[1] + '/' + data[2]), os.path.abspath(target_folder + data[1]))
#copy_repository(rep, './game/addons/', '.' + module_clone_path)
#print(sys.argv)
if len(sys.argv) == 3 or len(sys.argv) == 4:
src_dir = sys.argv[1]
dst_dir = sys.argv[2]
warn = 0
if len(sys.argv) == 4:
warn = int(sys.argv[3])
src_dir = os.path.abspath(src_dir)
dst_dir = os.path.abspath(dst_dir)
copytree(src_dir, dst_dir, warn)
else:
print("Usange: python copy_repos.py source_dir target_dir")

Some files were not shown because too many files have changed in this diff Show More