Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/enuPublic

Commitfa22eb5

Browse files
committed
iOS build scripts and cursor rules
1 parent660c794 commitfa22eb5

File tree

4 files changed

+134
-3
lines changed

4 files changed

+134
-3
lines changed

‎.cursor/rules/enu-rule.mdc‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
description:
3+
globs: **/*.nim
4+
alwaysApply: false
5+
---
6+
- This project is Enu, a 3D sandbox that allows Logo-like scripting in a Minecraft style voxel world. It's written in Nim, and also uses Nim for its scripts, which run inside the Nim VM.
7+
- `src` contains the main application. `nimble build` builds it.
8+
- `vmlib` contains files that run in the script engine.
9+
- `src` and `vmlib` contain some types with the same names. These represent the same objects, but in general you'll be working working one or the other. Assume I mean the version from `src` unless directed otherwise.
10+
- `vmlib/stdlib` is a copy of the Nim stdlib that's loaded by the script engine. In general you can ignore this directory, but it's there if you need it.
11+
- `vmlib/enu` is the enu specific stuff that's loaded in the vm.
12+
- `vmlib/worlds` are the default worlds that ship with Enu. You can ignore this unless I ask you about something in it.
13+
- This project uses the nim-godot binding. Most of the binding is auto-generated, based on the Godot 3.5 API. The generated code lives in the `generated` directory. You can inspect the files here to see what is available.
14+
- The code in `generated` uses `camelCase`, but you should always use `snake_case`.
15+
- Don't worry about fixing lint errors, but you can use them for hints if you're fixing a compile error.
16+
- Use `nimble build` to build the project and check for errors.
17+
- Be careful not to get stuck in a loop generating code.

‎enu.nimble‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ install_files = @["enu.nim"]
3030
bin_dir="app"
3131
src_dir="src"
3232
bin=@["enu"& lib_ext]
33-
backend="cpp"
3433

3534
requires"nim >= 2.2.0",
3635
"https://github.com/dsrw/Nim#31b77d0",
@@ -40,6 +39,8 @@ requires "nim >= 2.2.0",
4039
"https://github.com/treeform/pretty","chroma","markdown","chronicles",
4140
"dotenv","nimibook","metrics#51f1227","zippy"
4241

42+
let git_version=static_exec("git describe --tags HEAD").strip
43+
4344
procgodot_bin(target= target):string=
4445
result=this_dir()&&"/vendor/godot/bin/godot.{target}.tools.{cpu}{exe_ext}"
4546
if target=="server":
@@ -75,9 +76,17 @@ proc build_godot(target = target, cpu = cpu, opts = godot_opts) =
7576
with_dir"vendor/godot":
7677
exec&"{scons} custom_modules=../modules platform={target} arch={cpu}{opts} -j{cores}"
7778

78-
task build_ios_godot,"Build godot for ios":
79+
task ios_prereqs,"Build godot for ios":
80+
with_dir"vendor/pcre":
81+
exec"./configure --host=arm-apple-darwin10 --target=arm-apple-darwin10"
82+
exec"make"
83+
7984
build_godot(target="iphone", cpu="arm64")
8085

86+
task ios,"Build ios":
87+
exec&"{gen()} write_export_presets --enu_version{git_version}"
88+
exec&"{godot_bin()} --path app --export-pack\"ios\""&"ios"
89+
8190
task build_godot,"Build godot":
8291
build_godot()
8392

@@ -241,7 +250,6 @@ proc copy_vmlib(src, dest: string) =
241250

242251
task dist_package,"Build distribution binaries":
243252
p"Packaging distribution..."
244-
let git_version=static_exec("git describe --tags HEAD").strip
245253
copy_fonts()
246254
rm_dir"dist"
247255
mk_dir"dist"

‎installer/export_presets.cfg.nimf‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,70 @@ binary_format/64_bits=true
102102
binary_format/embed_pck=false
103103
custom_template/release=""
104104
custom_template/debug=""
105+
106+
[preset.3]
107+
108+
name="ios"
109+
platform="iOS"
110+
runnable=true
111+
custom_features=""
112+
export_filter="all_resources"
113+
include_filter=""
114+
exclude_filter=""
115+
export_path=""
116+
script_export_mode=1
117+
script_encryption_key=""
118+
119+
[preset.3.options]
120+
121+
custom_template/debug=""
122+
custom_template/release=""
123+
architectures/armv7=false
124+
architectures/arm64=true
125+
application/app_store_team_id="78XKJ5H5BX"
126+
application/provisioning_profile_uuid_debug=""
127+
application/code_sign_identity_debug=""
128+
application/export_method_debug=1
129+
application/provisioning_profile_uuid_release=""
130+
application/code_sign_identity_release=""
131+
application/export_method_release=0
132+
application/targeted_device_family=2
133+
application/name=""
134+
application/info="Made with Godot Engine"
135+
application/identifier="com.getenu.enu"
136+
application/signature=""
137+
application/short_version="1.0"
138+
application/version="1.0"
139+
application/copyright=""
140+
capabilities/access_wifi=false
141+
capabilities/push_notifications=false
142+
user_data/accessible_from_files_app=false
143+
user_data/accessible_from_itunes_sharing=false
144+
privacy/camera_usage_description=""
145+
privacy/microphone_usage_description=""
146+
privacy/photolibrary_usage_description=""
147+
icons/iphone_120x120=""
148+
icons/iphone_180x180=""
149+
icons/ipad_76x76=""
150+
icons/ipad_152x152=""
151+
icons/ipad_167x167=""
152+
icons/app_store_1024x1024=""
153+
icons/spotlight_40x40=""
154+
icons/spotlight_80x80=""
155+
storyboard/use_launch_screen_storyboard=false
156+
storyboard/image_scale_mode=0
157+
storyboard/custom_image@2x=""
158+
storyboard/custom_image@3x=""
159+
storyboard/use_custom_bg_color=false
160+
storyboard/custom_bg_color=Color( 0, 0, 0, 1 )
161+
landscape_launch_screens/iphone_2436x1125=""
162+
landscape_launch_screens/iphone_2208x1242=""
163+
landscape_launch_screens/ipad_1024x768=""
164+
landscape_launch_screens/ipad_2048x1536=""
165+
portrait_launch_screens/iphone_640x960=""
166+
portrait_launch_screens/iphone_640x1136=""
167+
portrait_launch_screens/iphone_750x1334=""
168+
portrait_launch_screens/iphone_1125x2436=""
169+
portrait_launch_screens/ipad_768x1024=""
170+
portrait_launch_screens/ipad_1536x2048=""
171+
portrait_launch_screens/iphone_1242x2208=""

‎vendor/build-pcre-ios.sh‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
TOOLCHAIN_ROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer"
2+
SYSROOT="${TOOLCHAIN_ROOT}/SDKs/iPhoneOS.sdk"
3+
4+
DEV_ARCHS="-arch armv7 -arch armv7s -arch arm64"
5+
6+
export CC=${TOOLCHAIN_ROOT}/usr/bin/gcc
7+
export CXX=${TOOLCHAIN_ROOT}/usr/bin/g++
8+
export LD=${TOOLCHAIN_ROOT}/usr/bin/ld\-r
9+
export CPP=${TOOLCHAIN_ROOT}/usr/bin/cpp
10+
export CXXCPP=${TOOLCHAIN_ROOT}/usr/bin/cpp
11+
export LDFLAGS="-isysroot${SYSROOT}${DEV_ARCHS}"
12+
export AR=${TOOLCHAIN_ROOT}/usr/bin/ar
13+
export AS=${TOOLCHAIN_ROOT}/usr/bin/as
14+
export LIBTOOL=${TOOLCHAIN_ROOT}/usr/bin/libtool
15+
export STRIP=${TOOLCHAIN_ROOT}/usr/bin/strip
16+
export RANLIB=${TOOLCHAIN_ROOT}/usr/bin/ranlib
17+
18+
if [!-d${SYSROOT} ];then
19+
echo
20+
echo"Cannot find iOS developer tools at${SYSROOT}."
21+
echo
22+
exit
23+
fi
24+
25+
if [-f Makefile ];then
26+
make clean
27+
fi
28+
29+
./configure \
30+
CFLAGS="-O -isysroot${SYSROOT}${DEV_ARCHS}" \
31+
CXXFLAGS="-O -isysroot${SYSROOT}${DEV_ARCHS}" \
32+
--disable-dependency-tracking \
33+
--host=arm-apple-darwin10 \
34+
--target=arm-apple-darwin10 \
35+
--disable-shared \
36+
--enable-utf8 \
37+
--prefix=${DEST_DIR}/device
38+
39+
make

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp