Skip to content

Commit

Permalink
Merge pull request #99 from savaughn/app-icons
Browse files Browse the repository at this point in the history
Added app icons
  • Loading branch information
savaughn authored Nov 18, 2023
2 parents 69a195e + 970d463 commit 78fdb8d
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 8 deletions.
Binary file modified .DS_Store
Binary file not shown.
14 changes: 10 additions & 4 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ jobs:
cp "${{ github.workspace }}/pokeromtrader" "${MACOS_DESTINATION}/pokeromtrader"
# Copy assets
mkdir -p "${MACOS_DESTINATION}/../Resources"
cp -r "${{ github.workspace }}/assets" "${MACOS_DESTINATION}/../Resources"
mkdir -p "${MACOS_DESTINATION}/../Resources/assets"
cp -r "${{ github.workspace }}/assets/images" "${MACOS_DESTINATION}/../Resources/assets"
cp "${{ github.workspace }}/assets/icon.icns" "${MACOS_DESTINATION}/../Resources"
# Create Info.plist file
echo '<?xml version="1.0" encoding="UTF-8"?>' > "${INFO_PLIST}"
Expand All @@ -142,6 +143,8 @@ jobs:
echo " <string>${APP_BUNDLE_ID}</string>" >> "${INFO_PLIST}"
echo ' <key>CFBundleName</key>' >> "${INFO_PLIST}"
echo " <string>${APP_BUNDLE_NAME}</string>" >> "${INFO_PLIST}"
echo " <key>CFBundleIconFile</key>" >> "${INFO_PLIST}"
echo " <string>icon</string>" >> "${INFO_PLIST}"
echo '</dict>' >> "${INFO_PLIST}"
echo '</plist>' >> "${INFO_PLIST}"
Expand Down Expand Up @@ -184,8 +187,9 @@ jobs:
cp "${{ github.workspace }}/pokeromtrader" "${MACOS_DESTINATION}/pokeromtrader"
# Copy assets
mkdir -p "${MACOS_DESTINATION}/../Resources"
cp -r "${{ github.workspace }}/assets" "${MACOS_DESTINATION}/../Resources"
mkdir -p "${MACOS_DESTINATION}/../Resources/assets"
cp -r "${{ github.workspace }}/assets/images" "${MACOS_DESTINATION}/../Resources/assets"
cp "${{ github.workspace }}/assets/icon.icns" "${MACOS_DESTINATION}/../Resources"
# Create Info.plist file
echo '<?xml version="1.0" encoding="UTF-8"?>' > "${INFO_PLIST}"
Expand All @@ -198,6 +202,8 @@ jobs:
echo " <string>${APP_BUNDLE_ID}</string>" >> "${INFO_PLIST}"
echo ' <key>CFBundleName</key>' >> "${INFO_PLIST}"
echo " <string>${APP_BUNDLE_NAME}</string>" >> "${INFO_PLIST}"
echo " <key>CFBundleIconFile</key>" >> "${INFO_PLIST}"
echo " <string>icon</string>" >> "${INFO_PLIST}"
echo '</dict>' >> "${INFO_PLIST}"
echo '</plist>' >> "${INFO_PLIST}"
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
build/*
deps/pksav/build/
obj/
*.DS_Store
.DS_Store
src/pokeromtrader

tests/*
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ PLATFORM ?= PLATFORM_DESKTOP

# Define project variables
PROJECT_NAME ?= pokeromtrader
PROJECT_VERSION := 0.7.0
PROJECT_VERSION := 0.8.0
# prerelease or release
PROJECT_VERSION_TYPE ?= release
PROJECT_VERSION_TYPE ?= prerelease
PROJECT_BUILD_PATH ?= .

RAYLIB_PATH ?= deps/raylib
Expand Down Expand Up @@ -261,7 +261,7 @@ LDFLAGS = -L. -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)/src -Ldeps/pksav/build/l
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS),WINDOWS)
# NOTE: The resource .rc file contains windows executable icon and properties
# LDFLAGS += \deps\pksav\build\lib\
LDFLAGS += assets\pkrom.rc.data
# -Wl,--subsystem,windows hides the console window
ifeq ($(BUILD_MODE), RELEASE)
LDFLAGS += -Wl,--subsystem,windows
Expand Down
Binary file added assets/icon.icns
Binary file not shown.
Binary file added assets/icon.ico
Binary file not shown.
21 changes: 21 additions & 0 deletions assets/pkrom.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
GLFW_ICON ICON "icon.ico"

1 VERSIONINFO
FILEVERSION 4,5,0,0
PRODUCTVERSION 4,5,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
//BLOCK "080904E4" // English UK
BLOCK "040904E4" // English US
BEGIN
VALUE "InternalName", "pokeromtrader app"
VALUE "OriginalFilename", "PokeromTrader.exe"
END
END
BLOCK "VarFileInfo"
BEGIN
//VALUE "Translation", 0x809, 1252 // English UK
VALUE "Translation", 0x409, 1252 // English US
END
END
Binary file added assets/pkrom.rc.data
Binary file not shown.

0 comments on commit 78fdb8d

Please sign in to comment.