Skip to content

Commit

Permalink
Merge branch 'release/1.6.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Jun 27, 2022
2 parents a9ff2aa + 5846c0d commit 86c3e8a
Show file tree
Hide file tree
Showing 93 changed files with 5,111 additions and 4,859 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build

on: [push, pull_request]

jobs:
build:

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
flags: ["--enable-networking --disable-gtk3",
"--enable-networking --enable-gtk3",
"--disable-networking"]
include:
- os: macos-latest
flags: "--enable-networking"
- os: ubuntu-latest
container: benmwebb/mingw
flags: "--host=x86_64-w64-mingw32 --enable-nativewin32"
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}

steps:
- uses: actions/checkout@v2
- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-latest' && matrix.container == null
run: |
sudo apt-get update -qq && sudo apt-get install -qq automake autoconf gcc libglib2.0-dev libcurl4-openssl-dev libgtk2.0-dev libgtk-3-dev
- name: Install dependencies (Mac)
if: matrix.os == 'macos-latest'
run: |
brew install automake
- name: Build
run: |
./autogen.sh ${{ matrix.flags }} && make -j2
- name: Test
if: matrix.container == null
run: |
src/dopewars -v
src/dopewars -h
75 changes: 75 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
schedule:
- cron: '38 13 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install dependencies (Linux)
run: |
sudo apt-get update -qq && sudo apt-get install -qq automake autoconf gcc libglib2.0-dev libcurl4-openssl-dev libgtk-3-dev gettext
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# How to contribute

dopewars is open-source software, meaning that it is free for anybody to
use. However, this also means that the quality of the software is dependent
in part on **you** the user. You **don't** have to be a programmer to
help out - in fact, dopewars currently needs people to produce sounds and
graphics rather than to write code.

- **Sounds** are needed. dopewars-1.5.7 and later support sounds, but
don't contain sounds for every game event. If **you** can provide
copyright-free sounds, then short files are needed for various effects
in the game. For example, gunshots, bullet hits, ricochets and subway
trains are obvious candidates for sound effects, although pretty much
any event in the game that you can think of can conceivably have a sound
(e.g. when players join or leave the game). These sounds should be in WAV
format, and should probably be no more than a second or two in length.
Later versions of dopewars may also be able to play longer repeating
sounds (i.e. music) if you're interested in contributing this. Please
open a [pull request](https://github.com/benmwebb/dopewars/pulls)
to add sound files to dopewars.

- **Suggestions** for future improvements are always welcomed at the
[issue tracker](https://github.com/benmwebb/dopewars/issues).
These can be anything from "the game interface is confusing" through
"more game locations are needed" to "what about a hospital". (I can't
guarantee that such suggestions will ever make it into dopewars, but
it's a lot easier if I know they exist! Also, it's far more likely
to happen if you write the code - see the
[tips for developers](https://dopewars.sourceforge.io/docs/developer.html)
page.)

- **Bug reports** are always useful. Register them with the
[issue tracker](https://github.com/benmwebb/dopewars/issues).
If I don't know the problem exists, I can't fix it...
The more information you can give here, the better. In particular, I need
to know your operating system - e.g. Linux or Windows. For Linux, gdb stack
traces of the core file are most useful.

- **Configuration files** can be included in future distributions. If
you run a customised game, and think others might want to play with your
configuration, or at least use it as an example, then post it in the
[issue tracker](https://github.com/benmwebb/dopewars/issues).

- **Translation** of dopewars into your language will enable you to
play the game in your native tongue, and will also help others that speak
the same language. It's pretty easy, too - all you have to do is edit a
simple text file! See the
[i18n pages](https://dopewars.sourceforge.io/docs/developer.html).
7 changes: 7 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 1.6.2 - 2022-06-26
- The text-mode client should now support Unicode input when in UTF-8
locales, e.g. allowing player names containing accented characters
to be input (#60).
- Add support for networking on the Haiku operating system (thanks
to Begasus) (#61).

# 1.6.1 - 2020-12-11
- Improved display in non-English text-mode clients; previously
columns were not aligned properly in some cases and occasionally
Expand Down
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
26th June 2022
dopewars-1.6.2 released. This improves Unicode support in the text-mode
client, and adds support for networking on the Haiku operating system.

11th December 2020
dopewars-1.6.1 released. This improves the appearance of the text-mode
client, adds a British English translation, and fixes a bug selecting sounds
Expand Down
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
[![Build Status](https://travis-ci.com/benmwebb/dopewars.svg?branch=develop)](https://travis-ci.com/benmwebb/dopewars)
[![Build Status](https://github.com/benmwebb/dopewars/workflows/build/badge.svg?branch=develop)](https://github.com/benmwebb/dopewars/actions?query=workflow%3Abuild)
[![Download dopewars drug dealing game](https://img.shields.io/sourceforge/dt/dopewars.svg)](https://dopewars.sourceforge.io/download.html)

This is dopewars 1.6.1, a game simulating the life of a drug dealer in
This is dopewars 1.6.2, a game simulating the life of a drug dealer in
New York. The aim of the game is to make lots and lots of money...
unfortunately, you start the game with a hefty debt, accumulating interest,
and the cops take a rather dim view of drug dealing...

These are brief instructions; see the HTML documentation for full information.

dopewars 1.6.1 servers should handle clients as old as version 1.4.3 with
dopewars 1.6.2 servers should handle clients as old as version 1.4.3 with
hardly any visible problems (the reverse is also true). However, it is
recommended that both clients and servers are upgraded to 1.6.1!
recommended that both clients and servers are upgraded to 1.6.2!

## Installation

Expand All @@ -19,10 +20,10 @@ Either...

Or...

1. Get the tarball `dopewars-1.6.1.tar.gz` from the same URL
2. Extract it via `tar -xvzf dopewars-1.6.1.tar.gz`
1. Get the tarball `dopewars-1.6.2.tar.gz` from the same URL
2. Extract it via `tar -xvzf dopewars-1.6.2.tar.gz`
3. Follow the instructions in the `INSTALL` file in the newly-created
`dopewars-1.6.1` directory
`dopewars-1.6.2` directory

Once you're done, you can safely delete the RPM, tarball and dopewars
directory. The dopewars binary is all you need!
Expand All @@ -33,8 +34,8 @@ score file can be selected with the `-f` switch.

## Windows installation

dopewars now compiles as a console or regular application under Win32
(XP or later). Almost all functionality of the standard Unix binary is retained;
dopewars now compiles as a console or regular application under Win32 (Windows 7
or later). Almost all functionality of the standard Unix binary is retained;
for example, all of the same command line switches are supported. However, for
convenience, the configuration file is the more Windows-friendly
"dopewars-config.txt".
Expand All @@ -48,21 +49,21 @@ dopewars has built-in client-server support for multi-player games. For a
full list of options configurable on the command line, run dopewars with
the `-h` switch.

`dopewars -a`
`dopewars -a`
This is "antique" dopewars; it tries to keep to the original dopewars, based
on the "Drug Wars" game by John E. Dell, as closely as possible.

`dopewars`
`dopewars`
By default, dopewars supports multi-player games. On starting a game, the
program will attempt to connect to a dopewars server so that players can send
messages back and forth, and shoot each other if they really want to...

`dopewars -s`
`dopewars -s`
Starts a dopewars server. This sits in the background and handles multi-player
games. You probably want to use the `-l` command line option too to direct its
log output to somewhere sensible.

`dopewars -c`
`dopewars -c`
Create and run a computer dopewars player. This will attempt to connect
to a dopewars server, and if this succeeds, it will then participate in
multi-player dopewars games.
Expand Down Expand Up @@ -100,11 +101,11 @@ nicer! ;)
## License

dopewars is released under the GNU General Public License; see the text file
LICENCE for further information. dopewars is copyright (C) Ben Webb 1998-2020.
LICENCE for further information. dopewars is copyright (C) Ben Webb 1998-2022.
The dopewars icons are copyright (C) Ocelot Mantis 2001.

## Support

dopewars is written and maintained by Ben Webb <[email protected]>
dopewars is written and maintained by Ben Webb <[email protected]>
Enquiries about dopewars may be sent to this address (keep them sensible
please ;) Bug fixes and reports, improvements and patches are also welcomed.
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
- Fix errors reported by 'msgfmt -cv foo.po'
- User accounts (i.e. players connect with a username and password, so can
build up their status over several games, or save and continue games)
- Popup to let you know you only have x days left before the end of the game
Expand Down
2 changes: 1 addition & 1 deletion auxbuild/README-release
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ New version checklist:
- git checkout -b release/x.y.z
- Change SVN to x.y.z in configure.ac and commit
- Merge into master, tag, and push:
git checkout master; git merge --no-ff -m 'Merge for x.y.z release' origin/release/x.y.z; git tag -s -u 22A3BF2B vx.y.z; git push origin vx.y.z
git checkout master; git merge --no-ff -m 'Merge for x.y.z release' origin/release/x.y.z; git diff origin/develop; git push origin master; git tag -s -u 22A3BF2B vx.y.z; git push origin vx.y.z
- Delete temporary branch:
git branch -d release/x.y.z; git push origin :release/x.y.z
- make dist, upload tar.gz plus RPMs and .exes to GitHub and SourceForge
45 changes: 25 additions & 20 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT([dopewars], [1.6.1])
AC_INIT([dopewars], [1.6.2])
AC_CONFIG_SRCDIR([src/dopewars.c])
AC_CONFIG_AUX_DIR(auxbuild)

Expand Down Expand Up @@ -52,6 +52,10 @@ AC_ARG_ENABLE(gui-server,
[ --enable-gui-server use a simple GTK+/Win32 GUI for the server],
[ GUI_SERVER="$enableval" ],[ GUI_SERVER="probe" ])

AC_ARG_ENABLE(gtk4,
[ --enable-gtk4 use GTK 4 if available (experimental)],
[ USE_GTK4="$enableval" ],[ USE_GTK4="no" ])

AC_ARG_ENABLE(gtk3,
[ --disable-gtk3 use GTK+ 2.x, even if 3.x is found],
[ USE_GTK3="$enableval" ],[ USE_GTK3="yes" ])
Expand Down Expand Up @@ -174,24 +178,25 @@ else
gtk2_found="probe"
if test "$GUI_CLIENT" != "no" -o "$GUI_SERVER" != "no"; then
PKG_PROG_PKG_CONFIG()
gtk3_found="no"
if test "$USE_GTK3" = "yes" ; then
PKG_CHECK_MODULES([GTK], [gtk+-3.0], gtk3_found="yes", gtk3_found="no")
if test "$gtk3_found" = "yes" ; then
# We use GtkTable a lot so don't clutter the compiler output with
# recommendations to use GtkGrid instead
CPPFLAGS="$CPPFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
fi
gtk4_found="no"
if test "$USE_GTK4" = "yes" ; then
PKG_CHECK_MODULES([GTK], [gtk4], gtk4_found="yes", gtk4_found="no")
fi
if test "$gtk3_found" = "no" ; then
AM_PATH_GTK_2_0(2.0.0,gtk2_found="yes",gtk2_found="no")
if test "$gtk2_found" = "no" ; then
if test "$GUI_CLIENT" = "yes" -o "$GUI_SERVER" = "yes" ; then
AC_MSG_ERROR(Cannot find GTK+)
else
AC_MSG_WARN(Cannot find GTK+; not building GUI client or server)
GUI_CLIENT="no"
GUI_SERVER="no"
if test "$gtk4_found" = "no" ; then
gtk3_found="no"
if test "$USE_GTK3" = "yes" ; then
PKG_CHECK_MODULES([GTK], [gtk+-3.0], gtk3_found="yes", gtk3_found="no")
fi
if test "$gtk3_found" = "no" ; then
AM_PATH_GTK_2_0(2.0.0,gtk2_found="yes",gtk2_found="no")
if test "$gtk2_found" = "no" ; then
if test "$GUI_CLIENT" = "yes" -o "$GUI_SERVER" = "yes" ; then
AC_MSG_ERROR(Cannot find GTK+)
else
AC_MSG_WARN(Cannot find GTK+; not building GUI client or server)
GUI_CLIENT="no"
GUI_SERVER="no"
fi
fi
fi
fi
Expand Down Expand Up @@ -334,7 +339,7 @@ dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_FUNC_SETVBUF_REVERSED
AC_FUNC_STRFTIME
AC_CHECK_FUNCS(strdup strstr getopt getopt_long fork issetugid)
AC_CHECK_FUNCS(strdup strstr getopt getopt_long fork issetugid localtime_r gmtime_r)

dnl Enable plugins only if we can find the dlopen function, and
dnl the user does not disable them with --disable-plugins or --disable-shared
Expand Down Expand Up @@ -375,7 +380,7 @@ else
dnl Check for socket and select even if networking gets manually
dnl disabled below, since select is used if available for
dnl millisecond sleeping
AC_SEARCH_LIBS(socket,socket)
AC_SEARCH_LIBS(socket,socket network)
AC_SEARCH_LIBS(gethostbyname,nsl socket)
AC_CHECK_FUNCS(socket gethostbyname select)
if test "$ac_cv_func_select" = "yes" ; then
Expand Down
3 changes: 2 additions & 1 deletion doc/aiplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
<title>Adding computer-controlled players</title>
<meta charset="utf-8"/>
</head>

<body>
Expand Down
Loading

0 comments on commit 86c3e8a

Please sign in to comment.