instead-3.3.2/AUTHORS 0000644 0001750 0001750 00000001614 13647020003 013233 0 ustar peter peter INSTEAD was written by:
Peter Kosyh
Initial port to Windows:
Ilya Ryndin
Port to Android:
Mahno Aleksey
Anton Kolosov
Port to Mac OS X:
.dm
Port to Windows CE:
Andrey Afletdinov
Debian package:
Sam Protsenko
FreeBSD port, cmake support and fixes:
Dmitry Marakasov
Ideas, games, advices, testing, bug reports, fixes ...
Vadim Balashoff
Evgeniy Efremov (jhekasoft)
Oleg Gvozdev
Heorhiy Kharvat (zaynyatyi)
Serj Kalichev
Vladimir Podobaev
Alexander Soborov
Vasily Voronkov
Alexander Yakovlev
Vladimir Zhirov
Andrew Lobanov
And many others...
Web resources:
https://instead-hub.github.io
https://github.com/instead-hub/instead
Join the chat at:
https://gitter.im/instead-hub/instead
Unofficial XMPP conference:
instead@conference.jabber.ru
instead-3.3.2/CMakeLists.txt 0000644 0001750 0001750 00000004765 13647020003 014735 0 ustar peter peter PROJECT(instead)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
IF("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
MESSAGE(FATAL_ERROR "In-source builds are not allowed. Please read ./INSTALL")
ENDIF("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
# global constants
SET(INSTEAD_VERSION "3.3.2")
# options
OPTION(WITH_SDL2 "Use SDL2 instead of SDL 1" ON)
OPTION(WITH_GTK2 "Use GTK2 file open dialog" ON)
OPTION(WITH_GTK3 "Use GTK3 file open dialog" OFF)
OPTION(WITH_ICONV "Build with iconv support" ON)
OPTION(WITH_LUAJIT "Use LuaJIT instead of Lua (recommended)" OFF)
# Note: there are three build modes for instead:
# - SYSTEMWIDE
# use it if you want to install it into your (unix) system
# - STANDALONE
# used to generate standalone relocatable package which
# may be run from anywhere. `install' target stages all
# required files in ${STANDALONEDIR} for you
# - neither (both options disabled)
# instead may be run from build directory, useful for
# development
OPTION(SYSTEMWIDE "Build for systemwide install" ON)
OPTION(STANDALONE "Build for standalone package creation" OFF)
IF(WITH_GTK2 AND WITH_GTK3)
MESSAGE(WARNING "WITH_GTK2 and WITH_GTK3 are mutually exclusive, disabling WITH_GTK2")
SET(WITH_GTK2 OFF)
ENDIF(WITH_GTK2 AND WITH_GTK3)
IF(SYSTEMWIDE AND STANDALONE)
MESSAGE(WARNING "Both STANDALONE and SYSTEMWIDE specified, disabling SYSTEMWIDE")
SET(SYSTEMWIDE OFF)
ENDIF(SYSTEMWIDE AND STANDALONE)
SET(BINDIR "bin" CACHE STRING "Where to install binaries")
SET(DATADIR "share/instead" CACHE STRING "Where to install data files")
SET(STEADDIR "${DATADIR}/stead" CACHE STRING "Where to install stead files")
SET(THEMESDIR "${DATADIR}/themes" CACHE STRING "Where to install themes")
SET(GAMESDIR "${DATADIR}/games" CACHE STRING "Where to install games")
SET(ICONDIR "share/pixmaps" CACHE STRING "Where to install icons")
SET(DOCDIR "share/doc/instead" CACHE STRING "Where to install documentation")
SET(LANGDIR "${DATADIR}/lang" CACHE STRING "Where to install language files")
SET(MANDIR "share/man" CACHE STRING "Where to install man pages")
SET(DESKTOPDIR "share/applications" CACHE STRING "Where to install .desktop files")
SET(STANDALONEDIR "${PROJECT_BINARY_DIR}/standalone" CACHE STRING "Where to stage stanalone package")
# subdirectories
ADD_SUBDIRECTORY(desktop)
ADD_SUBDIRECTORY(doc)
ADD_SUBDIRECTORY(games)
ADD_SUBDIRECTORY(icon)
ADD_SUBDIRECTORY(lang)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(stead)
ADD_SUBDIRECTORY(themes)
instead-3.3.2/COPYING 0000644 0001750 0001750 00000003335 13647020003 013220 0 ustar peter peter Copyright 2009-2020 Peter Kosyh
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please see each individual source file for a list of they copyright holders.
INSTEAD links with the following libraries/sources:
Lua (MIT)
SDL (LGPL)
SDL_image (LGPL)
SDL_ttf (LGPL)
SDL_mixer (LGPL)
SDL_gfx (Zlib)
SDL_anigif.c (LGPL)
SDL2 (Zlib)
SDL2_image (Zlib)
SDL2_ttf (Zlib)
SDL2_mixer (Zlib)
SDL2_gfx (Zlib)
zlib (Zlib)
Freetype (LGPL)
FFmpeg (LGPL)
jpeg (JPEG License)
libpng (PNG license)
zlib (Zlib License)
list routines (MIT) (http://ccodearchive.net/info/list.html)
LuaFileSystem (http://keplerproject.github.io/luafilesystem/license.html)
tinymt32 (The 3-clause BSD License)
instead-3.3.2/ChangeLog 0000644 0001750 0001750 00000067067 13647020003 013753 0 ustar peter peter 3.3.2
* fix: -lua parameter;
* fix: WM minimized state fix;
* fix: anigif and decorators fix;
* fix: gtk3 build warning;
* new: initial gamepad support;
* new: utf8 tiny library;
* enh: loadstring sandboxed;
* enh: stead3 debugger uses native text input;
* enh: doc fixes;
-- Peter Kosyh Sun, 19 Apr 2020 11:00:00 +0300
3.3.1
* fix: build with SDL 2.0.10;
* enh: discord bot can be sticked to channel(s);
* enh: english doc fixes;
-- Peter Kosyh Fri, 4 Oct 2019 18:21:00 +0300
3.3.0
* new: input:text() event;
* new: tiny instead for metaparser;
* new: telegram, vk and discord bots;
* enh: english documentation;
* enh: Android port;
* fix: list:add() and order;
* fix: some compilation warnings;
* fix: makefile and source code cleanups;
* fix: possible segfault;
* fix: do not eat keyboard input;
-- Peter Kosyh Fri, 8 Mar 2019 09:28:00 +0300
3.2.2
* new: mobile theme;
* new: -lang parameter;
* new: -notheme parameter;
* new: instead.screen_size();
* enh: themes cleanups;
* new: cmake and LuaJIT build (-DWITH_LUAJIT=1);
* enh: autosave in emscripten build;
* enh: load status in emscripten build;
* new: machine-translated English manual;
* fix: Lua5.3 compatibility;
* fix: ini method and load parameter;
* fix: -appdata and system build;
* fix: build with zlib;
* fix: std.fmt and substitutions ($);
* fix: segfault on restart;
* fix: build with old gcc;
-- Peter Kosyh Sat, 1 Sep 2018 09:21:00 +0300
3.2.1
* fix: save in lua 5.2 (proxy objects);
* new: {$fmt ... } substitution;
* fix: instead.set_sound() and snd.play();
* fix: direct mode fix;
* fix: bugs in documentation.
* new: project moved to https://instead-hub.github.io
-- Peter Kosyh Sun, 22 Apr 2018 13:34:00 +0300
3.2.0
* fix: segfault on path overflow fix;
* fix: segfault in std.readdir fix;
* fix: forever loop bug (unpaired {});
* fix: theme.restore();
* fix: fmt.anchor(), theme.snd.click(), push(), pop();
* fix: snapshots module bugs;
* fix: gamefile with main3.lua;
* fix: noinv/nolife modules ('step' mod_call error);
* fix: xact booleans parameters;
* fix: chnage_pl with string argument;
* fix: always = true in dialog phrase;
* fix: use opengl on Windows instead d3d (nvidia fullscreen bug);
* fix: win32 and path encoding problem;
* fix: instead.menu();
* fix: save declared functions in tables;
* fix: sprite font:size with style;
* enh: Android port improvements;
* enh: click on bg not passed when xref selected (module click);
* enh: documentation;
* enh: speed improvements while theme updates;
* enh: code cleanups;
* new: walkback() in stdlib;
* new: math.round;
* new: std.var for variable extensions;
* new: -renderer parameter;
* new: -nocursor parameter;
* new: SailfishOS port;
* new: WinRT patches for upcoming port;
* new: sprite.scr() returns background in non direct mode;
* new: sprite.render_callback() (yahoooo!);
* new: instead.clipboard() added (SDL2 only);
* new: instead.wait_use();
* new: instead.grab_events();
* new: theme.scr.w(), theme.scr.h() (read only);
-- Peter Kosyh Fri, 9 Feb 2018 21:07:00 +0300
3.1.2
* regression fix in fading and menu;
-- Peter Kosyh Mon, 21 Aug 2017 16:45:00 +0300
3.1.1
* regression fix in fading (Android);
* code cleanups;
* doc cleanups;
-- Peter Kosyh Mon, 21 Aug 2017 08:50:00 +0300
3.1.0
* emscripten port;
* fix div by zero in rnd;
* fix in loadmod (from gamefile);
* fix in path (.walk as function);
* fixes in doc;
* code cleanups (compilation warnings);
* instead.noise1/2/3/4 (Perlin Noise);
* pixels:scale()/rotate();
-- Peter Kosyh Sun, 20 Aug 2017 10:16:00 +0300
3.0.1
* fix segfault while pause/resume;
* stead3: start() logic fix;
-- Peter Kosyh Wed, 24 May 2017 21:03:00 +0300
3.0.0
* refactoring (src/instead);
* tiny-instead;
* bug fixes;
* completely new stead3;
* sound.load_mem;
* sprite.pixels;
-- Peter Kosyh Wed, 19 Apr 2017 17:45:00 +0300
2.4.1
* sprite from sprite load bug fixed with scaling;
* fix in themes pager;
* fix in stead.menu_toggle();
* memory leak in free_font (sprtites) fixed;
* new stead.mouse_show();
* fix in txtnb() escaping;
* fix in stead.busy();
* fixes in fonts,cutscene and keyboard example modules;
* ua -> uk language, fixes in translation;
-- Peter Kosyh Sat, 16 Apr 2016 13:50:00 +0300
2.4.0
* txty (iface.y) -- y position in text;
* menu_toggle ("themes", "settings" added), w/o return to top menu;
* win.ways.mode = top|bottom in themes;
* game themes support (themes/ directory in game);
* set theme vars is not working when not using own themes;
* fix stead.api_atleast/atleast when using with vv.mm format;
* be more strict while loading combined images;
* in -debug mode any "resource not found" messages are errors;
* be more simple with walk from enter/exit (>= 2.4.0);
* About menu shows game information;
* -standalone mode;
* scr.gfx.icon added (SDL2 only, experimental);
* -noconfig parameter;
* profiles support added (-profile parameter);
* -hires parameter and HQ option (enabled by default);
* -modes parameter;
* Android-NG and IOS ports improvements;
* font size scale is displayed in percents;
* -fontscale argument;
-- Peter Kosyh Thu, 18 Feb 2016 15:09:00 +0300
2.3.0
* audio default is 44100 hz;
* fix segfault in windows version;
* visits/visited -> stead.visits, stead.visited;
* -nosound fix (volume 0 problem);
* fix bug in fingers module;
* fixes in Android version;
* -resizable parameter and config option (resizable window mode);
* SDL2: graphics rewrite (better full screen handling, resize, etc.)
* SDL2: fix with alpha blended bg;
-- Peter Kosyh Sun, 18 Oct 2015 13:15:00 +0300
2.2.7
* fix bug with fingers positions (forgotten patch) (SDL2);
-- Peter Kosyh Sun, 20 Sep 2015 13:49:00 +0300
2.2.6
* fix bug with SDL2 and cursor draw;
* fix bug with fingers and click modules;
* fix bug with fingers positions (SDL2);
* fix bug with cursor positions (SDL2);
* fix bug with menu and 32 bit float (S60);
* fix SDL window title on S60;
-- Peter Kosyh Sun, 20 Sep 2015 13:22:00 +0300
2.2.5
* fix bug with SDL2 and idf format (segfault);
* fix bug with SDL2 windows build (cursor coordinates);
* fix some bugs with SDL2;
* fix bug with music paused while run fullscreen mode;
-- Peter Kosyh Sun, 30 Aug 2015 16:15:00 +0300
2.2.4
* fix in prefs module (Windows);
* German language and tutorial;
-- Peter Kosyh Sun, 2 Aug 2015 11:22:00 +0300
2.2.3
* fix in player_save;
* always reset LC_CTYPE to C;
* fallback to software renderer if can not create texture;
* remove game dialog cleanup;
* fix in gamereset() and init() call;
* fix with gtk dialog open and SDL2;
-- Peter Kosyh Fri, 20 Mar 2015 18:56:00 +0300
2.2.2
* last_disp regression fixed;
-- Peter Kosyh Fri, 6 Feb 2015 19:17:00 +0300
2.2.1
* -alsa option removed, use SDL_AUDIODRIVER env instead;
* -vsync added for SDL2 vsync feature;
* *gray* and *grey* colors are both valid;
* fix in sandbox with stead.type;
* fix in sprites dirty screen logic;
* no 48000 hz sound anymore;
* windows build uses SDL2 and luajit;
* debug and vsync options in rc file;
-- Peter Kosyh Sat, 31 Jan 2015 16:27:00 +0300
2.2.0
* fix in debugger;
* fix in links hl with events module;
* fix in fr language;
* fix segfault in fgetsesc;
* space added in fixed gfx theme mode when ways are empty;
* rnd is now Tiny Mersenne Twister algo;
* scr.gfx.scalable & 4 -> disable font scaling;
* stead.life_moved() to detect moves in life;
* stead.last_disp() added;
* stead.nop() added;
* stead.rndseed() added;
* ready for IOS build;
* touch events via input.finger (finger module);
* stead.mouse_pos now returns buttons mask;
* do gfx sync in direct mode only after timer event (speedup);
* SDL2: do not send key repeats in direct mode (speedup);
* SDL2: use scancodes instead keycodes (dvorak fixed);
* updated doc/examples/fonts.lua;
* fix dropf with 2nd parameter;
* added forgotten function dropto;
* updated documentation (en/ru);
-- Peter Kosyh Thu, 1 Jan 2015 10:52:00 +0300
2.1.1
* -debug parameter fixed;
-- Peter Kosyh Wed, 9 Jul 2014 13:30:00 +0400
2.1.0
* fr.ini added;
* fix in highlighting links;
* sprites colorkey function;
* events module (pause, resume, quit events);
* stead.stop_sound/sound.stop second [fadeout] parameter;
-- Peter Kosyh Tue, 3 Jun 2014 17:28:00 +0400
2.0.3
* sandbox fix for win32 systems;
* fix bug while changing HZ;
-- Peter Kosyh Thu, 20 Feb 2014 17:19:00 +0400
2.0.2
* sandbox fixes;
* be more compatible with lua 5.2;
* SDL2.0 gfx mode initialization;
-- Peter Kosyh Thu, 30 Jan 2014 08:30:00 +0400
2.0.1
* lua5.2 compatible;
-- Peter Kosyh Mon, 27 Jan 2014 19:40:00 +0400
2.0.0
* GPL2 code removed. Now INSTEAD is covered by MIT license;
* code in now hosted on github (fixes in Makefiles);
* sandbox (no write access from lua outside game);
* window title contains the game name;
* sdl-instead start variant;
* fixes in Makefiles (PREFIX and DESTDIR);
* experimental cmake support;
* doc/examples addons;
* -lua and -luac parameters;
* in windows do not close -debug console until press return;
* game.gui.hidetitle;
* stead.api_atleast() and stead.atleast();
* stead.tonum, stead.tostr, stead.type, stead.ipairs, stead.pairs, stead.opairs;
* potential bug with non ascii save path and non UTF-8 game codepage;
* bug with language changing;
* bug with anigif rotate and scale;
* bug with anigif and cursor;
* typo in Please, wait message;
-- Peter Kosyh Sun, 26 Jan 2014 13:12:00 +0400
1.9.1
* INSTEAD moved to sourceforge.net;
* pt_BR language added;
* example code fixes;
* -hinting option;
* fixes in Makefiles and configure script;
* lua5.2 fix;
* bug fix in new/delete;
-- Peter Kosyh Sat, 13 Jul 2013 14:30:00 +0400
1.9.0
* music track from svenzzon!!!;
* SDL2.0 ready;
* -owntheme option;
* -noautosave option is not saved;
* -software option;
* bug fix: segfault while change and restart game;
* img_t refactoring for future architecture upgrade;
* fix in anigif scale;
* fix in stead.dialog_rescan;
* mp3 fix in windows binary;
-- Peter Kosyh Fri, 12 Apr 2013 08:00:00 +0400
1.8.3
* bug fix in start() from gamefile;
* bug fix do not remove xwalk after gamereset;
* bug fix in txtnb (lua5.2 compat);
* stead.savename function to redefine saves;
* stead.restart() to restart current game;
* p/pr/pn now do error when called from global context;
* now math. and os. moved to stead;
* debian friendly release;
* ctrl-r is alt-r, ctrl-q is alt-q alias;
* New documentation;
* stead.menu_toggle 'load/save/quit' parameters;
-- Peter Kosyh Sat, 26 Jan 2013 14:50:00 +0400
1.8.2
* bug fix in gfx_chnage_screen (sigsegv);
* bug fix in sound system (sigsegv);
* bug fix in input.lua and lua 5.2;
* bug fix filter scr.w scr.h changing from lua;
* fixes in ua tutorial;
* icon fix in windows;
* cleanup code for clang;
-- Peter Kosyh Wed, 19 Dec 2012 10:34:00 +0400
1.8.1
* bug fix in onact (stop act on non-nil return);
* bug fix in instead_gamespath/instead_themespath/instead_steadpath;
* bug fix in vars, now do not empty [k] indexes in obj;
* bug fix flickering while theme update;
* new theme parameter: win.scroll.mode = [0|1|2|3]
* new iface.anchor feature;
* faster working with layouts;
-- Peter Kosyh Sat, 17 Nov 2012 10:32:00 +0400
1.8.0
* bug fix in stead.need_scene() with parameter;
* bug fix in click on sprite;
* bug fix in save logic (table keys);
* bug fixes in dbg;
* bug fix in proxy_menu - possible to work with nam = true objects;
* bug fix much more faster text output;
* bug fix if use returns nil and used returns true;
* bug fix in change theme on the fly via theme module (segfault);
* bug fix in restore_snapshot (extra call to main.enter);
* internal functions are moved in stead. table;
* dbg module: use f7 key again to exit debugger;
* enable and disable methods in list;
* sprite.rotate, sprite.scale smooth parameter;
* much better scr.gfx.scalable handling, uses /2^x scaler;
* CPPFLAGS added in Makefile;
* scaler is updated from SDL_gfx 2.0.24;
-- Peter Kosyh Sat, 1 Sep 2012 12:08:00 +0400
1.7.0
* bug fix in phrase handling w/o parameter;
* bug fix in zip unpack;
* fix in doc/menu;
* svg logo added;
* busy dialog;
* opt_fading;
* normal fonts in MAEMO build;
* wroom module added;
* nouse module added;
* nolife module added;
* hideinv module is better now, noinv added;
* new dlg module:
* - better dlg syntax;
* - psub/pret/pjump/pstart;
* - stead.phrase_prefix;
* compose in sprite;
* game.onact/onwalk/onuse/oninv handlers;
* counters module;
* proxymenu module;
* configure.sh now checks gtk+-3.0;
* sprite.box and sprite.blank;
* stead.add_var internal command;
* stead.gui.hideways added;
* xact now searches recursive;
* xwalk xact added;
* lifeon with order;
* correct output from life methods while moving;
* stead.need_scene() added;
* stead.last_act() added;
* move/purge/remove/replace now works with lists too;
* dialog:visible added;
-- Peter Kosyh Thu, 17 Apr 2012 13:40:00 +0400
1.6.2
* bugfix in build with SDL_mixer 1.2.12;
* configure.sh script is now compatible with BSD;
-- Peter Kosyh Thu, 08 Feb 2012 19:52:00 +0400
1.6.1
* bugfix in prefs;
* justify text option;
* new track in tutorial3 (svenzzon - The Titan Turrican, CC BY-NC-SA 3.0);
* SDL_mixer 1.2.12 ready;
* gentoo build fix;
* fix build on systems w/o PATH_MAX;
* fix SDL icon;
-- Peter Kosyh Thu, 19 Jan 2012 09:43:00 +0400
1.6.0
* CJK support;
* set_music_fading(out, in);
* 1 bit transparent icon added for SDL;
* stead.space_delim added;
* get_themespath, get_gamespath;
* goto -> walk, goXX -> walkXX;
* lua5.2 ready;
-- Peter Kosyh Tue, 20 Dec 2011 08:37:00 +0400
1.5.2
* bug fix in release kbd event;
* improved motion mode;
* align in float gfx mode;
-- Peter Kosyh Sun, 10 Oct 2011 09:49:00 +0400
1.5.1
* bug fix in game_cmd logic;
* bug fix in highlight logic;
* bug fix in click sound logic;
* bug fix in RAW_TEXT;
* INSTEAD SDL -> INSTEAD;
* languages are sorted now;
* set_timer moved to stead;
* code cleanup (no warnings);
-- Peter Kosyh Mon, 05 Sep 2011 16:11:00 +0400
1.5.0
* bug fix in gamefile;
* bug fix in lifes output;
* bug fix in PLAYER_MOVED and lifes;
* bug fix in stop_sound;
* bug fix in set_music with parameter;
* bug fix in highlighting;
-- Peter Kosyh Mon, 17 Aug 2011 15:40:00 +0400
1.4.5
* bug fix in rnd() w/o parameter;
* bug fix in for_each;
* bug fix in txtnb and \;
* bug fix in original theme picture scaling;
* bug fix in left/right image alignment;
* bug fix in change_pl;
* callpush/callpop/cctx/strip do_ini and some others moved to stead;
* win.align added to theme;
* theme_name added;
* now fading first value is new scene flag;
* more information in error messages while checking lists;
* fixes in input module;
* added PLATFORM variable;
-- Peter Kosyh Mon, 01 Aug 2011 12:24:00 +0400
1.4.4
* bug fix in direct mode (memory leak);
-- Peter Kosyh Thu, 21 Jun 2011 08:57:00 +0400
1.4.3
* bug fix in nopara logic;
* ukranian translation and tutorial;
* multilang tutorial3;
* sprites small fix (predefined handles);
* cursor changing from direct mode support;
-- Peter Kosyh Thu, 19 Jun 2011 10:24:00 +0400
1.4.2
* bug fix in idf gets;
* bug fix in kbd hooking;
-- Peter Kosyh Thu, 19 May 2011 20:14:00 +0400
1.4.1
* bug fix in use;
-- Peter Kosyh Thu, 12 May 2011 23:53:00 +0400
1.4.0
* bug fix in imgl/imgr;
* bug fix in xact;
* bug fix in jump to pos logic;
* bug fix lags in sound;
* bug fix with wince/windows with themes load;
* experemental sprites technology;
* global dir is now readdir;
* multichannal sound system (add_sound, stop_sound);
* -appdata parameter;
* -chunksize parameter;
* show dir to be deleted while remove game;
* theme reset features;
* mouse_pos added;
* start() init function added;
* idf files support (instead data format);
* menu font is now scalable too;
* toggle_menu added;
* get_ticks added;
* bit_xxx bitwise operations added;
* visits() added;
-- Peter Kosyh Mon, 2 May 2011 08:35:00 +0400
1.3.4
* bug fix in text renderer with italic text;
* bug fix with imgl/imgr in inv;
* bug fix in video init;
* bug fix in theme.get 'inv.mode'
* font faces { } syntax;
* new default font;
* set light hinting for font;
* added stead.dir iterator;
* modules doc fix;
* languages dir renamed to lang;
* updated manual.pdf;
-- Peter Kosyh Fri, 11 Mar 2011 12:10:00 +0300
1.3.3
* bug fix (kbd input);
* modules docs;
-- Peter Kosyh Thu, 27 Feb 2011 20:27:00 +0300
1.3.2
* bug fix (dates in save slots);
* bug fix (dbg fixes);
* bug fix (f8 and f9 error msg);
* small bug fixes;
* s60 build;
* SDL 1.3 ready;
* it lang and tutorial;
-- Peter Kosyh Thu, 24 Feb 2011 13:12:00 +0300
1.3.1
* bug fix (imgl and justify);
* bug fix (languages in WinCE version);
* bug fix (prefs do not create save dir);
* bug fix (alt+f4 != f4);
* bug fix ( tag parsing)
* visual.lua moved to doc/;
-- Peter Kosyh Mon, 29 Nov 2010 15:44:00 +0300
1.3.0
* bug fix (resample sounds while HZ change);
* bug fix (empty bg);
* bug fix (cursor center scaling);
* changing themes from game;
* strike ougth text;
* *.fnt.height theme parameter;
* scroller positions in theme;
* escaping ^ and delim;
* box: and blank:;
* pad: ;
* speed up;
* picture flow;
* prefs:purge now removes vars;
* dialog:empty added;
* txttab;
* tutorial update;
-- Peter Kosyh Tue, 12 Nov 2010 22:42:00 +0300
1.2.3
* android build;
* bug in xact;
-- Peter Kosyh Sat, 2 Oct 2010 16:53:00 +0300
1.2.2
* xact now can be used from everywhere;
* much speed improvments;
* get_gamepath, get_steadpath;
* wince port;
* internal cleanups;
-- Peter Kosyh Fri, 25 Sep 2010 13:59:00 +0300
1.2.1
* clearlooks bg;
* fading fix;
* fix in disable autosave;
* disp fix;
* savevars optimization;
-- Peter Kosyh Sat, 28 Aug 2010 19:47:00 +0300
1.2.0
* unpack/install feature;
* browse feature (win32 and gtk);
* clever game/themes sorting;
* time of save slots;
* remove games;
* aligned width for themes/games dialog;
* local appdata mode (portable app);
* clearlooks theme;
* inv align modes;
* prefs object;
* init() function;
* snapshots (not documented?);
* hook and inherit;
* entered/left human friendly actions;
* stead.cmd, stead.args added;
* require added (modules: goto, xact, input, click, vars, dbg, snapshot, prefs, format, kbd, hotkeys);
* instead_version added;
* taketo/takef added;
* disable/enable/disable_all/enable_all added;
* exist() added (seen over disabled objects);
* path() added;
* visited() added;
* live() added;
* nameof() added;
* goback() added;
* goin()/goout() added;
* disp attribute added;
* improved debugger;
* save vars in _G;
* no duplicated games while looking gamespaths;
* code function!!!;
* args in call;
* var and global;
* self() is now self;
* psen/punseen for dlg;
* no return goto needed;
* disable_all/enable_all for lists;
* purge and list_purge;
* undocumented gamefile;
* undocumented LANG;
* many bugfixes...
* mac os x port
-- Peter Kosyh Wed, 04 Aug 2010 20:59:00 +0300
1.1.6
* bugfix (no closed files)
* bugfix in line breaking with gfx
* pr() function added in stead
-- Peter Kosyh Wed, 19 May 2010 17:31:00 +0300
1.1.5
* multiple anigif in one layout fix
* click in picture event
* game.action callback
* bug in parsing
* pause game while minimize (-nopause option added)
* 8 bit scaler fix
-- Peter Kosyh Wed, 10 Mar 2010 15:20:51 +0300
1.1.4
* keyboard navigation fix
* cursor while menu and lost focus
* lower cpu usage (no gif logic if no gifs are drawn)
-- Peter Kosyh Fri, 05 Mar 2010 18:28:40 +0300
1.1.3
* unix_path in get_img
* " in variable names (save)
* \\, in ways and inv
* 32 bit bmp fix
-- Peter Kosyh Wed, 16 Feb 2010 11:10:40 +0300
1.1.2
* bug in saves
-- Peter Kosyh Wed, 10 Feb 2010 13:39:47 +0300
1.1.1
* encode path in save (' in paths);
* mouse focus win problem;
* cleanups in stead.lua;
* doc updates;
* alt-r in debug mode (restart game);
* -version arg
* timer
* kbd input
* mouse input
* bluesteel theme
* nop cmd added in stead.lua
* anigif while menu bug
* add inv.mode disabled
* txtnb added to stead.lua
* bg scaling fix
* broken codepage fix
* esc strings in tag
* themes and games sorting
-- Peter Kosyh Thu, 14 Jan 2010 15:47:50 +0300
1.0.5
* segfault while is_sound with -nosound
* snd volume hack
* arctic theme added
-- Peter Kosyh Thu, 7 Jan 2010 14:34:00 +0300
1.0.4
* xref hl optimization
* now, write save slots in game/saves if game/saves exist
-- Peter Kosyh Tue, 12 Dec 2009 17:15:00 +0300
1.0.3
* autojump to text change
* no cursor flickering
* sdl_path (i18n M$ win sdl paths)
-- Peter Kosyh Tue, 01 Dec 2009 14:12:36 +0300
1.0.2
* fix in box normalize
* fix in scaling
* fixed f5 key
-- Peter Kosyh Tue, 24 Nov 2009 11:00:20 +0300
1.0.1
* bug: no fclose :(
* i18n + esp lang and tutorial
* cat removed
-- Peter Kosyh Fri, 20 Nov 2009 13:33:36 +0300
1.0.0
* another mouse buttons -- escape
* escape as use cancel
* lifeoff from life method
* bug fix in anigif logic
* bug fix in img()
* more clever linebreaking
* kill empty lines at end of layout
* typo in color table (graphics.c) by Alexander
* manual.tex by Alexander and commiters
* default-large theme is default
* combined images!
* page up, page down clever logic;
* f8/f9 - quicksave/quickload
* game.enable_save
* lua stack overflow???
* autosave function
-- Peter Kosyh Tue, 3 Nov 2009 19:43:00 +0400
0.9.3
* have and seen fixes
* -encode option + doencfile
* print reregister
* from() with argument
* new()/delete() (allocator object)
* game:ini() fix
* theme scaling (yahoo!!!)
* scene_use attribute (scene objects using on each other)
-- Peter Kosyh Mon, 12 Oct 2009 11:09:19 +0400
0.9.2
* animated gif support
* graphics everywhere!!! (img cmd)
* sound support (set_sound)
* some cleanups
-- Peter Kosyh Sun, 4 Oct 2009 16:10:09 +0400
0.9.1
* mouse gfx bug
* noautosave option
* make uninstall
* === STEAD FIXES ====
* gui.lua is separated file
* menus in gfx mode!!! :)
* stead.lua fixes:
* ref fix
* phrases saver
* player is object
* disable_all enable_all for object
* inherited inventory
* save game bug
* own stead namespace (table problem fixed!)
* recurse for exit breaking
* wrap into vroom not call exit twice
-- Peter Kosyh Sun, 15 Sep 2009 14:42:44 +0400
0.9
* fixes in localization
* srch method for player
* english tutorial
* separated games?
* font with apache license :)
* debian cleanups
-- Peter Kosyh Tue, 15 Sep 2009 13:29:55 +0400
0.8.9
* -gamespath -game -themespath -theme options
* runtime languages
* disabled() function in stead
* list_zap, list_concat
* remove added
* stead.lua fixes
* full keyboard control!
* alt enter fix
* gfx cursor support!
* no reset video while change game/theme
* tutorial2
-- Peter Kosyh Sat, 5 Aug 2009 11:25:01 +0400
0.8.8
* Makefiles fixes
* cat game fix
* .insteadrc now in .instead/ by default
* small fixes
-- Peter Kosyh Mon, 31 Aug 2009 11:25:01 +0400
0.8.7
* highlight bug in nohl mode with filter
* windows version now looks games and themes in appdir.
-- Peter Kosyh Fri, 28 Aug 2009 12:51:08 +0400
0.8.6
* cat game fixes
* seen extra parameter
-- Peter Kosyh Thu, 27 Aug 2009 08:32:00 +0400
0.8.5
* possible segfaults in timer functions.
* ways, objs, drop, take - extra parameters
* put - function
* set_music fixes
-- Peter Kosyh Thu, 24 Aug 2009 08:32:00 +0400
0.8.4
* bug in savevar
* bug in long strings
-- Peter Kosyh Thu, 20 Aug 2009 14:09:14 +0400
0.8.3
* sge forgotten
* set_music with loop argument bug
-- Peter Kosyh Wed, 19 Aug 2009 14:09:14 +0400
0.8.2
* gfx_load_img
-- Peter Kosyh Sat, 15 Aug 2009 14:09:14 +0400
0.8
* key_name attribute!!!!
* do_ini
* version in stead.lua
* opairs!!!
* vroom fix
* typos
* backtrace
* list_set
-- Peter Kosyh Fri, 07 Aug 2009 14:09:14 +0400
0.7.7-4
* Fixes :)
-- Peter Kosyh Wed, 05 Aug 2009 17:26:55 +0400
0.7.7
* typos in games
* local games now can be placed in ~/.instead/games
* console version disabled by default
* -- $Name: tag -- full name of games, not only dirname
* fix of link color for title/ways
* bug in text layout logic (last period in line)
* embedded mode (picture and ways inside text!!!)
* float mode (for books)
* faster text renderer (x2-x5 times)
* free motion mode of scrolling
* click sound support in themes (in default theme too)
* new options (click sound, music)
* default theme changes
* fullscreen with Alt-Enter
* options -alsa, -fullscreen, -window
* now italic font used for events
* 48000Hz added in sound preferences
* now scroll position is saved in embedded mode
* themes support, one new theme added
* vway and vroom added
* updated tutorial
* set_music now take an loop parameter
* autosave is now default
* now vars saved if they begins from uppercase letter (undescore too);
* save slots !!!
* a lot of bugs fixed (memory leaks, SDL cavities.. )
-- Peter Kosyh Thu, 30 Jul 2009 18:12:19 +0400
0.7.6-1
* debian file fixes
-- Peter Kosyh Fri, 29 May 2009 14:17:01 +0400
0.7.6
* Keyboard scrolling
* Font scaling
* inv.horiz option
-- Peter Kosyh Mon, 25 May 2009 10:58:29 +0400
0.7.5
* Initial release
-- Peter Kosyh Thu, 21 May 2009 11:40:29 +0400
instead-3.3.2/INSTALL 0000644 0001750 0001750 00000006151 13647020003 013215 0 ustar peter peter INSTEAD 3.3.2
=============
WARNING! For successfull building you must install these development packages
(names may vary in your distribution):
sdl2, sdl2-mixer, sdl2-image, sdl2-ttf, lua5.1/luajit, iconv
and gtk+2(3) (to build with open file dialog)
Optionally you may use:
sdl1
lua5.2/lua5.3
0) Prepare for building
=======================
Unpack source package with this command:
$ tar xzvf instead_.tar.gz
Change current dir to project's build dir:
$ cd instead-
There are several ways to build package.
1) On Ubuntu
============
Install stable (old) version from repo:
$ apt-get install instead
Or use ppa with latest version:
https://launchpad.net/~gl00my/+archive/ubuntu/instead
2) On Debian based systems you can build deb package
====================================================
$ sudo apt-get install liblua5.1-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev
$ sudo apt-get install build-essential debhelper
$ debuild
$ cd ..
$ sudo dpkg -i instead_.deb
3) On arch linux
================
Install stable version from community:
$ pacman -S instead
Or build from svn:
$ make PKGBUILD
$ makepkg -s
And, I think, you have enough skills to build package yourself. ;)
4) On FreeBSD
=============
Install instead from ports with pkgng:
# pkg install instead
Or:
# cd /usr/ports/games/instead
# make install
Or build from tarball:
$ ./configure.sh
$ gmake
5) On RPM based system
======================
There is .spec file in tarball.
6) For other distributions
==========================
You have three choices:
a) try to use cmake rules
b) try run ./configure.sh and follow instructions
c) do all things manually
7) Build using cmake
====================
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install
Warning, in some systems (like Arch linux) you need to define LUA dir, to help cmake.
For example (Arch linux):
$ LUA_DIR=/usr/include/lua5.1/ cmake ..
To build standalone version, use this (in ./build/ directory):
$ cmake .. -DSTANDALONE=1
$ make && make install
$ cd standalone
$ ./sdl-instead
Some options:
WITH_SDL2 Use SDL2 instead of SDL 1 (default on)
WITH_GTK2 Use GTK2 file open dialog (default on)
WITH_GTK3 Use GTK3 file open dialog
WITH_LUAJIT Use LuaJIT instead of Lua (recommended, but off by default)
For example, to build with SDL2, use:
$ cmake .. -DWITH_SDL2=1 -DWITH_LUAJIT=1 -DSTANDALONE=1
$ cmake .. -DWITH_SDL2=0 -DSTANDALONE=1 # build with SDL1
To build with GTK3:
$ cmake .. -DWITH_GTK3=1
8) Manual build
===============
To build game, that runs just from build dir use Rules.make.standalone
----------------------------------------------------------------------
$ rm -f Rules.make
$ ln -s Rules.make.standalone Rules.make
$ make clean
$ make
If build process has failed check Rules.make.standalone and make changes if needed.
$ ./sdl-instead
To build game for system install
--------------------------------
$ rm -f Rules.make
$ ln -s Rules.make.system Rules.make
$ make clean
$ make
If build process has failed check Rules.make.system and make changes if needed.
$ sudo make install
$ sdl-instead
Enjoy.
instead-3.3.2/Makefile 0000644 0001750 0001750 00000004122 13647020003 013620 0 ustar peter peter include Rules.make
include config.make
VERTITLE := instead-$(VERSION)
ARCHIVE := instead_$(VERSION).tar.gz#
SUBDIRS += src/ stead games themes icon desktop doc lang
all:
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir $(@) || exit 1; \
done;
Rules.make:
ln -sf Rules.make.standalone Rules.make
config.make:
echo "# you can define own flags here" > config.make
svnclean:
{ test -d .svn && svn st; } | grep "^?" | awk '{ print $$2 }' | grep -v "config.make" | while read l; do $(RM) -rf $$l; done
gitclean:
{ test -d .git && git status -s; } | grep "^??" | awk '{ print $$2 }' | grep -v "config.make" | while read l; do $(RM) -rf $$l; done
rules:
$(RM) -f Rules.make
ln -sf Rules.make.standalone Rules.make
docs: rules
make docs -C doc/
PKGBUILD: PKGBUILD.in tarball
cat PKGBUILD.in | sed -e s/MD5SUM/`md5sum $(ARCHIVE) | cut -f1 -d' '`/g > PKGBUILD
caanoo.tar.gz:
wget "http://sourceforge.net/projects/instead/files/instead/build-bin-data/$(@)/download" -O $(@)
mingw32ce.tar.gz:
wget "http://sourceforge.net/projects/instead/files/instead/build-bin-data/$(@)/download" -O $(@)
windows-sdl2.tar.gz:
wget "http://sourceforge.net/projects/instead/files/instead/build-bin-data/windows-sdl2.tar.gz/download" -O $(@)
build-bin-data: caanoo.tar.gz mingw32ce.tar.gz windows-sdl2.tar.gz
tarball: clean svnclean gitclean docs rules
echo "# you can define own flags here" > config.make
ln -sf ./ $(VERTITLE)
tar -cz --exclude $(VERTITLE)/$(VERTITLE) --exclude CJK.zip --exclude .git --exclude .svn --exclude $(ARCHIVE) --exclude mingw32ce.tar.gz --exclude windows-sdl2.tar.gz --exclude caanoo.tar.gz -f $(ARCHIVE) $(VERTITLE)/*
$(RM) -f $(VERTITLE)
clean:
@for dir in $(SUBDIRS); do \
$(MAKE) clean -C $$dir $(@) || exit 1; \
done;
$(RM) -f $(ARCHIVE)
$(RM) -f PKGBUILD
install: all
ifeq ($(SYSTEMSETUP), yes)
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir install || exit 1; \
done;
else
echo No install needed
endif
uninstall:
ifeq ($(SYSTEMSETUP), yes)
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir uninstall || exit 1; \
done;
$(RM) -rf $(STEADPATH)
else
echo No uninstall needed
endif
instead-3.3.2/Makefile.mingw 0000644 0001750 0001750 00000001471 13647020003 014744 0 ustar peter peter MAKE=make
ISCC = wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Inno\ Setup\ 5/ISCC.exe
all: config.make src/windows
$(MAKE) -C src/zlib all
$(MAKE) -C src all
$(MAKE) -C themes all
src/windows:
tar xzvf windows-sdl2.tar.gz
config.make:
echo "# you can define own flags here" > config.make
clean:
$(RM) -rf bin
$(RM) -rf src/windows
$(MAKE) -C src/sdl-instead clean
docs:
# $(MAKE) pdf -C doc/
# man doc/instead.6 > doc/instead.txt
# $(MAKE) wiki -C doc/
install: all
cp src/sdl-instead.exe bin
$(MAKE) DESTDIR=../bin/ -C themes install
$(MAKE) DESTDIR=../bin/ -C games install
$(MAKE) DESTDIR=../bin/ -C stead install
$(MAKE) DESTDIR=../bin/ -C icon install
$(MAKE) DESTDIR=../bin/ -C lang install
$(MAKE) DESTDIR=../bin/ -C doc install
setup: install docs
cp setup.iss bin
cd bin; $(ISCC) setup.iss
instead-3.3.2/PKGBUILD.in 0000644 0001750 0001750 00000001165 13647020003 013715 0 ustar peter peter # Contributor: Peter Kosyh
pkgname=instead
pkgver=3.3.2
pkgrel=1
pkgdesc="instead quest interpreter"
arch=('i686' 'x86_64')
url="http://instead.sourceforge.net/"
license=('MIT')
depends=('sdl2_image' 'sdl2_mixer' 'sdl2_ttf' 'lua')
source=(http://downloads.sourceforge.net/project/instead/instead/${pkgver}/instead_${pkgver}.tar.gz)
md5sums=(MD5SUM)
optdepends=('instead-launcher: install and update INSTEAD games from net')
build() {
cd "${srcdir}/instead-${pkgver}"
echo "2" | ./configure.sh
make PREFIX=/usr
}
package() {
cd "${srcdir}/instead-${pkgver}"
make DESTDIR="${pkgdir}" PREFIX=/usr install
}
instead-3.3.2/README.md 0000644 0001750 0001750 00000001564 13647020003 013446 0 ustar peter peter [](https://travis-ci.org/instead-hub/instead)
# INSTEAD
This program is covered by the terms of the MIT license.
Check the [COPYING](COPYING) file for license.
Check the [INSTALL](INSTALL) file for install instructions.
## Web resources
- [Homepage](https://instead-hub.github.io)
- [Code](https://github.com/instead-hub/instead)
- [Games](http://instead-games.sf.net)
- [Documentation](https://instead-hub.github.io/#doc)
## Install games
To run games you may:
- Unzip game archive into ~/.instead/games/;
- Or run zip-packed game: $ instead ;
- Or press [f4] to open file dialog (build with gtk2/gtl3 only).
## Contacts
- Join the chat at [gitter](https://gitter.im/instead-hub/instead);
- Unofficial XMPP conference: instead@conference.jabber.ru;
- Check the [AUTHORS](AUTHORS) file.
instead-3.3.2/Rules.make 0000777 0001750 0001750 00000000000 13647020004 020170 2Rules.make.standalone ustar peter peter instead-3.3.2/Rules.make.macosx 0000644 0001750 0001750 00000001752 13647020003 015410 0 ustar peter peter VERSION := 3.3.2
DESTDIR=
BIN=
DATAPATH=__private__
STEADPATH=$(DATAPATH)/stead
THEMESPATH=$(DATAPATH)/themes
GAMESPATH=$(DATAPATH)/games
ICONPATH=$(DATAPATH)/icon
LANGPATH=$(DATAPATH)/lang
DOCPATH=
MANPATH=
SYSTEMSETUP=no
ZLIB_CFLAGS=
ZLIB_LFLAGS=-lz
LUA_CFLAGS=$(shell pkg-config --cflags lua5.1)
LUA_LFLAGS=$(shell pkg-config --libs lua5.1)
# for arch linux, fedora (may be others) use this
#
# LUA_CFLAGS=$(shell pkg-config --cflags lua)
# LUA_LFLAGS=$(shell pkg-config --libs lua)
#
SDL_CFLAGS=$(shell sdl-config --cflags)
SDL_LFLAGS=$(shell sdl-config --libs) -lSDL_ttf -lSDL_mixer -lSDL_image
CFLAGS += -Wall -Dunix -D_USE_UNPACK -D_USE_BROWSE -D_SDL_MOD_BUG
INSTALLD=echo "Do not install standalone version!"
INSTALLB=echo "Do not install standalone version!"
INSTALL=echo "Do not install standalone version!"
LN=echo "Do not install standalone version!"
EXE=
PLATFORM=macosx.m
ADDOBJ=macosx.o
macosx.o : macosx.m
$(CC) -c $(<) $(I) $(CFLAGS)
RESOURCES=
RM=rm
AR=ar rc
RANLIB=ranlib
instead-3.3.2/Rules.make.mingw32ce 0000644 0001750 0001750 00000001637 13647020003 015716 0 ustar peter peter VERSION := 3.3.2
PREFIX=
DESTDIR=
BIN=$(PREFIX)
STEADPATH=$(PREFIX)stead
THEMESPATH=$(PREFIX)themes
GAMESPATH=$(PREFIX)games
ICONPATH=$(PREFIX)icon
DOCPATH=$(PREFIX)doc
LANGPATH=$(PREFIX)lang
MANPATH=$(PREFIX)doc
ZLIB_CFLAGS=
ZLIB_LFLAGS=-lz
LUA_CFLAGS=-I./mingw32ce/
LUA_LFLAGS=-llua -L./mingw32ce/
SDL_CFLAGS=-I./mingw32ce/SDL
SDL_LFLAGS=-lmikmod -lpng -L./mingw32ce/SDL
CFLAGS += -Wall -march=armv4t -Os -static \
-D_HAVE_ICONV -D_LOCAL_APPDATA -D_SDL_MOD_BUG
LDFLAGS += -Wl,-Bstatic \
-lSDL_mixer -lSDL -lmad -lvorbisfile -lvorbis -logg \
-lSDL_ttf -liconv -lfreetype \
-lSDL_image -lz -ljpeg \
-lmmtimer -lwince
CC=arm-mingw32ce-gcc
AR=arm-mingw32ce-ar rc
RANLIB=arm-mingw32ce-ranlib
RM=rm
EXE=.exe
INSTALLD=install -d -m 0755
INSTALLB=install -m 0755
INSTALL=install -m 0644
PLATFORM=wince.c iowin32.c
RESOURCES=resources.o
resources.o: resources.rc
arm-mingw32ce-windres -i resources.rc -o resources.o
instead-3.3.2/Rules.make.standalone 0000644 0001750 0001750 00000001647 13647020003 016251 0 ustar peter peter VERSION := 3.3.2
DESTDIR=
BIN=
DATAPATH=.
STEADPATH=$(DATAPATH)/stead
THEMESPATH=$(DATAPATH)/themes
GAMESPATH=$(DATAPATH)/games
ICONPATH=$(DATAPATH)/icon
LANGPATH=$(DATAPATH)/lang
DOCPATH=
MANPATH=
SYSTEMSETUP=no
ZLIB_CFLAGS=
ZLIB_LFLAGS=-lz
LUA_CFLAGS=$(shell pkg-config --cflags lua5.1)
LUA_LFLAGS=$(shell pkg-config --libs lua5.1)
# for arch linux, fedora (may be others) use this
#
# LUA_CFLAGS=$(shell pkg-config --cflags lua)
# LUA_LFLAGS=$(shell pkg-config --libs lua)
#
SDL_CFLAGS=$(shell sdl-config --cflags)
SDL_LFLAGS=$(shell sdl-config --libs) -lSDL_ttf -lSDL_mixer -lSDL_image -lm
CFLAGS += -O2 -Wall -Dunix -D_USE_UNPACK -D_LOCAL_APPDATA # -D_SDL_MOD_BUG
INSTALLD=echo "Do not install standalone version!"
INSTALLB=echo "Do not install standalone version!"
INSTALL=echo "Do not install standalone version!"
LN=echo "Do not install standalone version!"
EXE=
PLATFORM=unix.c
RESOURCES=
RM=rm
AR=ar rc
RANLIB=ranlib
instead-3.3.2/Rules.make.system 0000644 0001750 0001750 00000001610 13647020003 015433 0 ustar peter peter VERSION := 3.3.2
PREFIX=/usr/local
DESTDIR=
BIN=$(PREFIX)/bin/
DATAPATH=$(PREFIX)/share/instead
STEADPATH=$(DATAPATH)/stead
THEMESPATH=$(DATAPATH)/themes
GAMESPATH=$(DATAPATH)/games
ICONPATH=$(PREFIX)/share/pixmaps
DOCPATH=$(PREFIX)/share/doc/instead
LANGPATH=$(DATAPATH)/lang
MANPATH=$(PREFIX)/share/man/man6
SYSTEMSETUP=yes
ZLIB_CFLAGS=
ZLIB_LFLAGS=-lz
LUA_CFLAGS=$(shell pkg-config --cflags lua5.1)
LUA_LFLAGS=$(shell pkg-config --libs lua5.1)
# for arch and gentoo linux use this
#
# LUA_CFLAGS=$(shell pkg-config --cflags lua)
# LUA_LFLAGS=$(shell pkg-config --libs lua)
#
SDL_CFLAGS=$(shell sdl-config --cflags)
SDL_LFLAGS=$(shell sdl-config --libs) -lSDL_ttf -lSDL_mixer -lSDL_image -lm
CFLAGS += -Wall -Dunix -D_USE_UNPACK # -D_SDL_MOD_BUG
INSTALLD=install -d -m 0755
INSTALLB=install -m 0755
INSTALL=install -m 0644
LN=ln -sf
EXE=
PLATFORM=unix.c
RESOURCES=
RM=rm
AR=ar rc
RANLIB=ranlib
instead-3.3.2/Rules.mingw 0000644 0001750 0001750 00000001543 13647020003 014321 0 ustar peter peter VERSION := 3.3.2
PREFIX=./
DESTDIR=
BIN=$(PREFIX)
STEADPATH=$(PREFIX)stead
THEMESPATH=$(PREFIX)themes
GAMESPATH=$(PREFIX)games
ICONPATH=$(PREFIX)icon
DOCPATH=$(PREFIX)doc
LANGPATH=$(PREFIX)lang
MANPATH=$(PREFIX)doc
WINDOWS=yes
ZLIB_CFLAGS=-Izlib
ZLIB_LFLAGS=zlib/libz.a
LUA_CFLAGS=-I./windows/
LUA_LFLAGS=-llua5.1 -L./windows/
SDL_CFLAGS=-I./windows/SDL
SDL_LFLAGS=-lSDL2 -lSDL2main -lSDL2_ttf -lSDL2_mixer -lSDL2_image -L./windows/SDL
CFLAGS += -Wall -mwindows -D_HAVE_ICONV -D_USE_UNPACK -D_USE_BROWSE -D_LOCAL_APPDATA # -D_SDL_MOD_BUG
LDFLAGS += -liconv
CC=i486-mingw32-gcc
AR=i486-mingw32-ar rc
RANLIB=i486-mingw32-ranlib
RM=rm
EXE=.exe
INSTALLD=install -d -m 0755
INSTALLB=install -m 0755
INSTALL=install -m 0644
LN=echo
PLATFORM=windows.c iowin32.c
RESOURCES=resources.o
resources.o: resources.rc
i486-mingw32-windres -i resources.rc -o resources.o
instead-3.3.2/bld.inf 0000644 0001750 0001750 00000000104 13647020003 013413 0 ustar peter peter PRJ_PLATFORMS
DEFAULT
PRJ_MMPFILES
gnumakefile icons.mk
instead.mmp
instead-3.3.2/cmake/ 0000755 0001750 0001750 00000000000 13647020003 013241 5 ustar peter peter instead-3.3.2/cmake/FindSDL2_ttf.cmake 0000644 0001750 0001750 00000001326 13647020003 016427 0 ustar peter peter # - Try to locate SDL2_ttf
# This module defines:
#
# SDL2TTF_INCLUDE_DIR
# SDL2TTF_LIBRARY
# SDL2TTF_FOUND
#
FIND_PATH(SDL2TTF_INCLUDE_DIR NAMES SDL_ttf.h PATH_SUFFIXES SDL2)
FIND_LIBRARY(SDL2TTF_LIBRARY NAMES SDL2_ttf)
IF(SDL2TTF_INCLUDE_DIR AND SDL2TTF_LIBRARY)
SET(SDL2TTF_FOUND TRUE)
ENDIF(SDL2TTF_INCLUDE_DIR AND SDL2TTF_LIBRARY)
IF(SDL2TTF_FOUND)
IF(NOT SDL2_ttf_FIND_QUIETLY)
MESSAGE(STATUS "Found SDL2_ttf: -I${SDL2TTF_INCLUDE_DIR}, ${SDL2TTF_LIBRARY}")
ENDIF(NOT SDL2_ttf_FIND_QUIETLY)
ELSE(SDL2TTF_FOUND)
IF(SDL2_ttf_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find SDL2_ttf")
ENDIF(SDL2_ttf_FIND_REQUIRED)
ENDIF(SDL2TTF_FOUND)
MARK_AS_ADVANCED(SDL2TTF_INCLUDE_DIR SDL2TTF_LIBRARY SDL2TTF_FOUND)
instead-3.3.2/cmake/FindSDL2_mixer.cmake 0000644 0001750 0001750 00000001414 13647020003 016754 0 ustar peter peter # - Try to locate SDL2_mixer
# This module defines:
#
# SDL2MIXER_INCLUDE_DIR
# SDL2MIXER_LIBRARY
# SDL2MIXER_FOUND
#
FIND_PATH(SDL2MIXER_INCLUDE_DIR NAMES SDL_mixer.h PATH_SUFFIXES SDL2)
FIND_LIBRARY(SDL2MIXER_LIBRARY NAMES SDL2_mixer)
IF(SDL2MIXER_INCLUDE_DIR AND SDL2MIXER_LIBRARY)
SET(SDL2MIXER_FOUND TRUE)
ENDIF(SDL2MIXER_INCLUDE_DIR AND SDL2MIXER_LIBRARY)
IF(SDL2MIXER_FOUND)
IF(NOT SDL2_mixer_FIND_QUIETLY)
MESSAGE(STATUS "Found SDL2_mixer: -I${SDL2MIXER_INCLUDE_DIR}, ${SDL2MIXER_LIBRARY}")
ENDIF(NOT SDL2_mixer_FIND_QUIETLY)
ELSE(SDL2MIXER_FOUND)
IF(SDL2_mixer_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find SDL2_mixer")
ENDIF(SDL2_mixer_FIND_REQUIRED)
ENDIF(SDL2MIXER_FOUND)
MARK_AS_ADVANCED(SDL2MIXER_INCLUDE_DIR SDL2MIXER_LIBRARY SDL2MIXER_FOUND)
instead-3.3.2/cmake/FindLuaJIT.cmake 0000644 0001750 0001750 00000003443 13647020003 016140 0 ustar peter peter # Locate LuaJIT library
# This module defines
# LUAJIT_FOUND, if false, do not try to link to Lua
# LUA_LIBRARIES
# LUA_INCLUDE_DIR, where to find lua.h
# LUAJIT_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
## Copied from default CMake FindLua51.cmake
find_path(LUA_INCLUDE_DIR luajit.h
HINTS
ENV LUA_DIR
PATH_SUFFIXES include/luajit-2.0 include
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(LUA_LIBRARY
NAMES luajit-5.1
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
)
if(LUA_LIBRARY)
# include the math library for Unix
if(UNIX AND NOT APPLE)
find_library(LUA_MATH_LIBRARY m)
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
else()
set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
endif()
endif()
if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h")
file(STRINGS "${LUA_INCLUDE_DIR}/luajit.h" luajit_version_str REGEX "^#define[ \t]+LUAJIT_VERSION[ \t]+\"LuaJIT .+\"")
string(REGEX REPLACE "^#define[ \t]+LUAJIT_VERSION[ \t]+\"LuaJIT ([^\"]+)\".*" "\\1" LUAJIT_VERSION_STRING "${luajit_version_str}")
unset(luajit_version_str)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJIT
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
VERSION_VAR LUAJIT_VERSION_STRING)
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
instead-3.3.2/cmake/InstallSymlink.cmake 0000644 0001750 0001750 00000001041 13647020003 017214 0 ustar peter peter MACRO(INSTALL_SYMLINK linktarget linkname destination)
IF(UNIX)
IF(IS_ABSOLUTE ${destination})
SET(FULL_DESTINATION "\$ENV{DESTDIR}${destination}/${linkname}")
ELSE(IS_ABSOLUTE ${destination})
SET(FULL_DESTINATION "\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${destination}/${linkname}")
ENDIF(IS_ABSOLUTE ${destination})
INSTALL(CODE "MESSAGE(STATUS \"Symlink: ${FULL_DESTINATION} -> ${linktarget}\")
EXECUTE_PROCESS(COMMAND \${CMAKE_COMMAND} -E create_symlink ${linktarget} ${FULL_DESTINATION})")
ENDIF()
ENDMACRO()
instead-3.3.2/cmake/FindSDL2_image.cmake 0000644 0001750 0001750 00000001414 13647020003 016712 0 ustar peter peter # - Try to locate SDL2_image
# This module defines:
#
# SDL2IMAGE_INCLUDE_DIR
# SDL2IMAGE_LIBRARY
# SDL2IMAGE_FOUND
#
FIND_PATH(SDL2IMAGE_INCLUDE_DIR NAMES SDL_image.h PATH_SUFFIXES SDL2)
FIND_LIBRARY(SDL2IMAGE_LIBRARY NAMES SDL2_image)
IF(SDL2IMAGE_INCLUDE_DIR AND SDL2IMAGE_LIBRARY)
SET(SDL2IMAGE_FOUND TRUE)
ENDIF(SDL2IMAGE_INCLUDE_DIR AND SDL2IMAGE_LIBRARY)
IF(SDL2IMAGE_FOUND)
IF(NOT SDL2_image_FIND_QUIETLY)
MESSAGE(STATUS "Found SDL2_image: -I${SDL2IMAGE_INCLUDE_DIR}, ${SDL2IMAGE_LIBRARY}")
ENDIF(NOT SDL2_image_FIND_QUIETLY)
ELSE(SDL2IMAGE_FOUND)
IF(SDL2_image_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find SDL2_image")
ENDIF(SDL2_image_FIND_REQUIRED)
ENDIF(SDL2IMAGE_FOUND)
MARK_AS_ADVANCED(SDL2IMAGE_INCLUDE_DIR SDL2IMAGE_LIBRARY SDL2IMAGE_FOUND)
instead-3.3.2/cmake/FindSDL2.cmake 0000644 0001750 0001750 00000001174 13647020003 015553 0 ustar peter peter # - Try to locate SDL2
# This module defines:
#
# SDL2_INCLUDE_DIR
# SDL2_LIBRARY
# SDL2_FOUND
#
FIND_PATH(SDL2_INCLUDE_DIR NAMES SDL.h PATH_SUFFIXES SDL2)
FIND_LIBRARY(SDL2_LIBRARY NAMES SDL2)
IF(SDL2_INCLUDE_DIR AND SDL2_LIBRARY)
SET(SDL2_FOUND TRUE)
ENDIF(SDL2_INCLUDE_DIR AND SDL2_LIBRARY)
IF(SDL2_FOUND)
IF(NOT SDL2_FIND_QUIETLY)
MESSAGE(STATUS "Found SDL2: -I${SDL2_INCLUDE_DIR}, ${SDL2_LIBRARY}")
ENDIF(NOT SDL2_FIND_QUIETLY)
ELSE(SDL2_FOUND)
IF(SDL2_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find SDL2")
ENDIF(SDL2_FIND_REQUIRED)
ENDIF(SDL2_FOUND)
MARK_AS_ADVANCED(SDL2_INCLUDE_DIR SDL2_LIBRARY SDL2_FOUND)
instead-3.3.2/cmake/FindIconv.cmake 0000644 0001750 0001750 00000002600 13647020003 016120 0 ustar peter peter # - Locate Iconv
# This module defines:
#
# ICONV_INCLUDE_DIR
# ICONV_LIBRARY
# ICONV_FOUND
#
# Look for header file
FIND_PATH(ICONV_INCLUDE_DIR NAMES iconv.h)
# Check if library is needed
IF(ICONV_INCLUDE_DIR)
SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
TRY_COMPILE(ICONV_LIBRARY_NOT_NEEDED
${CMAKE_BINARY_DIR}
${CMAKE_MODULE_PATH}/iconv_test.c
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${ICONV_INCLUDE_DIR}"
)
IF(NOT ICONV_LIBRARY_NOT_NEEDED)
# Locate library
FIND_LIBRARY(ICONV_LIBRARY NAMES iconv libiconv)
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARY)
SET(ICONV_FOUND TRUE)
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARY)
ELSE(NOT ICONV_LIBRARY_NOT_NEEDED)
# Library not needed
SET(ICONV_LIBRARY)
IF(ICONV_INCLUDE_DIR)
SET(ICONV_FOUND TRUE)
ENDIF(ICONV_INCLUDE_DIR)
ENDIF(NOT ICONV_LIBRARY_NOT_NEEDED)
ENDIF(ICONV_INCLUDE_DIR)
# Show status
IF(ICONV_FOUND)
IF(NOT Iconv_FIND_QUIETLY)
IF(ICONV_LIBRARY_NOT_NEEDED)
MESSAGE(STATUS "Found Iconv: -I${ICONV_INCLUDE_DIR}, library not needed")
ELSE(ICONV_LIBRARY_NOT_NEEDED)
MESSAGE(STATUS "Found Iconv: -I${ICONV_INCLUDE_DIR}, ${ICONV_LIBRARY}")
ENDIF(ICONV_LIBRARY_NOT_NEEDED)
ENDIF(NOT Iconv_FIND_QUIETLY)
ELSE(ICONV_FOUND)
IF(Iconv_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find ICONV")
ENDIF(Iconv_FIND_REQUIRED)
ENDIF(ICONV_FOUND)
MARK_AS_ADVANCED(ICONV_INCLUDE_DIR ICONV_LIBRARY ICONV_FOUND)
instead-3.3.2/cmake/iconv_test.c 0000644 0001750 0001750 00000000103 13647020003 015554 0 ustar peter peter #include
int main() {
iconv_open("", "");
return 0;
}
instead-3.3.2/cmake/FindGTK3.cmake 0000644 0001750 0001750 00000001530 13647020003 015553 0 ustar peter peter # - Try to locate GTK3
# This module defines:
#
# GTK3_INCLUDE_DIRS
# GTK3_LIBRARIES
# GTK3_FOUND
# GTK3_DEFINITIONS
#
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_GTK3 REQUIRED gtk+-3.0)
SET(GTK3_INCLUDE_DIRS ${PC_GTK3_INCLUDE_DIRS})
FOREACH(LIB ${PC_GTK3_LIBRARIES})
FIND_LIBRARY(FOUND${LIB} HINTS ${PC_GTK3_LIBRARY_DIRS} NAMES ${LIB})
LIST(APPEND GTK3_LIBRARIES ${FOUND${LIB}})
ENDFOREACH(LIB)
IF(GTK3_INCLUDE_DIRS AND GTK3_LIBRARIES)
SET(GTK3_FOUND TRUE)
ENDIF(GTK3_INCLUDE_DIRS AND GTK3_LIBRARIES)
IF(GTK3_FOUND)
IF(NOT GTK3_FIND_QUIETLY)
MESSAGE(STATUS "Found GTK3: -I${GTK3_INCLUDE_DIRS}, ${GTK3_LIBRARIES}")
ENDIF(NOT GTK3_FIND_QUIETLY)
ELSE(GTK3_FOUND)
IF(GTK3_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find GTK3")
ENDIF(GTK3_FIND_REQUIRED)
ENDIF(GTK3_FOUND)
MARK_AS_ADVANCED(GTK3_INCLUDE_DIRS GTK3_LIBRARIES GTK3_FOUND)
instead-3.3.2/config.make 0000644 0001750 0001750 00000000040 13647020016 014263 0 ustar peter peter # you can define own flags here
instead-3.3.2/configure-mingw32.sh 0000755 0001750 0001750 00000000337 13647020003 015770 0 ustar peter peter #!/bin/sh
rm -f config.make
rm -f Rules.make
ln -sf Rules.mingw Rules.make
rm -f sdl-instead
ln -sf src/sdl-instead sdl-instead
echo "Ok. We are ready to build. Use this command:"
echo " \$ make -f Makefile.mingw setup"
instead-3.3.2/configure.sh 0000755 0001750 0001750 00000015177 13647020003 014514 0 ustar peter peter #!/bin/sh
echo -n "Checking pkg-config..."
if ! pkg-config --version >/dev/null 2>&1; then
echo "error: no pkg-config in \$PATH."
exit 1
fi
echo "ok"
echo -n "Checking pkg-config --cflags zlib..."
if ! pkg-config --cflags zlib >/dev/null 2>&1; then
if [ -f /usr/include/zlib.h ]; then
echo "not found, but /usr/include/zlib.h exists..."
zlib_cflags="x"
zlib_libs=
else
echo "internal"
zlib_cflags=
zlib_libs=
fi
else
echo "system"
zlib_cflags="pkg-config --cflags zlib"
zlib_libs="pkg-config --libs zlib"
fi
echo -n "Checking pkg-config --cflags gtk+-2.0..."
if ! pkg-config --cflags gtk+-2.0 >/dev/null 2>&1; then
echo "no"
echo -n "Checking pkg-config --cflags gtk+-3.0..."
if ! pkg-config --cflags gtk+-3.0 >/dev/null 2>&1; then
echo "no open file dialog"
gtk_cflags=
gtk_libs=
else
echo "yes"
gtk_cflags="pkg-config --cflags gtk+-3.0"
gtk_libs="pkg-config --libs gtk+-3.0"
fi
else
echo "yes"
gtk_cflags="pkg-config --cflags gtk+-2.0"
gtk_libs="pkg-config --libs gtk+-2.0"
fi
echo -n "Checking pkg-config --cflags lua[jit|5.1|5.2|51|52]..."
if [ "x$LUA" = "x" ]; then
lua_ver="luajit lua5.1 lua5.2 lua lua-5.1 lua-5.2 lua51 lua52"
else
lua_ver=$LUA
fi
for v in $lua_ver; do
if pkg-config --cflags "$v" >/dev/null 2>&1; then
echo "$v"
lua_cflags="pkg-config --cflags $v"
lua_libs="pkg-config --libs $v"
break
fi
done
if test "x$lua_libs" = "x"; then
echo "failed: no package lua/lua5.1/lua5.2/lua-5.1/lua-5.2/lua51/lua52"
echo "Please install lua development package."
exit 1
fi
echo -n "Checking sdl2-config..."
if ! sdl2-config --version >/dev/null 2>&1; then
if ! sdl-config --version >/dev/null 2>&1; then
echo "error: no sdl-config/sdl2-config in \$PATH."
echo "Please install sdl, sdl_ttf, sdl_mixer and sdl_image development packages."
exit 1
fi
echo "no, using SDL 1.xx"
sdl_config="sdl-config"
sdl_libs="-lSDL_ttf -lSDL_mixer -lSDL_image -lm"
else
echo "ok"
sdl_config="sdl2-config"
sdl_libs="-lSDL2_ttf -lSDL2_mixer -lSDL2_image -lm"
fi
echo -n "Checking sdl-config --cflags..."
if ! $sdl_config --cflags >/dev/null 2>&1; then
echo "failed."
exit 1
fi
echo "ok"
ops="$CPPFLAGS $CFLAGS $LDFLAGS"
ops=$ops" "`$lua_cflags`
ops=$ops" "`$lua_libs`
echo -n "Looking for compiler..."
if ! $CC --version >/dev/null 2>&1; then
if ! cc --version >/dev/null 2>&1; then
if ! gcc --version >/dev/null 2>&1; then
echo "cc, gcc, \$(CC) are not valid compilers... Please export CC for valid one...";
exit 1;
else
cc="gcc";
fi
else
cc="cc"
fi
else
cc=$CC
fi
cat << EOF >/tmp/sdl-test.c
#include
#include
#include
#include
#include
int main(int argc, char **argv)
{
return 0;
}
EOF
echo $cc
echo -n "Checking test build...("
echo -n $cc /tmp/sdl-test.c $ops `$sdl_config --cflags` `$sdl_config --libs` $sdl_libs -o /tmp/sdl-test ")..."
if ! $cc /tmp/sdl-test.c $ops `$sdl_config --cflags` `$sdl_config --libs` $sdl_libs -o /tmp/sdl-test; then
echo "failed".
echo "Please sure if these development packages are installed: sdl, sdl_ttf, sdl_mixer, sdl_image."
rm -f /tmp/sdl-test.c /tmp/sdl-test
exit 1
fi
echo "ok"
rm -f /tmp/sdl-test.c /tmp/sdl-test
cat << EOF >/tmp/iconv-test.c
#include
int main(int argc, char **argv)
{
iconv_open("","");
}
EOF
echo $cc
echo -n "Checking iconv...("
echo -n "$cc /tmp/iconv-test.c -o iconv-test)..."
if $cc /tmp/iconv-test.c -o /tmp/iconv-test >/dev/null 2>&1; then
CFLAGS="$CFLAGS -D_HAVE_ICONV -DLIBICONV_PLUG" # force FreeBSD to use iconv.h from base
echo "ok"
elif $cc /tmp/iconv-test.c -liconv -o /tmp/iconv-test >/dev/null 2>&1; then
CFLAGS="$CFLAGS -D_HAVE_ICONV"
LDFLAGS="$LDFLAGS -liconv"
echo "ok, with -liconv"
elif $cc /tmp/iconv-test.c -I/usr/local/include -L/usr/local/lib -liconv -o /tmp/iconv-test >/dev/null 2>&1; then
CFLAGS="$CFLAGS -I/usr/local/include -D_HAVE_ICONV"
LDFLAGS="$LDFLAGS -L/usr/local/lib -liconv"
echo "ok, with -liconv and -L/usr/local/lib"
else
echo -n "failed. Build without iconv.".
fi
rm -f /tmp/iconv-test.c /tmp/iconv-test
if ! make clean >/dev/null 2>&1; then
echo " * Warning!!! Can not do make clean..."
fi
echo -n "Generating config.make..."
echo "# autamatically generated by configure.sh" >config.make
if [ ! -z "$CFLAGS" ]; then
echo "EXTRA_CFLAGS+=$CFLAGS" >> config.make
fi
if [ ! -z "$LDFLAGS" ]; then
echo "EXTRA_LDFLAGS+=$LDFLAGS" >> config.make
fi
if [ ! -z "$gtk_cflags" ]; then
echo "EXTRA_CFLAGS+=-D_USE_GTK -D_USE_BROWSE" >> config.make
echo "EXTRA_CFLAGS+=\$(shell $gtk_cflags)" >> config.make
echo "EXTRA_LDFLAGS+=\$(shell $gtk_libs)" >> config.make
fi
if [ -z "$zlib_cflags" ]; then
echo "SUBDIRS=src/zlib" >> config.make
echo "ZLIB_CFLAGS=-Izlib" >> config.make
echo "ZLIB_LFLAGS=zlib/libz.a" >> config.make
elif [ "$zlib_cflags" = "x" ]; then
echo "ZLIB_CFLAGS=" >> config.make
echo "ZLIB_LFLAGS=-lz" >> config.make
else
echo "ZLIB_CFLAGS=\$(shell $zlib_cflags)" >> config.make
echo "ZLIB_LFLAGS=\$(shell $zlib_libs)" >> config.make
fi
echo "LUA_CFLAGS=\$(shell $lua_cflags)" >> config.make
echo "LUA_LFLAGS=\$(shell $lua_libs)" >> config.make
echo "SDL_CFLAGS=\$(shell $sdl_config --cflags)" >> config.make
echo "SDL_LFLAGS=\$(shell $sdl_config --libs) $sdl_libs" >> config.make
echo "ok"
if [ "x$PREFIX" = "x" ]; then
echo -n "Choose installation mode. Standalone(1) or system(2) [1]: "
read ans
else
ans="2"
fi
if [ "x$ans" = "x1" -o "x$ans" = "x" ]; then
echo " * Standalone version"
rm -f Rules.make
ln -sf Rules.make.standalone Rules.make
rm -f sdl-instead
ln -sf src/sdl-instead sdl-instead
echo "Ok. We are ready to build. Use these commands:"
echo " \$ make"
echo " \$ ./sdl-instead"
elif [ "x$ans" = "x2" ]; then
if [ "x$PREFIX" = "x" ]; then
echo -n "Enter prefix path [/usr/local]: "
read ans
else
ans="$PREFIX"
fi
if [ "x$ans" = "x" ]; then
prefix="/usr/local"
else
prefix="$ans"
fi
rm -f Rules.make
ln -s Rules.make.system Rules.make
echo " * System version with prefix: $prefix"
echo "PREFIX=$prefix" >> config.make
echo "BIN=\$(PREFIX)/bin/" >> config.make
echo "DATAPATH=\$(PREFIX)/share/instead" >> config.make
echo "STEADPATH=\$(DATAPATH)/stead" >> config.make
echo "THEMESPATH=\$(DATAPATH)/themes" >> config.make
echo "GAMESPATH=\$(DATAPATH)/games" >> config.make
echo "ICONPATH=\$(PREFIX)/share/pixmaps" >> config.make
echo "DOCPATH=\$(PREFIX)/share/doc/instead" >> config.make
echo "LANGPATH=\$(DATAPATH)/lang" >> config.make
echo "MANPATH=\$(PREFIX)/share/man/man6" >> config.make
echo "Ok. We are ready to build and install. Use these commands:"
echo " \$ make"
echo " \$ sudo make install"
echo " \$ sdl-instead"
else
echo "Huh!!! Wrong answer."
exit 1
fi
echo " Enjoy..."
instead-3.3.2/contrib/ 0000755 0001750 0001750 00000000000 13647020003 013621 5 ustar peter peter instead-3.3.2/contrib/instead-em-build.sh 0000755 0001750 0001750 00000021660 13647020003 017310 0 ustar peter peter #!/usr/bin/env bash
# build INSTEAD with emscripten
set -e
export WORKSPACE="" #"/home/peter/Devel/emsdk-portable/env"
if [ ! -f ./emsdk_env.sh ]; then
echo "Run this script in emsdk directory"
exit 1
fi
if [ -z "$WORKSPACE" ]; then
echo "Define WORKSPACE path in $0"
exit 1
fi
if [ ! -d "$WORKSPACE" ]; then
echo "Please, create build directory $WORKSPACE"
exit 1
fi
. ./emsdk_env.sh
# some general flags
export PATH="$WORKSPACE/bin:$PATH"
export CFLAGS="-g0 -O2"
export CXXFLAGS="$CFLAGS"
export EM_CFLAGS="-Wno-warn-absolute-paths"
export EMMAKEN_CFLAGS="$EM_CFLAGS"
export PKG_CONFIG_PATH="$WORKSPACE/lib/pkgconfig"
export MAKEFLAGS="-j2"
# flags to fake emconfigure and emmake
export CC="emcc"
export CXX="em++"
export LD="$CC"
export LDSHARED="$LD"
export RANLIB="emranlib"
export AR="emar"
export CC_BUILD=cc
# Lua
cd $WORKSPACE
rm -rf lua-5.1.5
[ -f lua-5.1.5.tar.gz ] || wget -nv 'https://www.lua.org/ftp/lua-5.1.5.tar.gz'
tar xf lua-5.1.5.tar.gz
cd lua-5.1.5
cat src/luaconf.h | sed -e 's/#define LUA_USE_POPEN//g' -e 's/#define LUA_USE_ULONGJMP//g'>src/luaconf.h.new
mv src/luaconf.h.new src/luaconf.h
emmake make posix CC=emcc
emmake make install INSTALL_TOP=$WORKSPACE
# libiconv
cd $WORKSPACE
rm -rf libiconv-1.15
[ -f libiconv-1.15.tar.gz ] || wget -nv 'https://ftp.gnu.org/gnu/libiconv/libiconv-1.15.tar.gz'
tar xf libiconv-1.15.tar.gz
cd libiconv-1.15
emconfigure ./configure --prefix=$WORKSPACE
emmake make install
# zlib
cd $WORKSPACE
rm -rf zlib-1.2.11/
[ -f zlib-1.2.11.tar.gz ] || wget -nv 'http://zlib.net/zlib-1.2.11.tar.gz'
tar xf zlib-1.2.11.tar.gz
cd zlib-1.2.11
emconfigure ./configure --prefix=$WORKSPACE
emmake make install
# libmikmod
cd $WORKSPACE
rm -rf libmikmod-3.1.12/
[ -f SDL2_mixer-2.0.1.tar.gz ] || wget -nv https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.tar.gz
tar xf SDL2_mixer-2.0.1.tar.gz
mv SDL2_mixer-2.0.1/external/libmikmod-3.1.12/ libmikmod-3.1.12/
cd libmikmod-3.1.12/
emconfigure ./configure --prefix=$WORKSPACE --disable-shared --enable-static
emmake make install SHELL="${SHELL}"
# SDL2
cd $WORKSPACE
rm -rf SDL2
git clone https://github.com/emscripten-ports/SDL2.git
cd SDL2
# git checkout merge-2.0.7
git pull
./autogen.sh
emconfigure ./configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-mmx --disable-sdltest --prefix=$WORKSPACE CPPFLAGS="-I$WORKSPACE/include" LDFLAGS="-L$WORKSPACE/lib" --disable-sdltest --disable-shared --disable-joystick --disable-pthreads
cat <em.patch
--- SDL_audio.c 2017-12-23 14:03:32.965522053 +0300
+++ SDL_audio.c.em 2017-12-23 14:18:03.274008570 +0300
@@ -1280,7 +1280,7 @@
/* if your target really doesn't need it, set it to 0x1 or something. */
/* otherwise, close_audio_device() won't call impl.CloseDevice(). */
- SDL_assert(device->hidden != NULL);
+// SDL_assert(device->hidden != NULL);
/* See if we need to do any conversion */
build_stream = SDL_FALSE;
EOF
patch -p1 src/audio/SDL_audio.c -i em.patch
emmake make install
cd $WORKSPACE
rm -rf freetype-2.8
wget https://download.savannah.gnu.org/releases/freetype/freetype-2.8.tar.gz
tar -xvf freetype-2.8.tar.gz
cd freetype-2.8
./autogen.sh
emconfigure ./configure --build=amd64-unknown-linux --host=asmjs-unknown-linux --prefix=$WORKSPACE CPPFLAGS="-I$WORKSPACE/include" LDFLAGS="-L$WORKSPACE/lib" --disable-shared
emmake make install
# SDL2_ttf
cd $WORKSPACE
rm -rf SDL2_ttf
git clone https://github.com/emscripten-ports/SDL2_ttf.git
cd SDL2_ttf
git checkout master
git pull
./autogen.sh
emconfigure ./configure --build=amd64-unknown-linux --host=asmjs-unknown-linux --prefix=$WORKSPACE CPPFLAGS="-I$WORKSPACE/include -I$WORKSPACE/include/SDL2 -I$WORKSPACE/include/freetype2" LDFLAGS="-L$WORKSPACE/lib" --disable-sdltest --disable-shared
emmake make install
# SDL2_mixer
cd $WORKSPACE
rm -rf SDL_mixer
[ -d SDL_mixer/.hg ] || hg clone https://hg.libsdl.org/SDL_mixer
cd SDL_mixer
hg pull -u
hg up -C
hg --config "extensions.purge=" purge --all
cat configure.in | sed -e 's/AC_CHECK_LIB(\[modplug\], /AC_CHECK_LIB(\[modplug\], \[ModPlug_Load\], /' -e 's/have_libmikmod=no/have_libmikmod=yes/g' > configure.in.new
mv -f configure.in.new configure.in
./autogen.sh
emconfigure ./configure --host=asmjs-unknown-emscripten --prefix=$WORKSPACE CPPFLAGS="-I$WORKSPACE/include -I$WORKSPACE/include/SDL2 -s USE_VORBIS=1 -s USE_OGG=1" LDFLAGS="-L$WORKSPACE/lib" --disable-sdltest --disable-shared \
--disable-music-mp3-mad-gpl --enable-music-ogg --disable-music-ogg-shared --enable-music-mod-mikmod --disable-music-mod-mikmod-shared \
--disable-music-midi-fluidsynth --disable-music-midi-fluidsynth-shared \
--disable-music-mp3-smpeg --disable-music-mp3-smpeg-shared
cat Makefile | sed -e 's| \$(objects)/playwave\$(EXE) \$(objects)/playmus\$(EXE)||g' > Makefile.new
mv -f Makefile.new Makefile
emmake make install
# jpeg lib
cd $WORKSPACE
rm -rf jpeg-9b
[ -f jpegsrc.v9b.tar.gz ] || wget -nv 'http://www.ijg.org/files/jpegsrc.v9b.tar.gz'
tar xf jpegsrc.v9b.tar.gz
cd jpeg-9b
emconfigure ./configure --prefix=$WORKSPACE
emmake make install
# SDL_image
cd $WORKSPACE
rm -rf SDL2_image
[ -d SDL2_image/.git ] || git clone https://github.com/emscripten-ports/SDL2_image.git SDL2_image
cd SDL2_image
./autogen.sh
emconfigure ./configure --host=asmjs-unknown-linux --prefix=$WORKSPACE CPPFLAGS="-I$WORKSPACE/include -I$WORKSPACE/include/SDL2 -s USE_LIBPNG=1" LDFLAGS="-L$WORKSPACE/lib -lpng -ljpeg" --disable-sdltest --disable-shared --enable-static --enable-png --disable-png-shared --enable-jpg --disable-jpg-shared
emmake make install
# INSTEAD
echo "INSTEAD"
cd $WORKSPACE
[ -d instead-em ] || git clone https://github.com/instead-hub/instead.git instead-em
cd instead-em
git pull
[ -e Rules.make ] || ln -s Rules.standalone Rules.make
cat < config.make
EXTRA_CFLAGS+= -DNOMAIN -D_HAVE_ICONV -I../../include
SDL_CFLAGS=-I../../include/SDL2
SDL_LFLAGS=
LUA_CFLAGS=
LUA_LFLAGS=
ZLIB_LFLAGS=
EOF
emmake make clean
emmake make
cd $WORKSPACE
[ -d instead-em-js ] || mkdir instead-em-js
[ -d instead-em-js/fs ] || mkdir instead-em-js/fs
cp -R instead-em/icon instead-em-js/fs/
cp -R instead-em/stead instead-em-js/fs/
cp -R instead-em/themes instead-em-js/fs/
cp -R instead-em/lang instead-em-js/fs/
cp -R instead-em/games instead-em-js/fs/
rm -rf instead-em-js/fs/games # without games
find instead-em-js/fs/ \( -name '*.svg' -o -name Makefile -o -name CMakeLists.txt \) -exec rm {} \;
cat < post.js
var Module;
FS.mkdir('/appdata');
FS.mount(IDBFS,{},'/appdata');
Module['postRun'].push(function() {
var argv = []
var req
if (typeof window === "object") {
argv = window.location.search.substr(1).trim().split('&');
if (!argv[0])
argv = [];
}
var url = argv[0];
if (!url) {
FS.syncfs(true, function (error) {
if (error) {
console.log("Error while syncing: ", error);
};
console.log("Running...");
Module.ccall('instead_main', 'number');
});
return;
}
req = new XMLHttpRequest();
req.open("GET", url, true);
req.responseType = "arraybuffer";
console.log("Get: ", url);
setTimeout(function() {
var spinnerElement = document.getElementById('spinner');
spinnerElement.style.display = 'inline-block';
Module['setStatus']('Downloading data file...');
}, 3);
req.onload = function() {
var basename = function(path) {
parts = path.split( '/' );
return parts[parts.length - 1];
}
var data = req.response;
console.log("Data loaded...");
FS.syncfs(true, function (error) {
if (error) {
console.log("Error while syncing: ", error);
}
url = basename(url);
console.log("Writing: ", url);
FS.writeFile(url, new Int8Array(data), { encoding: 'binary' }, "w");
console.log("Running...");
var args = [];
[ "instead-em", url, "-standalone", "-window", "-resizable", "-mode" ].forEach(function(item) {
args.push(allocate(intArrayFromString(item), 'i8', ALLOC_NORMAL));
args.push(0); args.push(0); args.push(0);
})
args = allocate(args, 'i32', ALLOC_NORMAL);
setTimeout(function() {
Module.setStatus('');
document.getElementById('status').style.display = 'none';
}, 3);
window.onclick = function(){ window.focus() };
Module.ccall('instead_main', 'number', ["number", "number"], [6, args ]);
});
}
req.send(null);
});
EOF
unzip -o -j instead-em/contrib/instead-em.zip -d instead-em-js/
cd instead-em-js
ln -f -s ../instead-em/src/sdl-instead sdl-instead.bc
ln -f -s ../lib lib
emcc -O2 sdl-instead.bc lib/libz.a lib/libiconv.so lib/liblua.a lib/libSDL2_ttf.a lib/libfreetype.a lib/libSDL2_mixer.a lib/libSDL2.a lib/libmikmod.a lib/libSDL2_image.a lib/libjpeg.a \
-s EXPORTED_FUNCTIONS="['_instead_main']" \
-s 'SDL2_IMAGE_FORMATS=["png","jpeg","gif"]' \
-s 'EXTRA_EXPORTED_RUNTIME_METHODS=["ccall", "Pointer_stringify"]' \
-s QUANTUM_SIZE=4 \
-s BINARYEN_TRAP_MODE=clamp \
-s WASM=1 \
-s PRECISE_F32=1 \
-s USE_OGG=1 -s USE_VORBIS=1 -s USE_LIBPNG=1 \
-o instead-em.html -s SAFE_HEAP=0 -s TOTAL_MEMORY=167772160 -s ALLOW_MEMORY_GROWTH=1 \
--post-js post.js \
--preload-file fs@/
echo "Happy hacking"
python2.7 -m SimpleHTTPServer 8000
instead-3.3.2/contrib/instead-sailfish.spec 0000644 0001750 0001750 00000002644 13647020003 017732 0 ustar peter peter Summary: simple text adventures/visual novels engine and game
Name: instead
Version: 3.3.2
Release: 1%{?dist}
License: MIT
URL: http://instead.sourceforge.net
Source0: %{name}_%{version}.tar.gz
Group: Amusements/Games
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: SDL2-devel, SDL2_mixer-devel, SDL2_image-devel, SDL2_ttf-devel, lua-devel, libaudioresource-devel, glib2-devel
%description
Simple text adventures/visual novels engine and game
Visual novell/text quest-like game in Russian with engine.
%prep
%setup -q
echo -e "2\n\/usr" | ./configure.sh
cat >>config.make </home/nemo/.instead/profile <