├── LICENSE ├── README.md ├── copyunityengine ├── copyunityengine.1 ├── debian ├── changelog ├── compat ├── control ├── copyright ├── docs ├── install ├── manpages ├── rules └── source │ └── format ├── links.txt ├── templates ├── ScreenSelector.png ├── UnityTOS.pdf ├── UnityTOS.rtf ├── compat ├── copyright.in ├── description ├── icon-alt.png ├── icon-alt.svg ├── icon.png ├── icon.svg ├── lintian-overrides ├── make-icons.sh ├── patchelf │ ├── COPYING │ ├── Makefile │ ├── README │ ├── patchelf.cpp │ └── patchelf.h ├── rules └── source │ └── format ├── u2appimage-example.sh ├── u2deb ├── u2deb.1 ├── u2mojo └── u2mojo.1 /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2017 djcj 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | 24 | 25 | templates/patchelf/*: 26 | Copyright (c) 2004-2016 Eelco Dolstra 27 | https://github.com/NixOS/patchelf 28 | 29 | This program is free software: you can redistribute it and/or modify 30 | it under the terms of the GNU General Public License as published by 31 | the Free Software Foundation, either version 3 of the License, or (at 32 | your option) any later version. 33 | 34 | This program is distributed in the hope that it will be useful, but 35 | WITHOUT ANY WARRANTY; without even the implied warranty of 36 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 37 | General Public License for more details. 38 | 39 | You should have received a copy of the GNU General Public License 40 | along with this program. If not, see . 41 | 42 | 43 | 44 | The files templates/icon.* were created by djcj from scratch using Inkscape. 45 | They show the Unity logo which is a trademark of Unity Technologies (http://unity3d.com). 46 | 47 | 48 | The files templates/icon-alt.*: 49 | exported from Haiku's Prefs_Joystick icon 50 | https://cgit.haiku-os.org/haiku/log/data/artwork/icons 51 | https://github.com/darealshinji/haiku-icons 52 | 53 | The MIT License (MIT) 54 | 55 | Copyright (c) 2007-2008 Haiku, Inc. 56 | 57 | Permission is hereby granted, free of charge, to any person obtaining a copy 58 | of this software and associated documentation files (the "Software"), to deal 59 | in the Software without restriction, including without limitation the rights 60 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 61 | copies of the Software, and to permit persons to whom the Software is 62 | furnished to do so, subject to the following conditions: 63 | 64 | The above copyright notice and this permission notice shall be included in all 65 | copies or substantial portions of the Software. 66 | 67 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 68 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 69 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 70 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 71 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 72 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 73 | SOFTWARE. 74 | 75 | 76 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | UnityEngine2deb 2 | =============== 3 | 4 | Create Debian packages of Unity Engine games 5 | 6 | **u2deb**: Package a Unity game in two steps. First run `u2deb prepare ` and follow the instructions. 7 | The game files will be copied into a temporary directory and Debian packaging files will be generated. 8 | You can manually edit those files. Then run `u2deb build` to create the package. To delete the temporary files 9 | run `u2deb clean`. You can get a full list of options and environment variables with `u2deb --help`. 10 | 11 | **copyunityengine**: This script will download and install GNU/Linux binaries of a Unity engine game and delete all previously 12 | installed binary files. Usage is `copyunityengine `. 13 | You can use this script to create native GNU/Linux versions of games that were released only for 14 | Windows and/or OSX (this _may_ not work with Unity 5 games). 15 | You can also create native 64 bit versions if a GNU/Linux build was originally released only as 32 bit version, or you can also use it to install the screenselector plugin if the original build came without it. 16 | 17 | **u2mojo**: This script helps you to create portable [MojoSetup](http://www.icculus.org/mojosetup/) 18 | installers for any GNU/Linux distribution. 19 | 20 | Minimum dependencies: `build-essential debhelper rename imagemagick aria2¹ p7zip-full¹ wget¹` 21 | 22 | Recommended dependencies: `execstack lintian libgtk2.0-0 libgtk2.0-0:i386 libglu1-mesa libglu1-mesa:i386` 23 | 24 | ¹ only required by copyunityengine 25 | 26 | **Examples:** 27 | 28 | You can use the builds from [here](https://github.com/darealshinji/simple-unity3d-example/releases) to test the scripts. 29 | 30 | Build 32 and 64 bit packages of a native game and store the platform independent 31 | files in a separate "-data" package: 32 | ``` 33 | ./u2deb prepare example-game-linux --data 34 | ./u2deb build 35 | ``` 36 | 37 | Build a 64 bit package from a 32 bit native game: 38 | ``` 39 | ./copyunityengine example-game-linux-x86 40 | ./u2deb prepare example-game-linux-x86 --no-x86 41 | ./u2deb build 42 | ``` 43 | 44 | Build packages from a Windows-only game: 45 | ``` 46 | ./copyunityengine example-game-win32 47 | rm -f example-game-win32/*.exe example-game-win32/*.pdb example-game-win32/*_Data/Mono/mono.dll 48 | ./u2deb prepare example-game-win32 49 | ./u2deb build 50 | ``` 51 | 52 | Build packages from an OS X .app bundle: 53 | ``` 54 | ./copyunityengine example-game.app 55 | ./u2deb prepare example-game-linux 56 | ./u2deb build 57 | ``` 58 | 59 | Build a MojoSetup installer and export variables: 60 | ``` 61 | echo "This is a simple Unity 3D test project." > /tmp/example-game-description 62 | echo "Homepage: http://www.unity3d.com/" >> /tmp/example-game-description 63 | 64 | export FULLNAME="Test project" 65 | export SHORTNAME=example-game 66 | export VENDOR="djcj" 67 | export VERSION=1.0 68 | ./u2mojo --readme=/tmp/example-game-description example-game 69 | ``` 70 | 71 | **Package this tool:** 72 | 73 | You can also build a Debian package from this tool. 74 | ``` 75 | sudo apt-get install debhelper git 76 | git clone https://github.com/darealshinji/UnityEngine2deb.git 77 | cd UnityEngine2deb 78 | dpkg-buildpackage -b -us -uc 79 | ``` 80 | -------------------------------------------------------------------------------- /copyunityengine: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Copyright (c) 2015-2017, djcj 6 | # 7 | # Permission is hereby granted, free of charge, to any person obtaining a copy 8 | # of this software and associated documentation files (the "Software"), to deal 9 | # in the Software without restriction, including without limitation the rights 10 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | # copies of the Software, and to permit persons to whom the Software is 12 | # furnished to do so, subject to the following conditions: 13 | # 14 | # The above copyright notice and this permission notice shall be included in 15 | # all copies or substantial portions of the Software. 16 | # 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | # THE SOFTWARE. 24 | 25 | LANG=C 26 | LANGUAGE=C 27 | LC_ALL=C 28 | 29 | appversion="17.10.08.1" 30 | 31 | appname=$(basename "$0") 32 | engines="$HOME/.local/share/UnityEngine2deb/Engines" 33 | links_url="https://raw.githubusercontent.com/darealshinji/UnityEngine2deb/master/links.txt" 34 | 35 | errorExit() { 36 | echo "error: $1" 37 | exit 1 38 | } 39 | 40 | help() { 41 | cat << EOF 42 | 43 | Install Linux binaries into a Unity engine game and delete all previously 44 | installed binary files. 45 | You can use this script to create native Linux versions of games that were 46 | released only for Windows and/or OSX, or to create native 64 bit versions if 47 | a Linux build was originally released only as 32 bit version. You can also 48 | use it to install the screenselector plugin if the original build came without 49 | it. 50 | Some Unity 5 games may not work correctly afterwards. 51 | 52 | Usage: 53 | $appname [--no-sdk|--force-sdk] [-y|--yes] 54 | $appname -p|--print 55 | $appname -d|--download [--no-sdk|--force-sdk] [-y|--yes] 56 | $appname --package 57 | $appname -h|--help 58 | 59 | Options: 60 | --no-sdk don't download the SDK if a mirrored engine package 61 | is not available 62 | --force-sdk download the SDK even if a mirrored engine package is 63 | available 64 | -p, --print print used engine version and exit 65 | -d, --download download the engine package specified by its version 66 | and exit. Download location is: 67 | \`$engines' 68 | --package create an engine package from a specified SDK file 69 | -y, --yes always assume "yes" on questions (use with care!) 70 | 71 | -h, --help print this message 72 | -V, --version display version info and quit 73 | 74 | engine version, separated by points; pattern is x.x.x; 75 | example: 4.3.1 (don't use something like 4.3.1f3) 76 | 77 | Windows installer that contains the Linux binaries. 78 | From version 5.3.0 on they're in a separate "Linux- 79 | Support-for-Editor" setup file which can be 80 | downloaded with the Unity Download Assistent (Unity 81 | Installer). 82 | 83 | EOF 84 | exit 0 85 | } 86 | 87 | extractSDKfiles() { 88 | exe="$1" 89 | version="$2" 90 | txz="$3" 91 | 92 | echo "" 93 | echo "-- extract SDK files" 94 | files=`mktemp -d /tmp/unityengine-XXXXXXXXXX` 95 | 7z x $exe -o$files 96 | 97 | set +e 98 | # The directory names have non-ASCII characters that make it impossible 99 | # to work with the shell. We're renaming them to their inode numbers 100 | # and then we're moving the Linux-related directories into the top directory. 101 | inodes="$(ls -1i "$files" | awk '{print $1}' | tr '\n' ' ')" 102 | for n in $inodes; do 103 | find $files -inum $n -exec mv -v '{}' $files/$n 2>/dev/null \; 104 | done 105 | find $files -type d -name linux*_withgfx_*development* -exec mv '{}' "$files" 2>/dev/null \; 106 | find $files -type d -name linux*_headless_*development* -exec mv '{}' "$files" 2>/dev/null \; 107 | find $files -type d -name linux*headlessstandaloneplayer -exec mv '{}' "$files" 2>/dev/null \; 108 | find $files -type d -name linux*developmentstandaloneplayer -exec mv '{}' "$files" 2>/dev/null \; 109 | set -e 110 | 111 | echo "" 112 | echo "-- move engine binaries" 113 | mkdir -vp $files/$version/Mono/x86 114 | mkdir -vp $files/$version/Mono/x86_64 115 | mkdir -vp $files/$version/Plugins/x86 116 | mkdir -vp $files/$version/Plugins/x86_64 117 | 118 | if [ -d $files/linux32headlessstandaloneplayer ]; then 119 | mv -v $files/linuxdevelopmentstandaloneplayer/LinuxPlayer $files/$version/x86 120 | mv -v $files/linux64developmentstandaloneplayer/LinuxPlayer $files/$version/x86_64 121 | mv -v $files/linux32headlessstandaloneplayer/Data/Mono/libmono.so $files/$version/Mono/x86 122 | mv -v $files/linux64developmentstandaloneplayer/Data/Mono/libmono.so $files/$version/Mono/x86_64 123 | if [ -d $files/linuxdevelopmentstandaloneplayer/Data/Plugins/x86 ]; then 124 | mv -v $files/linuxdevelopmentstandaloneplayer/Data/Plugins/x86/ScreenSelector.so $files/$version/Plugins/x86 125 | mv -v $files/linux64developmentstandaloneplayer/Data/Plugins/x86_64/ScreenSelector.so $files/$version/Plugins/x86_64 126 | elif [ -f $files/linuxdevelopmentstandaloneplayer/Data/Plugins/ScreenSelector.so ]; then 127 | mv -v $files/linuxdevelopmentstandaloneplayer/Data/Plugins/ScreenSelector.so $files/$version/Plugins/x86 128 | mv -v $files/linux64developmentstandaloneplayer/Data/Plugins/ScreenSelector.so $files/$version/Plugins/x86_64 129 | else 130 | rm -r $files/$version/Plugins 131 | fi 132 | elif [ -f $files/linuxdevelopmentstandaloneplayer/Data/Mono/libmono.so ]; then 133 | mv -v $files/linuxdevelopmentstandaloneplayer/LinuxPlayer $files/$version/x86 134 | mv -v $files/linux64developmentstandaloneplayer/LinuxPlayer $files/$version/x86_64 135 | mv -v $files/linuxdevelopmentstandaloneplayer/Data/Mono/libmono.so $files/$version/Mono/x86 136 | mv -v $files/linux64developmentstandaloneplayer/Data/Mono/libmono.so $files/$version/Mono/x86_64 137 | rm -r $files/$version/Plugins 138 | else 139 | mv -v $files/linux32_withgfx_nondevelopment*/LinuxPlayer $files/$version/x86 140 | mv -v $files/linux64_withgfx_nondevelopment*/LinuxPlayer $files/$version/x86_64 141 | mv -v $files/linux32_withgfx_development*/Data/Plugins/x86/ScreenSelector.so $files/$version/Plugins/x86 142 | mv -v $files/linux64_withgfx_development*/Data/Plugins/x86_64/ScreenSelector.so $files/$version/Plugins/x86_64 143 | mv -v $files/linux32_headless_development*/Data/Mono/x86/libmono.so $files/$version/Mono/x86 144 | mv -v $files/linux64_headless_development*/Data/Mono/x86_64/libmono.so $files/$version/Mono/x86_64 145 | fi 146 | 147 | echo "" 148 | echo "-- strip engine binaries" 149 | strip -v $files/$version/x86* $files/$version/Mono/x86*/* 150 | [ ! -d $files/$version/Plugins ] || strip -v $files/$version/Plugins/x86*/* 151 | 152 | echo "" 153 | echo "-- create archive" 154 | cd $files && tar cvfJ "$txz" $version 155 | cd /tmp 156 | rm -rf $files 157 | 158 | checksum="$(md5sum "$txz" | awk '{print $1}')" 159 | echo "" 160 | echo "-- archive saved at \`$txz'" 161 | echo "-- md5 checksum: $checksum" 162 | } 163 | 164 | checkUnityVersionString() { 165 | version="$1" 166 | length=$(($(printf "$version" | wc -m))) 167 | msg="Incorrect version string!" 168 | case $(echo "$version" | cut -d. -f1) in 169 | 4|5) 170 | if [ $length -lt 5 ]; then 171 | errorExit "$msg (too short)" 172 | fi 173 | if [ $length -gt 5 ]; then 174 | errorExit "$msg (too long)" 175 | fi 176 | ;; 177 | *) 178 | errorExit "$msg" 179 | ;; 180 | esac 181 | } 182 | 183 | downloadUnityEngine() { 184 | version="$1" 185 | sdk="$2" 186 | forcesdk="$3" 187 | exe=`mktemp -u /tmp/UnitySetup-XXXXXXXXXX --suffix=.exe` 188 | txz="$engines/$version.tar.xz" 189 | 190 | bin="$(whereis -b aria2c | awk '{print $2}')" 191 | have_aria2c="no" 192 | [ "x$bin" == "x" ] || have_aria2c="yes" 193 | if [ "$have_aria2c" = "yes" ]; then 194 | # The SDKs are huge, usually over 1G. If available, use aria2c to 195 | # download the SDK because of its ability to pre-allocate space (avoids fragmentation). 196 | download="aria2c --file-allocation=prealloc -d / -o" 197 | else 198 | download="wget -O" 199 | fi 200 | 201 | decimal_ver="$(echo $version | tr -d .)" 202 | major=$(echo "$version" | cut -d. -f1) 203 | checkUnityVersionString $version 204 | 205 | mkdir -p "$engines" 206 | if [ -f "$txz" ] && [ "$forcesdk" = "no" ]; then 207 | echo "\`$version.tar.xz' already in cache." 208 | echo "No need to download anything." 209 | exit 0 210 | fi 211 | 212 | ### download pre-packaged engine binaries 213 | if [ -f "$engines/links.txt" ]; then 214 | mv -f "$engines/links.txt" "$engines/links.txt.old" 215 | fi 216 | # each line in links.txt has 3 or 4 fields with the following data 217 | # separated by spaces: [] 218 | wget -O "$engines/links.txt" "$links_url" 219 | 220 | regex="$(echo $version | sed 's|\.|\\.|g')" 221 | dldata="$(grep "$regex" "$engines/links.txt" || true)" 222 | 223 | if [ x"$dldata" = x"" ] || [ "$forcesdk" = "yes" ]; then 224 | if [ "$sdk" = "no" ]; then 225 | echo "Requested engine version is not among the mirror list and SDK download is disabled." 226 | echo "Run again without \`--no-sdk'" 227 | exit 1 228 | fi 229 | 230 | ### download the Unity SDK 231 | 232 | bin="$(whereis -b 7z | awk '{print $2}')" 233 | if [ "x$bin" = "x" ]; then 234 | errorExit "you need 7zip to extract files from the Unity SDK setup package (\`sudo apt-get install p7zip-full')." 235 | fi 236 | 237 | # inform about bandwidth and disk space for Unity < v5.3.0 238 | if [ $decimal_ver -lt 530 ] && [ "$assume_yes" = "no" ]; then 239 | echo "" 240 | echo "You're about to download a Unity3D SDK. Its file size may exceed 1G and" 241 | echo "you might need up to 7.5G of additional free disk space to extract the" 242 | read -r -p "downloaded file. Do you really want to continue? [Y/n] " response 243 | case $response in 244 | [Nn]*) 245 | exit 0 246 | ;; 247 | *) 248 | ;; 249 | esac 250 | fi 251 | 252 | echo "" 253 | if [ $decimal_ver -ge 530 ]; then 254 | echo "-- download Unity $version Linux files" 255 | else 256 | echo "-- download Unity $version SDK" 257 | fi 258 | rm -f $exe 259 | if [ $decimal_ver -ge 530 ]; then 260 | url=$(wget -q -O - "https://unity3d.com/get-unity/download/archive" | \ 261 | grep -o "http:\/\/.*\.unity3d\.com.*UnitySetup64-$version.*\.exe" | \ 262 | sed 's|Windows64EditorInstaller\/UnitySetup64|TargetSupportInstaller/UnitySetup-Linux-Support-for-Editor|') 263 | elif [ $major = 5 ] && [ $decimal_ver -lt 530 ]; then 264 | url="$(wget -q -O - "https://unity3d.com/get-unity/download/archive" | \ 265 | grep -o "http:\/\/.*\.unity3d\.com.*UnitySetup64-$version.*\.exe")" 266 | elif [ $major = 4 ]; then 267 | url="http://download.unity3d.com/download_unity/UnitySetup-$version.exe" 268 | wget -q --spider $url || url="" 269 | fi 270 | if [ -z $url ]; then 271 | errorExit "Requested version is not available on the web server!" 272 | fi 273 | 274 | $download $exe $url 275 | 276 | extractSDKfiles $exe $version $txz 277 | rm -f $exe 278 | exit 0 279 | fi 280 | 281 | ### continue downloading pre-packaged engine binaries 282 | md5_1=$(echo "$dldata" | awk '{print $2}') 283 | url=$(echo "$dldata" | awk '{print $3}') 284 | #mirror=$(echo "$dldata" | awk '{print $4}') # currently unused 285 | 286 | echo "" 287 | echo "-- download Unity $version engine files" 288 | wget -O "$txz" $url 289 | md5_2=$(md5sum "$txz" | awk '{print $1}') 290 | if [ "$md5_1" = "$md5_2" ]; then 291 | echo "Checksum ok!" 292 | else 293 | echo "" 294 | echo "Checksum mismatch!" 295 | echo "Deleting \`$txz'" 296 | rm -f "$txz" 297 | exit 1 298 | fi 299 | } 300 | 301 | 302 | case x"$1" in 303 | x|x--help|x-help|x-h|x-\?) 304 | help;; 305 | x-V|x-v|x--version|x-version) 306 | echo $appversion; exit 0;; 307 | esac 308 | 309 | keep="no" 310 | printonly="no" 311 | sdk="yes" 312 | forcesdk="no" 313 | dlonly="no" 314 | no_sdk_opt_set="no" 315 | force_sdk_opt_set="no" 316 | createpackage="no" 317 | assume_yes="no" 318 | for opt; do 319 | optarg="${opt#*=}" 320 | case "$opt" in 321 | "--no-sdk") 322 | sdk="no" 323 | forcesdk="no" 324 | no_sdk_opt_set="yes" 325 | ;; 326 | "--force-sdk") 327 | sdk="yes" 328 | forcesdk="yes" 329 | force_sdk_opt_set="yes" 330 | ;; 331 | "--download"|"-d") 332 | dlonly="yes" 333 | ;; 334 | "--print"|"-p") 335 | printonly="yes" 336 | ;; 337 | "--package") 338 | createpackage="yes" 339 | ;; 340 | "--yes"|"-y") 341 | assume_yes="yes" 342 | ;; 343 | "--help"|"-h"|"--version"|"-V") 344 | ;; 345 | *) 346 | origpath="$optarg" 347 | ;; 348 | esac 349 | done 350 | 351 | if [ "$createpackage" = "yes" ]; then 352 | version="$2" 353 | exe="$3" 354 | if [ $# -gt 3 ]; then 355 | errorExit "too many arguments for \`--package'; usage is: $appname --package " 356 | fi 357 | if [ $# -lt 3 ]; then 358 | errorExit "missing arguments for \`--package'; usage is: $appname --package " 359 | fi 360 | checkUnityVersionString $version 361 | if [ -e "$PWD/$version.tar.xz" ]; then 362 | errorExit "\`$PWD/$version.tar.xz' already exists" 363 | fi 364 | if [ ! -e "$exe" ]; then 365 | errorExit "\`$exe' doesn't exist" 366 | elif [ -d "$exe" ]; then 367 | errorExit "\`$exe' is a directory" 368 | fi 369 | extractSDKfiles $exe $version "$PWD/$version.tar.xz" 370 | exit 0 371 | fi 372 | 373 | if [ "$no_sdk_opt_set" = "yes" ] && [ "$force_sdk_opt_set" = "yes" ]; then 374 | errorExit "you cannot use \`--no-sdk' and \`--force-sdk' together" 375 | fi 376 | 377 | if [ "$dlonly" = "yes" ]; then 378 | version="$origpath" 379 | if [ -z "$version" ]; then 380 | errorExit "no version string specified" 381 | fi 382 | downloadUnityEngine $version $sdk $forcesdk 383 | exit 0 384 | fi 385 | 386 | if [ -z "$origpath" ]; then 387 | errorExit "no path specified" 388 | elif [ ! -e "$origpath" ]; then 389 | errorExit "path to '$origpath' doesn't exist" 390 | elif [ ! -d "$origpath" ]; then 391 | errorExit "'$origpath' is not a directory" 392 | fi 393 | 394 | # OSX .app bundle 395 | have_icns="no" 396 | osxAppBundle="no" 397 | osxdir="$origpath/Contents" 398 | if [ -d "$osxdir/Data" -a \ 399 | -d "$osxdir/MacOS" -a \ 400 | -d "$osxdir/Resources" -a \ 401 | -f "$osxdir/Info.plist" ] 402 | then 403 | osxAppBundle="yes" 404 | if [ "$printonly" = "no" ]; then 405 | game="$(grep -A1 -e 'CFBundleName' "$osxdir/Info.plist" | tail -n1 | sed 's|.*||; s|<\/string>.*||')" 406 | linuxdir="$(dirname "$origpath")/${game}-Linux" 407 | echo "" 408 | echo "OSX .app bundle detected!" 409 | echo "The game's directory layout needs to be restructured for Linux compatibility." 410 | if [ "$assume_yes" = "no" ]; then 411 | read -r -p "Should I copy all files to \`$linuxdir'? [Y/n] " response 412 | case $response in 413 | [Nn]*) echo "Aborted."; exit 0 ;; 414 | *) ;; 415 | esac 416 | fi 417 | echo "" 418 | mkdir -p "$linuxdir" 419 | cp -rv "$osxdir/Data" "$linuxdir/${game}_Data" 420 | test ! -d "$osxdir/Resources/Data" || cp -rv "$osxdir/Resources/Data"/* "$linuxdir/${game}_Data" 421 | mkdir -p "$linuxdir/${game}_Data/Resources" "$linuxdir/${game}_Data/Mono" "$linuxdir/${game}_Data/Plugins" 422 | cp -v "$osxdir/Resources/unity default resources" "$linuxdir/${game}_Data/Resources" 423 | # Why are Linux plugins sometimes bundled? Not that I complain about it... 424 | test ! -d "$osxdir/Plugins/x86" || cp -rv "$osxdir/Plugins/x86" "$linuxdir/${game}_Data/Plugins" 425 | test ! -d "$osxdir/Plugins/x86_64" || cp -rv "$osxdir/Plugins/x86_64" "$linuxdir/${game}_Data/Plugins" 426 | test ! -f "$osxdir/Resources/ScreenSelector.png" || cp -v "$osxdir/Resources/ScreenSelector.png" "$linuxdir/${game}_Data" 427 | icns="$osxdir/Resources/UnityPlayer.icns" 428 | test ! -f "$icns" || have_icns="yes" 429 | origpath="$linuxdir" 430 | fi 431 | fi 432 | 433 | if [ "$osxAppBundle" = "yes" ] && [ "$printonly" = "yes" ]; then 434 | versionFileA="$osxdir/Resources/Data/globalgamemanagers" 435 | versionFileB="$osxdir/Data/mainData" 436 | else 437 | datadir="$(find "$origpath" -type d -name \*_Data | head -n1)" 438 | game="$(basename "$datadir" | sed 's/_Data$//')" 439 | versionFileA="$datadir/globalgamemanagers" 440 | versionFileB="$datadir/mainData" 441 | fi 442 | if [ -f "$versionFileA" ]; then 443 | versionFile="$versionFileA" 444 | elif [ -f "$versionFileB" ]; then 445 | versionFile="$versionFileB" 446 | else 447 | errorExit "cannot find \`mainData' or \`globalgamemanagers'" 448 | fi 449 | version="$(head -c 30 "$versionFile" | strings | head -c5)" 450 | txz="$engines/$version.tar.xz" 451 | 452 | if [ "$printonly" = "yes" ]; then 453 | echo "Used Unity engine: version $version" 454 | exit 0 455 | fi 456 | 457 | if [ ! -f "$txz" ]; then 458 | downloadUnityEngine $version $sdk $forcesdk 459 | fi 460 | 461 | delete_bins="yes" 462 | if [ "$assume_yes" = "no" ]; then 463 | read -r -p "Do you want to delete the old binary files from the game directory? [Y/n] " response 464 | case $response in 465 | [Nn]*) echo "Keeping files."; delete_bins="no" ;; 466 | *) ;; 467 | esac 468 | fi 469 | cd "$origpath" 470 | if [ "$delete_bins" = "yes" ]; then 471 | rm -rvf *.pdb "${game}" "${game}."* "${game}_Data/Mono/mono.dll" "${game}_Data/Mono/x86"* "${game}_Data/Plugins"/*.dll 472 | fi 473 | 474 | tar xvf "$txz" 475 | if [ -d $version/Plugins ]; then 476 | mkdir -p "${game}_Data/Plugins/x86" "${game}_Data/Plugins/x86_64" 477 | mv -f $version/Plugins/x86/* "${game}_Data/Plugins/x86" 478 | mv -f $version/Plugins/x86_64/* "${game}_Data/Plugins/x86_64" 479 | fi 480 | mv $version/Mono/* "${game}_Data/Mono" 481 | mv $version/x86 "${game}.x86" 482 | mv $version/x86_64 "${game}.x86_64" 483 | chmod a+x "${game}.x86" "${game}.x86_64" 484 | rm -rf $version 485 | 486 | if [ "$osxAppBundle" = "yes" ]; then 487 | echo "" 488 | echo "files saved to \`$linuxdir'" 489 | fi 490 | if [ "$have_icns" = "yes" ]; then 491 | echo "" 492 | echo "Hint: use \`icns2png' (sudo apt-get install icnsutils) to convert the OSX icon to png:" 493 | echo "$icns" 494 | fi 495 | 496 | -------------------------------------------------------------------------------- /copyunityengine.1: -------------------------------------------------------------------------------- 1 | .TH COPYUNITYENGINE 1 "" "" 2 | .SH NAME 3 | copyunityengine \- install Linux binaries into a Unity engine game 4 | 5 | .SH SYNOPSIS 6 | .B copyunityengine \fR[\fB\-\-no\-sdk\fR|\fB\-\-force\-sdk\fR] [\fB\-y\fR|\fB\-\-yes\fR] 7 | .br 8 | .B copyunityengine \-p\fR|\fB\-\-print \fR 9 | .br 10 | .B copyunityengine \-d\fR|\fB\-\-download \fR[\fB\-\-no\-sdk\fR|\fB\-\-force\-sdk\fR] [\fB\-y\fR|\fB\-\-yes\fR] 11 | .br 12 | .B copyunityengine \-\-package \fR 13 | .br 14 | .B copyunityengine \-h\fR|\fB\-\-help 15 | 16 | .SH DESCRIPTION 17 | Install Linux binaries into a Unity engine game and delete all previously installed binary files. 18 | You can use this script to create native Linux versions of games that were released only for Windows and/or OSX, 19 | or to create native 64 bit versions if a Linux build was originally released only as 32 bit version. 20 | You can also use it to install the screenselector plugin if the original build came without it. 21 | 22 | .SH OPTIONS 23 | .TP 24 | \fB\-\-no\-sdk 25 | don't download the SDK if a mirrored engine package is not available 26 | .TP 27 | \fB\-\-force\-sdk 28 | download the SDK even if a mirrored engine package is available 29 | .TP 30 | \fB\-p, \-\-print 31 | print used engine version and exit 32 | .TP 33 | \fB\-d, \-\-download 34 | download the engine package specified by its version and exit. 35 | Download location is 36 | .I ~/.local/share/UnityEngine2deb/Engines 37 | .TP 38 | \fB\-\-package 39 | create an engine package from a specified SDK file 40 | .TP 41 | \fB\-y, \-\-yes 42 | always assume "yes" on questions (use with care!) 43 | .TP 44 | \fB 45 | engine version, separated by points; pattern is x.x.x; 46 | example: 4.3.1 (don't use something like 4.3.1f3) 47 | .TP 48 | \fB 49 | Windows installer that contains the Linux binaries; 50 | on newer versions they're in a separate "Linux-Support-for-Editor" setup file 51 | .TP 52 | \fB\-h, \-\-help 53 | show help text and quit 54 | 55 | 56 | .SH SEE ALSO 57 | .I https://github.com/darealshinji/UnityEngine2deb 58 | .PP 59 | .BR u2deb (1), 60 | .BR u2mojo (1) 61 | 62 | .SH AUTHOR 63 | djcj 64 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | u2deb (16.04.29.1~trusty) trusty; urgency=low 2 | 3 | * copyunityengine: support OSX .app bundles as input directories 4 | 5 | -- Marshall Banana Fri, 13 May 2016 07:22:15 +0200 6 | 7 | u2deb (16.02.24.1~trusty) trusty; urgency=low 8 | 9 | * copyunityengine: 10 | * parse commands in a getopt()-like way 11 | * new option to create a tarball from a specified exe file 12 | * print md5 checksum after creating an archive 13 | * u2deb: 14 | * clarify that the UNITY-SOFTWARE-LICENSE-AGREEMENT applies to games 15 | * update PatchELF 16 | * u2mojo: 17 | * fix download of MojoSetup binaries and add MD5 check 18 | 19 | -- Marshall Banana Thu, 31 Mar 2016 16:45:53 +0200 20 | 21 | u2deb (16.01.14.1~trusty) trusty; urgency=low 22 | 23 | * copyunityengine: 24 | * get version number from Unity 5 games 25 | * u2deb: 26 | * convert ScreenSelector.bmp to .png 27 | * delete ScreenSelector.bmp 28 | * automatic fix of DOS line endings in descriptions 29 | 30 | -- Marshall Banana Thu, 14 Jan 2016 13:44:44 +0100 31 | 32 | u2deb (15.12.08.1~trusty) trusty; urgency=low 33 | 34 | * copyunityengine: 35 | * show confirmation dialog before downloading huge files 36 | * inform when the checksum is okay 37 | * enable automatic download for Unity >= 5.3 (files will be downloaded 38 | with Aria2c via BitTorrent) 39 | * New scripts: 40 | * u2mojo: create Mojo Setup packages of Unity engine games 41 | 42 | -- Marshall Banana Tue, 08 Dec 2015 23:10:12 +0100 43 | 44 | u2deb (15.09.09.1~trusty) trusty; urgency=low 45 | 46 | * copyunityengine: fix checking for aria2c 47 | 48 | -- Marshall Banana Wed, 09 Sep 2015 07:31:52 +0200 49 | 50 | u2deb (15.08.15.1~trusty) trusty; urgency=low 51 | 52 | * copyunityengine: small modification to enable downloads from Google Drive 53 | 54 | -- Marshall Banana Sat, 15 Aug 2015 04:44:55 +0200 55 | 56 | u2deb (15.08.11.1~trusty) trusty; urgency=low 57 | 58 | * copyunityengine: fix copying plugins 59 | 60 | -- Marshall Banana Tue, 11 Aug 2015 22:44:10 +0200 61 | 62 | u2deb (15.07.30.2~trusty) trusty; urgency=low 63 | 64 | * copyunityengine: fix downloading engine packages 65 | 66 | -- Marshall Banana Thu, 30 Jul 2015 15:31:00 +0200 67 | 68 | u2deb (15.07.30.1~trusty) trusty; urgency=low 69 | 70 | * New scripts: 71 | * copyunityengine: download and install Linux binaries of a specific 72 | engine version 73 | * Create random build directory 74 | * Don't fail package building if there's a 64 bit binary but no 32 bit one 75 | * Ship with a copy of PatchELF so we don't have to rely on it as a 76 | third-party dependency 77 | * Install files into /usr/lib/games 78 | 79 | -- Marshall Banana Thu, 30 Jul 2015 13:37:34 +0200 80 | 81 | u2deb (15.03.26.1~trusty) trusty; urgency=low 82 | 83 | * Copy only game_Data and game.x86* 84 | * Delete any *.dll.mdb file 85 | 86 | -- Marshall Banana Thu, 26 Mar 2015 17:31:33 +0100 87 | 88 | u2deb (15.03.16.1~trusty) trusty; urgency=low 89 | 90 | * Add missing ScreenSelector.png icon if required 91 | * New default icon (vectorized Unity logo) 92 | 93 | -- Marshall Banana Mon, 16 Mar 2015 17:47:34 +0100 94 | 95 | u2deb (15.03.13.1~trusty) trusty; urgency=low 96 | 97 | * Removing unused DT_NEEDED entries from ELF file headers can now be turned 98 | off with --no-patchelf 99 | * i386 packages created on amd64 architectures do no longer have a double 100 | libc6 dependency entry in their control file 101 | 102 | -- Marshall Banana Fri, 13 Mar 2015 13:07:37 +0100 103 | 104 | u2deb (15.03.12.1~trusty) trusty; urgency=low 105 | 106 | * Enable -V and -h commands even if templates weren't found 107 | * Run execstack only if the command is available 108 | * Implement --no-x86 and --no-x86_64 commands to disable the build of 109 | i386 or amd64 packages 110 | * With --working-dir= the temporary files can now be stored in 111 | a different location 112 | 113 | -- Marshall Banana Thu, 12 Mar 2015 20:20:45 +0100 114 | 115 | u2deb (15.02.04.1~trusty) trusty; urgency=low 116 | 117 | * Delete .DS_Store and Thumbs.db files 118 | * Delete __MACOSX directories 119 | * Use PatchELFmod only 120 | * Add UPSTREAMNAME and FILENAME to environment variables 121 | * Move the following actions from debian/rules to the shell script: 122 | * remove executable bits 123 | * remove executable stack 124 | * delete unnecessary files 125 | * Remove Lintian overrides 126 | 127 | -- Marshall Banana Wed, 04 Feb 2015 16:00:34 +0100 128 | 129 | u2deb (15.01.29.1~trusty) trusty; urgency=low 130 | 131 | * Automatically delete UnityEngine debug data 132 | * Find and delete Steam API plugins 133 | 134 | -- Marshall Banana Thu, 29 Jan 2015 18:49:47 +0100 135 | 136 | u2deb (15.01.27.3~trusty) trusty; urgency=low 137 | 138 | * Don't build arch-independend *-data packages twice 139 | 140 | -- Marshall Banana Tue, 27 Jan 2015 17:30:40 +0100 141 | 142 | u2deb (15.01.27.2~trusty) trusty; urgency=low 143 | 144 | * Implement --output/-o command line options 145 | * Override Lintian warnings about ScreenSelector.png in inside /usr/lib 146 | * Add Lintian to dependencies 147 | * Make Debian packages depend on libpulse0 148 | 149 | -- Marshall Banana Tue, 27 Jan 2015 11:23:45 +0100 150 | 151 | u2deb (15.01.27.1~trusty) trusty; urgency=low 152 | 153 | * New version 154 | * Implement a non-interactive way to enter packaging information 155 | via the shell's export function 156 | * Fix templates/rules to not fail if the game has no plugin directory 157 | 158 | -- Marshall Banana Tue, 27 Jan 2015 08:26:59 +0100 159 | 160 | u2deb (15.01.07.1~trusty) trusty; urgency=low 161 | 162 | * New version 163 | 164 | -- Marshall Banana Sat, 10 Jan 2015 12:15:08 +0100 165 | 166 | u2deb (14.12.29.1~trusty1) trusty; urgency=low 167 | 168 | * New version 169 | 170 | -- Marshall Banana Sat, 03 Jan 2015 05:31:12 +0100 171 | 172 | u2deb (14.10.09.1~trusty2) trusty; urgency=low 173 | 174 | * Override Lintian warnings 175 | 176 | -- Marshall Banana Tue, 11 Nov 2014 13:56:28 +0100 177 | 178 | u2deb (14.10.09.1~trusty1) trusty; urgency=low 179 | 180 | * New version 181 | 182 | -- Marshall Banana Thu, 09 Oct 2014 00:27:55 +0200 183 | 184 | u2deb (14.09.14.1~trusty2) trusty; urgency=low 185 | 186 | * Upload to PPA 187 | 188 | -- Marshall Banana Sun, 14 Sep 2014 20:01:35 +0200 189 | 190 | u2deb (14.09.07.1~1) unstable; urgency=low 191 | 192 | * Initial release 193 | 194 | -- Marshall Banana Sun, 07 Sep 2014 13:09:49 +0200 195 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: u2deb 2 | Section: devel 3 | Priority: optional 4 | Maintainer: Marshall Banana 5 | Build-Depends: debhelper (>= 9) 6 | Standards-Version: 3.9.6 7 | Homepage: https://github.com/darealshinji/UnityEngine2deb 8 | Vcs-Git: https://github.com/darealshinji/UnityEngine2deb.git 9 | Vcs-Browser: https://github.com/darealshinji/UnityEngine2deb 10 | 11 | Package: u2deb 12 | Architecture: any 13 | Depends: ${misc:Depends}, 14 | debhelper (>= 9), 15 | make | build-essential | dpkg-dev, 16 | aria2, 17 | imagemagick, 18 | p7zip-full, 19 | wget 20 | Recommends: execstack, 21 | libglu1-mesa [amd64 i386], 22 | libglu1-mesa:i386 [amd64], 23 | libgtk2.0-0 [amd64 i386], 24 | libgtk2.0-0:i386 [amd64], 25 | lintian 26 | Suggests: icnsutils 27 | Description: create Debian packages of Unity Engine games 28 | Games that were built on the Unity engine became quite popular these days. 29 | Those games can be built to run natively on GNU/Linux systems. 30 | . 31 | This Bash script helps you to almost automatically create proper 32 | Debian packages of such games. 33 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: UnityEngine2deb 3 | Upstream-Contact: djcj 4 | Source: https://github.com/darealshinji/UnityEngine2deb 5 | 6 | Files: * 7 | Copyright: 2014-2016 djcj 8 | License: MIT 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights to 12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 13 | of the Software, and to permit persons to whom the Software is furnished to do 14 | so, subject to the following conditions: 15 | . 16 | The above copyright notice and this permission notice shall be included in all 17 | copies or substantial portions of the Software. 18 | . 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25 | SOFTWARE. 26 | 27 | Files: templates/patchelf/* 28 | Copyright: 2004-2016 Eelco Dolstra 29 | License: GPL-3+ 30 | This program is free software: you can redistribute it and/or modify 31 | it under the terms of the GNU General Public License as published by 32 | the Free Software Foundation, either version 3 of the License, or (at 33 | your option) any later version. 34 | . 35 | This program is distributed in the hope that it will be useful, but 36 | WITHOUT ANY WARRANTY; without even the implied warranty of 37 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 38 | General Public License for more details. 39 | . 40 | You should have received a copy of the GNU General Public License 41 | along with this program. If not, see . 42 | . 43 | On Debian systems, the complete text of the GNU General 44 | Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". 45 | 46 | Files: templates/icon-alt.* 47 | Copyright: none 48 | License: public-domain 49 | The icons in this repository are herefore released into the Public Domain. 50 | Comment: http://tango-project.org 51 | 52 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /debian/install: -------------------------------------------------------------------------------- 1 | copyunityengine /usr/bin 2 | u2deb /usr/bin 3 | u2mojo /usr/bin 4 | templates/* /usr/share/u2deb 5 | -------------------------------------------------------------------------------- /debian/manpages: -------------------------------------------------------------------------------- 1 | copyunityengine.1 2 | u2deb.1 3 | u2mojo.1 4 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | %: 4 | dh ${@} 5 | 6 | override_dh_install: 7 | dh_install -XCOPYING 8 | 9 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /links.txt: -------------------------------------------------------------------------------- 1 | 5.6.0 53e094f14f7cbb0e4ad0b34b38888938 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykeEEzc2J5R3dLejA https://dropbox.com/s/6mitkx8bti6t6r9/5.6.0.tar.xz 2 | 5.5.3 1914fd3b3054fbdcbb2b6cd4ba194b04 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykOS1BMnpIYVJoMXc https://dropbox.com/s/qzifk5rzpvrvmaa/5.5.3.tar.xz 3 | 5.5.2 6685b61a91caded57b017bb6257e491b https://drive.google.com/uc?export=download&id=0BxClEVSW8QykV2sydDJDX1NDdzQ https://dropbox.com/s/ja79nhtt2hpkmsl/5.5.2.tar.xz 4 | 5.5.1 3a40b3a0a278531d38a272171eef71dd https://drive.google.com/uc?export=download&id=0BxClEVSW8QykZ0JmMk9MaDlKZXM https://dropbox.com/s/v38htzqnzxx59fz/5.5.1.tar.xz 5 | 5.5.0 bd7a8406b26e623e7feb8e108a614b36 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykbzFzd3FRNWczZnM https://dropbox.com/s/5v95sa79ku2gqqg/5.5.0.tar.xz 6 | 5.4.5 2f40dea65fa1e72707ec8adb44228e7e https://drive.google.com/uc?export=download&id=0BxClEVSW8QykSTlDa1F1RjRYaU0 https://dropbox.com/s/zb0zc24n4fkly7k/5.4.5.tar.xz 7 | 5.4.4 dd650adc07e446454a6284f374f382b3 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykSHNQTEE4anRFSms https://dropbox.com/s/9k5xngxcvwg4nad/5.4.4.tar.xz 8 | 5.4.3 1bf8f43f3a669bf6626040d13c75c64a https://drive.google.com/uc?export=download&id=0BxClEVSW8QykUm91b2RlZUJaQ1E https://dropbox.com/s/p5rty0n0akcrvax/5.4.3.tar.xz 9 | 5.4.2 b29d26530f94a35bdb469e303abb2e3d https://drive.google.com/uc?export=download&id=0BxClEVSW8QykNUdZUC15ZW5yUm8 https://dropbox.com/s/s7sb565g2hizvuv/5.4.2.tar.xz 10 | 5.4.1 893be9a43a306e148acb620b218e2abc https://drive.google.com/uc?export=download&id=0BxClEVSW8QykZFRvYzZQM1dSR1E https://dropbox.com/s/e5z8wmteghz21tf/5.4.1.tar.xz 11 | 5.4.0 b451ecf89f7c98036213f34d1f1e0085 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykOGR2QUNuckVjeEk https://dropbox.com/s/n4zw3nvp0r9cl60/5.4.0.tar.xz 12 | 5.3.8 3adf3b87048c8a5b4203182444f2474a https://drive.google.com/uc?export=download&id=0BxClEVSW8QykVWQtalpnWjBPSWs https://dropbox.com/s/8ibms8y6yvq559e/5.3.8.tar.xz 13 | 5.3.7 c0d7651ac32bf33e7aa70d65091faea7 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykRkExT1BZeGRvTWc https://dropbox.com/s/97qaoqh8mkxri6o/5.3.7.tar.xz 14 | 5.3.6 519d7e9dfff8006c179ac0f852dbeca7 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykeW1Gc0g3Q205cEU https://dropbox.com/s/q6z66hlfyjrr1ot/5.3.6.tar.xz 15 | 5.3.5 be4dcfe0645148a2e475743f949f1e85 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykYklVSGVkQ3JyVHc https://dropbox.com/s/abvjz2zflpjjxad/5.3.5.tar.xz 16 | 5.3.4 72db56b82d3fea3535226590abc9fd5f https://drive.google.com/uc?export=download&id=0BxClEVSW8QykbGJJOW9GS1NkVUk https://dropbox.com/s/gmk6w4ql3q8fkrc/5.3.4.tar.xz 17 | 5.3.3 21f42a6e36cac1a63ac9c7eaa1eac645 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykQzQ5ZUQwZ25pQm8 https://dropbox.com/s/0k8iru7jwcoozf7/5.3.3.tar.xz 18 | 5.3.2 fd7f7896ba292288644bf95ddd68de5a https://drive.google.com/uc?export=download&id=0BxClEVSW8QykQWFaX05XX2VueFE https://dropbox.com/s/54o4g6h7fkbac4w/5.3.2.tar.xz 19 | 5.3.1 62d2335d60855650cfb8d4bde1530476 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykZWlDaE5nRjJMRVE https://dropbox.com/s/khq5mwmw340ej4c/5.3.1.tar.xz 20 | 5.3.0 5820fbc12261c47abaf7a4aff3d12ccd https://drive.google.com/uc?export=download&id=0BxClEVSW8QykUlhrQkRqTDhXR3c https://dropbox.com/s/j9k2c4q6e6zjota/5.3.0.tar.xz 21 | 5.2.5 718a55db0635a74e771006b8f8d46ad9 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykNmtReTdIVkFBREk https://dropbox.com/s/x0iobozm74u0l4t/5.2.5.tar.xz 22 | 5.2.4 594b931bbb4c925c5fd85aa8d553c3c2 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykQ2cwNk4yd1EyWVE https://dropbox.com/s/3m1syvie19egxdl/5.2.4.tar.xz 23 | 5.2.3 d6d96335f35570df0224280393430aca https://drive.google.com/uc?export=download&id=0BxClEVSW8QykOTY0UjlLc1VDdms https://dropbox.com/s/tyo6r60iddf4l2v/5.2.3.tar.xz 24 | 5.2.2 2c089347d6c6f2bad951afc5af675b21 https://drive.google.com/uc?export=download&id=0BxClEVSW8Qykbm1GekJJZFBQSXM https://dropbox.com/s/4ji0jso70v25h74/5.2.2.tar.xz 25 | 5.2.1 25dc33879da31bde72d720a21ff1ca77 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykWEhXTkxQdzlQaUU https://dropbox.com/s/a5xwansefrpw2c6/5.2.1.tar.xz 26 | 5.2.0 9a275082dea6151976b6c391955968f5 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykTlQtXzh6d1RpV2c https://dropbox.com/s/gbekyavt29jmyto/5.2.0.tar.xz 27 | 5.1.5 0f5c7792594a8263b7e3fe2a02a615ea https://drive.google.com/uc?export=download&id=0BxClEVSW8QykRmpMQTBYZ2FpUXc https://dropbox.com/s/fbhe0hyfq4qlfgz/5.1.5.tar.xz 28 | 5.1.4 f589207fe6c3883ddb416889a9766d50 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykTjRZVHVqRjN5N28 https://dropbox.com/s/cn0smwesx3umzuz/5.1.4.tar.xz 29 | 5.1.3 71dc01d4499aabee977190d58c89f2ce https://drive.google.com/uc?export=download&id=0BxClEVSW8Qykd1lfb1NkM0x5U1E https://dropbox.com/s/vrwbg9ma1qepxf2/5.1.3.tar.xz 30 | 5.1.2 2b05e457bc8dc3e7df119c629ce8f902 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykZjB5UmloUjZucmM https://dropbox.com/s/szgzfvo9ax97gnq/5.1.2.tar.xz 31 | 5.1.1 8a1e79b5357950e41f6f1f410834e33d https://drive.google.com/uc?export=download&id=0BxClEVSW8QykbExocFNfT0xBUFU https://dropbox.com/s/910lsmjy91n58qj/5.1.1.tar.xz 32 | 5.1.0 092bd547b648213d3e3c59de5f93cd44 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykLWN2MWFrU0VHTkk https://dropbox.com/s/ffcwnkr7u4gl0bl/5.1.0.tar.xz 33 | 5.0.4 e484fff002dd851161fd645728ba5f7d https://drive.google.com/uc?export=download&id=0BxClEVSW8QykVVJ4VTN3aGxydWs https://dropbox.com/s/t2cwhq46vgsqmo6/5.0.4.tar.xz 34 | 5.0.3 8ecf67c6615ce14fda818889740404d1 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykU0VUaURwaURuZXM https://dropbox.com/s/rhet6qb1zyt6cm1/5.0.3.tar.xz 35 | 5.0.2 3eb04566537ba9f2e714036c775bb1ec https://drive.google.com/uc?export=download&id=0BxClEVSW8QykTmxWRGNoTzVWM2s https://dropbox.com/s/79jqxls577kdmiu/5.0.2.tar.xz 36 | 5.0.1 ca2c86a54600aa077e3d8bb10338d29b https://drive.google.com/uc?export=download&id=0BxClEVSW8QykVGhzWHRmMU9aS0E https://dropbox.com/s/q9nwigaaidpohfm/5.0.1.tar.xz 37 | 5.0.0 6c8a5f408ba0a335cc843eff78a1a2c8 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykTmxWRGNoTzVWM2s https://dropbox.com/s/rgwumah9nicfean/5.0.0.tar.xz 38 | 4.7.2 dd197924e17f1a88720835e930122af3 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykalloVnpPemdjTU0 https://dropbox.com/s/k6ca6460w5tu5rp/4.7.2.tar.xz 39 | 4.7.1 124143b7e31949360ad7dfb262453ff5 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykV2hqMy1BQmgwNGs https://dropbox.com/s/nkvuvfn0imnvwe6/4.7.1.tar.xz 40 | 4.7.0 291c5ac0b88836f6872701d18b2e87e8 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykZEpaVTJDQnU1UDg https://dropbox.com/s/rdosntaspjhv07w/4.7.0.tar.xz 41 | 4.6.9 d5871cc37a3eb0f9b34481cf422f4a26 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykOUxwRGp2bG5aUFk https://dropbox.com/s/6zpunem54szoibq/4.6.9.tar.xz 42 | 4.6.8 b0e4727744dbcb8b93c76dd5ca6aaf80 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykUzcxdGZQRHJTTnc https://dropbox.com/s/04c7nlomow8ht59/4.6.8.tar.xz 43 | 4.6.7 71b613c639f155856cc699f62fe807c3 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykSXFfMVV6eDB1dmM https://dropbox.com/s/zpnks3xkvbjbo4w/4.6.7.tar.xz 44 | 4.6.6 a4ce9ad2b2479eb45a8637bbe6e30312 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykLTlXenlVYWFSbzg https://dropbox.com/s/55rztktqjf4e3y7/4.6.6.tar.xz 45 | 4.6.5 4c98c45e3bf3f97a8a7ec3ae69c8eb17 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykNDgxZ3Zfd04xVlk https://dropbox.com/s/d2u6qxe3mcnzpq2/4.6.5.tar.xz 46 | 4.6.4 fc6df43de2a2974cbbb16aa35ee31bb7 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykSFR0d1M5YXhaVjg https://dropbox.com/s/6i6ge4or5tcdmf6/4.6.4.tar.xz 47 | 4.6.3 6dabdb3a5e3d304423ff827527e30f78 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykNHFSTmFweEFsaW8 https://dropbox.com/s/en8wh1w2ngyfobb/4.6.3.tar.xz 48 | 4.6.2 5c57ad51ea092fba8e9962042c9d5a6a https://drive.google.com/uc?export=download&id=0BxClEVSW8QykNmhiLWNhdXd4NHM https://dropbox.com/s/wobkpzqy4fjdes3/4.6.2.tar.xz 49 | 4.6.1 5d3d1c308acd7478908f17d5d674f3b0 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykemVPd0M0Y0M0Zms https://dropbox.com/s/hpue3l26owwdth2/4.6.1.tar.xz 50 | 4.6.0 3024f13035e67eb183de72e1e1d0a336 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykZV95QVpkUUJjSFE https://dropbox.com/s/1r90oiorm4qjtnd/4.6.0.tar.xz 51 | 4.5.5 7a6a9eaf451d484181f726795b66ddd5 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykTjFBdElqYTRlc1E https://dropbox.com/s/f04q6mbwwsvix8a/4.5.5.tar.xz 52 | 4.5.4 8aee529074c81ae8f91c7ac5f606b7c1 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykdV9yT1VlSnN5SDg https://dropbox.com/s/3qvoi8kryhqodm8/4.5.4.tar.xz 53 | 4.5.3 37f40c42ea2799361e53ec5ccd02e7f1 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykZ3hDUHd6QlFoRU0 https://dropbox.com/s/mkhurw9ug3nmmun/4.5.3.tar.xz 54 | 4.5.2 abf92349dfc9de5a5fb90b50822aeee2 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykUTdBQ1JMWUhHZlk https://dropbox.com/s/z4dffs2268jx10b/4.5.2.tar.xz 55 | 4.5.1 a3aad078f6faf5586c4b92e97522bf61 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykS0FmdUVQSENjMzg https://dropbox.com/s/91q96gbjt7t3xk5/4.5.1.tar.xz 56 | 4.5.0 bdfe31dd9caa4a0be00d3fefaa07304a https://drive.google.com/uc?export=download&id=0BxClEVSW8QykendrT0ctU1FUNEU https://dropbox.com/s/zeukn55kzzy3ql8/4.5.0.tar.xz 57 | 4.3.4 9061de44844d90af04d18f2b2cd4c7ad https://drive.google.com/uc?export=download&id=0BxClEVSW8QykdHljSWxOeTd4SDg https://dropbox.com/s/2cxkniovk0swv20/4.3.4.tar.xz 58 | 4.3.3 1189cad38e4920ea3fce7e3f2f337a2b https://drive.google.com/uc?export=download&id=0BxClEVSW8QykMTlaVkJnSW9INlE https://dropbox.com/s/gqqx38mghll51ii/4.3.3.tar.xz 59 | 4.3.2 ef9257b3a5daaae7d910290d1ac776b9 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykM0gzUHM4X2xvVlU https://dropbox.com/s/rjsqsq8k3hhxb89/4.3.2.tar.xz 60 | 4.3.1 5baa72f4d51652678a7cb7c988abc389 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykaW5aSnRkTm5sQkU https://dropbox.com/s/lazkq8etmo7olqy/4.3.1.tar.xz 61 | 4.3.0 73a3b09dc56c669208c1335643420282 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykUjNiX2M0MHVaekk https://dropbox.com/s/tuyv61xf6wjix8i/4.3.0.tar.xz 62 | 4.2.2 e7b35d53c107d2afeda177776c8e9fb7 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykSk1PQzJTc1FxQjg https://dropbox.com/s/3prvolncm9gtvhu/4.2.2.tar.xz 63 | 4.2.1 c46c1f228471099320bc10ae80d4e824 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykcGJkS3QxWWRkS3M https://dropbox.com/s/uma8n0e0opybfl4/4.2.1.tar.xz 64 | 4.2.0 51c1d1cf3ae2015f6e6284af547f5200 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykT3NwTEllbmRMZ3M https://dropbox.com/s/2ehharrb6ahyj64/4.2.0.tar.xz 65 | 4.1.5 db976388a0751137a9af08de75063b4d https://drive.google.com/uc?export=download&id=0BxClEVSW8Qykb1RLMHJFa285c2M https://dropbox.com/s/qwpir62y5xbmv7i/4.1.5.tar.xz 66 | 4.1.4 72076360cfab0fb8d78a3cd5fa21953f https://drive.google.com/uc?export=download&id=0BxClEVSW8QykZlh1bnpsX3RGdk0 https://dropbox.com/s/oa8aiqy32ryneyr/4.1.4.tar.xz 67 | 4.1.3 58fcbc59c26ae0b52a217eb96901c109 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykSVBvWWptTWJUQVE https://dropbox.com/s/qukg909hn8nbblw/4.1.3.tar.xz 68 | 4.1.2 930f67516cd48c891cfd4d73f8ec05e3 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykMjhTRjR4YnJNa2c https://dropbox.com/s/mw4468dtjhuhkr4/4.1.2.tar.xz 69 | 4.1.1 53d4ffd7bad907368d461bbb327a7092 https://drive.google.com/uc?export=download&id=0BxClEVSW8Qykei1nSXNQMm9HbEk https://dropbox.com/s/l27ghuuua3fd6nk/4.1.1.tar.xz 70 | 4.1.0 1278416ac2faf97041dc5006cd8314e4 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykSVlGcXlhU1YxVDA https://dropbox.com/s/kgsxod251ofyi9x/4.1.0.tar.xz 71 | 4.0.1 82f405fdba809188297e9dfe900c30f4 https://drive.google.com/uc?export=download&id=0BxClEVSW8QykZC1TM2w5OS1ETjA https://dropbox.com/s/9hiahz8g4wswz37/4.0.1.tar.xz 72 | 4.0.0 cb0765ba463e2619db692936a2ce90bc https://drive.google.com/uc?export=download&id=0BxClEVSW8QykbVJqZzREMmNTSm8 https://dropbox.com/s/7y4y6uqnzezr3wo/4.0.0.tar.xz 73 | -------------------------------------------------------------------------------- /templates/ScreenSelector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darealshinji/UnityEngine2deb/dab8137c4154076df08d9aa3cc9881654c2d3e54/templates/ScreenSelector.png -------------------------------------------------------------------------------- /templates/UnityTOS.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darealshinji/UnityEngine2deb/dab8137c4154076df08d9aa3cc9881654c2d3e54/templates/UnityTOS.pdf -------------------------------------------------------------------------------- /templates/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /templates/copyright.in: -------------------------------------------------------------------------------- 1 | License: UNITY-TERMS-OF-SERVICE 2 | The full license text can be found in the files UnityTOS.pdf or UnityTOS.rtf, 3 | or at https://unity3d.com/legal/terms-of-service 4 | 5 | Files: debian/* 6 | Copyright: 2014-2016 djcj 7 | License: MIT 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | . 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | . 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /templates/description: -------------------------------------------------------------------------------- 1 | This game was built on the Unity engine (http://unity3d.com) and has been exported to GNU/Linux. 2 | 3 | It was packaged for Debian-based systems with the help of UnityEngine2deb (https://github.com/darealshinji/UnityEngine2deb). 4 | 5 | -------------------------------------------------------------------------------- /templates/icon-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darealshinji/UnityEngine2deb/dab8137c4154076df08d9aa3cc9881654c2d3e54/templates/icon-alt.png -------------------------------------------------------------------------------- /templates/icon-alt.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 12 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 31 | 32 | 33 | 36 | 39 | 43 | 44 | 45 | 46 | 47 | 51 | 52 | 53 | 54 | 55 | 59 | 60 | 61 | 62 | 63 | 64 | 68 | 72 | 73 | 74 | 75 | 76 | 77 | 80 | 84 | 85 | 86 | 87 | 88 | 89 | 93 | 97 | 98 | 99 | 100 | 101 | 102 | 106 | 107 | 108 | 109 | 110 | 111 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /templates/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darealshinji/UnityEngine2deb/dab8137c4154076df08d9aa3cc9881654c2d3e54/templates/icon.png -------------------------------------------------------------------------------- /templates/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /templates/lintian-overrides: -------------------------------------------------------------------------------- 1 | # the Unity engine is closed-source 2 | hardening-no-pie 3 | embedded-library 4 | 5 | # no point to replace a single png file with a symlink 6 | image-file-in-usr-lib */ScreenSelector.png 7 | -------------------------------------------------------------------------------- /templates/make-icons.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | # Create an X11 icon set from a single image file. 4 | # Usage: make-icon.sh [] 5 | 6 | # Last revision : 2016-08-27 7 | # Requires: librsvg2-bin imagemagick 8 | 9 | 10 | # Copyright (c) 2014-2016, djcj 11 | # 12 | # Permission is hereby granted, free of charge, to any person obtaining a copy 13 | # of this software and associated documentation files (the "Software"), to deal 14 | # in the Software without restriction, including without limitation the rights 15 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 16 | # copies of the Software, and to permit persons to whom the Software is 17 | # furnished to do so, subject to the following conditions: 18 | # 19 | # The above copyright notice and this permission notice shall be included in 20 | # all copies or substantial portions of the Software. 21 | # 22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 28 | # THE SOFTWARE. 29 | 30 | 31 | create_xpm="no" 32 | #create_xpm="yes" 33 | 34 | input="$1" 35 | output1=$(basename "$1") 36 | output="${output1%.*}" 37 | tmpstring=`tempfile` 38 | rm $tmpstring 39 | tmp="$tmpstring-${output1}.png" 40 | 41 | if [ -z "$1" ] ; then 42 | echo "Usage: $0 []" 43 | exit 1 44 | elif [ ! -e "$1" ] ; then 45 | echo "Can't find '$1'!" 46 | exit 1 47 | elif [ -d "$1" ] ; then 48 | echo "Input is a directory!" 49 | exit 1 50 | fi 51 | 52 | if [ -z "$2" ] ; then 53 | destdir=converted_icons 54 | else 55 | destdir="$2" 56 | fi 57 | 58 | 59 | ## Check if input is an SVG 60 | if [ "${input##*.}" = "svg" ] || [ "${input##*.}" = "SVG" ] ; then 61 | svgdir="$destdir/icons/hicolor/scalable/apps" 62 | echo "install SVG" 63 | 64 | # install SVG into hicolor/scalable/apps 65 | install -c -D -m644 "$input" "$svgdir/$output1" 66 | 67 | # compress SVG 68 | gzip -f9 "$svgdir/$output1" 69 | mv "$svgdir/$output1.gz" "$svgdir/$output.svgz" 70 | 71 | # Create temporary input PNG file 72 | rsvg-convert "$input" -o "$tmp" 73 | input="$tmp" 74 | fi 75 | 76 | 77 | ## Create XPM 78 | if [ "$create_xpm" = "yes" ]; then 79 | pixmaps="$destdir/pixmaps" 80 | mkdir -p "$pixmaps" 81 | echo "create pixmap" 82 | convert "$input" -filter Lanczos -resize 32x32 "$pixmaps/$output.xpm" 83 | fi 84 | 85 | 86 | ## Create PNGs 87 | for n in 16 22 24 32 48 64 96 128 256 512 88 | do 89 | w=$(identify -format "%w" "$input") 90 | h=$(identify -format "%h" "$input") 91 | 92 | if [ $w != $h ] ; then 93 | echo "hicolor icons require width and height to be equal, but input resolution is ${w}x${h}." 94 | echo "Didn't create hicolor icons." 95 | exit 0 96 | fi 97 | 98 | if [ $w -ge $n ] ; then 99 | icondestdir="$destdir/icons/hicolor/${n}x${n}/apps" 100 | mkdir -p "$icondestdir" 101 | echo "create hicolor ${n}x${n}" 102 | convert "$input" -filter Lanczos -resize ${n}x${n} "$icondestdir/$output.png" 103 | fi 104 | done 105 | 106 | if [ -f "$tmp" ] ; then 107 | rm "$tmp" 108 | fi 109 | -------------------------------------------------------------------------------- /templates/patchelf/COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /templates/patchelf/Makefile: -------------------------------------------------------------------------------- 1 | CXXFLAGS = -O3 -Wall -Wextra -Wcast-qual -I. -std=c++17 -D_FILE_OFFSET_BITS=64 -DPACKAGE_STRING='"PatchELF 0.18.0"' 2 | LDFLAGS = -s 3 | 4 | 5 | all: patchelf 6 | 7 | clean: 8 | -rm -f patchelf 9 | 10 | distclean: clean 11 | 12 | patchelf: patchelf.cpp 13 | $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) 14 | 15 | -------------------------------------------------------------------------------- /templates/patchelf/README: -------------------------------------------------------------------------------- 1 | PatchELF was downloaded from: 2 | https://github.com/NixOS/patchelf/ 3 | 4 | 5 | Copyright (c) 2004-2016 Eelco Dolstra 6 | 7 | This program is free software: you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation, either version 3 of the License, or (at 10 | your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see . 19 | -------------------------------------------------------------------------------- /templates/patchelf/patchelf.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "elf.h" 10 | 11 | using FileContents = std::shared_ptr>; 12 | 13 | #define ElfFileParams class Elf_Ehdr, class Elf_Phdr, class Elf_Shdr, class Elf_Addr, class Elf_Off, class Elf_Dyn, class Elf_Sym, class Elf_Versym, class Elf_Verdef, class Elf_Verdaux, class Elf_Verneed, class Elf_Vernaux, class Elf_Rel, class Elf_Rela, unsigned ElfClass 14 | #define ElfFileParamNames Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass 15 | 16 | template 17 | struct span 18 | { 19 | explicit span(T* d = {}, size_t l = {}) : data(d), len(l) {} 20 | span(T* from, T* to) : data(from), len(to-from) { assert(from <= to); } 21 | T& operator[](std::size_t i) { checkRange(i); return data[i]; } 22 | T* begin() { return data; } 23 | T* end() { return data + len; } 24 | auto size() const { return len; } 25 | explicit operator bool() const { return size() > 0; } 26 | 27 | private: 28 | void checkRange(std::size_t i) { 29 | if (i >= size()) throw std::out_of_range("error: Span access out of range."); 30 | } 31 | 32 | T* data; 33 | size_t len; 34 | }; 35 | 36 | template 37 | class ElfFile 38 | { 39 | public: 40 | 41 | const FileContents fileContents; 42 | 43 | private: 44 | 45 | std::vector phdrs; 46 | std::vector shdrs; 47 | 48 | bool littleEndian; 49 | 50 | bool changed = false; 51 | 52 | bool isExecutable = false; 53 | 54 | using SectionName = std::string; 55 | using ReplacedSections = std::map; 56 | 57 | ReplacedSections replacedSections; 58 | 59 | std::string sectionNames; /* content of the .shstrtab section */ 60 | 61 | /* Align on 4 or 8 bytes boundaries on 32- or 64-bit platforms 62 | respectively. */ 63 | static constexpr size_t sectionAlignment = sizeof(Elf_Off); 64 | 65 | std::vector sectionsByOldIndex; 66 | 67 | public: 68 | explicit ElfFile(FileContents fileContents); 69 | 70 | [[nodiscard]] bool isChanged() const noexcept 71 | { 72 | return changed; 73 | } 74 | 75 | private: 76 | 77 | struct CompPhdr 78 | { 79 | const ElfFile * elfFile; 80 | bool operator ()(const Elf_Phdr & x, const Elf_Phdr & y) const noexcept 81 | { 82 | // A PHDR comes before everything else. 83 | if (elfFile->rdi(y.p_type) == PT_PHDR) return false; 84 | if (elfFile->rdi(x.p_type) == PT_PHDR) return true; 85 | 86 | // Sort non-PHDRs by address. 87 | return elfFile->rdi(x.p_paddr) < elfFile->rdi(y.p_paddr); 88 | } 89 | }; 90 | 91 | void sortPhdrs(); 92 | 93 | struct CompShdr 94 | { 95 | const ElfFile * elfFile; 96 | bool operator ()(const Elf_Shdr & x, const Elf_Shdr & y) const noexcept 97 | { 98 | return elfFile->rdi(x.sh_offset) < elfFile->rdi(y.sh_offset); 99 | } 100 | }; 101 | 102 | [[nodiscard]] unsigned int getPageSize() const noexcept; 103 | 104 | void sortShdrs(); 105 | 106 | void shiftFile(unsigned int extraPages, size_t sizeOffset, size_t extraBytes); 107 | 108 | [[nodiscard]] std::string getSectionName(const Elf_Shdr & shdr) const; 109 | 110 | const Elf_Shdr & findSectionHeader(const SectionName & sectionName) const; 111 | 112 | [[nodiscard]] std::optional> tryFindSectionHeader(const SectionName & sectionName) const; 113 | 114 | template span getSectionSpan(const Elf_Shdr & shdr) const; 115 | template span getSectionSpan(const SectionName & sectionName); 116 | template span tryGetSectionSpan(const SectionName & sectionName); 117 | 118 | [[nodiscard]] unsigned int getSectionIndex(const SectionName & sectionName) const; 119 | 120 | std::string & replaceSection(const SectionName & sectionName, 121 | unsigned int size); 122 | 123 | [[nodiscard]] bool haveReplacedSection(const SectionName & sectionName) const; 124 | 125 | void writeReplacedSections(Elf_Off & curOff, 126 | Elf_Addr startAddr, Elf_Off startOffset); 127 | 128 | void rewriteHeaders(Elf_Addr phdrAddress); 129 | 130 | void rewriteSectionsLibrary(); 131 | 132 | void rewriteSectionsExecutable(); 133 | 134 | void normalizeNoteSegments(); 135 | 136 | public: 137 | 138 | void rewriteSections(bool force = false); 139 | 140 | [[nodiscard]] std::string getInterpreter() const; 141 | 142 | typedef enum { printOsAbi, replaceOsAbi } osAbiMode; 143 | 144 | void modifyOsAbi(osAbiMode op, const std::string & newOsAbi); 145 | 146 | typedef enum { printSoname, replaceSoname } sonameMode; 147 | 148 | void modifySoname(sonameMode op, const std::string & newSoname); 149 | 150 | void setInterpreter(const std::string & newInterpreter); 151 | 152 | typedef enum { rpPrint, rpShrink, rpSet, rpAdd, rpRemove } RPathOp; 153 | 154 | void modifyRPath(RPathOp op, const std::vector & allowedRpathPrefixes, std::string newRPath); 155 | std::string shrinkRPath(char* rpath, std::vector &neededLibs, const std::vector & allowedRpathPrefixes); 156 | void removeRPath(Elf_Shdr & shdrDynamic); 157 | 158 | void addNeeded(const std::set & libs); 159 | 160 | void removeNeeded(const std::set & libs); 161 | 162 | void replaceNeeded(const std::map & libs); 163 | 164 | void printNeededLibs() const; 165 | 166 | void noDefaultLib(); 167 | 168 | void addDebugTag(); 169 | 170 | void renameDynamicSymbols(const std::unordered_map&); 171 | 172 | void clearSymbolVersions(const std::set & syms); 173 | 174 | enum class ExecstackMode { print, set, clear }; 175 | 176 | void modifyExecstack(ExecstackMode op); 177 | 178 | private: 179 | struct GnuHashTable { 180 | using BloomWord = Elf_Addr; 181 | struct Header { 182 | uint32_t numBuckets, symndx, maskwords, shift2; 183 | } m_hdr; 184 | span m_bloomFilters; 185 | span m_buckets, m_table; 186 | }; 187 | GnuHashTable parseGnuHashTable(span gh); 188 | 189 | struct HashTable { 190 | struct Header { 191 | uint32_t numBuckets, nchain; 192 | } m_hdr; 193 | span m_buckets, m_chain; 194 | }; 195 | HashTable parseHashTable(span gh); 196 | 197 | void rebuildGnuHashTable(span strTab, span dynsyms); 198 | void rebuildHashTable(span strTab, span dynsyms); 199 | 200 | using Elf_Rel_Info = decltype(Elf_Rel::r_info); 201 | 202 | uint32_t rel_getSymId(const Elf_Rel_Info& info) const 203 | { 204 | if constexpr (std::is_same_v) 205 | return ELF64_R_SYM(info); 206 | else 207 | return ELF32_R_SYM(info); 208 | } 209 | 210 | Elf_Rel_Info rel_setSymId(Elf_Rel_Info info, uint32_t id) const 211 | { 212 | if constexpr (std::is_same_v) 213 | { 214 | constexpr Elf_Rel_Info idmask = (~Elf_Rel_Info()) << 32; 215 | info = (info & ~idmask) | (Elf_Rel_Info(id) << 32); 216 | } 217 | else 218 | { 219 | constexpr Elf_Rel_Info idmask = (~Elf_Rel_Info()) << 8; 220 | info = (info & ~idmask) | (Elf_Rel_Info(id) << 8); 221 | } 222 | return info; 223 | } 224 | 225 | template 226 | void changeRelocTableSymIds(const Elf_Shdr& shdr, RemapFn&& old2newSymId) 227 | { 228 | static_assert(std::is_same_v || std::is_same_v); 229 | 230 | for (auto& r : getSectionSpan(shdr)) 231 | { 232 | auto info = rdi(r.r_info); 233 | auto oldSymIdx = rel_getSymId(info); 234 | auto newSymIdx = old2newSymId(oldSymIdx); 235 | if (newSymIdx != oldSymIdx) 236 | wri(r.r_info, rel_setSymId(info, newSymIdx)); 237 | } 238 | } 239 | 240 | template 241 | void forAllStringReferences(const Elf_Shdr& strTabHdr, StrIdxCallback&& fn); 242 | 243 | template 244 | auto follow(U* ptr, size_t offset) -> T* { 245 | return offset ? (T*)(((char*)ptr)+offset) : nullptr; 246 | }; 247 | 248 | template 249 | void forAll_ElfVer(span vdspan, VdFn&& vdfn, VaFn&& vafn) 250 | { 251 | auto* vd = vdspan.begin(); 252 | for (; vd; vd = follow(vd, rdi(vd->vd_next))) 253 | { 254 | vdfn(*vd); 255 | auto va = follow(vd, rdi(vd->vd_aux)); 256 | for (; va; va = follow(va, rdi(va->vda_next))) 257 | vafn(*va); 258 | } 259 | } 260 | 261 | template 262 | void forAll_ElfVer(span vnspan, VnFn&& vnfn, VaFn&& vafn) 263 | { 264 | auto* vn = vnspan.begin(); 265 | for (; vn; vn = follow(vn, rdi(vn->vn_next))) 266 | { 267 | vnfn(*vn); 268 | auto va = follow(vn, rdi(vn->vn_aux)); 269 | for (; va; va = follow(va, rdi(va->vna_next))) 270 | vafn(*va); 271 | } 272 | } 273 | 274 | /* Convert an integer in big or little endian representation (as 275 | specified by the ELF header) to this platform's integer 276 | representation. */ 277 | template 278 | constexpr I rdi(I i) const noexcept; 279 | 280 | /* Convert back to the ELF representation. */ 281 | template 282 | constexpr inline I wri(I & t, U i) const 283 | { 284 | I val = static_cast(i); 285 | if (static_cast(val) != i) 286 | throw std::runtime_error { "value truncation" }; 287 | t = rdi(val); 288 | return val; 289 | } 290 | 291 | [[nodiscard]] Elf_Ehdr *hdr() noexcept { 292 | return reinterpret_cast(fileContents->data()); 293 | } 294 | 295 | [[nodiscard]] const Elf_Ehdr *hdr() const noexcept { 296 | return reinterpret_cast(fileContents->data()); 297 | } 298 | }; 299 | -------------------------------------------------------------------------------- /templates/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | # Copyright (c) 2014-2016, 2019, djcj 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | 24 | include debian/confflags 25 | 26 | DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) 27 | 28 | LIBPREFIX = usr/lib/games 29 | ICONPREFIX = $(LIBPREFIX)/ 30 | ICONPKG = $(NAME) 31 | ifeq ($(DATAPACKAGE), yes) 32 | ICONPREFIX = usr/share/games/ 33 | ICONPKG = $(NAME)-data 34 | endif 35 | ICONDEST = $(CURDIR)/debian/$(ICONPKG)/usr/share 36 | bindir = $(CURDIR)/debian/$(NAME)/usr/games/ 37 | libdir = $(CURDIR)/debian/$(NAME)/$(LIBPREFIX)/$(NAME)/ 38 | datadir = $(CURDIR)/debian/$(NAME)-data/usr/share/games/$(NAME)/ 39 | plugindir = source/$(NAME)_Data/Plugins 40 | 41 | 42 | %: 43 | dh ${@} 44 | 45 | 46 | override_dh_auto_install: 47 | mkdir -p $(libdir) 48 | mkdir -p $(ICONDEST) 49 | mkdir -p $(bindir) 50 | mkdir -p $(CURDIR)/debian/$(NAME)/usr/share/applications 51 | 52 | # create icons 53 | debian/make-icons.sh $(ICON) $(ICONDEST) 54 | 55 | # install files 56 | cp -r source/* $(libdir) 57 | install -m644 $(NAME).desktop $(CURDIR)/debian/$(NAME)/usr/share/applications 58 | 59 | # create launcher script; 60 | # don't use a symlink to avoid 'There is no data folder' errors 61 | echo '#!/bin/sh' > $(bindir)$(NAME) 62 | echo 'cd "/$(LIBPREFIX)/$(NAME)" && ./$(NAME) $$*' >> $(bindir)$(NAME) 63 | echo 'exit $$?' >> $(bindir)$(NAME) 64 | chmod a+x $(bindir)$(NAME) 65 | 66 | ifeq ($(DATAPACKAGE), yes) 67 | # remove data package files from /$(LIBPREFIX) 68 | rm -rf $(libdir)$(NAME)_Data 69 | 70 | mkdir -p $(datadir) 71 | mkdir -p $(libdir)$(NAME)_Data 72 | mkdir -p $(CURDIR)/debian/$(NAME)-data/usr/share 73 | 74 | # install data package files into /usr/share 75 | cp -r source/$(NAME)_Data $(datadir) 76 | cp -r source/$(NAME)_Data/Mono $(libdir)$(NAME)_Data 77 | cd $(datadir)$(NAME)_Data && rm -rf Mono Plugins 78 | [ ! -d $(plugindir) ] || cp -r $(plugindir) $(libdir)$(NAME)_Data 79 | 80 | # create symbolic links between /usr/share and /usr/lib 81 | for f in $$(ls $(datadir)$(NAME)_Data) ; \ 82 | do \ 83 | dh_link -p$(NAME) usr/share/games/$(NAME)/$(NAME)_Data/$$f $(LIBPREFIX)/$(NAME)/$(NAME)_Data/$$f ; \ 84 | done 85 | endif 86 | 87 | # replace UnityPlayer.png with a symbolic link 88 | # to the biggest icon available 89 | for d in 512 256 128 96 64 48 32 24 22 16 ; \ 90 | do \ 91 | dir="$(ICONDEST)/icons/hicolor/$${d}x$${d}" ; \ 92 | if [ -d $$dir ] ; \ 93 | then \ 94 | biggesticon="$$(basename $$dir)" ; \ 95 | dh_link -p$(ICONPKG) usr/share/icons/hicolor/$$biggesticon/apps/$(NAME).png \ 96 | $(ICONPREFIX)$(NAME)/$(NAME)_Data/Resources/UnityPlayer.png ; \ 97 | exit 0 ; \ 98 | fi ; \ 99 | done 100 | 101 | 102 | override_dh_installdocs: 103 | dh_installdocs -A debian/UnityTOS.pdf debian/UnityTOS.rtf 104 | 105 | 106 | # Unity engine games don't provide any shared libraries 107 | override_dh_makeshlibs: 108 | 109 | 110 | # can't strip Intel architecture binaries on foreign systems 111 | override_dh_strip: 112 | ifeq ($(HOST_INTEL), yes) 113 | dh_strip 114 | endif 115 | 116 | 117 | override_dh_shlibdeps: 118 | ifneq ($(HOST_INTEL), yes) 119 | dh_shlibdeps -X$(NAME) -X.so 120 | else 121 | ifeq ($(PATCHELF),yes) 122 | # remove unnecessary dependencies that a binary was errerously linked against 123 | # by deleting their DT_NEEDED entries from the ELF header 124 | 125 | $(MAKE) -C $(CURDIR)/debian/patchelf 2>/dev/null 126 | 127 | rm -f uselessdeps.log 128 | (dh_shlibdeps -- --warnings=2 2>&1 | tee uselessdeps.log) > /dev/null 129 | 130 | lines=$$(wc -l uselessdeps.log | cut -d' ' -f1) ; \ 131 | for n in $$(seq 1 $$lines) ; \ 132 | do \ 133 | dep=$$(cut -d' ' -f15 uselessdeps.log | sed -n $${n}p) ; \ 134 | bin=$$(cut -d' ' -f10 uselessdeps.log | sed -n $${n}p) ; \ 135 | $(CURDIR)/debian/patchelf/patchelf --debug --remove-needed $$dep $$bin 2>&1 | \ 136 | grep -v -e 'keeping' | grep -v -e 'Kernel' ; \ 137 | done ; 138 | endif 139 | ifeq ($(ARCH), x86) 140 | dh_shlibdeps -l/usr/lib/i386-linux-gnu/mesa/:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu 141 | else 142 | dh_shlibdeps -l/usr/lib/x86_64-linux-gnu/mesa/:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu 143 | endif 144 | endif 145 | 146 | 147 | override_dh_gencontrol: 148 | dh_gencontrol 149 | 150 | # fix architecture when packaging i386 on foreign system 151 | ifeq ($(ARCH), x86) 152 | ifneq ($(DEB_HOST_ARCH), i386) 153 | sed -i 's/Architecture: $(DEB_HOST_ARCH)/Architecture: i386/g' debian/$(NAME)/DEBIAN/control 154 | endif 155 | endif 156 | 157 | # fix architecture when packaging amd64 on foreign system 158 | ifeq ($(ARCH), x86_64) 159 | ifneq ($(DEB_HOST_ARCH), amd64) 160 | sed -i 's/Architecture: $(DEB_HOST_ARCH)/Architecture: amd64/g' debian/$(NAME)/DEBIAN/control 161 | endif 162 | endif 163 | 164 | 165 | override_dh_builddeb: 166 | dh_builddeb $(arch_only) -- -Z$(Z) -z9 167 | 168 | -------------------------------------------------------------------------------- /templates/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /u2appimage-example.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | set -x 4 | 5 | # This is a small example recipe showing how to 6 | # create an AppImage (https://github.com/probonopd/AppImageKit/wiki) 7 | # from Unity Engine games. 8 | 9 | # name of the game 10 | APP=simple-unity5-example 11 | LOWERAPP=${APP,,} 12 | 13 | # replace this with the game's actual version string 14 | VER1="5.5.0" 15 | 16 | # create directories 17 | mkdir -p $APP/$APP.AppDir/usr 18 | cd $APP 19 | 20 | # download and source the functions needed to build an AppImage 21 | wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh 22 | . ./functions.sh 23 | 24 | # download the game 25 | wget -q https://github.com/darealshinji/simple-unity3d-example/releases/download/r2/unity${VER1}-linux.tar.xz 26 | 27 | # move into AppDir 28 | cd $APP.AppDir 29 | 30 | # extract the downloaded game files 31 | tar xf ../unity${VER1}-linux.tar.xz 32 | 33 | # delete 32 bit binaries (can be skipped, but this will save some space) 34 | rm -rf linux/test_Data/Plugins/x86 linux/test_Data/Mono/x86 linux/test.x86 35 | 36 | # move game files into the AppDir's usr/bin directory and rename them 37 | mv linux ./usr/bin 38 | mv ./usr/bin/test_Data ./usr/bin/${LOWERAPP}_Data 39 | mv ./usr/bin/test.x86_64 ./usr/bin/${LOWERAPP} 40 | 41 | # create a .desktop file 42 | cat < ${LOWERAPP}.desktop 43 | [Desktop Entry] 44 | Name=$APP 45 | Exec=$LOWERAPP 46 | Terminal=false 47 | Type=Application 48 | Icon=$LOWERAPP 49 | Categories=Game; 50 | StartupNotify=true 51 | EOF 52 | 53 | # copy the game icon file 54 | cp ./usr/bin/${LOWERAPP}_Data/Resources/UnityPlayer.png ${LOWERAPP}.png 55 | 56 | # copy runtime dependencies (the required system libraries to run the game); 57 | # this should usually not be necessary for Unity Engine games (they're 58 | # very portable and distribution agnostic) 59 | #copy_deps 60 | #move_lib 61 | 62 | # download the needed AppImage runtime files 63 | get_apprun 64 | 65 | # append required minimum glibc version to the version string 66 | GLIBC_NEEDED=$(glibc_needed) 67 | VERSION=$VER1.glibc$GLIBC_NEEDED 68 | echo $VERSION 69 | 70 | # this will enable desktop integration (optional) 71 | get_desktopintegration $LOWERAPP 72 | 73 | # leave AppDir 74 | cd .. 75 | 76 | # build AppImage 77 | generate_appimage 78 | 79 | -------------------------------------------------------------------------------- /u2deb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Copyright (c) 2014-2016, djcj 6 | # 7 | # Permission is hereby granted, free of charge, to any person obtaining a copy 8 | # of this software and associated documentation files (the "Software"), to deal 9 | # in the Software without restriction, including without limitation the rights 10 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | # copies of the Software, and to permit persons to whom the Software is 12 | # furnished to do so, subject to the following conditions: 13 | # 14 | # The above copyright notice and this permission notice shall be included in 15 | # all copies or substantial portions of the Software. 16 | # 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | # THE SOFTWARE. 24 | 25 | LANG=C 26 | LANGUAGE=C 27 | LC_ALL=C 28 | 29 | appversion="19.03.14.1" 30 | 31 | appname=$(basename "$0") 32 | scriptpath="$(dirname "$(readlink -f "$0")")" 33 | wdconf="$HOME/.config/UnityEngie2deb/workingdir" 34 | 35 | deb_arch=$(dpkg-architecture -qDEB_HOST_ARCH) 36 | if [ $deb_arch = "amd64" ] || [ $deb_arch = "i386" ]; then 37 | host_intel="yes" 38 | else 39 | host_intel="no" 40 | fi 41 | assumed_dependencies="libc6, libgcc1, libgl1-mesa-glx | libgl1, libglu1-mesa, libgtk2.0-0, libgdk-pixbuf2.0-0, libglib2.0-0, libstdc++6, libx11-6, libxcursor1" 42 | 43 | errorExit() { 44 | echo "error: $1" 45 | exit 1 46 | } 47 | 48 | help() { 49 | cat << EOF 50 | 51 | Create Debian packages of Unity engine games 52 | 53 | Usage: 54 | $appname -h | --help | -V | --version 55 | $appname -p | prepare [OPTIONS] 56 | $appname -b | build | make [OPTIONS] 57 | $appname -c | clean [OPTIONS] 58 | 59 | Options: 60 | -h, --help print this message 61 | -V, --version display version info and quit 62 | 63 | -p, prepare copy files from and prepare a Debian 64 | source package 65 | -b, build, make build binary packages 66 | -c, clean delete the working tree 67 | 68 | -o=, 69 | --output= save Debian packages in 70 | --working-dir= Working directory where the temporary files are stored. 71 | 72 | -d, --data build a separate package for architecture- 73 | independent files 74 | --gzip use gzip instead of xz compression (faster compression 75 | at the cost of bigger packages) 76 | --icon= use this icon for the desktop entry 77 | --no-x86 don't build an i386 package 78 | --no-x86_64 don't build an amd64 package 79 | --no-patchelf don't remove unused DT_NEEDED entries from ELF binary 80 | file headers 81 | 82 | Environment variables: 83 | UPSTREAMNAME the original name of the game, including special chars 84 | or spaces 85 | PKGNAME specify a name for the executable and the package 86 | SHORTDESCRIPTION a brief game description for the package and menu entry 87 | VERSION the game's upstream version 88 | MAINTAINER The package maintainer. Make sure to use the following 89 | pattern: John Doe 90 | HOMEPAGE homepage of the game or the developer 91 | YEAR the year when the game was released 92 | COPYRIGHT Who's holding the copyright? 93 | 94 | EOF 95 | 96 | if [ -f "$wdconf" ]; then 97 | lastwd="$(cat "$wdconf")" 98 | if [ -d "$lastwd" ]; then 99 | echo "Current working directory is \`$lastwd'" 100 | fi 101 | fi 102 | } 103 | 104 | case x"$1" in 105 | x|x--help|x-help|x-h|x-\?) 106 | help;; 107 | x-V|x-v|x--version|x-version) 108 | echo $appversion; exit 0;; 109 | esac 110 | 111 | if [ -d "$scriptpath/templates" ] ; then 112 | templates="$scriptpath/templates" 113 | elif [ -d "$scriptpath/../share/$appname" ] ; then 114 | templates="$scriptpath/../share/$appname" 115 | elif [ -d "/usr/local/share/$appname" ] ; then 116 | templates="/usr/local/share/$appname" 117 | elif [ -d "/usr/share/$appname" ] ; then 118 | templates="/usr/share/$appname" 119 | else 120 | errorExit "Can't find the templates!" 121 | fi 122 | 123 | 124 | datapackage="no" 125 | icon="" 126 | mode="empty" 127 | output="$HOME" 128 | compression="xz" 129 | disable_x86="no" 130 | disable_x86_64="no" 131 | patchelf="yes" 132 | wd="" 133 | for opt; do 134 | optarg="${opt#*=}" 135 | case "$opt" in 136 | "prepare"|"-p") 137 | mode="prepare" 138 | ;; 139 | "build"|"-b"|"make") 140 | mode="build" 141 | ;; 142 | "clean"|"-c") 143 | mode="clean" 144 | ;; 145 | --output=*|-o=*) 146 | output="$optarg" 147 | ;; 148 | --working-dir=*) 149 | wd="$optarg" 150 | ;; 151 | "--data"|"-d") 152 | datapackage="yes" 153 | ;; 154 | --gzip) 155 | compression="gzip" 156 | ;; 157 | --icon=*) 158 | icon="$optarg" 159 | ;; 160 | "--no-x86") 161 | disable_x86="yes" 162 | ;; 163 | "--no-x86_64") 164 | disable_x86_64="yes" 165 | ;; 166 | "--no-patchelf") 167 | patchelf="no" 168 | ;; 169 | "--help"|"-h"|"--version"|"-V") 170 | ;; 171 | *) 172 | origpath="$optarg" 173 | ;; 174 | esac 175 | done 176 | 177 | if [ $disable_x86 = "yes" ] && [ $disable_x86_64 = "yes" ] ; then 178 | errorExit "you can't use \`--no-x86' together with \`--no-x86_64'" 179 | fi 180 | 181 | if [ $mode = "empty" ] ; then 182 | help 183 | exit 1 184 | fi 185 | 186 | mkdir -p "$(dirname "$wdconf")" 187 | touch "$wdconf" 188 | lastwd="$(cat "$wdconf")" 189 | if ([ $mode = "build" ] || [ $mode = "clean" ]) && [ -d "$lastwd" ] && [ -z "$wd" ] ; then 190 | wd="$lastwd" 191 | fi 192 | [ -n "$wd" ] && topsrc="$wd" || topsrc="`mktemp -d /tmp/UnityEngine2deb_tmpXXXXXXXXXX`" 193 | echo "$topsrc" > "$wdconf" 194 | builddir="$topsrc/build" 195 | sourcedir="$topsrc/source" 196 | icondir="$builddir/icon" 197 | debian="$builddir/x86/debian" 198 | 199 | 200 | 201 | ################## clean ################## 202 | if [ $mode = "clean" ] ; then 203 | rm -rvf "$topsrc" "$wdconf" 204 | exit 0 205 | fi 206 | 207 | 208 | ################# prepare ################# 209 | if [ $mode = "prepare" ] ; then 210 | if [ -z "$origpath" ] ; then 211 | errorExit "no path specified" 212 | elif [ ! -e "$origpath" ] ; then 213 | errorExit "path to '$origpath' doesn't exist" 214 | elif [ ! -d "$origpath" ] ; then 215 | errorExit "'$origpath' is not a directory" 216 | else 217 | path="$( cd "$origpath" && pwd )" 218 | fi 219 | rm -rf $cleanfiles 220 | 221 | # get the application name 222 | filename="$(basename "$(find "$origpath" -type d -name *_Data)" | head -c-6)" 223 | [ -z "$PKGNAME" ] && name="$filename" || name="$PKGNAME" 224 | [ -z "$UPSTREAMNAME" ] && UPSTREAMNAME="$name" 225 | if [ -n "$UPSTREAMNAME" ] && [ -n "$PKGNAME" ] ; then 226 | name="$PKGNAME" 227 | fi 228 | 229 | # check for architectures 230 | x86="no" 231 | x86_64="no" 232 | rename_to_x86="no" 233 | rename_to_x86_64="no" 234 | [ -f "$origpath/$filename".x86 ] && x86="yes" 235 | [ -f "$origpath/$filename".x86_64 ] && x86_64="yes" 236 | if [ $x86 = "no" ] && [ $x86_64 = "no" ] ; then 237 | echo "neither '$filename.x86' nor '$filename.x86_64' found" 238 | if [ -f "$origpath/$filename" ] ; then 239 | if [ "$(file "$origpath/$filename" | grep 'ELF 32-bit')" ]; then 240 | echo "'$filename' (x86) found" 241 | x86="yes" 242 | rename_to_x86="yes" 243 | elif [ "$(file "$origpath/$filename" | grep 'ELF 64-bit')" ]; then 244 | echo "'$filename' (x86_64) found" 245 | x86_64="yes" 246 | rename_to_x86_64="yes" 247 | else 248 | errorExit "'$filename' was found but is not a valid ELF binary" 249 | fi 250 | else 251 | errorExit "couldn't find '$filename' either" 252 | fi 253 | fi 254 | if [ $x86_64 = "yes" ] && [ $x86 = "no" ]; then 255 | disable_x86="yes" 256 | fi 257 | if [ $disable_x86 = "yes" ] && [ $x86_64 = "no" ] ; then 258 | errorExit "x86 disabled but no x86_64 binary found" 259 | elif [ $disable_x86_64 = "yes" ] && [ $x86 = "no" ] ; then 260 | errorExit "x86_64 disabled but no x86 binary found" 261 | fi 262 | 263 | # copy source files 264 | echo "copy source files... " 265 | mkdir -p "$sourcedir" 266 | cp -vr "$origpath"/* "$sourcedir" 267 | echo "done" 268 | 269 | # remove executable bits 270 | find "$sourcedir" -type f -exec chmod a-x '{}' \; 271 | 272 | # remove executable stack 273 | export PATH="/usr/local/sbin:/usr/sbin:/sbin:${PATH}" # on Debian /sbin isn't in PATH by default 274 | execstack="$(whereis -b execstack | awk '{print $2}')" 275 | if [ "x$execstack" != "x" ]; then 276 | find "$sourcedir" -name libmono.so -exec "$execstack" -c '{}' \; 277 | fi 278 | 279 | # delete unnecessary files 280 | for f in libCSteamworks.so libsteam_api.so libSteamworksNative.so SteamworksNative.dll \ 281 | \*.dll.mdb Thumbs.db .DS_Store ; 282 | do 283 | find "$sourcedir" -name "$f" -delete 284 | done 285 | rm -rf `find "$sourcedir" -type d -name __MACOSX` 286 | 287 | # rename application 288 | name=$(echo "$name" | sed -e 's/\(.*\)/\L\1/; s/\ -\ /-/g; s/\ /-/g; s/_/-/g') 289 | [ "$filename" != "$name" ] && rename "s/$filename/$name/" "$sourcedir"/* 290 | if [ "$rename_to_x86" = "yes" ] && [ -f "$sourcedir/$name" ] ; then 291 | mv "$sourcedir/$name" "$sourcedir/${name}.x86" 292 | echo "application was renamed to ${name}.x86" 293 | elif [ "$rename_to_x86_64" = "yes" ] && [ -f "$sourcedir/$name" ] ; then 294 | mv "$sourcedir/$name" "$sourcedir/${name}.x86_64" 295 | echo "application was renamed to ${name}.x86_64" 296 | fi 297 | 298 | ScreenSelector="$sourcedir/${name}_Data/ScreenSelector" 299 | 300 | # convert ScreenSelector.bmp to ScreenSelector.png 301 | if [ -f "${ScreenSelector}.bmp" ] && [ ! -f "${ScreenSelector}.png" ] ; then 302 | convert "${ScreenSelector}.bmp" "${ScreenSelector}.png" 303 | fi 304 | 305 | # remove unused ScreenSelector.bmp 306 | rm -f "${ScreenSelector}.bmp" 307 | 308 | # add a ScreenSelector.png if required 309 | if [ -f "`find "$sourcedir" -name ScreenSelector.so | head -n1`" ] && \ 310 | [ ! -f "${ScreenSelector}.png" ] ; then 311 | cp "$templates/ScreenSelector.png" "${ScreenSelector}.png" 312 | fi 313 | 314 | # icon 315 | default_icon="no" 316 | mkdir -p "$icondir" 317 | if [ -z "$icon" ] || [ ! -f "$icon" ] ; then 318 | if [ -f "$sourcedir/${name}_Data/Resources/UnityPlayer.png" ] ; then 319 | cp "$sourcedir/${name}_Data/Resources/UnityPlayer.png" "$icondir/$name.png" 320 | icon="$icondir/$name.png" 321 | else 322 | cp "$templates/icon.png" "$icondir/$name.png" 323 | icon="$icondir/$name.png" 324 | default_icon="yes" 325 | fi 326 | else 327 | cp "$icon" "$icondir/$name.png" 328 | icon="$icondir/$name.png" 329 | fi 330 | 331 | # enter packaging information 332 | echo "" 333 | if [ -z "$SHORTDESCRIPTION" ] ; then 334 | echo "" 335 | echo "Please enter a brief description," 336 | read -p "i.e. 'Unity engine video game': " SHORTDESCRIPTION 337 | fi 338 | if [ -f "$PWD/description" ] ; then 339 | cp "$PWD/description" "$topsrc" 340 | else 341 | cp "$templates/description" "$topsrc" 342 | echo "" 343 | echo "Please add a more detailed description about the game in the text file" 344 | echo "$topsrc/description" 345 | echo "and press any key to continue." 346 | read -p "" -n1 -s 347 | fi 348 | sed -i 's/\r//' "$topsrc/description" # dos2unix line endings 349 | echo "" >> "$topsrc/description" # add a new line to the end of the file 350 | if [ -z "$VERSION" ] ; then 351 | echo "" 352 | echo "Enter the game's release version. It should begin with a number" 353 | read -p "and mustn't contain any spaces or underscores: " VERSION 354 | fi 355 | if [ -z "$MAINTAINER" ] ; then 356 | echo "" 357 | echo "Enter the package maintainer information." 358 | echo "Use the following pattern: John Doe " 359 | read -p " " MAINTAINER 360 | fi 361 | if [ -z "$HOMEPAGE" ] ; then 362 | echo "" 363 | read -p "What's the game's homepage? " HOMEPAGE 364 | fi 365 | if [ -z "$YEAR" ] ; then 366 | echo "" 367 | read -p "What year is this game from? " YEAR 368 | fi 369 | if [ -z "$COPYRIGHT" ] ; then 370 | echo "" 371 | read -p "Who's holding the copyright? " COPYRIGHT 372 | fi 373 | echo "" 374 | echo "" 375 | [ -z "$SHORTDESCRIPTION" ] && SHORTDESCRIPTION="Unity engine video game" 376 | [ -z "$VERSION" ] && VERSION=$(date +%y.%m.%d.1) 377 | [ -z "$MAINTAINER" ] && MAINTAINER="John Doe " 378 | [ -z "$HOMEPAGE" ] && HOMEPAGE="http://www.unity3d.com/" 379 | [ -z "$YEAR" ] && YEAR=$(date +%Y) 380 | [ -z "$COPYRIGHT" ] && COPYRIGHT="the creator(s) of '$UPSTREAMNAME'" 381 | 382 | # create Debian files 383 | mkdir -p "$builddir/x86" 384 | cp -r "$templates" "$debian" 385 | chmod a+x "$debian/rules" "$debian/make-icons.sh" 386 | 387 | cat >> "$builddir/x86/${name}.desktop" << EOF 388 | [Desktop Entry] 389 | Name=$UPSTREAMNAME 390 | Comment=$SHORTDESCRIPTION 391 | Exec=$name 392 | Type=Application 393 | Categories=Game; 394 | StartupNotify=true 395 | Icon=$name 396 | EOF 397 | 398 | echo "debian/${name}.6" > "$builddir/x86/debian/${name}.manpages" 399 | 400 | cat >> "$builddir/x86/debian/${name}.6" << EOF 401 | .TH ${name^^} 6 "" "$(date +%d.%m.%Y)" 402 | .SH NAME 403 | $name \- $SHORTDESCRIPTION 404 | .SH SYNOPSIS 405 | .B $name 406 | .SH OPTIONS 407 | This game has no command line options. 408 | .SH DESCRIPTION 409 | EOF 410 | fold -s "$topsrc/description" >> "$builddir/x86/debian/${name}.6" 411 | cat >> "$builddir/x86/debian/${name}.6" << EOF 412 | .SH SEE ALSO 413 | .I $HOMEPAGE 414 | .SH AUTHOR 415 | $COPYRIGHT 416 | EOF 417 | 418 | cat >> "$debian/copyright" << EOF 419 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 420 | Upstream-Name: $UPSTREAMNAME 421 | Source: $HOMEPAGE 422 | 423 | Files: * 424 | Copyright: 2012-2016 Unity Technologies 425 | $YEAR $COPYRIGHT 426 | EOF 427 | cat "$templates/copyright.in" >> "$debian/copyright" 428 | 429 | [ $datapackage = "yes" ] && datadeps=", ${name}-data (= \${binary:Version})" 430 | printf '%s\n' "`cat "$topsrc/description"`" | fold -s -w 79 | sed 's/^/ /g; s/^ $/ ./g; s/ $//g' > "$topsrc/description_processed" 431 | cat >> "$debian/control.in" << EOF 432 | Source: $name 433 | Section: games 434 | Priority: optional 435 | Maintainer: $MAINTAINER 436 | Build-Depends: debhelper (>= 9) 437 | Standards-Version: 3.9.5 438 | Homepage: $HOMEPAGE 439 | 440 | Package: $name 441 | Architecture: any 442 | EOF 443 | deb_arch=$(dpkg-architecture -qDEB_HOST_ARCH) 444 | if [ $host_intel = "yes" ]; then 445 | echo "Depends: \${misc:Depends}, \${shlibs:Depends}, libpulse0$datadeps" >> "$debian/control.in" 446 | else 447 | echo "Depends: \${misc:Depends}, $assumed_dependencies, libpulse0$datadeps" >> "$debian/control.in" 448 | fi 449 | echo "Description: $SHORTDESCRIPTION" >> "$debian/control.in" 450 | cat "$topsrc/description_processed" >> "$debian/control.in" 451 | 452 | if [ $datapackage = "yes" ] ; then 453 | cat >> "$debian/control.in" << EOF 454 | 455 | Package: ${name}-data 456 | Architecture: all 457 | Depends: \${misc:Depends} 458 | Recommends: $name 459 | Description: $SHORTDESCRIPTION - game data 460 | EOF 461 | cat "$topsrc/description_processed" >> "$debian/control.in" 462 | echo " ." >> "$debian/control.in" 463 | echo " This package installs the $name game data." >> "$debian/control.in" 464 | fi 465 | 466 | uniq "$debian/control.in" "$debian/control" 467 | 468 | cat >> "$debian/changelog" << EOF 469 | $name ($VERSION) unstable; urgency=medium 470 | 471 | * Initial release 472 | 473 | -- $MAINTAINER $(date -R) 474 | EOF 475 | 476 | if [ $x86_64 = "yes" ] ; then 477 | mkdir -p "$builddir/x86_64/debian" 478 | cp -rf "$debian"/* "$builddir/x86_64/debian" 479 | cp -f "$builddir/x86/${name}.desktop" "$builddir/x86_64" 480 | cat >> "$builddir/x86_64/debian/confflags" << EOF 481 | NAME = $name 482 | ICON = "$icon" 483 | ARCH = x86_64 484 | HOST_INTEL = $host_intel 485 | DATAPACKAGE = $datapackage 486 | Z = $compression 487 | PATCHELF = $patchelf 488 | EOF 489 | fi 490 | cat >> "$debian/confflags" << EOF 491 | NAME = $name 492 | ICON = "$icon" 493 | ARCH = x86 494 | HOST_INTEL = $host_intel 495 | DATAPACKAGE = $datapackage 496 | Z = $compression 497 | PATCHELF = $patchelf 498 | EOF 499 | 500 | [ $disable_x86 = "yes" ] && rm -rf "$builddir/x86" 501 | [ $disable_x86_64 = "yes" ] && rm -rf "$builddir/x86_64" 502 | if [ -d "$builddir/x86" ] ; then 503 | echo "hard link files to build/x86... " 504 | mkdir -p "$builddir/x86/source" 505 | cp -vrl "$sourcedir/${name}_Data" "$sourcedir/${name}.x86" "$builddir/x86/source" 506 | echo "done" 507 | fi 508 | if [ -d "$builddir/x86_64" ] ; then 509 | echo "hard link files to build/x86_64..." 510 | mkdir -p "$builddir/x86_64/source" 511 | cp -vrl "$sourcedir/${name}_Data" "$sourcedir/${name}.x86_64" "$builddir/x86_64/source" 512 | echo "done" 513 | fi 514 | if [ -d "$builddir/x86" ] && [ -d "$builddir/x86_64" ] ; then 515 | echo "arch_only = --arch" >> "$builddir/x86_64/debian/confflags" 516 | fi 517 | 518 | cat <> Summary << 521 | name: $UPSTREAMNAME 522 | application/package name: $name 523 | description: $SHORTDESCRIPTION 524 | package version: $VERSION 525 | packagemaintainer: $MAINTAINER 526 | homepage: $HOMEPAGE 527 | year: $YEAR 528 | copyright: $COPYRIGHT 529 | 530 | build datapackage? $datapackage 531 | compression method: $compression 532 | disable x86? $disable_x86 533 | disable x86_64? $disable_x86_64 534 | use patchelf? $patchelf 535 | 536 | detailed description: 537 | $(cat "$topsrc/description_processed") 538 | 539 | 540 | The files are prepared. Run '$appname build' to build Debian packages. 541 | Or modify the the files in '$builddir' first. 542 | EOL 543 | 544 | exit 0 545 | fi 546 | 547 | 548 | ################## build ################## 549 | buildpackage () { 550 | arch=${1} 551 | if [ -d "$builddir/${arch}" ] ; then 552 | name="$(grep 'NAME = ' $builddir/${arch}/debian/confflags | sed -e 's/NAME = //')" 553 | cd "$builddir/${arch}" 554 | chmod a+x debian/rules source/${name}.${arch} 555 | mv source/${name}.${arch} source/${name} 556 | test ${arch} = "x86" && purge=x86_64 || purge=x86 557 | rm -rf source/${name}_Data/Mono/${purge} source/${name}_Data/Plugins/${purge} source/${name}.${purge} 558 | dpkg-buildpackage -b -us -uc 2>&1 | tee "$builddir/${arch}-build.log" 559 | fi 560 | } 561 | 562 | if [ $mode = "build" ] ; then 563 | if [ ! -d "$builddir/x86" ] && [ ! -d "$builddir/x86_64" ] ; then 564 | echo "no files in '$builddir'!" 565 | errorExit "run '$appname prepare ' first" 566 | fi 567 | 568 | buildpackage x86 569 | buildpackage x86_64 570 | 571 | cd "$builddir" 572 | echo "" 573 | ls *.deb >/dev/null 574 | if [ $(echo $?) = 0 ] ; then 575 | for f in *.deb ; do 576 | echo "$f:" 577 | dpkg-deb -I $f 578 | lintian $f 579 | echo "" 580 | done 2>&1 | tee "$builddir/packages.log" 581 | for f in *.deb ; do 582 | echo "$f:" 583 | dpkg-deb -c $f 584 | echo "" 585 | done 2>&1 | tee -a "$builddir/packages.log" 586 | fi 587 | cp -f *.deb "$output" 588 | echo "Debian packages have been copied to '$output'" 589 | fi 590 | 591 | exit 0 592 | -------------------------------------------------------------------------------- /u2deb.1: -------------------------------------------------------------------------------- 1 | .TH U2DEB 1 "" "" 2 | .SH NAME 3 | u2deb \- create Debian packages of Unity engine games 4 | 5 | .SH SYNOPSIS 6 | .B u2deb \-h \fR| \fBhelp 7 | .br 8 | .B u2deb \-p \fR| \fBprepare \fR [OPTIONS] 9 | .br 10 | .B u2deb \-b \fR| \fBbuild \fR| \fBmake \fR[OPTIONS] 11 | .br 12 | .B u2deb \-c \fR| \fBclean \fR[OPTIONS] 13 | 14 | .SH DESCRIPTION 15 | Games that were built on the Unity engine became quite popular these days. 16 | Those games can be built to run natively on GNU/Linux systems. 17 | This Bash script helps you to almost automatically create Debian packages of such games. 18 | 19 | Package a Unity game in two steps. First run \fBu2deb prepare \fR and follow the instructions. 20 | The game files will be copied into a temporary directory and Debian packaging files will be generated. 21 | You can manually edit those files. Then run \fBu2deb build\fR to create the package. 22 | To delete the temporary files run \fBu2deb clean\fR. 23 | You can get a full list of options and environment variables with \fBu2deb --help\fR. 24 | 25 | .SH OPTIONS 26 | .TP 27 | \fB\-h, \-\-help 28 | show help text and quit 29 | .TP 30 | \fB\-V, \-\-version 31 | display version info and quit 32 | .TP 33 | \fB\-p, prepare \fR 34 | copy files from and prepare a Debian source package 35 | .TP 36 | \fB\-b, build, make 37 | build binary packages 38 | .TP 39 | \fB\-c, clean 40 | delete the working tree 41 | .TP 42 | \fB\-o=\fR,\fB\-\-output\fR= 43 | save Debian packages in 44 | .TP 45 | \fB\-\-working-dir\fR= 46 | Working directory where the temporary files are stored. 47 | Default: /tmp/UnityEngine2deb_tmp 48 | .TP 49 | \fB\-d, \-\-data 50 | build a separate package for architecture-independent files 51 | .TP 52 | \fB\-\-gzip 53 | use gzip instead of xz compression (faster compression at the cost of bigger packages) 54 | .TP 55 | \fB\-\-icon=\fR 56 | use this icon for the desktop entry 57 | .TP 58 | \fB\-\-no\-x86 59 | don't build an i386 package 60 | .TP 61 | \fB\-\-no\-x86_64 62 | don't build an amd64 package 63 | .TP 64 | \fB\-\-no\-patchelf 65 | don't remove unused DT_NEEDED entries from ELF binary file headers 66 | 67 | .SH "Environment variables" 68 | .TP 69 | \fBUPSTREAMNAME 70 | the original name of the game, including special chars or spaces 71 | .TP 72 | \fBPKGNAME 73 | specify a name for the executable and the package 74 | .TP 75 | \fBSHORTDESCRIPTION 76 | a brief game description for the package and menu entry 77 | .TP 78 | \fBVERSION 79 | the game's upstream version 80 | .TP 81 | \fBMAINTAINER 82 | The package maintainer. 83 | Make sure to use the following pattern: John Doe 84 | .TP 85 | \fBHOMEPAGE 86 | homepage of the game or the developer 87 | .TP 88 | \fBYEAR 89 | the year when the game was released 90 | .TP 91 | \fBCOPYRIGHT 92 | Who's holding the copyright? 93 | 94 | .SH SEE ALSO 95 | .I https://github.com/darealshinji/UnityEngine2deb 96 | .PP 97 | .BR copyunityengine (1), 98 | .BR u2mojo (1) 99 | 100 | .SH AUTHOR 101 | djcj 102 | -------------------------------------------------------------------------------- /u2mojo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Copyright (c) 2015-2016, djcj 6 | # 7 | # Permission is hereby granted, free of charge, to any person obtaining a copy 8 | # of this software and associated documentation files (the "Software"), to deal 9 | # in the Software without restriction, including without limitation the rights 10 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | # copies of the Software, and to permit persons to whom the Software is 12 | # furnished to do so, subject to the following conditions: 13 | # 14 | # The above copyright notice and this permission notice shall be included in 15 | # all copies or substantial portions of the Software. 16 | # 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | # THE SOFTWARE. 24 | 25 | LANG=C 26 | LANGUAGE=C 27 | LC_ALL=C 28 | 29 | appversion="16.02.04.1" 30 | 31 | appname=$(basename "$0") 32 | appname_u2deb="u2deb" 33 | scriptpath="$(dirname "$(readlink -f "$0")")" 34 | tmpdir="`mktemp -d /tmp/UnityEngine2mojo_tmpXXXXXXXXXX`" 35 | mojoreadme="`mktemp -u /tmp/mojoreadme_XXXXXXXXXX`" 36 | mojobins="`mktemp -d /tmp/mojobins_XXXXXXXXXX`" 37 | templates_url="https://raw.githubusercontent.com/darealshinji/UnityEngine2deb/master/templates" 38 | 39 | mojobins_version="0.0.885" 40 | mojobins_extracted="MojoSetup-Bins-$mojobins_version" 41 | mojobins_archive="${mojobins_extracted}-linux.tar.xz" 42 | mojobins_md5sum="746c1098ab48465eb35eb4b76b5666ac" 43 | mojobins_url="https://github.com/darealshinji/MojoSetup-Bins/releases/download/v$mojobins_version/$mojobins_archive" 44 | 45 | errorExit() { 46 | echo "error: $1" 47 | exit 1 48 | } 49 | 50 | help() { 51 | cat << EOF 52 | 53 | Create Mojo Setup packages of Unity engine games 54 | 55 | Usage: 56 | $appname -h | --help | -V | --version 57 | $appname [options] 58 | 59 | Options: 60 | -h, --help print this message 61 | -V, --version display version info and quit 62 | 63 | --icon= use this icon for the desktop entry 64 | --readme= use this readme file 65 | 66 | Environment variables: 67 | FULLNAME the original name of the game, including special chars 68 | or spaces 69 | SHORTNAME short name, used as executable, directory and package name 70 | VERSION release version string 71 | VENDOR copyright holder (or publisher/developer) 72 | 73 | EOF 74 | } 75 | 76 | # parse commands 77 | case x"$1" in 78 | x|x--help|x-help|x-h|x-\?) 79 | help;; 80 | x-V|x-v|x--version|x-version) 81 | echo $appversion; exit 0;; 82 | esac 83 | for opt; do 84 | optarg="${opt#*=}" 85 | case "$opt" in 86 | --icon=*) 87 | custom_icon="$optarg" 88 | ;; 89 | --readme=*) 90 | readme="$optarg" 91 | ;; 92 | --help|-h|--version|-V) 93 | ;; 94 | *) 95 | origpath="$optarg" 96 | ;; 97 | esac 98 | done 99 | 100 | # templates 101 | if [ -d "$scriptpath/templates" ] ; then 102 | templates="$scriptpath/templates" 103 | elif [ -d "$scriptpath/../share/$appname_u2deb" ] ; then 104 | templates="$scriptpath/../share/$appname_u2deb" 105 | elif [ -d "/usr/local/share/$appname_u2deb" ] ; then 106 | templates="/usr/local/share/$appname_u2deb" 107 | elif [ -d "/usr/share/$appname_u2deb" ] ; then 108 | templates="/usr/share/$appname_u2deb" 109 | fi 110 | 111 | # check $origpath 112 | if [ -z "$origpath" ] ; then 113 | errorExit "no path specified" 114 | elif [ ! -e "$origpath" ] ; then 115 | errorExit "path to '$origpath' doesn't exist" 116 | elif [ ! -d "$origpath" ] ; then 117 | errorExit "'$origpath' is not a directory" 118 | else 119 | path="$( cd "$origpath" && pwd )" 120 | fi 121 | 122 | # get the application name 123 | filename="$(basename "$(find "$origpath" -type d -name *_Data)" | head -c-6)" 124 | [ -z "$SHORTNAME" ] && name="$filename" || name="$SHORTNAME" 125 | [ -z "$FULLNAME" ] && FULLNAME="$name" 126 | if [ -n "$FULLNAME" ] && [ -n "$SHORTNAME" ] ; then 127 | name="$SHORTNAME" 128 | fi 129 | 130 | # check for architectures 131 | x86="no" 132 | x86_64="no" 133 | rename_to_x86="no" 134 | rename_to_x86_64="no" 135 | [ -f "$origpath/$filename".x86 ] && x86="yes" 136 | [ -f "$origpath/$filename".x86_64 ] && x86_64="yes" 137 | if [ $x86 = "no" ] && [ $x86_64 = "no" ] ; then 138 | echo "neither '$filename.x86' nor '$filename.x86_64' found" 139 | if [ -f "$origpath/$filename" ] ; then 140 | if [ "$(file "$origpath/$filename" | grep 'ELF 32-bit')" ]; then 141 | echo "'$filename' (x86) found" 142 | x86="yes" 143 | rename_to_x86="yes" 144 | elif [ "$(file "$origpath/$filename" | grep 'ELF 64-bit')" ]; then 145 | echo "'$filename' (x86_64) found" 146 | x86_64="yes" 147 | rename_to_x86_64="yes" 148 | else 149 | errorExit "'$filename' was found but is not a valid ELF binary" 150 | fi 151 | else 152 | errorExit "couldn't find '$filename' either" 153 | fi 154 | fi 155 | 156 | # copy source files 157 | echo "copy source files... " 158 | mkdir -p "$tmpdir" 159 | cp -vr "$origpath"/* "$tmpdir" 160 | echo "done" 161 | 162 | # remove executable bits 163 | find "$tmpdir" -type f -exec chmod a-x '{}' \; 164 | 165 | # remove executable stack 166 | export PATH="/usr/local/sbin:/usr/sbin:/sbin:${PATH}" # on Debian /sbin isn't in PATH by default 167 | execstack="$(whereis -b execstack | awk '{print $2}')" 168 | if [ "x$execstack" != "x" ]; then 169 | find "$tmpdir" -name libmono.so -exec execstack -c '{}' \; 170 | fi 171 | 172 | # delete unnecessary files 173 | for f in libCSteamworks.so libsteam_api.so libSteamworksNative.so SteamworksNative.dll \ 174 | \*.dll.mdb Thumbs.db .DS_Store ; 175 | do 176 | find "$tmpdir" -name "$f" -delete 177 | done 178 | rm -rf `find "$tmpdir" -type d -name __MACOSX` 179 | 180 | # rename application 181 | name=$(echo "$name" | sed -e 's/\(.*\)/\L\1/; s/\ -\ /-/g; s/\ /-/g; s/_/-/g') 182 | [ "$filename" != "$name" ] && rename "s/$filename/$name/" "$tmpdir"/* 183 | if [ "$rename_to_x86" = "yes" ] && [ -f "$tmpdir/$name" ] ; then 184 | mv "$tmpdir/$name" "$tmpdir/${name}.x86" 185 | echo "application was renamed to ${name}.x86" 186 | elif [ "$rename_to_x86_64" = "yes" ] && [ -f "$tmpdir/$name" ] ; then 187 | mv "$tmpdir/$name" "$tmpdir/${name}.x86_64" 188 | echo "application was renamed to ${name}.x86_64" 189 | fi 190 | 191 | # set executable bits 192 | test "$x86" = "yes" && chmod 0755 "$tmpdir/${name}.x86" 193 | test "$x86_64" = "yes" && chmod 0755 "$tmpdir/${name}.x86_64" 194 | 195 | # generate startup script 196 | cat < "$tmpdir/start-game.sh" 197 | #!/bin/sh 198 | cd "\$(dirname "\$(readlink -f "\$0")")" 199 | bin="${name}.x86" 200 | if [ "\$(uname -m)" = "x86_64" ] && [ -x "\${bin}_64" ]; then 201 | bin="\${bin}_64" 202 | fi 203 | "./\$bin" \$@ 204 | EOF 205 | chmod 0755 "$tmpdir/start-game.sh" 206 | 207 | # ScreenSelector/splash image 208 | splash="$tmpdir/${name}_Data/ScreenSelector.png" 209 | if [ ! -f "$splash" ] && [ -d "$templates" ] ; then 210 | cp "$templates/ScreenSelector.png" "$splash" 211 | fi 212 | 213 | # icon 214 | icon="$tmpdir/${name}_Data/Resources/UnityPlayer.png" 215 | test -f "$custom_icon" && cp -f "$custom_icon" "$icon" 216 | if [ ! -f "$icon" ] && [ -d "$templates" ] ; then 217 | cp "$templates/icon.png" "$icon" 218 | fi 219 | 220 | # readme 221 | if [ -f "$readme" ] ; then 222 | cp "$readme" "$mojoreadme" 223 | else 224 | echo "This game was built on the Unity engine (http://unity3d.com) and has been exported to GNU/Linux." > "$mojoreadme" 225 | echo "" 226 | echo "Please add a more detailed description about the game in the text file" 227 | echo "\`$mojoreadme'" 228 | echo "and press any key to continue." 229 | read -p "" -n1 -s 230 | fi 231 | 232 | # enter packaging information 233 | echo "" 234 | echo "name: $FULLNAME" 235 | echo "application/package name: $name" 236 | if [ -z "$VERSION" ] ; then 237 | echo "" 238 | echo "Enter the game's release version. It should begin with a number" 239 | read -p "and mustn't contain and spaces or underscores: " VERSION 240 | else 241 | echo "package version: $VERSION" 242 | fi 243 | if [ -z "$VENDOR" ] ; then 244 | echo "" 245 | read -p "Who's holding the copyright? " VENDOR 246 | else 247 | echo "copyright: $VENDOR" 248 | fi 249 | echo "" 250 | echo "" 251 | [ -z "$SHORTDESCRIPTION" ] && SHORTDESCRIPTION="Unity engine video game" 252 | [ -z "$VERSION" ] && VERSION=$(date +%y.%m.%d.1) 253 | [ -z "$VENDOR" ] && VENDOR="the creator of '$name'" 254 | 255 | # build Mojo setup 256 | cd $mojobins 257 | wget $mojobins_url 258 | echo "$mojobins_md5sum *$mojobins_archive" | md5sum -c - 259 | tar xvf $mojobins_archive 260 | cd $mojobins_extracted 261 | test -f $splash || wget -O "$splash" "$templates_url/ScreenSelector.png" 262 | test -f $icon || wget -O "$icon" "$templates_url/icon.png" 263 | sed -i 's|category = "Misc;"|category = "Game;"|g' config.lua.in # force category "Game" 264 | export FULLNAME="$FULLNAME" 265 | export SHORTNAME=$name 266 | export VERSION=$VERSION 267 | export VENDOR="$VENDOR" 268 | export START=start-game.sh 269 | export ICON="${name}_Data/Resources/UnityPlayer.png" 270 | export SPLASH=$splash 271 | export README=$mojoreadme 272 | ./create-package.sh $tmpdir 273 | cp -f ${name}-${VERSION}-install.sh "$HOME" 274 | echo "File saved at \`$HOME/${name}-${VERSION}-install.sh'" 275 | cd "$HOME" 276 | 277 | # clean-up 278 | rm -rf $tmpdir $mojobins $mojoreadme 279 | 280 | exit 0 281 | -------------------------------------------------------------------------------- /u2mojo.1: -------------------------------------------------------------------------------- 1 | .TH U2DEB 1 "" "" 2 | .SH NAME 3 | u2mojo \- create Mojo Setup packages of Unity engine games 4 | 5 | .SH SYNOPSIS 6 | .B u2mojo \-h \fR| \fB\-\-help \fR| \fB\-V \fR| \fB\-\-version 7 | .br 8 | .B u2mojo \fR[options] 9 | 10 | .SH DESCRIPTION 11 | Games that were built on the Unity engine became quite popular these days. 12 | Those games can be built to run natively on GNU/Linux systems. 13 | MojoSetup is a portable, flexible installation application and this script 14 | helps you to create Mojo Setup packages of Unity engine games. 15 | The MojoSetup binaries for amd64 and i386 architectures will be downloaded from Github. 16 | 17 | .SH OPTIONS 18 | .TP 19 | \fB\-h, \-\-help 20 | show help text and quit 21 | .TP 22 | \fB\-V, \-\-version 23 | display version info and quit 24 | .TP 25 | \fB\-\-icon=\fR 26 | use this icon for the desktop entry 27 | .TP 28 | \fB\-\-readme=\fR 29 | use this readme file 30 | 31 | .SH "Environment variables" 32 | .TP 33 | \fBFULLNAME 34 | the original name of the game, including special chars or spaces 35 | .TP 36 | \fBSHORTNAME 37 | short name, used as executable, directory and package name 38 | .TP 39 | \fBVERSION 40 | release version string 41 | .TP 42 | \fBVENDOR 43 | copyright holder (or publisher/developer) 44 | 45 | .SH SEE ALSO 46 | .I https://github.com/darealshinji/UnityEngine2deb 47 | .br 48 | .I https://github.com/darealshinji/MojoSetup-Bins 49 | .PP 50 | .BR copyunityengine (1), 51 | .BR u2deb (1) 52 | 53 | .SH AUTHOR 54 | djcj 55 | --------------------------------------------------------------------------------