mirror of
https://github.com/Pixelplanet/Pixel-VR-Player.git
synced 2026-10-25 16:00:23 +01:00
feat(branding): add portrait capsule, landscape header, and transparent logo for Steam library
This commit is contained in:
1 parent
09a5f73393
commit
c404131924
9 files changed
+43
-28
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 336 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 286 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 119 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 336 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 286 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 119 KiB |
+17
-7
@@ -136,12 +136,10 @@ def main() -> int:
|
||||
launch_helper = PROJECT_ROOT / "tools" / "launch.sh"
|
||||
if launch_helper.is_file():
|
||||
scp([str(launch_helper)], f"{REMOTE_DIR}/launch.sh")
|
||||
icon_file = PROJECT_ROOT / "assets" / "icon.png"
|
||||
if icon_file.is_file():
|
||||
scp([str(icon_file)], f"{REMOTE_DIR}/icon.png")
|
||||
hero_file = PROJECT_ROOT / "assets" / "hero.png"
|
||||
if hero_file.is_file():
|
||||
scp([str(hero_file)], f"{REMOTE_DIR}/hero.png")
|
||||
for asset_name in ("icon.png", "hero.png", "capsule.png", "header.png", "logo.png"):
|
||||
asset_file = PROJECT_ROOT / "assets" / asset_name
|
||||
if asset_file.is_file():
|
||||
scp([str(asset_file)], f"{REMOTE_DIR}/{asset_name}")
|
||||
|
||||
# 3. Register the Non-Steam shortcut (runs on the host, not in Sniper).
|
||||
request = {
|
||||
@@ -217,15 +215,27 @@ def main() -> int:
|
||||
" e['DevkitGameID'] = [STR, '']\n"
|
||||
" icon_p = os.path.expanduser('~/" + REMOTE_DIR + "/icon.png')\n"
|
||||
" hero_p = os.path.expanduser('~/" + REMOTE_DIR + "/hero.png')\n"
|
||||
" capsule_p = os.path.expanduser('~/" + REMOTE_DIR + "/capsule.png')\n"
|
||||
" header_p = os.path.expanduser('~/" + REMOTE_DIR + "/header.png')\n"
|
||||
" logo_p = os.path.expanduser('~/" + REMOTE_DIR + "/logo.png')\n"
|
||||
" grid = os.path.join(os.path.dirname(os.path.dirname(vdf)), 'config', 'grid')\n"
|
||||
" os.makedirs(grid, exist_ok=True)\n"
|
||||
" raw_id = e.get('appid', [INT, 0])[1] & 0xFFFFFFFF\n"
|
||||
" if os.path.isfile(icon_p):\n"
|
||||
" e['icon'] = [STR, icon_p]\n"
|
||||
" shutil.copyfile(icon_p, os.path.join(grid, f'{raw_id}.png'))\n"
|
||||
" shutil.copyfile(icon_p, os.path.join(grid, f'{raw_id}_icon.png'))\n"
|
||||
" if os.path.isfile(capsule_p):\n"
|
||||
" shutil.copyfile(capsule_p, os.path.join(grid, f'{raw_id}p.png'))\n"
|
||||
" elif os.path.isfile(icon_p):\n"
|
||||
" shutil.copyfile(icon_p, os.path.join(grid, f'{raw_id}p.png'))\n"
|
||||
" if os.path.isfile(header_p):\n"
|
||||
" shutil.copyfile(header_p, os.path.join(grid, f'{raw_id}.png'))\n"
|
||||
" elif os.path.isfile(icon_p):\n"
|
||||
" shutil.copyfile(icon_p, os.path.join(grid, f'{raw_id}.png'))\n"
|
||||
" if os.path.isfile(hero_p):\n"
|
||||
" shutil.copyfile(hero_p, os.path.join(grid, f'{raw_id}_hero.png'))\n"
|
||||
" if os.path.isfile(logo_p):\n"
|
||||
" shutil.copyfile(logo_p, os.path.join(grid, f'{raw_id}_logo.png'))\n"
|
||||
" mod = True\n"
|
||||
" if mod:\n"
|
||||
" tmp = vdf + '.tmp'\n"
|
||||
|
||||
+21
-15
@@ -302,13 +302,24 @@ def main():
|
||||
import shutil
|
||||
steam_user_dir = os.path.dirname(os.path.dirname(path))
|
||||
grid_dir = os.path.join(steam_user_dir, "config", "grid")
|
||||
raw_appid = entry["appid"][1] & 0xFFFFFFFF
|
||||
if icon_path and os.path.isfile(icon_path):
|
||||
shutil.copyfile(icon_path, os.path.join(grid_dir, "%d_icon.png" % raw_appid))
|
||||
capsule_path = os.path.join(os.path.dirname(icon_path), "capsule.png") if icon_path else ""
|
||||
if capsule_path and os.path.isfile(capsule_path):
|
||||
shutil.copyfile(capsule_path, os.path.join(grid_dir, "%dp.png" % raw_appid))
|
||||
elif icon_path and os.path.isfile(icon_path):
|
||||
shutil.copyfile(icon_path, os.path.join(grid_dir, "%dp.png" % raw_appid))
|
||||
header_path = os.path.join(os.path.dirname(icon_path), "header.png") if icon_path else ""
|
||||
if header_path and os.path.isfile(header_path):
|
||||
shutil.copyfile(header_path, os.path.join(grid_dir, "%d.png" % raw_appid))
|
||||
elif icon_path and os.path.isfile(icon_path):
|
||||
shutil.copyfile(icon_path, os.path.join(grid_dir, "%d.png" % raw_appid))
|
||||
hero_path = os.path.join(os.path.dirname(icon_path), "hero.png") if icon_path else ""
|
||||
if hero_path and os.path.isfile(hero_path):
|
||||
shutil.copyfile(hero_path, os.path.join(grid_dir, "%d_hero.png" % raw_appid))
|
||||
logo_path = os.path.join(os.path.dirname(icon_path), "logo.png") if icon_path else ""
|
||||
if logo_path and os.path.isfile(logo_path):
|
||||
shutil.copyfile(logo_path, os.path.join(grid_dir, "%d_logo.png" % raw_appid))
|
||||
except Exception:
|
||||
pass
|
||||
print("%s '%s' (%d shortcut(s) in the library)" % (
|
||||
@@ -525,20 +536,15 @@ if [ -f "$srcdir/VERSION" ]; then
|
||||
elif [ -n "$VERSION" ]; then
|
||||
printf '%s\n' "$VERSION" > "$INSTALL_DIR/VERSION"
|
||||
fi
|
||||
if [ -f "$srcdir/icon.png" ]; then
|
||||
cp "$srcdir/icon.png" "$INSTALL_DIR/icon.png"
|
||||
elif [ -n "$script_dir" ] && [ -f "$script_dir/icon.png" ]; then
|
||||
cp "$script_dir/icon.png" "$INSTALL_DIR/icon.png"
|
||||
elif [ -f "assets/icon.png" ]; then
|
||||
cp "assets/icon.png" "$INSTALL_DIR/icon.png"
|
||||
fi
|
||||
if [ -f "$srcdir/hero.png" ]; then
|
||||
cp "$srcdir/hero.png" "$INSTALL_DIR/hero.png"
|
||||
elif [ -n "$script_dir" ] && [ -f "$script_dir/hero.png" ]; then
|
||||
cp "$script_dir/hero.png" "$INSTALL_DIR/hero.png"
|
||||
elif [ -f "assets/hero.png" ]; then
|
||||
cp "assets/hero.png" "$INSTALL_DIR/hero.png"
|
||||
fi
|
||||
for asset in icon.png hero.png capsule.png header.png logo.png; do
|
||||
if [ -f "$srcdir/$asset" ]; then
|
||||
cp "$srcdir/$asset" "$INSTALL_DIR/$asset"
|
||||
elif [ -n "$script_dir" ] && [ -f "$script_dir/$asset" ]; then
|
||||
cp "$script_dir/$asset" "$INSTALL_DIR/$asset"
|
||||
elif [ -f "assets/$asset" ]; then
|
||||
cp "assets/$asset" "$INSTALL_DIR/$asset"
|
||||
fi
|
||||
done
|
||||
ok "$(ls -1 "$INSTALL_DIR/shaders" | wc -l | tr -d ' ') shaders, $(du -h "$INSTALL_DIR/pixelvr" 2>/dev/null | cut -f1) binary"
|
||||
|
||||
missing_libs=""
|
||||
|
||||
@@ -40,12 +40,11 @@ cp tools/install.sh "${stage}/PixelVRPlayer/install.sh"
|
||||
if [[ -f "tools/Install Pixel VR Player.desktop" ]]; then
|
||||
cp "tools/Install Pixel VR Player.desktop" "${stage}/PixelVRPlayer/Install Pixel VR Player.desktop"
|
||||
fi
|
||||
if [[ -f "assets/icon.png" ]]; then
|
||||
cp "assets/icon.png" "${stage}/PixelVRPlayer/icon.png"
|
||||
fi
|
||||
if [[ -f "assets/hero.png" ]]; then
|
||||
cp "assets/hero.png" "${stage}/PixelVRPlayer/hero.png"
|
||||
fi
|
||||
for asset in icon.png hero.png capsule.png header.png logo.png; do
|
||||
if [[ -f "assets/${asset}" ]]; then
|
||||
cp "assets/${asset}" "${stage}/PixelVRPlayer/${asset}"
|
||||
fi
|
||||
done
|
||||
if [[ -n "${VERSION}" ]]; then
|
||||
printf '%s\n' "${VERSION}" > "${stage}/PixelVRPlayer/VERSION"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user