Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » Stracciatella Project (Platform Independent JA2) » JA2-Stracciatella Q&A
|
JA2-Stracciatella Q&A[message #186601] |
Wed, 28 May 2008 13:53  | |
| Tron
|
  |
Messages:227
Registered:August 2007 Location: Germany |
|
|
|
What is the goal of JA2-Stracciatella?
The goal is to make Jagged Alliance 2 available to a wide range of platforms, improve its stability, fix bugs and provide a stable platform for mod development.
Where does JA2-Stracciatella run?
It should run on all 32bit little endian platforms, which support SDL. This includes (but is not limited to) BSDs, Linuxes and Windows on x86. A long term goal is to remove the 32bit and little endian restrictions.
There are reports of running it successfully one some hand held devices. The main development platform is FreeBSD on x86 and the provided Windows binaries are cross compiled using MinGW.
What is necessary to compile JA2-Stracciatella?
There are only few build dependencies: GCC (any other C99 compliant C and C++ compiler like ICC will probably work, too) and SDL.
On most *nix (Linuxes, BSDs, etc.) like machines, these should be available from you package manager (apt, pkg-src, portage, ports, etc.). Be sure to install the SDL development package, if it is separate from the SDL runtime.
On Windows the easiest way is to use MSYS+MinGW. Development libraries for SDL for MinGW are available, too.
Where is the source code located?
The source code is available via Subversion (short SVN) from svn://tron.homeunix.org/ja2/trunk. Please read the Subversion book, if you are not familiar with version control systems in general or Subversion in particular. Apart from the standard SVN client, TortoiseSVN seems to be a popular choice on Windows.
There are also source packages for past releases.
What are the necessary steps to compile JA2-Stracciatella?
- Install GCC either from your package manager or use MSYS+MinGW on Windows.
- Install SDL development libraries either from your package manager or get them from the SDL site.
- Get the source code of JA2-Stracciatella either via SVN from svn://tron.homeunix.org/ja2/trunk or get a source package
- Copy config.template to config.default, edit the resulting file: Uncomment ONE language, optionally uncomment some build options.
For MSYS+MinGW uncomment the parts specific to it regarding SDL and adjust the path to SDL as necessary - Build it by typing make (or gmake on some platforms)
- Start the game once, it will generate a config file .ja2/ja2.ini (or JA2/ja2.ini on Windows) in your home directory and terminate. Edit the file and adjust the path in their to point to your Jagged Alliance 2 data files.
[Updated on: Thu, 29 May 2008 00:23] by Moderator
|
|
|
|
|
|
Re: JA2-Stracciatella Q&A[message #186673] |
Wed, 28 May 2008 17:46   | |
| firefly28
|
 |
Messages:54
Registered:May 2008 |
|
|
|
Hi Tron this is the first time I have seen this thread up, thanks for writing up - I have mysys and MinGW installed , I installed SDL and used a test file of a tutorial site and the file run so Im hoping I have installed the librarys correctly. I think I noticed info about the ini files etc in the build directory but its still good to have it here as well Im away to try compiling your latest revision tommrow, MAYBE today . (I got r2 JA2 and r13 sgp built but being an old revision that had a C project file but with a little tinkering I got it working, had to ammend the relative paths in one of the dsw or dsp files)
Anyway Im away to try the latest revision.... soon:)
Hi Tron I got the latest build working, I wasnt happy about the way my sdl was installed from this guide I read , there were bits all over the place, so I edited some paths in the files you mention and was quite shocked to find the game is loading up np with SDL and Mingw Whats the command to put in the ini to force full screen again? btw I can include my config files as an example for people to see what needs setup in them but then again my sdl libs and includes I put them in differant places , a bit of a messy structure but it works what the heck heres the files
FILE: CONFIG DEFAULT START
------------------------
Quote:
# NOTE: This file is ONLY intended as template config file for manual builds.
# If you are building a package (or ebuild, spell, source rpm, ...) do NOT
# modify this file, use sed or whatever. In fact do NOT use this file AT ALL.
# Just pass parameters to make. This is much simpler and way less error prone
# this way. This file is NOT intended for package building. For a package
# just use
# make LNG=$YOUR_LANGUAGE PREFIX=$YOUR_PREFIX
# as build command and maybe some more variables, though on a sane system this
# should not be necessary.
# Uncomment exactly ONE of these
#LNG := DUTCH
[color:#CC0000]LNG := ENGLISH[/color]
#LNG := FRENCH
#LNG := GERMAN
#LNG := ITALIAN
#LNG := POLISH
# Russian BUKA Agonia Vlasti release
#LNG := RUSSIAN
# Russian Gold release
#LNG := RUSSIAN_GOLD
#JA2BETAVERSION := yes
#JA2TESTVERSION := yes
#JA2EDITOR := yes
#WITH_DEMO := yes
#WITH_DEMO_ADS := yes
#WITH_FIXMES := yes
#WITH_MAEMO := yes
#WITH_SOUND_DEBUG := yes
#CFLAGS += -g
#CFLAGS += -Werror
# Specify here were the Jagged Alliance 2 data files are located
#SGPDATADIR := /usr/local/share/ja2
SGPDATADIR := "C:/Program Files/Jagged Alliance 2 Gold/data" #actually just curious if this is #correct in hindsight its working but sgp is a folder in the source is it not?
# Tunables for installation. The default values are shown
#PREFIX := /usr/local
#MANPREFIX := $(PREFIX)
#INSTALL := install
#INSTALL_PROGRAM := $(INSTALL) -m 555 -s
#INSTALL_MAN := $(INSTALL) -m 444
#INSTALL_DATA := $(INSTALL) -m 444
# Below are some example variable overrides for MSys/MinGW
# If you set CFLAGS_SDL and LDFLAGS_SDL explicitly, then SDL_CONFIG is ignored
[color:#FF0000]SDL_CONFIG := D:/MinGW/bin[/color]
#SDL_PATH := ../sdl-1.2.11
[color:#CC0000]CFLAGS_SDL := -I D:/MinGW/include/SDL
LDFLAGS_SDL := -L D:/MinGW/lib -lmingw32 -lSDLmain -lSDL[/color]
FILE config.default END
--------------------------
FILE ja2.ini START--------------------------
#Tells ja2-stracciatella where the binary datafiles are locateddata_dir #= /some/place/where/the/data/is
located
data_dir = C:/Program Files/Jagged Alliance 2 Gold
FILE ja2.ini END----------------------------
ABOVE SHOULD BE locateddata_dir =
Thread word wrapped, also for those using mingw remember to add forward slashes even if you a referancing windows paths.
I did get lots of these warnings that was all I got though
===> CXX Build/Utils/_JA25RussianText.cc
cc1plus.exe: warning: command line option "-Wsequence-point" is valid for C/ObjC but not for C++
edit: Nice one with the steps just editing here rather than replying because it leaves and easy set of steps at the end for people!
[Updated on: Thu, 29 May 2008 04:00] by Moderator
|
|
|
|
|
|
Re: JA2-Stracciatella Q&A[message #186746] |
Thu, 29 May 2008 00:16   | |
| Shanga
|
  |
Messages:3519
Registered:January 2000 Location: Danubia |
|
|
|
How to Install SDL Under MinGW
http://www.netadelica.com/coding/sdl/install.html
Quote:
How to Install SDL Under MinGW
--------------------------------------------------------------------------------
Introduction
SDL is great and it lives here. But if you're not already a guru, it can be difficult to install, and there aren't many if any step-by-step instructions for getting it working. So, if you're struggling to install it under MinGW, this page might be helpful.
Installing SDL
These are the steps I took to get SDL 1.2.9 running, starting with MinGW and MSYS already installed, and using Windows 2000/XP.
Download and unpack SDL
On the SDL Web site, go to the download section for the current version (1.2.9 at the moment).
You're given a choice of Source Code, Runtime Libraries, or Development Libraries. Assuming you want to write programs that use SDL, and you just want to get up and running without being bothered compiling the source code yourself, you need the Development Libraries bit of the page.
You're installing it under MinGW, so [color:#CC0000]download SDL-devel-1.2.9-mingw32.tar.gz [/color](assuming 1.2.9 is the current version).
Unzip and unpack that file into a temporary directory on your PC. You can delete the directory when you've finished installing. Let's assume you've unpacked the file into /temp/. You'll need something that can handle .gz and .tar, but that's probably in MinGW/MSYS already. Personally I use WinNavigator which deals with them nicely.
Install SDL files for the compiler
Find your MinGW directory, the one with the bin, doc, include and lib directories in it. Let's assume it's /mingw/
[color:#CC0000]Create a new directory to put the SDL header files in: /mingw/include/SDL/
Copy all files (30 of them in SDL 1.2.9) in /temp/SDL-1.2.9/include/ to this new directory. [/color]
[color:#CC0000]Copy all files (4 of them in SDL 1.2.9) in /temp/SDL-1.2.9/lib/ to /mingw/lib/ [/color]
Find your MSYS directory, the one with the bin, doc, etc, and home directories in it. Let's assume it's /msys/
[color:#CC0000]Copy the file /temp/SDL-1.2.9/bin/sdl-config to /msys/bin/sdl-config[/color] I chose /msys/bin/ because you can be sure that anything in there will always get executed regardless of which directory you're currently in. When you compile an SDL program you need to execute the file sdl-config on the compilation line (more below).
Copy the SDL DLL and tidy up
[color:#CC0000]Copy the file /temp/SDL-1.2.9/bin/SDL.dll to c:/WINNT/system32/[/color]. As that directory will be in your PATH, it ensures that any SDL program you write will find the DLL and you can keep just one copy on your disk. If your Windows drive is something other than c: then change accordingly.
Delete /temp/SDL-1.2.9/
You should now have a working SDL installation and you can write some code.
Your First SDL program
Quote:
Here's a small program to get started and to test everything's working.
#include
#include "SDL/SDL.h"
// include the SDL headers you put in /mingw/include/SDL/
int main(int argc, char *argv[]) {
// with SDL, you need the argc and argv parameters
printf("Hello world
");
// with SDL, anything you printf will get printed to the
// file stdout.txt in the current directory, not to the screen
}
How to Compile an SDL program
To compile an SDL program, use this:
gcc filename.c `sdl-config --cflags --libs`
[color:#CC0000]Note that you use backticks (SHIFT + ~), not normal apostrophes[/color]. The file sdl-config will get executed (which is why you copied it to /msys/bin/ so that you can be sure that it will get executed) and will pass its output to gcc, in a sort of magical ritual that I don't understand.
After you tested the SDL install and everything works fine (you can compile hello world), edit your own paths in config.default, as maverick says above:
Quote:
SDL_CONFIG := [color:#CC0000]D:/MinGW/[/color]bin
#SDL_PATH := ../sdl-1.2.11
CFLAGS_SDL := -I [color:#CC0000]D:/MinGW/[/color]include/SDL
LDFLAGS_SDL := -L [color:#CC0000]D:/MinGW/[/color]lib -lmingw32 -lSDLmain -lSDL
[Updated on: Thu, 29 May 2008 00:22] by Moderator
|

|
|
|
|
|
Re: JA2-Stracciatella Q&A[message #186750] |
Thu, 29 May 2008 01:34   | |
| Shanga
|
  |
Messages:3519
Registered:January 2000 Location: Danubia |
|
|
|
Posting the final steps, for conformity:
Now that you've installed everything (MinGW, MSYS, SDL and Tortoise), do this:
1. make a /ja2source folder in your c:/msys/1.0/home/(Username)
2. rclick on /ja2source and select SVN Checkout (put svn://tron.homeunix.org/ja2/trunk in the dialogue window next)
3. wait till full source is downloaded, then fire up MSYS (from the included .bat)
4. in MSYS , type "ls -all" and check to see if it lists your /ja2source (just to double check)
5. in MSYS, type "cd ja2source" then "make"
6. let it compile and go drink a cuppa
7. by the time you come back, if you followed all the steps above (I only hope you dont use Vista) you should get a message that everything compiled and no "error" message
8. check /ja2source for a ja2.exe file...that's your compiled program
---
Now, check My Documents on your desktop. You should have a JA2 folder, with a JA2.ini in it
edit the path to your JA2 installation (C:/Program Files/JA2 or whatever) and then leave it alone.
Replace the default JA2.exe with the new ja2.exe and enjoy JA2 Straciatella.
[Updated on: Thu, 29 May 2008 01:50] by Moderator
|

|
|
|
| | | | | | | | | | |
|
Re: JA2-Stracciatella Q&A[message #186803] |
Thu, 29 May 2008 15:50   | |
| firefly28
|
 |
Messages:54
Registered:May 2008 |
|
|
|
i.e only
SDL_CONFIG := D:\MinGW\bin\sdl-config or just sdl-config tried both also tried / and \ paths
SDL_PATH := D:\MinGW\bin
have also tried just sdl-config . its the sdl include files that are not getting found from sdl/include when I try to ddo it the sdl config way choosing one option over another. In the case where you specify the include and lib files and not sdl config it works as tron highlights but if you got the route of using sdl-config in place of specifying the library paths/include paths it doesnt work , Im just out of curiosity and learning wanting to know how to set it up the sdl-config way , its no biggie but would be good to know I figured tron or yourself or someone here could set me straight as to if Im thinking about it the wrong way?
could you give me the absolute paths to your sdl config? as Im wanting to see ive located that in the correct place, its in D:\MinGW\bin\sdl-config because it seems like sdl-config is unecessary? Im just wandering how its possible to use that instead of setting cflags, ldflags
ahh sorry about the double post
EDIT: Ive got it working a much easier way for newbies and with sdl-config only, unfortunatly this way of doing it is neglected to be mentioned in any of the guides I have read , just worked this one out myself heres my file now
SDL_CONFIG := sdl-config
#SDL_PATH := C:\msys\1.0\home\Dave\workhorse\tron\downloads\SDL-devel-1.2.13-mingw32\SDL-1.2.13
#CFLAGS_SDL := -I D:/MinGW/include/SDL
#LDFLAGS_SDL := -L D:/MinGW/lib -lmingw32 -lSDLmain -lSDL
#see how SDL_PATH, CFLAGS_SDL and LDFLAGS_SDL are commented out? but it works with just one line?
#seems a safer way because minimum changes are required it all works though but
#really wanted to learn about sdl-config since I kinda thought it seemed a good way to do it
#once I started googling about it
So lets say we download the sdl source code, plonk it in any directory we feel like in my case
D:/MinGW/SDL-devel-1.2.13-mingw32/SDL-1.2.13
so lets look in sdl-config, you will find a line that says
prefix=/Users/hercules/tmp/SDL-1.2.13
Ok so comment out this line
#prefix=/Users/hercules/tmp/SDL-1.2.13
#and add the below line
prefix=D:/MinGW/SDL-devel-1.2.13-mingw32/SDL-1.2.13
#replace D:/MinGW/SDL-devel-1.2.13-mingw32/SDL-1.2.13 in the above ^ line with whatever is the path #to the parent
#folder of the sdl bin and lib files which are all in the one sdl folder when you downloaded the #source code
#Seems a more sane way to me Im not sure whether I was able to omit the path variable because of #where I put my sdl.dll file? Not sure if thats relevant or not
#also make sure sdl-config is in your path i.e in one of your system bin folders, you should be
#able to type sdl-config and get usage flags if that doesnt happen its not in your path, in my case
# its in D:\MinGW\bin
[Updated on: Thu, 29 May 2008 17:30] by Moderator
|
|
|
|
| | | | | | | | | | | |
|
Re: JA2-Stracciatella Q&A[message #253051] |
Fri, 04 June 2010 22:20   | |
| ronsen
|
Messages:3
Registered:June 2010 |
|
|
|
hi,
could someone tell me the meaning of this:
#JA2BETAVERSION := yes
#JA2TESTVERSION := yes
#JA2EDITOR := yes
#WITH_DEMO := yes
#WITH_DEMO_ADS := yes
#WITH_FIXMES := yes
#WITH_MAEMO := yes
#WITH_SOUND_DEBUG := yes
i would like to compile a demo-binary (which works with the offical ja2 demo)
WITH_DEMO := yes
WITH_DEMO_ADS := yes
do i need to activate both?
Update:
I figured out by myself whats the "WITH_DEMO_ADS" is good for. Thanks a lot!
[Updated on: Mon, 07 June 2010 23:29] by Moderator
|
|
|
|
| |
|
Re: JA2-Stracciatella Q&A[message #254325] |
Sat, 19 June 2010 19:21   | |
| virus_found
|
 |
Messages:7
Registered:February 2008 Location: Moscow |

|
|
I'm sorry for such a question, I haven't been able to find it in FAQs: is it possible to "land" 1.13 mod onto JA2-Stracciatella (or merge them)?
I've played 1.13 and really enjoyed it, for it enhances gameplay greatly. And now I just can't conceive playing JA2 without some of its features.
1.13 and JA2-Stracciatella are very similar to two Transport Tycoon Deluxe major projects: TTDPatch (closed source, win32 only) and OpenTTD (open source, cross-platform). TTDPatch started first, very quickly it became a favourite among fans. TTDP provided a lot of really great innovative features, that OTTD lacked. But now TTDP faints slowly (that's just my opinion), for it's rival receives lots of fan patches (from *nix users as well, obviously) and just receives more love due to it's versatility.
My point here is that cross-platform projects win, they are best suited for long-term plans. So, everybody would benefit from such a "merge" (if it's possible).
I'm sorry, if I'm telling nonsence, for I haven't even played Stracciatella.
|
|
|
|
| | |
|
Re: JA2-Stracciatella Q&A[message #329809] |
Fri, 17 January 2014 16:59  | |
| Jakub
|
 |
Messages:38
Registered:January 2014 |
|
|
|
But we need stable 1.13 Wild fire mod for Linux too ... In Current situation am use Wine 1.4 & play on Linux to my Jagged Alliance 2 1.5 PL ( mixed with some orther mods & wersions of 1.13 betas . )
|
|
|
|
|
Goto Forum:
Current Time: Thu Sep 17 16:32:19 EEST 2020
Total time taken to generate the page: 0.00993 seconds
|