diff --git a/assets/capsule.png b/assets/capsule.png new file mode 100644 index 0000000..e122d83 Binary files /dev/null and b/assets/capsule.png differ diff --git a/assets/header.png b/assets/header.png new file mode 100644 index 0000000..7f67312 Binary files /dev/null and b/assets/header.png differ diff --git a/assets/logo.png b/assets/logo.png new file mode 100644 index 0000000..03d464b Binary files /dev/null and b/assets/logo.png differ diff --git a/docs/assets/capsules/capsule_600x900.png b/docs/assets/capsules/capsule_600x900.png new file mode 100644 index 0000000..e122d83 Binary files /dev/null and b/docs/assets/capsules/capsule_600x900.png differ diff --git a/docs/assets/headers/header_920x430.png b/docs/assets/headers/header_920x430.png new file mode 100644 index 0000000..7f67312 Binary files /dev/null and b/docs/assets/headers/header_920x430.png differ diff --git a/docs/assets/logos/logo_1280x320.png b/docs/assets/logos/logo_1280x320.png new file mode 100644 index 0000000..03d464b Binary files /dev/null and b/docs/assets/logos/logo_1280x320.png differ diff --git a/tools/deploy.py b/tools/deploy.py index 65648bc..71a48d6 100644 --- a/tools/deploy.py +++ b/tools/deploy.py @@ -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" diff --git a/tools/install.sh b/tools/install.sh index 4e03067..1ee441a 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -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="" diff --git a/tools/package-release.sh b/tools/package-release.sh index 758dffa..f26de30 100755 --- a/tools/package-release.sh +++ b/tools/package-release.sh @@ -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