Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
프로젝트 내보내기
왜 내보내나요?
원래, Godot는 프로젝트를 내보내는 수단이 없었습니다. 개발자는 적절한 바이너리를 컴파일하고 각 플랫폼으로 패키지를 수동으로 만들었습니다.
더 많은 개발자가 (그리고 심지어 비프로그래머까지) Godot를 사용하기 시작했고, 우리 회사가 동시에 더 많은 프로젝트를 시작하면서, 이것이 병목 현상인 것이 분명해 졌습니다.
PC에서
Godot로 PC에서 게임 프로젝트를 배포하는 것은 비교적 쉽습니다. Godot 바이너리를 project.godot
파일의 형태로 같은 디렉토리에 드롭하고, 프로젝트 디렉토리를 압축하면 끝입니다.
간단해 보이지만, 개발자들이 이 방식을 원하지 않는 몇 가지 이유가 있을 것입니다. 첫 째로 많은 파일을 배포하는 것은 바람직하지 않을 수 있습니다. 일부 개발자들은 호기심 많은 사용자가 게임이 만들어진 방법을 알아내는 것을 좋아하지 않을 수도 있고, 다른 개발자들이 게임이 잘 만들어지지 않은 것을 발견할 수도 있습니다. 또 다른 이유는 개발자가 특별히 컴파일된 바이너리를 선호하기 때문인데, 크기 면에서 더 작지만 더 많이 최적화되어 있으면서, 편집기와 디버거같은 툴을 갖지 않기 때문입니다.
마지막으로, Godot는 추가 패키지 파일로 DLC를 만드는 간단하면서도 효율적인 :ref:`시스템 <doc_exporting_pcks>`을 갖고 있습니다.
모바일에서
모바일 플랫폼에서의 같은 시나리오는 좀 더 나쁩니다. 이 기기로 프로젝트를 배포하기 위해, 각 플랫폼을 위한 바이너리가 지어지고, 네이티브 프로젝트에 게임 데이터와 함께 추가됩니다.
이것은 개발자가 각 플랫폼의 SDK에 익숙해져야 내보낼 수 있음을 의미하기 때문에 번거로울 수 있습니다. 각 SDK를 배우는 것을 항상 권장하는 반면, 바람직하지 않은 시간에 SDK를 강제 실행하는 것은 방해가 될 수 있습니다.
There is also another problem with this approach: different devices prefer some data in different formats to run. The main example of this is texture compression. All PC hardware uses S3TC (BC) compression and that has been standardized for more than a decade, but mobile devices use different formats for texture compression, such as ETC1 and ETC2.
Configuration files
The export configuration is stored in two files that can both be found in the project directory:
export_presets.cfg
: This file contains the vast majority of the export configuration and can be safely committed to version control. There is nothing in here that you would normally have to keep secret..godot/export_credentials.cfg
: This file contains export options that are considered confidential, like passwords and encryption keys. It should generally not be committed to version control or shared with others unless you know exactly what you are doing.
Since the credentials file is usually kept out of version control systems, some export options will be missing if you clone the project to a new machine. The easiest way to deal with this is to copy the file manually from the old location to the new one.
명령줄에서 내보내기
In production, it is useful to automate builds, and Godot supports this
with the --export-release
and --export-debug
command line parameters.
Exporting from the command line still requires an export preset to define
the export parameters. A basic invocation of the command would be:
godot --export-release "Windows Desktop" some_name.exe
This will export to some_name.exe
, assuming there is a preset
called "Windows Desktop" and the template can be found. (The export preset name
must be written within quotes if it contains spaces or special characters.)
The output path is relative to the project path or absolute;
it does not respect the directory the command was invoked from.
The output file extension should match the one used by the Godot export process:
Windows:
.exe
macOS:
.zip
(from all platforms) or.dmg
(only when exporting from macOS)..app
is not supported directly, although the generated ZIP archive contains an.app
bundle.Linux: Any extension (including none).
.x86_64
is typically used for 64-bit x86 binaries.HTML5:
.zip
Android:
.apk
iOS:
.zip
You can also configure it to export only the PCK or ZIP file, allowing a single exported main pack file to be used with multiple Godot executables. When doing so, the export preset name must still be specified on the command line:
godot --export-pack "Windows Desktop" some_name.pck
It is often useful to combine the --export-release
flag with the --path
flag, so that you do not need to cd
to the project folder before running
the command:
godot --path /path/to/project --export-release "Windows Desktop" some_name.exe
더 보기
See 명령줄(Command line) 튜토리얼 for more information about using Godot from the command line.
PCK와 ZIP 파일 포맷의 비교
두 포맷은 각각의 장단점을 갖고 있습니다. PCK는 기본 설정이며 대부분의 상황에서 사용이 권장되는 포맷입니다. 하지만 경우에 따라 ZIP을 사용하는 것이 좋은 경우도 있습니다.
PCK 포맷:
압축되지 않은 포맷입니다. 파일 용량이 크지만 읽기/쓰기 속도가 빠릅니다.
일반 사용자가 갖고 있는 툴로는 읽기나 쓰기가 불가능하지만 PCK를 생성 및 압축해제 할 수 있는`서드파티 툴 <https://github.com/hhyyrylainen/GodotPckTool>`__ 이 존재합니다.
ZIP 포맷:
압축 포맷입니다. 파일의 용량이 작지만 읽기/쓰기가 느립니다.
일반 사용자가 갖고 있는 툴로 읽기 및 쓰기가 가능합니다. 때문에 모딩이 쉬워지는 장점이 있습니다(:ref:`doc_exporting_pcks`를 참고하십시오).
경고
버그 로 인해 ZIP 파일을 팩 파일로 사용하면 내보낸 이진 파일이 이를 자동으로 찾아 사용하지 않습니다. 따라서 플레이어가 직접 클릭 혹은 터미널에서 사용할 수 있는 런처 스크립트 를 다음과 같이 따로 생성해야 합니다:
:: launch.bat (Windows)
@echo off
my_project.exe --main-pack my_project.zip
# launch.sh (Linux)
./my_project.x86_64 --main-pack my_project.zip
런처 스크립트를 이진 파일과 동일한 폴더에 저장하십시오. Linux의 경우, 런처 스크립트가 chmod +x launch.sh
명령을 사용할 권한이 있는지 확인해야 합니다.