You are not logged in.
GOG is finally supporting Linux!
http://www.gog.com/news/gogcom_now_supports_linux
Bought a few games on sale today and will try to add PKGBUILDs to AUR when I'll have time. Should I follow this quide if it is not outdated?
http://gogwiki.com/wiki/AUR
Do you know of any other sources for PKGBUILDs?
Offline
This should perhaps be moved to AUR Issues, Discussion & PKGBUILD Requests.
I was about to package a game for which GOG provides a tar.gz. I'm not sure those guidelines apply to native versions. Why would anyone install a wine version now that there are native versions? If there is a native version (which will always be the preferred version), then why have gog-sidmeierscolonization-{,base,native} and not only gog-sidmeierscolonization?
Though I somewhat agree with their policy on save files. Colonization at least tries to save files to $GAME_PATH/data/MPS/COLONIZE/COLONY00.SAV. If installed to /opt the user won't have access. I just wish they'd used $HOME/.local/share/gog/$GAME instead.
My PKGBUILD is something like this:
pkgname=gog-sidmeierscolonization
pkgver=1.0.0.3
pkgrel=1
pkgdesc="a turn-based strategy game themed on the early European colonization of the New World"
arch=("i686" "x86_64")
url="http://www.gog.com/game/sid_meiers_colonization"
license=("custom")
source=("sid_meier_s_colonization_${pkgver}.tar.gz"
"sidmeierscolonization")
sha256sums=('e5924289e5a17a6938591e0e5d78a3ac0b1af6b8892ab63023f5b7c3fcbd610d'
'675ac219ad406c255a2dbce4494f50b69e6578fc2e1a23dfcdee211571677aa5')
depends=(libpng12 unionfs-fuse)
package() {
mkdir -p "${pkgdir}/opt/gog/sidmeierscolonization"
cp -r "${srcdir}/Sid Meiers Colonization"/* "${pkgdir}/opt/gog/sidmeierscolonization"
install -Dm755 "${srcdir}/sidmeierscolonization" "${pkgdir}/usr/bin/sidmeierscolonization"
}
PKGEXT=.pkg.tar
sidmeierscolonization:
#!/usr/bin/bash
gogdir="/opt/gog/sidmeierscolonization"
homedir="$HOME/.gog/sidmeierscolonization"
mkdir -p "$homedir"/{game,config/data/MPS/COLONIZE}
if [[ ! -e "$homedir/config/dosboxCOL.conf" ]]; then
cp "$gogdir/dosboxCOL.conf" "$homedir/config/dosboxCOL.conf"
fi
unionfs "$homedir/config=RW:$gogdir=RO" "$homedir/game"
"$homedir"/game/start.sh
fusermount -u "$homedir/game"
Offline
Moving to AUR issues, Discussion and PKGBUILD requests
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Wow that's great news; thanks for this! If it wasn't for this post I wouldn't have known GOG had released official support today. Looking forward to see what they bring to the table.
Offline
Sidk,
keep in mind that many of the games on that list are from the dos area, and have ran fine on linux using dosbox for years.
Sid meiers Colonization is one of those games, i own the original and have played it many times on linux.
in short, many of the games on the list are NOT native versions.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Offline
I realise it's a dosbox game. OK, I suppose someone may want to use a $game-base package to install only the data, then use their own dosbox installation rather than the one GOG bundle.
When I extract the tar.gz which GOG provide I get this structure:
$ tree -d
.
├── data # Contains no other files
│ └── MPS # Contains no other files
│ └── COLONIZE # Contains all the game data
├── docs # Contains dosbox source code, GOG's EULA, Game manual and reference PDFs
├── dosbox # Contains dosbox
│ └── libs
│ ├── i686
│ └── x86_64
└── support # Contains sample .desktop file, scripts to generate debugging information
So, for dosbox games, should I follow the recommendations and make a $game-base package which installs that entire tree structure except for the dosbox installation and the dosbox source code? Then have another $game-dosbox package which depends on $game-base and dosbox and installs the /usr/bin/$game script?
Offline
Arch Wiki doesn't have guidelines for dosbox or GOG packages.
Tea / Xyem who started the project you linked to in your first post, stated in the gog forum thread their intention was to get the package in aur at some point and would inform arch community of their work.
No idea if they have done that yet.
They have not updated the project page to reflect gog new linux support, i suggest try contacting them through gog forum or gog irc channel.
Personally i don't use pacman to manage my programs that use dosbox or wine, but my systems are for my use only.
If multiple people use a system, pacman should be used to maintain those packages.
Last edited by Lone_Wolf (2014-07-26 11:25:31)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Would be nice if we could get some new guidelines AUR packages now that GOG supports Linux officially.
Offline
I realise it's a dosbox game. OK, I suppose someone may want to use a $game-base package to install only the data, then use their own dosbox installation rather than the one GOG bundle.
When I extract the tar.gz which GOG provide I get this structure:
$ tree -d . ├── data # Contains no other files │ └── MPS # Contains no other files │ └── COLONIZE # Contains all the game data ├── docs # Contains dosbox source code, GOG's EULA, Game manual and reference PDFs ├── dosbox # Contains dosbox │ └── libs │ ├── i686 │ └── x86_64 └── support # Contains sample .desktop file, scripts to generate debugging information
So, for dosbox games, should I follow the recommendations and make a $game-base package which installs that entire tree structure except for the dosbox installation and the dosbox source code? Then have another $game-dosbox package which depends on $game-base and dosbox and installs the /usr/bin/$game script?
IMHO seems a bit excessive to rip out the dosbox/wine installation from the packages. The game comes with a specific version of dosbox or wine why risk additional breakage? Regarding creating a launch script wouldn't symlinking start.sh to /usr/bin/gog-game be enough? That is what is suggested with the .desktop file.
Offline
Here is my suggestion for a PKGBUILD for the game Stargunner (dosbox and free on GOG).
pkgname=gog-stargunner
pkgver=1.0.0.8
pkgrel=1
pkgdesc="This sci-fi scrolling shooter brings you some of the most intense action ever seen on the PC."
arch=("i686" "x86_64")
url="http://www.gog.com/game/stargunner"
license=("custom")
source=("gog_stargunner_${pkgver}.tar.gz")
sha256sums=('d04dd70b598fdd3b23e7d05fa1626feed08fd93d98511775dc33e2a537d69311')
depends=(libpng12)
package() {
cd ${srcdir}
mkdir -p "${pkgdir}"/opt/gog/stargunner
cp -r "${srcdir}"/Stargunner/* "${pkgdir}"/opt/gog/stargunner
install -Dm644 "${srcdir}"/Stargunner/support/gog-stargunner-primary.desktop "${pkgdir}"/usr/share/applications/gog-stargunner.desktop
install -Dm644 "${srcdir}"/Stargunner/support/gog-stargunner.png "${pkgdir}"/usr/share/pixmaps/gog-stargunner.png
install -Dm644 "${srcdir}"/Stargunner/docs/End\ User\ License\ Agreement.txt "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE
install -d "${pkgdir}"/usr/bin
ln -s "${pkgdir}"/opt/gog/stargunner/start.sh "${pkgdir}"/usr/bin/gog-stargunner
}
PKGEXT=.pkg.tar
any suggestions are welcome.
EDIT: Updated PKGBUILD to include installation of license file and fixed the symlink.
Last edited by fettouhi (2014-08-11 14:39:23)
Offline
add 'pkbase=gog-stargunner' (recent aur split packages support requires every pacakge to have a pkgbase)
Also when using a custom license, you must put the license in /usr/share/licenses/$pkgbase .
other then that the PKGBUILD looks ok to me.
However, i expect you may get a problem at runtime with stargunner saving files.
Could you post the dosbox.conf file used by gog-stargunner ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
add 'pkbase=gog-stargunner' (recent aur split packages support requires every pacakge to have a pkgbase)
Also when using a custom license, you must put the license in /usr/share/licenses/$pkgbase .
other then that the PKGBUILD looks ok to me.
However, i expect you may get a problem at runtime with stargunner saving files.
Could you post the dosbox.conf file used by gog-stargunner ?
Thanks for the feedback. Here is the dosbox.conf file for stargunner.
# Lines starting with a # are commentlines.
# They are used to (briefly) document the effect of each option.
[sdl]
# fullscreen -- Start dosbox directly in fullscreen.
# fulldouble -- Use double buffering in fullscreen.
# fullresolution -- What resolution to use for fullscreen: original or fixed size (e.g. 1024x768).
# windowresolution -- Scale the window to this size IF the output device supports hardware scaling.
# output -- What to use for output: surface,overlay,opengl,openglnb,ddraw.
# autolock -- Mouse will automatically lock, if you click on the screen.
# sensitiviy -- Mouse sensitivity.
# waitonerror -- Wait before closing the console if dosbox has an error.
# priority -- Priority levels for dosbox: lowest,lower,normal,higher,highest,pause (when not focussed).
# Second entry behind the comma is for when dosbox is not focused/minimized.
# mapperfile -- File used to load/save the key/event mappings from.
# usescancodes -- Avoid usage of symkeys, might not work on all operating systems.
fullscreen=true
fulldouble=false
fullresolution=original
windowresolution=original
output=overlay
autolock=true
sensitivity=100
waitonerror=true
priority=higher,normal
mapperfile=mapper.txt
usescancodes=true
[dosbox]
# language -- Select another language file.
# memsize -- Amount of memory DOSBox has in megabytes.
# machine -- The type of machine tries to emulate:hercules,cga,tandy,pcjr,vga.
# captures -- Directory where things like wave,midi,screenshot get captured.
language=
machine=svga_s3
captures=capture
memsize=32
[render]
# frameskip -- How many frames DOSBox skips before drawing one.
# aspect -- Do aspect correction, if your output method doesn't support scaling this can slow things down!.
# scaler -- Scaler used to enlarge/enhance low resolution modes.
# Supported are none,normal2x,normal3x,advmame2x,advmame3x,hq2x,hq3x,
# 2xsai,super2xsai,supereagle,advinterp2x,advinterp3x,
# tv2x,tv3x,rgb2x,rgb3x,scan2x,scan3x.
# If forced is appended (like scaler=hq2x forced), the scaler will be used
# even if the result might not be desired.
frameskip=0
aspect=false
scaler=normal2x
[cpu]
# core -- CPU Core used in emulation: normal,simple,dynamic,auto.
# auto switches from normal to dynamic if appropriate.
# cycles -- Amount of instructions DOSBox tries to emulate each millisecond.
# Setting this value too high results in sound dropouts and lags.
# You can also let DOSBox guess the correct value by setting it to max.
# The default setting (auto) switches to max if appropriate.
# cycleup -- Amount of cycles to increase/decrease with keycombo.
# cycledown Setting it lower than 100 will be a percentage.
core=auto
cycles=fixed 25000
cycleup=1000
cycledown=1000
[mixer]
# nosound -- Enable silent mode, sound is still emulated though.
# rate -- Mixer sample rate, setting any devices higher than this will
# probably lower their sound quality.
# blocksize -- Mixer block size, larger blocks might help sound stuttering
# but sound will also be more lagged.
# prebuffer -- How many milliseconds of data to keep on top of the blocksize.
nosound=false
rate=22050
blocksize=2048
prebuffer=80
[midi]
# mpu401 -- Type of MPU-401 to emulate: none, uart or intelligent.
# device -- Device that will receive the MIDI data from MPU-401.
# This can be default,alsa,oss,win32,coreaudio,none.
# config -- Special configuration options for the device. In Windows put
# the id of the device you want to use. See README for details.
mpu401=intelligent
device=default
config=
[sblaster]
# sbtype -- Type of sblaster to emulate:none,sb1,sb2,sbpro1,sbpro2,sb16.
# sbbase,irq,dma,hdma -- The IO/IRQ/DMA/High DMA address of the soundblaster.
# mixer -- Allow the soundblaster mixer to modify the DOSBox mixer.
# oplmode -- Type of OPL emulation: auto,cms,opl2,dualopl2,opl3.
# On auto the mode is determined by sblaster type.
# All OPL modes are 'Adlib', except for CMS.
# oplrate -- Sample rate of OPL music emulation.
sbtype=sb16
sbbase=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=22050
[gus]
# gus -- Enable the Gravis Ultrasound emulation.
# gusbase,irq1,irq2,dma1,dma2 -- The IO/IRQ/DMA addresses of the
# Gravis Ultrasound. (Same IRQ's and DMA's are OK.)
# gusrate -- Sample rate of Ultrasound emulation.
# ultradir -- Path to Ultrasound directory. In this directory
# there should be a MIDI directory that contains
# the patch files for GUS playback. Patch sets used
# with Timidity should work fine.
gus=false
gusrate=22050
gusbase=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=C:\ULTRASND
[speaker]
# pcspeaker -- Enable PC-Speaker emulation.
# pcrate -- Sample rate of the PC-Speaker sound generation.
# tandy -- Enable Tandy Sound System emulation (off,on,auto).
# For auto Tandysound emulation is present only if machine is set to tandy.
# tandyrate -- Sample rate of the Tandy 3-Voice generation.
# disney -- Enable Disney Sound Source emulation. Covox Voice Master and Speech Thing compatible.
pcspeaker=true
pcrate=22050
tandy=auto
tandyrate=22050
disney=true
[joystick]
# joysticktype -- Type of joystick to emulate: auto (default), none,
# 2axis (supports two joysticks,
# 4axis (supports one joystick, first joystick used),
# 4axis_2 (supports one joystick, second joystick used),
# fcs (Thrustmaster), ch (CH Flightstick).
# none disables joystick emulation.
# auto chooses emulation depending on real joystick(s).
# timed -- enable timed intervals for axis. (false is old style behaviour).
# autofire -- continuously fires as long as you keep the button pressed.
# swap34 -- swap the 3rd and the 4th axis. can be useful for certain joysticks.
# buttonwrap -- enable button wrapping at the number of emulated buttons.
joysticktype=auto
timed=true
autofire=false
swap34=false
buttonwrap=true
[serial]
# serial1-4 -- set type of device connected to com port.
# Can be disabled, dummy, modem, nullmodem, directserial.
# Additional parameters must be in the same line in the form of
# parameter:value. Parameter for all types is irq.
# for directserial: realport (required), rxdelay (optional).
# for modem: listenport (optional).
# for nullmodem: server, rxdelay, txdelay, telnet, usedtr,
# transparent, port, inhsocket (all optional).
# Example: serial1=modem listenport:5000
serial1=dummy
serial2=dummy
serial3=disabled
serial4=disabled
[dos]
# xms -- Enable XMS support.
# ems -- Enable EMS support.
# umb -- Enable UMB support.
# keyboardlayout -- Language code of the keyboard layout (or none).
xms=true
ems=true
umb=true
keyboardlayout=none
Offline
Hmm,
while i would use different values in [render] [cpu] & [midi] section (good values for those those tend to be hardware / system dependent) ,
i was expecting to see an [autoexec] section, that among other things usually shows where on the native fielsystem dosbox puts the drives the program gets to see.
Maybe gog uses another method to set those, please post the *.desktop file so we can see how the game is started.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Hmm,
while i would use different values in [render] [cpu] & [midi] section (good values for those those tend to be hardware / system dependent) ,
i was expecting to see an [autoexec] section, that among other things usually shows where on the native fielsystem dosbox puts the drives the program gets to see.Maybe gog uses another method to set those, please post the *.desktop file so we can see how the game is started.
Here is the desktop file
[Desktop Entry]
Version=1.0
Name=Stargunner
Comment=Stargunner (GOG.com)
Exec=gog-stargunner
Icon=gog-stargunner
Terminal=false
Type=Application
Categories=Game;
and here is start.sh which I symlink in my PKGBUILD:
#!/bin/bash
# GOG.com (www.gog.com)
# Stargunner
# Package info
declare -r PACKAGE_NAME="gog-stargunner"
declare -r VERSION="1.0.0.8"
declare -r VERSION_DEV="n/a"
declare -r GAME_NAME="Stargunner"
# Global
declare -r CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Initialization
cd "${CURRENT_DIR}"
# Load GOG.com Library
source support/gog_com.shlib
# Actions
run_game() {
echo "Running ${GAME_NAME}"
run_dosbox "dosbox_stargun.conf" "dosbox_stargun_single.conf"
}
run_game_settings() {
echo "Running ${GAME_NAME} settings"
export LC_ALL="C"
run_dosbox "dosbox_stargun.conf" "dosbox_stargun_settings.conf"
}
install() {
echo ""
}
default() {
run_game
}
# Options
define_option "-s" "--start" "start ${GAME_NAME} [default]" "run_game" "$@"
define_option "-sset" "--settings" "start ${GAME_NAME} Settings" "run_game_settings" "$@"
# Defaults
standard_options "$@"
Offline
Can't login to GOG atm, so i can't check things myself.
That start.sh indicates GOG uses it's own launcher to start dosbox, using an internal command run_dosbox .
I assume the file you posted was dosbox_stargun.conf ?
the content of dosbox_stargun_single.conf & dosbos_stargun_settings.conf might give more clues.
Alternatively you could just instal stargunner, start it & try to save a file, then quit stargunner.
Then try to find that file on your system.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Can't login to GOG atm, so i can't check things myself.
That start.sh indicates GOG uses it's own launcher to start dosbox, using an internal command run_dosbox .
I assume the file you posted was dosbox_stargun.conf ?
the content of dosbox_stargun_single.conf & dosbos_stargun_settings.conf might give more clues.
Alternatively you could just instal stargunner, start it & try to save a file, then quit stargunner.
Then try to find that file on your system.
Here is the content of dosbos_stargun_settings.conf
[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
mount C "data"
c:
cls
SETUP.exe
exit
and dosbox_stargun_single.conf
[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
mount C "data"
c:
cls
STARGUN.exe
exit
Offline
Can't login to GOG atm, so i can't check things myself.
That start.sh indicates GOG uses it's own launcher to start dosbox, using an internal command run_dosbox .
I assume the file you posted was dosbox_stargun.conf ?
the content of dosbox_stargun_single.conf & dosbos_stargun_settings.conf might give more clues.
Alternatively you could just instal stargunner, start it & try to save a file, then quit stargunner.
Then try to find that file on your system.
I ran the game from my home directory by running the start.sh file. The game saves in the directory Starguner/data/.
Offline
Fettouhi,
for clarity :
You did have the package installed in /opt when you tried that ?
If so, that indicates GOG designed a method to allow (dosbox) applications to write stuff.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Fettouhi,
for clarity :
You did have the package installed in /opt when you tried that ?If so, that indicates GOG designed a method to allow (dosbox) applications to write stuff.
No, I ran the game from my home directory. I just unpacked the tar.gz file and ran the start.sh from a terminal.
Offline
I suspect they do this with all/most of the dosbox games. See my solution above using unionfs.
Offline
I suspect they do this with all/most of the dosbox games. See my solution above using unionfs.
So my PKGBUILD should then be
pkgname=gog-stargunner
pkgver=1.0.0.8
pkgrel=1
pkgdesc="This sci-fi scrolling shooter brings you some of the most intense action ever seen on the PC."
arch=("i686" "x86_64")
url="http://www.gog.com/game/stargunner"
license=("custom")
source=("gog_stargunner_${pkgver}.tar.gz" "gog-stargunner")
sha256sums=('d04dd70b598fdd3b23e7d05fa1626feed08fd93d98511775dc33e2a537d69311'
'eb60e2a2e4d92bc3f1e7661694ab2e15aff22bf05a4ae2de77e7cc522c44ca38')
depends=(libpng12 unionfs-fuse)
package() {
mkdir -p "${pkgdir}"/opt/gog/stargunner
cp -r "${srcdir}"/Stargunner/* "${pkgdir}"/opt/gog/stargunner
install -Dm644 "${srcdir}"/Stargunner/support/gog-stargunner-primary.desktop "${pkgdir}"/usr/share/applications/gog-stargunner.desktop
install -Dm644 "${srcdir}"/Stargunner/support/gog-stargunner.png "${pkgdir}"/usr/share/pixmaps/gog-stargunner.png
install -Dm644 "${srcdir}"/Stargunner/docs/End\ User\ License\ Agreement.txt "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE
install -Dm755 "${srcdir}/gog-stargunner" "${pkgdir}/usr/bin/gog-stargunner"
}
PKGEXT=.pkg.tar
and gog-stargunner
#!/usr/bin/bash
gogdir="/opt/gog/stargunner"
homedir="$HOME/.gog/stargunner"
mkdir -p "$homedir"/{game,config/data}
if [[ ! -e "$homedir/config/dosbox_stargun.conf" ]]; then
cp "$gogdir/dosbox_stargun.conf" "$homedir/config/dosbox_stargun.conf"
fi
unionfs "$homedir/config=RW:$gogdir=RO" "$homedir/game"
"$homedir"/game/start.sh
fusermount -u "$homedir/game"
Last edited by fettouhi (2014-08-12 21:26:16)
Offline
Since there will be far more than only a few games running on dosbox from gog, I would suggest creating a universal PKGBUILD, that would either be used as a template for all gog dosbox games, and maybe non-dosbox ones as well, or include dynamic configuration, so that different packages could be created on the fly using the same PKGBUILD. This should prove far more efficient and easier to maintain in the long run. As a consequence less orphans should be the result and a faster response to any major changes how gog handles its releases. The requirement would be uniformity among gogs packages. I would see possible problems with sound software however.
Offline
Since there will be far more than only a few games running on dosbox from gog, I would suggest creating a universal PKGBUILD, that would either be used as a template for all gog dosbox games, and maybe non-dosbox ones as well, or include dynamic configuration, so that different packages could be created on the fly using the same PKGBUILD. This should prove far more efficient and easier to maintain in the long run. As a consequence less orphans should be the result and a faster response to any major changes how gog handles its releases. The requirement would be uniformity among gogs packages. I would see possible problems with sound software however.
I looked at the games I have on GOG right now. Six of them have a Linux version now. 4 of those are dosbox games and packages in in the same as the Stargunner game PKGBUILD. The last 2 games are native Linux their packing is almost identical to the dosbox games except no dosbox but the games are launched from a start.sh script. So making a universal PKGBUILD for GOG games could be done.
Offline
Are there any free GOG games also for GNU/Linux? Otherwise I only those who have some could participate. Do the any files in the archive have the games description in them? That could be used for the package description instead of downloading it from gog's website or manual entry.
Edit: Man I was tired writing this.
Last edited by emeres (2014-08-14 12:06:10)
Offline