Skip to content

Commit a800e09

Browse files
committed
Linux zip now comes with an optional install.sh script
1 parent 1293cf9 commit a800e09

15 files changed

Lines changed: 101 additions & 1 deletion
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Added
2+
body: 'Linux: the archive now includes an `install.sh` script. This script can be used to install the game and setup a launcher icon for it. It is still possible to run the game without installation, though.'
3+
time: 2022-02-10T18:01:19.242789652+01:00
0 Bytes
Loading

icon/export.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
GPLAY_ICON = REPO_DIR / "fastlane/metadata/android/en-US/images/icon.png"
2222

2323
MACOS_ICON = REPO_DIR / "tools/packaging/macos/pixelwheels.icns"
24+
LINUX_ICON_DIR = REPO_DIR / "tools/packaging/linux/icons"
2425

2526
APPWINDOW_ICON = ASSETS_DIR / "desktop-icon/desktop-icon.png"
2627

@@ -34,6 +35,8 @@
3435
# Note: no 64x64 in the macOS icon
3536
MACOS_ICON_SIZES = [16, 32, 48, 128, 256, 512, 1024]
3637

38+
LINUX_ICON_SIZES = SLICE_ICON_SIZES + SCALED_ICON_SIZES
39+
3740

3841
def run(*args):
3942
cmd = [str(x) for x in args]
@@ -98,6 +101,12 @@ def generate_android_tv_banner():
98101
"--save-as", RES_DIR / "drawable-xhdpi/tv_banner.png")
99102

100103

104+
def generate_linux_icons():
105+
for size in LINUX_ICON_SIZES:
106+
dst = LINUX_ICON_DIR / f"{size}-com.agateau.PixelWheels.png"
107+
shutil.copy(work_icon(size), dst)
108+
109+
101110
def generate_appwindow_icon():
102111
shutil.copy(work_icon(128), APPWINDOW_ICON)
103112

tools/packaging/common/README.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
padding: 3px 6px;
2929
border-radius: 5px;
3030
}
31-
3231
</style>
3332

3433
</head>
@@ -39,6 +38,22 @@ <h1>Pixel Wheels</h1>
3938

4039
<p>It works on Linux, Intel-based macOS, Windows and Android.</p>
4140

41+
<h2>📦 Installation</h2>
42+
43+
<p>You can start the game directly from this folder, but if you want to install it, here is how.
44+
45+
<h3>Linux</h3>
46+
47+
<p>Run the <code>install.sh</code> script to install it on your system. This will make the game available from your desktop menu.</p>
48+
49+
<h3>macOS</h3>
50+
51+
<p>Drag the "Pixel Wheels" bundle to your "Application" folder.</p>
52+
53+
<h3>Windows</h3>
54+
55+
<p>There is no automated installation procedure for now, but you can copy this folder in the folder of your choice and create a shortcut to the <code>pixelwheels.exe</code> executable.</p>
56+
4257
<h2>🏎 Controls</h2>
4358

4459
<p>The user interface and the vehicle can be controlled using either gamepads or keyboard.</p>

tools/packaging/create-archives

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ DST_DESKTOP_JAR=$DIST_OUT_BASE_DIR/pixelwheels.jar
2929
PACKAGING_DIR=$PWD/tools/packaging
3030
PACKAGING_COMMON_DIR=$PACKAGING_DIR/common
3131
PACKAGING_MACOS_DIR=$PACKAGING_DIR/macos
32+
PACKAGING_LINUX_DIR=$PACKAGING_DIR/linux
3233

3334
. tools/functions.sh
3435

@@ -87,6 +88,15 @@ create_archive() {
8788
# *inside* the bundle
8889
cp $PACKAGING_COMMON_DIR/README.html "$DIST_OUT_BASE_DIR/$dist_name"
8990

91+
if [ "$platform" = "linux64" ] ; then
92+
cp -a $PACKAGING_LINUX_DIR/* "$out_dir"
93+
fi
94+
95+
echo "Make sure all files are writable"
96+
# Packr generates some read-only files in the jre dir. This causes trouble
97+
# when trying to replace them during upgrade.
98+
chmod -R u+w $out_dir
99+
90100
echo "Creating zip"
91101
(
92102
cd $DIST_OUT_BASE_DIR
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Desktop Entry]
2+
Type=Application
3+
Version=1.0
4+
Name=Pixel Wheels
5+
Categories=Game;ArcadeGame;
6+
GenericName=Top-down retro racing game
7+
Comment=Race for the first place on various tracks. Pick up bonuses to boost your position or slow down competitors!
8+
Icon=com.agateau.PixelWheels
9+
Exec=pixelwheels
10+
Terminal=false
10.8 KB
Loading
1 KB
Loading
330 Bytes
Loading
1.32 KB
Loading

0 commit comments

Comments
 (0)