LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices


Reply
  Search this Thread
Old 02-18-2022, 08:45 PM   #1
bendipa
Member
 
Registered: Aug 2018
Posts: 35

Rep: Reputation: Disabled
Hearts Card Game for Linux.


I thought I found a Hearts card game for Linux here {I'm using Mint). After following the instructions to the letter on how to build this from source code, during the compilation no errors appeared on the terminal after several minutes of activity. Each step under instruction 3 was carried out. However when finished, 2 issues arose. 1) There are no instructions saying how to start this game. 2) Nothing is showing in 'usr/share/applications', which is a good clue that it hasn't installed properly, if at all. Nothing is showing in 'dpkg -l' either with a reference to 'Hearts'.

All I seem to have new is within my home folder, ie a sub-folder named 'Hearts' with a lot of files with object/source code extensions .o and .h. etc and a few folders with image files. Then I noticed under instruction 2 it mentions in brackets, files for Ubuntu 16.04 (which I did install first). But I have Mint 20.3. So I'm more confused. Was this installation meant to be used for Mint, anyway?

Would appreciate some help.

Last edited by bendipa; 02-21-2022 at 05:54 PM.
 
Old 02-18-2022, 09:45 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,341
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
Did you try a whereis search for *hearts*?

There's not much here to go on, but if errors appeared while you were attempting to build the application from sources, it is likely the build failed, even if you followed the succeeding steps. Among other things, to build from sources, kernel headers must be installed, and, to the best of my knowledge, Mint does not install kernel headers by default. (Most distros do not install kernel headers by default so as to reduce the size of the install *.iso.)

If you re-attempt the build and post the error messages, we may be able to help you.

A web search for "cards hearts linux" tells me that there is a snap package. You might take a look at that.

Here's a good tutorial on building from sources: https://www.maketecheasier.com/build...-source-linux/

Last edited by frankbell; 02-18-2022 at 09:48 PM. Reason: More info
 
Old 02-18-2022, 11:44 PM   #3
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,388

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
What did you do after make? Did you install it in any way? If not, its just sitting there and you can probably run it from right where it is. Or you can try
Code:
sudo make install
if the Makefile has defined a method to install it, and hopefully add a menu entry (.desktop file). If not you can do that manually.
 
Old 02-19-2022, 06:23 PM   #4
bendipa
Member
 
Registered: Aug 2018
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
Did you try a whereis search for *hearts*?

There's not much here to go on, but if errors appeared while you were attempting to build the application from sources, it is likely the build failed, even if you followed the succeeding steps. Among other things, to build from sources, kernel headers must be installed, and, to the best of my knowledge, Mint does not install kernel headers by default. (Most distros do not install kernel headers by default so as to reduce the size of the install *.iso.)

If you re-attempt the build and post the error messages, we may be able to help you.

A web search for "cards hearts linux" tells me that there is a snap package. You might take a look at that.

Here's a good tutorial on building from sources: https://www.maketecheasier.com/build...-source-linux/
If you read my op I said that there were no error messages shown on the terminal. The compilation appeared to complete and I had followed the instructions in step 3 to the letter. So clearly the instructions are wrong, incomplete or the package is unsuitable for Mint 20.3.
 
Old 02-19-2022, 06:26 PM   #5
bendipa
Member
 
Registered: Aug 2018
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by enigma9o7 View Post
What did you do after make? Did you install it in any way? If not, its just sitting there and you can probably run it from right where it is. Or you can try
Code:
sudo make install
if the Makefile has defined a method to install it, and hopefully add a menu entry (.desktop file). If not you can do that manually.
I did nothing after 'make'. There was nothing further in the instructions after that.

Here's the first part of the Makefile you mentioned. Any idea how I proceed from here?

Code:
#############################################################################
# Makefile for building: Hearts
# Generated by qmake (3.1) (Qt 5.12.8)
# Project:  Hearts.pro
# Template: app
# Command: /usr/lib/qt5/bin/qmake -o Makefile Hearts.pro
#############################################################################

MAKEFILE      = Makefile

EQ            = =

####### Compiler, tools and options

CC            = gcc
CXX           = g++
DEFINES       = -DONLINE_PLAY -DUSE_LIBALLEGRO5 -DFULL_SCREEN -DDEBUG -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
CFLAGS        = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
CXXFLAGS      = -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
INCPATH       = -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtSvg -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++
QMAKE         = /usr/lib/qt5/bin/qmake
DEL_FILE      = rm -f
CHK_DIR_EXISTS= test -d
MKDIR         = mkdir -p
COPY          = cp -f
COPY_FILE     = cp -f
COPY_DIR      = cp -f -R
INSTALL_FILE  = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR   = cp -f -R
QINSTALL      = /usr/lib/qt5/bin/qmake -install qinstall
QINSTALL_PROGRAM = /usr/lib/qt5/bin/qmake -install qinstall -exe
DEL_FILE      = rm -f
SYMLINK       = ln -f -s
DEL_DIR       = rmdir
MOVE          = mv -f
TAR           = tar -cf
COMPRESS      = gzip -9f
DISTNAME      = Hearts1.0.0
DISTDIR = /home/bendipa2/Hearts/.tmp/Hearts1.0.0
LINK          = g++
LFLAGS        = -Wl,-O1
LIBS          = $(SUBLIBS) -lallegro_audio -lallegro_acodec -lallegro_memfile -lallegro /usr/lib/x86_64-linux-gnu/libQt5Svg.so /usr/lib/x86_64-linux-gnu/libQt5Widgets.so /usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5Network.so /usr/lib/x86_64-linux-gnu/libQt5Core.so /usr/lib/x86_64-linux-gnu/libGL.so -lpthread   
AR            = ar cqs
RANLIB        = 
SED           = sed
STRIP         = strip

####### Output directory

OBJECTS_DIR   = ./

Last edited by bendipa; 02-19-2022 at 07:22 PM.
 
Old 02-19-2022, 09:45 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,341
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
Generally, in installing from sources, make is followed by make install.

The former creates the installation package. The latter actually does the install.
 
Old 02-20-2022, 04:44 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
The executable is built right in the repo's root directory and is called - surprise - Hearts.
So, doubleclick it, or, in a terminal opened in that folder, execute
Code:
./Hearts
 
Old 02-21-2022, 08:43 AM   #8
bendipa
Member
 
Registered: Aug 2018
Posts: 35

Original Poster
Rep: Reputation: Disabled
Thanks. Only works on command line though.

Last edited by bendipa; 02-21-2022 at 09:17 AM.
 
Old 02-21-2022, 01:21 PM   #9
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,141
Blog Entries: 6

Rep: Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828
That source has a .../Hearts-master/Hearts.pro file.

Did you run qmake in that directory? That will make you a Makefile.
Quote:
#############################################################################
# Makefile for building: Hearts
# Generated by qmake (3.1) (Qt 5.15.2)
# Project: Hearts.pro
# Template: app
# Command: /usr/bin/qmake -o Makefile Hearts.pro
#############################################################################

MAKEFILE = Makefile

EQ = =

####### Compiler, tools and options

CC = gcc
CXX = g++
DEFINES = -DONLINE_PLAY -DUSE_LIBALLEGRO5 -DFULL_SCREEN -DDEBUG -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
CFLAGS = -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC $(DEFINES)
CXXFLAGS = -pipe -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC $(DEFINES)
INCPATH = -I. -I/usr/include/qt -I/usr/include/qt/QtSvg -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtCore -I. -I. -I/usr/lib/qt/mkspecs/linux-g++
QMAKE = /usr/bin/qmake
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = cp -f
COPY_DIR = cp -f -R
INSTALL_FILE = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR = cp -f -R
QINSTALL = /usr/bin/qmake -install qinstall
QINSTALL_PROGRAM = /usr/bin/qmake -install qinstall -exe
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
TAR = tar -cf
COMPRESS = gzip -9f
DISTNAME = Hearts1.0.0
DISTDIR = <path>/hearts/Hearts-master/.tmp/Hearts1.0.0
LINK = g++
LFLAGS = -Wl,-O1 -fPIC
LIBS = $(SUBLIBS) -lallegro_audio -lallegro_acodec -lallegro_memfile -lallegro /usr/lib/libQt5Svg.so /usr/lib/libQt5Widgets.so /usr/lib/libQt5Gui.so /usr/lib/libQt5Network.so /usr/lib/libQt5Core.so -lGL -lpthread
AR = ar cqs
RANLIB =
SED = sed
STRIP = strip

####### Output directory

OBJECTS_DIR = ./

####### Files

SOURCES = client.cpp \
connect.cpp \
ctable.cpp \

<snip>.....
qrc_resources.o: qrc_resources.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_resources.o qrc_resources.cpp

moc_client.o: moc_client.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_client.o moc_client.cpp

moc_connect.o: moc_connect.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_connect.o moc_connect.cpp

moc_ctable.o: moc_ctable.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_ctable.o moc_ctable.cpp

moc_online.o: moc_online.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_online.o moc_online.cpp

moc_cgame.o: moc_cgame.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_cgame.o moc_cgame.cpp

moc_debug.o: moc_debug.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_debug.o moc_debug.cpp

moc_ccardsplayed.o: moc_ccardsplayed.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_ccardsplayed.o moc_ccardsplayed.cpp

moc_mainwindow.o: moc_mainwindow.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp

moc_clabel.o: moc_clabel.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_clabel.o moc_clabel.cpp

moc_chearts.o: moc_chearts.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_chearts.o moc_chearts.cpp

moc_rules.o: moc_rules.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_rules.o moc_rules.cpp

moc_credits.o: moc_credits.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_credits.o moc_credits.cpp

moc_settings.o: moc_settings.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_settings.o moc_settings.cpp

moc_cstatistics.o: moc_cstatistics.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_cstatistics.o moc_cstatistics.cpp

####### Install

install: FORCE

uninstall: FORCE

FORCE:
I was going to compile that. I don't have all of the depends installed at the moment to build that. But I could generate a Makefile with qmake.
 
Old 02-22-2022, 11:51 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by bendipa View Post
Thanks. Only works on command line though.
I seriously doubt that.
 
Old 06-15-2022, 06:52 PM   #11
Steve R.
Member
 
Registered: Jun 2009
Location: Morehead City, NC
Distribution: Mint 20.3
Posts: 521

Rep: Reputation: 98
Just as an FYI, SourceForge has a version of Blackjack available. SourceForge Blackjack link. It was last updated on June 27, 2014.

Several years ago, I attempted to install. It failed. I have not revisited this failure. Whether this version works or not is an unknown.

I have been very bewildered that Hearts is not easily available for Linux.
 
Old 01-23-2023, 09:00 AM   #12
CharlesJohnson
LQ Newbie
 
Registered: Jan 2023
Posts: 1

Rep: Reputation: 0
What did you do following making?
 
Old 04-30-2024, 05:53 PM   #13
Luximpros
LQ Newbie
 
Registered: Apr 2024
Posts: 1

Rep: Reputation: 0
You know, I can totally relate to your situation. My partner is all about card games and puzzles, but I was never really into them until we stumbled upon Dominoes during the whole COVID mess. At first, I wasn't too excited about it, but I gotta say, it's grown on me big time. We even made up our own set of rules to keep things interesting.
But let me tell you about this other game I've been getting into lately: solitaire. Yeah, I know, it sounds kinda old-school, but bear with me. I stumbled upon this online version recently, and man, it's been a game-changer.

Last edited by Luximpros; Today at 05:12 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Hearts card game missing in Ubuntu 18.04 JDWheel Linux - Games 11 11-16-2018 09:27 PM
Game of Hearts download that is supported by Linux Jira Linux - Newbie 4 11-03-2018 08:23 PM
LXer: Microsoft (hearts) Linux, for Azure's sake LXer Syndicated Linux News 0 10-21-2014 02:20 AM
LXer: Honda hearts Linux, wants cash LXer Syndicated Linux News 0 04-24-2007 07:46 PM
Ms hearts and MS Solitaire for Linux MvD Linux - Software 8 10-14-2003 09:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games

All times are GMT -5. The time now is 08:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration