Add project logo and use it for the app icon
- assets/logo.png (transparent) and assets/logo-256.png for the site and README - tools/make_icon.m builds the full-bleed iOS icon from the logo
This commit is contained in:
1 parent
30b961c923
commit
f5b1cc1a79
6 files changed
+13
-8
No files matched your search
@@ -96,14 +96,14 @@ def dylib(name, sources, defines=(), reexport=None, link_appkit=True, extra=()):
|
||||
|
||||
|
||||
def build_icon():
|
||||
"""Compile an asset catalog with the app icon, made from the game's own icon; returns plist keys."""
|
||||
"""Compile an asset catalog with the app icon, made from assets/logo.png; returns plist keys."""
|
||||
work = OUT / "icon"
|
||||
iconset = work / "Assets.xcassets/AppIcon.appiconset"
|
||||
iconset.mkdir(parents=True, exist_ok=True)
|
||||
tool = work / "make_icon"
|
||||
run(["xcrun", "clang", "-O2", "-fobjc-arc", ROOT / "tools/make_icon.m", "-framework", "Foundation",
|
||||
"-framework", "CoreGraphics", "-framework", "ImageIO", "-o", tool])
|
||||
run([tool, GAME / "data/core/graphics/factorio-icon@2x.png", iconset / "AppIcon-1024.png"])
|
||||
run([tool, ROOT / "assets/logo.png", iconset / "AppIcon-1024.png"])
|
||||
(iconset / "Contents.json").write_text(json.dumps({"images": [{"filename": "AppIcon-1024.png", "idiom": "universal",
|
||||
"platform": "ios", "size": "1024x1024"}], "info": {"author": "xcode", "version": 1}}))
|
||||
(work / "Assets.xcassets/Contents.json").write_text(json.dumps({"info": {"author": "xcode", "version": 1}}))
|
||||
|
||||
Reference in new issue
Block a user