-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP BROKEN libtifiles: add two variable types which are normally for …
…internal use only; tifileutil: add the initial version of an in-tree libtifiles front-end (issue #31), so that it can be used by the libticalcs build; libticalcs: use tifileutil instead of tf2hex + tipack; Temporarily integrate downstream Debian patch in tf2hex by Andi B. Mundt, possibly unnecessary for tifileutil ? TODO use tifileutil in libticalcs' ROM dumper build. TODO finish dump chexarray functionality (with more args and per-chunk read / write) TODO use tifileutil dump chexarray instead of tf2hex in libticalcs TODO delete tf2hex from libticalcs, simplify the build defs TODO tifileutil manpage. TODO tifileutil logging - more tifileutil_*(...), less fprintf(stderr, ...) TODO tifileutil French translation. TODO move this commit before the libticalcs TI-68k ROM dumper rewrite TODO libticalcs simplify the TI-68k ROM dumper build by using tifileutil wrap instead of the custom as & ld header + footer which doesn't compute the trailing checksum. Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
- Loading branch information
Showing
28 changed files
with
2,209 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Lionel Debroux: maintainer (2009-): tifileutil | ||
============================================== | ||
|
||
web: http://lpg.ticalc.org/prj_tilp , http://tict.ticalc.org , https://tiplanet.org | ||
mail: lionel_debroux@yahoo.fr | ||
|
||
Benjamin Moody (FloppusMaximus): tipack, etc. | ||
============================================= | ||
|
||
web: http://lpg.ticalc.org/prj_tilem/index.html | ||
mail: benjamin.moody@gmail.com | ||
|
||
Romain Liévin (roms): former maintainer (1999-2009), tf2hex | ||
=========================================================== | ||
|
||
web: http://lpg.ticalc.org/prj_tilp | ||
mail: roms@tilp.info | ||
|
||
Jon Sturm (Jonimus): titools | ||
============================ | ||
|
||
mail: jonimoose@gmail.com |
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Process this file with automake to produce Makefile.in | ||
|
||
ACLOCAL_AMFLAGS=-I m4 | ||
|
||
# subdirectories to scan | ||
SUBDIRS = build po src | ||
|
||
if USE_GROFF | ||
SUBDIRS += man | ||
endif | ||
|
||
dist_pkgdata_DATA = COPYING RELEASE | ||
|
||
DISTCLEANFILES = ... intltool-extract intltool-merge intltool-update po/.intltool-merge-cache | ||
|
||
EXTRA_DIST = README.* TODO | ||
|
||
INTLTOOL_FILES = intltool-extract.in intltool-merge.in intltool-update.in |
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SUBDIRS = mingw | ||
EXTRA_DIST = mingw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
BASE = tifileutil | ||
RC ?= windres | ||
|
||
EXTRA_DIST = $(BASE).rc | ||
|
||
if OS_WIN32 | ||
noinst_DATA = $(BASE)-rc.o | ||
endif | ||
|
||
if OS_WIN32 | ||
all: $(BASE)-rc.o | ||
|
||
$(BASE)-rc.o : $(BASE).rc | ||
$(RC) $(BASE).rc $@ | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Version | ||
// | ||
|
||
#include "winver.h" | ||
|
||
VS_VERSION_INFO VERSIONINFO | ||
FILEVERSION 0,1,0,0 | ||
PRODUCTVERSION 0,1,0,0 | ||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | ||
#ifdef _DEBUG | ||
FILEFLAGS (VS_FF_PRERELEASE | VS_FF_DEBUG) | ||
#else | ||
FILEFLAGS (VS_FF_PRERELEASE) | ||
#endif | ||
FILEOS VOS_NT_WINDOWS32 | ||
FILETYPE VFT_APP | ||
FILESUBTYPE VFT2_UNKNOWN | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040904b0" | ||
BEGIN | ||
VALUE "Comments", "This program is placed under GPL license. The license can be found on www.gnu.org\0" | ||
VALUE "CompanyName", "Linux Programmer Group\0" | ||
VALUE "FileDescription", "TI calculators file modification utility\0" | ||
VALUE "FileVersion", "0.1.0\0" | ||
VALUE "InternalName", "tifileutil\0" | ||
VALUE "LegalCopyright", "Copyright \xA9 1999-2019, Romain Li\xE9vin, Julien Blache and contributors\0" | ||
VALUE "LegalTrademarks", "The TiLP Team\0" | ||
VALUE "OriginalFilename", "tifileutil.exe\0" | ||
VALUE "PrivateBuild", "\0" | ||
VALUE "ProductName", "TI file software for Linux, Windows Vista/7/8/8.1/10, Mac OS X and FreeBSD.\0" | ||
VALUE "ProductVersion", "0.1.0\0" | ||
VALUE "SpecialBuild", "Windows Vista/7/8/8.1/10 version\0" | ||
END | ||
END | ||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x409, 1252 | ||
END | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
dnl Process this file with autoconf to produce a configure script. | ||
dnl $Id$ | ||
|
||
# Init. | ||
AC_PREREQ(2.57) | ||
AC_INIT(TIFILEUTIL, 0.1, [tilp-users@lists.sourceforge.net]) | ||
|
||
dnl Release versioning info | ||
VERSION="0.1" | ||
AC_SUBST(VERSION) | ||
|
||
AM_INIT_AUTOMAKE([dist-bzip2]) | ||
AM_MAINTAINER_MODE | ||
AC_CONFIG_MACRO_DIR([m4]) | ||
|
||
AC_PREFIX_DEFAULT(/usr/local) | ||
|
||
# Files to configure. | ||
AC_CONFIG_SRCDIR([src/main.cc]) | ||
AC_CONFIG_HEADERS([config.h]) | ||
AC_CONFIG_FILES([ | ||
Makefile | ||
build/Makefile | ||
build/mingw/Makefile | ||
man/Makefile | ||
src/Makefile | ||
]) | ||
|
||
# Setup libtool. | ||
AC_DISABLE_STATIC | ||
AC_LIBTOOL_WIN32_DLL | ||
LT_INIT | ||
|
||
# Checks for programs. | ||
AC_PROG_CC | ||
AC_PROG_CXX | ||
AM_PROG_CC_C_O | ||
AC_PROG_INSTALL | ||
AC_PROG_MAKE_SET | ||
AC_PROG_LN_S | ||
AC_ISC_POSIX | ||
AC_PROG_AWK | ||
AC_CHECK_PROG(GROFF, groff, yes, no) | ||
AM_CONDITIONAL(USE_GROFF, test "$GROFF" != "no") | ||
AC_CHECK_TOOL(RC, windres, windres) | ||
|
||
# Translation | ||
AC_PROG_INTLTOOL([0.40.0]) | ||
|
||
GETTEXT_PACKAGE=tifileutil | ||
AC_SUBST(GETTEXT_PACKAGE) | ||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [tifileutil]) | ||
AM_GLIB_GNU_GETTEXT | ||
|
||
# Checks for libraries. | ||
PKG_CHECK_MODULES(TICONV, ticonv >= 1.1.6) | ||
AC_SUBST(TICONV_CFLAGS) | ||
AC_SUBST(TICONV_LIBS) | ||
|
||
PKG_CHECK_MODULES(TIFILES, tifiles2 >= 1.1.8) | ||
AC_SUBST(TIFILES_CFLAGS) | ||
AC_SUBST(TIFILES_LIBS) | ||
|
||
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6.0) | ||
AC_SUBST(GLIB_CFLAGS) | ||
AC_SUBST(GLIB_LIBS) | ||
|
||
# Checks for header files. | ||
AC_HEADER_STDC | ||
AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) | ||
|
||
# Checks for typedefs, structures, and compiler characteristics. | ||
AC_C_CONST | ||
AC_C_RESTRICT | ||
AC_HEADER_STAT | ||
AC_TYPE_UID_T | ||
AC_TYPE_MODE_T | ||
AC_TYPE_OFF_T | ||
AC_STRUCT_TM | ||
|
||
# Checks for library functions. | ||
AC_PROG_GCC_TRADITIONAL | ||
AC_TYPE_SIGNAL | ||
AC_FUNC_STAT | ||
AC_CHECK_FUNCS([memset strchr strdup strrchr localtime_r]) | ||
|
||
# Platform specific tests. | ||
dnl AC_CANONICAL_HOST | ||
case "$host" in | ||
*-*-mingw*) ARCH="-D__WIN32__ -D__MINGW32__ -mwindows" ;; | ||
*-*-cygwin) ARCH="-D__WIN32__ -D__CYGWIN__ -mwindows -mno-cygwin" ;; | ||
*-*-*bsd*) ARCH="-D__BSD__" ;; | ||
*) ARCH="-D__LINUX__" ;; | ||
esac | ||
CFLAGS="$CFLAGS $ARCH" | ||
|
||
# Ensure MSVC-compatible struct packing convention is used when | ||
# compiling for Win32 with gcc. | ||
# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while | ||
# gcc2 uses "-fnative-struct". | ||
case $host_os in | ||
*mingw*|*cygwin*) | ||
if test x$GCC = xyes; then | ||
msnative_struct='' | ||
AC_MSG_CHECKING([how to get MSVC-compatible struct packing]) | ||
if test -z "$ac_cv_prog_CC"; then | ||
our_gcc="$CC" | ||
else | ||
our_gcc="$ac_cv_prog_CC" | ||
fi | ||
case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in | ||
2.) | ||
if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then | ||
msnative_struct='-fnative-struct' | ||
fi | ||
;; | ||
*) | ||
if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then | ||
msnative_struct='-mms-bitfields' | ||
fi | ||
;; | ||
esac | ||
if test x"$msnative_struct" = x ; then | ||
AC_MSG_RESULT([no way]) | ||
AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code]) | ||
else | ||
CFLAGS="$CFLAGS $msnative_struct" | ||
AC_MSG_RESULT([${msnative_struct}]) | ||
fi | ||
fi | ||
;; | ||
esac | ||
|
||
AM_CONDITIONAL(OS_WIN32, test "$msnative_struct") | ||
|
||
# Check for the new -fvisibility=hidden flag introduced in gcc 4.0 | ||
# Allow to reduce shared library size and avoid symbol clash | ||
case $host_os in | ||
*mingw*) | ||
;; | ||
*) | ||
if test x$GCC = xyes; then | ||
visibility_flag='' | ||
AC_MSG_CHECKING([whether gcc accepts -fvisibility]) | ||
if test -z "$ac_cv_prog_CC"; then | ||
our_gcc="$CC" | ||
else | ||
our_gcc="$ac_cv_prog_CC" | ||
fi | ||
if $our_gcc -v --help 2>/dev/null | grep "fvisibility" >/dev/null; then | ||
visibility_flag='-fvisibility=hidden' | ||
fi | ||
if test x"$visibility_flag" = x ; then | ||
AC_MSG_RESULT([no]) | ||
else | ||
CFLAGS="$CFLAGS $visibility_flag" | ||
AC_MSG_RESULT([${visibility_flag}]) | ||
AC_DEFINE(HAVE_FVISIBILITY, 1, [Use -fvisibility=hidden flag]) | ||
fi | ||
fi | ||
;; | ||
esac | ||
|
||
# Find a C compiler for the build system (needed for compiling cleaner) | ||
AC_ARG_VAR([CC_FOR_BUILD], [C compiler for programs to be run on the build system]) | ||
AC_ARG_VAR([CFLAGS_FOR_BUILD], [C compiler flags for CC_FOR_BUILD]) | ||
AC_MSG_CHECKING([for the host compiler]) | ||
if test "x$build" == "x$host" ; then | ||
# Not cross-compiling. | ||
CC_FOR_BUILD=$CC | ||
CFLAGS_FOR_BUILD=$CFLAGS | ||
AC_MSG_RESULT([${CC_FOR_BUILD}]) | ||
else | ||
# Try to find the host CC among several choices | ||
AC_CHECK_PROGS(CC_FOR_BUILD, [gcc cc clang c89 c99], [false]) | ||
if test "x$CC_FOR_BUILD" = "xfalse" ; then | ||
AC_MSG_FAILURE([not found.]) | ||
else | ||
AC_MSG_RESULT([${CC_FOR_BUILD}]) | ||
fi | ||
fi | ||
|
||
# some extra flags | ||
CXXFLAGS="$CFLAGS -fno-rtti -fno-exceptions" | ||
|
||
AC_SUBST(CFLAGS) | ||
AC_SUBST(LDFLAGS) | ||
AC_SUBST(CXXFLAGS) | ||
|
||
# Output. | ||
AC_OUTPUT([ | ||
po/Makefile.in | ||
]) | ||
|
||
echo "Now, you can type 'make' and 'make install'." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
man_MANS = tifileutil.1 | ||
pkgdata_DATA = Manpage.txt | ||
|
||
EXTRA_DIST = $(man_MANS) cleaner.c Manpage.txt | ||
|
||
all: dist_win | ||
|
||
view: $(man_MANS) | ||
groff -Tascii -man $(man_MANS) | less | ||
|
||
Manpage.txt: | ||
groff -Tascii -man $(man_MANS) > Manpage | ||
C_INCLUDE_PATH="" LIBRARY_PATH="" $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) cleaner.c -o cleaner | ||
./cleaner Manpage | ||
rm -f Manpage cleaner | ||
|
||
dist_win: $(man_MANS) Manpage.txt | ||
|
||
clean: | ||
rm -f Manpage.txt cleaner |
Oops, something went wrong.