stephenjsweeney / tbftss

2D mission-based space shooter, based on the Battle for the Solar System space opera novel trilogy.
https://www.battleforthesolarsystem.com
GNU General Public License v2.0
53 stars 14 forks source link

documentation of building steps and requirement #58

Open tempral opened 5 months ago

tempral commented 5 months ago

Hi, I tried to run "make" but fails

tbftss> make process_begin: CreateProcess(NULL, grep -c processor /proc/cpuinfo, ...) failed. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. A subdirectory or file -p already exists. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. msgfmt -c -o locale/ca.mo locale/ca.po process_begin: CreateProcess(NULL, msgfmt -A subdirectory or file -p already exists. c -o locale/ca.mo locale/ca.po, ...) failed. Error occurred while processing: -p. A subdirectory or file bin already exists. Error occurred while processing: bin. msgfmt -c -o locale/da.mo locale/da.po process_begin: CreateProcess(NULL, msgfmt -c -o locale/da.mo locale/da.po, ...) failed. msgfmt -c -o locale/de.mo locale/de.po process_begin: CreateProcess(NULL, msgfmt -c -o locale/de.mo locale/de.po, ...) failed. msgfmt -c -o locale/es.mo locale/es.po process_begin: CreateProcess(NULL, msgfmt -c -o locale/es.mo locale/es.po, ...) failed. msgfmt -c -o locale/fr.mo locale/fr.po process_begin: CreateProcess(NULL, msgfmt -c -o locale/fr.mo locale/fr.po, ...) failed. make (e=2): The system cannot find the file specified. make: [locale/ca.mo] Erreur 2 make: Attente des tâches non terminées.... make (e=2): The system cannot find the file specified. make: [locale/da.mo] Erreur 2 make (e=2): The system cannot find the file specified. make: [locale/de.mo] Erreur 2 make (e=2): The system cannot find the file specified. make: [locale/es.mo] Erreur 2 make (e=2): The system cannot find the file specified. make: [locale/fr.mo] Erreur 2 make: [bin/unixInit.o] Erreur 1 make: [bin/ai.o] Erreur 1 make: [bin/atlas.o] Erreur 1 make: [bin/battle.o] Erreur 1 make: [bin/bullets.o] Erreur 1 make: [bin/capitalShips.o] Erreur 1 make: [bin/challengeHome.o] Erreur 1 make: [bin/challenges.o] Erreur 1 make: [bin/cJSON.o] Erreur 1 make: [bin/controls.o] Erreur 1 make: [bin/credits.o] Erreur 1 make: [bin/debris.o] Erreur 1 make: [bin/dev.o] Erreur 1 make: [bin/draw.o] Erreur 1 make: [bin/effects.o] Erreur 1 make: [bin/entities.o] Erreur 1 make: [bin/fighters.o] Erreur 1 make: [bin/fighterDatabase.o] Erreur 1 make: [bin/galacticMap.o] Erreur 1 make: [bin/game.o] Erreur 1 make: [bin/hud.o] Erreur 1 make: [bin/i18n.o] Erreur 1 make: [bin/init.o] Erreur 1 make: [bin/input.o] Erreur 1 make: [bin/io.o] Erreur 1 make: [bin/items.o] Erreur 1 make: [bin/jumpgate.o] Erreur 1 make: [bin/load.o] Erreur 1 make: [bin/locations.o] Erreur 1 make: [bin/lookup.o] Erreur 1 make: [bin/main.o] Erreur 1 make: [bin/messageBox.o] Erreur 1 make: [bin/mine.o] Erreur 1 make: [bin/mission.o] Erreur 1 make: [bin/missionInfo.o] Erreur 1 make: [bin/modalDialog.o] Erreur 1 make: [bin/objectives.o] Erreur 1 make: [bin/options.o] Erreur 1 make: [bin/player.o] Erreur 1 make: [bin/quadtree.o] Erreur 1 make: [bin/radar.o] Erreur 1 make: [bin/resources.o] Erreur 1 make: [bin/rope.o] Erreur 1 make: [bin/save.o] Erreur 1 make: [bin/script.o] Erreur 1 make: [bin/sound.o] Erreur 1 make: [bin/spawners.o] Erreur 1 make: [bin/starfield.o] Erreur 1 make: [bin/starSystems.o] Erreur 1 make: [bin/stats.o] Erreur 1 make: [bin/testMission.o] Erreur 1 make: [bin/textures.o] Erreur 1 make: [bin/text.o] Erreur 1 make: [bin/title.o] Erreur 1 make: [bin/transition.o] Erreur 1 make: [bin/trophies.o] Erreur 1 make: [bin/util.o] Erreur 1 make: [bin/waypoints.o] Erreur 1 make: *** [bin/widgets.o] Erreur 1

stephenjsweeney commented 5 months ago

Which OS are you running this on?

tempral commented 5 months ago

windows 11

stephenjsweeney commented 5 months ago

I'm not a Windows user myself; the binaries here for Windows were produced by cross-compiling from Linux.

However, with MinWG installed, as well as all the SDL development headers and libraries, it should be possible to build the Windows version using:

make -f makefile.win32

tempral commented 5 months ago

video

finally i was able to build the project but, as I adapted the whole thing into Visual Studio, I guess some configuration equivalents to the various make instructions are missing...

cJSON_GetObjectItem(cJSON object, const char string) cJSON.c Line 1036 cJSON *c = object->child;

Exception thrown: read access violation. object was nullptr.

call stack

loadConfigFile(char filename) init.c Line 259 app.winWidth = cJSON_GetObjectItem(root, "winWidth")->valueint; loadConfig(int argc, char argv) Line 232 initSDL(int argc, char argv) Line 107
SDL_main(int argc, char
* argv) main.c Line 77 main_getcmdline() Line 80

stephenjsweeney commented 5 months ago

That particular error is resulting from attempting to load the configuration file from your user directory, so:

C:/Users//tbftss/config.json

By the look of it, the file has become corrupt; it's having trouble reading the JSON values. Try deleting the file and trying again.

tempral commented 5 months ago

I followed back where the "null" start ...

`file = fopen(getFileLocation(filename), "rb");`     io.c   LINE 58

fopen(...) FAILS even with a correct file location passed to it

in stdio.h is declared as

_ACRTIMP FILE* __cdecl fopen( _In_z_ char const* _FileName, _In_z_ char const* _Mode );

but it's just an header i guess, if I ask to find the definition, I get a warning message telling :

A definition for the symbol 'fopen' could not be located.

stephenjsweeney commented 5 months ago

Could you try this build here:

https://www.battleforthesolarsystem.com/downloads/tbftss-1.5.1.win.x86_64-w32.zip

and let me know if that runs without issue. That binary was created by cross compiling from Linux.

tempral commented 5 months ago

yes I already played it, no issue... I was searching for an example game written with SDL, especially one without a huge amount of source code to study... I tried fews and choosed yours because matched my criteria of low demanding in CPU/GPU resources, and also because was pretty and fun, of course !

tempral commented 5 months ago

i made some progress, I am not sure how... the game start but crash when starting a challange...

i add a log error after fopen and this is the result

data/app/config.json: File exists C:\Users\carmi\tbftss/config.json: File exists data/atlas/atlas.json: File exists data/locale/characters.dat: File exists data/widgets/battleLost.json: File exists data/widgets/battleWon.json: File exists data/widgets/challenges.json: File exists data/widgets/controls.json: File exists data/widgets/fighterDB.json: File exists data/widgets/galacticMap.json: File exists data/widgets/inBattle.json: File exists data/widgets/modal.json: File exists data/widgets/options.json: File exists data/widgets/starSystem.json: File exists data/widgets/startBattle.json: File exists data/widgets/stats.json: File exists data/widgets/title.json: File exists data/widgets/trophies.json: File exists

data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/craft: Permission denied

data/craft: Permission denied WARN: Failed to load 'data/craft' data/craft: Permission denied WARN: Failed to load 'data/craft' data/craft: Permission denied WARN: Failed to load 'data/craft' data/craft: Permission denied WARN: Failed to load 'data/craft' data/craft: Permission denied WARN: Failed to load 'data/craft' data/craft: Permission denied WARN: Failed to load 'data/craft'

data/turrets: Permission denied WARN: Failed to load 'data/turrets' data/turrets: Permission denied WARN: Failed to load 'data/turrets' data/turrets: Permission denied WARN: Failed to load 'data/turrets'

csnCorvette01.json: No such file or directory WARN: Failed to load 'csnCorvette01.json' csnCorvette02.json: No such file or directory WARN: Failed to load 'csnCorvette02.json' hmsCorvette01.json: No such file or directory WARN: Failed to load 'hmsCorvette01.json' hmsCorvette02.json: No such file or directory WARN: Failed to load 'hmsCorvette02.json' infCorvette01.json: No such file or directory WARN: Failed to load 'infCorvette01.json' infCorvette02.json: No such file or directory WARN: Failed to load 'infCorvette02.json' unfCorvette01.json: No such file or directory WARN: Failed to load 'unfCorvette01.json' unfCorvette02.json: No such file or directory WARN: Failed to load 'unfCorvette02.json' data/battle/items.json: No such file or directory data/battle/bullets.json: No such file or directory data/galaxy/starSystems.json: No such file or directory data/missions/sol/01 - free flight.json: No such file or directory data/missions/sol/02 - weapons.json: No such file or directory data/missions/sol/03 - moving target.json: No such file or directory data/missions/sol/04 - armed target.json: No such file or directory data/missions/sol/05 - ecm.json: No such file or directory data/missions/sol/06 - mag.json: No such file or directory data/missions/sol/07 - wingmates.json: No such file or directory data/missions/sol/08 - final.json: No such file or directory data/challenges/01.json: No such file or directory data/challenges/02.json: No such file or directory data/challenges/03.json: No such file or directory data/challenges/04.json: No such file or directory data/challenges/05.json: No such file or directory data/challenges/06.json: No such file or directory data/challenges/07.json: No such file or directory data/challenges/08.json: No such file or directory data/challenges/09.json: No such file or directory data/challenges/10.json: No such file or directory data/challenges/11.json: No such file or directory data/challenges/12.json: No such file or directory data/challenges/13.json: No such file or directory data/challenges/14.json: No such file or directory data/challenges/15.json: No such file or directory data/challenges/16.json: No such file or directory data/challenges/17.json: No such file or directory data/challenges/18.json: No such file or directory data/challenges/19.json: No such file or directory data/challenges/20.json: No such file or directory data/challenges/21.json: No such file or directory data/challenges/22.json: No such file or directory data/challenges/23.json: No such file or directory data/challenges/24.json: No such file or directory data/challenges/25.json: No such file or directory data/challenges/26.json: No such file or directory data/challenges/27.json: No such file or directory data/challenges/28.json: No such file or directory data/challenges/29.json: No such file or directory data/challenges/30.json: No such file or directory data/challenges/31.json: No such file or directory data/trophies/trophies.json: No such file or directory C:\Users\carmi\tbftss/game.save: No such file or directory data/missions/sol/02 - weapons.json: No such file or directory Error: no such fighter 'TAF'

[process exited with code 1 (0x00000001)] You can now close this terminal with Ctrl+D, or press Enter to restart.

stephenjsweeney commented 5 months ago

Something seems very wrong on your system. All of those files exists, and none of them should be returning Permission Denied.

This is still Microsoft Windows 11? Are you trying to run the game using a different user to the one that pulled that repo from github? That's all I can think of. The user who is trying to run the game has different permissions to the one that owns the git data.