Browse Source

Add .desktop file for linux and app bundles for macos

tags/v1.0-RC2
Jens Pitkänen 1 year ago
parent
commit
da6ba41ece
11 changed files with 64 additions and 10 deletions
  1. +3
    -1
      linux-build.sh
  2. +3
    -1
      linux-rpi-build.sh
  3. +11
    -2
      osx-build.sh
  4. +0
    -0
      resources/icon.png
  5. +9
    -0
      resources/linux/moe.neon.metro.desktop
  6. +32
    -0
      resources/macos/Info.plist
  7. BIN
      resources/macos/icon.icns
  8. +0
    -0
      resources/windows/favicon.rc
  9. +0
    -0
      resources/windows/icon.ico
  10. +1
    -1
      windows-mingw-build.sh
  11. +5
    -5
      windows-msvc-build.bat

+ 3
- 1
linux-build.sh View File

@@ -146,9 +146,11 @@ fi
rm *.o
[ -z "$QUIET" ] && echo "COMPILE-INFO: Game compiled into an executable in: $OUTPUT_DIR/"

cp $ROOT_DIR/resources/icon.png metro-game.png
cp $ROOT_DIR/resources/linux/moe.neon.metro.desktop .
mkdir -p metro_assets
cd metro_assets
cp $ROOT_DIR/src/icon.png .
cp $ROOT_DIR/resources/icon.png .
cp -r $ROOT_DIR/src/shaders .
mkdir -p fonts
cp $ROOT_DIR/vendor/vt323/vt323.ttf fonts/


+ 3
- 1
linux-rpi-build.sh View File

@@ -146,9 +146,11 @@ fi
rm *.o
[ -z "$QUIET" ] && echo "COMPILE-INFO: Game compiled into an executable in: $OUTPUT_DIR/"

cp $ROOT_DIR/resources/icon.png metro-game.png
cp $ROOT_DIR/resources/linux/moe.neon.metro.desktop .
mkdir -p metro_assets
cd metro_assets
cp $ROOT_DIR/src/icon.png .
cp $ROOT_DIR/resources/icon.png .
cp -r $ROOT_DIR/src/shaders .
mkdir -p fonts
cp $ROOT_DIR/vendor/vt323/vt323.ttf fonts/


+ 11
- 2
osx-build.sh View File

@@ -148,14 +148,23 @@ fi
rm *.o
[ -z "$QUIET" ] && echo "COMPILE-INFO: Game compiled into an executable in: $OUTPUT_DIR/"


mkdir -p Metro.app/Contents
cp $ROOT_DIR/resources/macos/Info.plist Metro.app/Contents/Info.plist
mkdir -p Metro.app/Contents/MacOS
mv $GAME_NAME Metro.app/Contents/MacOS/$GAME_NAME

mkdir -p Metro.app/Contents/Resources
cd Metro.app/Contents/Resources
cp $ROOT_DIR/resources/macos/icon.icns Metro.icns
mkdir -p metro_assets
cd metro_assets
cp $ROOT_DIR/src/icon.png .
cp $ROOT_DIR/resources/icon.png .
cp -r $ROOT_DIR/src/shaders .
mkdir -p fonts
cp $ROOT_DIR/vendor/vt323/vt323.ttf fonts/
cp $ROOT_DIR/vendor/open-sans/open_sans.ttf fonts/
cd ..
cd ../../MacOS
[ -z "$QUIET" ] && echo "COMPILE-INFO: Game resources copied into: $OUTPUT_DIR/"

if [ -n "$STRIP_IT" ]; then


src/icon.png → resources/icon.png View File


+ 9
- 0
resources/linux/moe.neon.metro.desktop View File

@@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=A Walk In A Metro Tunnel
Comment=A metro tunnel exploration game featuring floating-point weirdness
Exec=metro
Icon=metro-game.png
Terminal=false
Categories=Game;AdventureGame;

+ 32
- 0
resources/macos/Info.plist View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>Metro</string>

<key>CFBundleDisplayName</key>
<string>A Walk In A Metro Tunnel</string>

<key>CFBundleIdentifier</key>
<string>moe.neon.Metro</string>

<key>CFBundleVersion</key>
<string>1.0.0</string>

<key>CFBundleShortVersionString</key>
<string>1.0.0</string>

<key>CFBundlePackageType</key>
<string>APPL</string>

<key>CFBundleExecutable</key>
<string>metro</string>

<key>CFBundleIconFile</key>
<string>Metro.icns</string>

<key>NSHumanReadableCopyright</key>
<string>Copyright (C) 2019 Jens Pitkanen, distributed under the GNU GPLv3</string>
</dict>
</plist>

BIN
resources/macos/icon.icns View File

Before After
Width: 32  |  Height: 32  |  Size: 1.9 KiB

src/favicon.rc → resources/windows/favicon.rc View File


src/icon.ico → resources/windows/icon.ico View File


+ 1
- 1
windows-mingw-build.sh View File

@@ -152,7 +152,7 @@ rm *.o

mkdir -p metro_assets
cd metro_assets
cp $ROOT_DIR/src/icon.png .
cp $ROOT_DIR/resources/icon.png .
cp -r $ROOT_DIR/src/shaders .
mkdir -p fonts
cp $ROOT_DIR/vendor/vt323/vt323.ttf fonts/


+ 5
- 5
windows-msvc-build.bat View File

@@ -10,7 +10,7 @@ set SOURCES=src\*.c
REM Set your raylib/src location here (relative path!)
set RAYLIB_SRC=vendor\raylib

set RESOURCE_SOURCES=src\favicon.rc
set RESOURCE_SOURCES=resources\windows\favicon.rc

REM About this build script: it does many things, but in essence, it's
REM very simple. It has 3 compiler invocations: building raylib (which
@@ -197,20 +197,20 @@ IF NOT DEFINED QUIET echo COMPILE-INFO: Compiling game code.
IF DEFINED REALLY_QUIET (
cl.exe !VERBOSITY_FLAG! !COMPILATION_FLAGS! !WARNING_FLAGS! /c /I"!RAYLIB_SRC!" !SOURCES! > NUL 2>&1 || exit /B
rc.exe !VERBOSITY_FLAG! !RESOURCE_SOURCES! > NUL 2>&1 || exit /B
cl.exe !VERBOSITY_FLAG! !OUTPUT_FLAG! "!ROOT_DIR!\!TEMP_DIR!\*.obj" "!ROOT_DIR!\src\*.res" *.obj !LINK_FLAGS! !SUBSYSTEM_FLAGS! > NUL 2>&1 || exit /B
cl.exe !VERBOSITY_FLAG! !OUTPUT_FLAG! "!ROOT_DIR!\!TEMP_DIR!\*.obj" "!ROOT_DIR!\resources\windows\*.res" *.obj !LINK_FLAGS! !SUBSYSTEM_FLAGS! > NUL 2>&1 || exit /B
) ELSE (
cl.exe !VERBOSITY_FLAG! !COMPILATION_FLAGS! !WARNING_FLAGS! /c /I"!RAYLIB_SRC!" !SOURCES! || exit /B
rc.exe !VERBOSITY_FLAG! !RESOURCE_SOURCES! || exit /B
cl.exe !VERBOSITY_FLAG! !OUTPUT_FLAG! "!ROOT_DIR!\!TEMP_DIR!\*.obj" "!ROOT_DIR!\src\*.res" *.obj !LINK_FLAGS! !SUBSYSTEM_FLAGS! || exit /B
cl.exe !VERBOSITY_FLAG! !OUTPUT_FLAG! "!ROOT_DIR!\!TEMP_DIR!\*.obj" "!ROOT_DIR!\resources\windows\*.res" *.obj !LINK_FLAGS! !SUBSYSTEM_FLAGS! || exit /B
)
del *.obj
del "!ROOT_DIR!\src\*.res"
del "!ROOT_DIR!\resources\windows\*.res"
IF NOT DEFINED QUIET echo COMPILE-INFO: Game compiled into an executable in: !OUTPUT_DIR!\

REM Copy resources
IF NOT EXIST metro_assets mkdir metro_assets
cd metro_assets
IF NOT EXIST "icon.png" cp !ROOT_DIR!\src\icon.png icon.png
IF NOT EXIST "icon.png" cp !ROOT_DIR!\resources\icon.png icon.png
IF NOT EXIST shaders mkdir shaders
IF EXIST "shaders\sdf_shader.glsl" del shaders\sdf_shader.glsl
cp !ROOT_DIR!\src\shaders\sdf.glsl shaders\sdf.glsl


Loading…
Cancel
Save