1---------------------------------------------------------------------- 2 HOW TO INSTALL SSWF FROM THE SOURCE TAR BALL 3---------------------------------------------------------------------- 4 5 6 SUMMARY 7 8 I. PREFACE 9 II. COMPILING WITH AMAKE 10 III. COMPILING WITH GNU MAKE 11 IV. COMPILING WITH VISUAL C++ 12 13 14---------------------------------------------------------------------- 15 16I. PREFACE 17 18This file was added in order to give some information about how to 19compile and install sswf from the source files. If you want, you can 20also download a pre-made package which will automatically install on 21your system. How to install these packages is not available in this 22file. See one of the INSTALL-<system>.txt file instead. 23 24First of all, I suspect you extracted the files in a directory. There 25you have a set of source files you can compile using either amake or 26GNUmake (note that GNUmake is often called make or gmake). 27 28 29---------------------------------------------------------------------- 30 31II. COMPILING WITH AMAKE 32 33NOTE: if you don't yet have amake, you can find it on SourceForge and 34at the FTP site of Made to Order Software Corp. See the webpage here: 35 36 http://amake.sf.net 37 38Download from here: 39 40 ftp://ftp.m2osw.com/amake/current 41 42or 43 44 http://www.sourceforge.net/projects/amake 45 46 47Before to run amake, if you are not under Linux RedHat 9, you may have 48to edit the libsswf-config.h file (you may need to do that even on 49RedHat). That file includes a list of #define which are used to set or 50not available features and also to ensure some compiler or system 51dependent things are properly handled. 52 53At this time, the flags are: 54 55 USE_WCHAR_T used to know whether the 56 printf(3C) uses wchar_t 57 or wint_t for %lc formats 58 59To compile under a Unix system or MinGW 3.3 just type that on your 60command line: 61 62 amake 63 64Under Linux, you can install the result with the install target. Watch 65out, the destination directory may not be valid for your system. The 66following is the command line to install as on my Linux system: 67 68 amake install 69 70If you first want to check out where files will be installed use the 71-n option as in: 72 73 amake -n install 74 75 76---------------------------------------------------------------------- 77 78III. COMPILING WITH GNU MAKE 79 80To compile using GNUmake under Linux, IRIX, Mac OS/X, and surely many 81other Unix systems and also under MinGW, one can use the configure 82script first to generate the necessary Makefile's as follow: 83 84 ./configure [-options] 85 make 86 make install 87 88In order to see what the options are, type this: 89 90 ./configure --help | less 91 92(I suggest piping to less because usually it's several pages). 93 94At this time, the following are the different flags which are 95available: 96 97 --enable-notes-to-html Only useful if you want to 98 transforms the CHANGES.txt 99 and NOTES.txt in HTML files. 100 You may of course use it for 101 your own purpose in your own 102 project. (disabled by default) 103 104 --enable-docs Will ensure that the 105 documentation gets installed. 106 You need to extract the src 107 and doc tar balls to be able 108 to specify this option. 109 (enabled by default when the 110 docs are present) 111 112 --enable-cpp-to-c Only useful if you want to 113 regenerate the C header file 114 and .c++ file. See the 115 cpp-to-c.c++ file for more 116 info (in src/misc) 117 118 --enable-debug Turn the debug ON. This is 119 still the default (mainly 120 because many errors are 121 actually asserts!) 122 123 --enable-yydebug Turn the yacc debug ON. This 124 is like --enable-debug, it 125 will generate errors that you 126 wouldn't otherwise see. Errors 127 which at times are 128 "legitimate" (i.e. possible in 129 the input files) 130 131Note that if you don't have freetype 2.1.2 or better installed, the 132ft2sswf tool won't be rebuilt. Anything else missing will usually 133break the configure script. 134 135Under Mac OS/X you at least need to specify these directories so it 136all works well (by default, configure doesn't find fink): 137 138 ./configure --prefix=/sw --mandir=/sw/share/man 139 140 141---------------------------------------------------------------------- 142 143IV. COMPILING WITH VISUAL C++ 144 145For Visual C++ users, you can use the pre-created files available in 146the VC directory. At time of writing, the following extra files are 147present in this directory: 148 149 sswf_grammar.c 150 sswf_grammar.h 151 rename_all.bat 152 153These are automatically generated from the sswf_grammer.y found in the 154src/sswf directory. It requires bison to be regenerated. 155 156The main source files are all in the src directory. All the C++ files 157use the extension .c++ and that is not compatible with cl (the Visual 158C++ compiler). If you want to compile these files, you need to rename 159them. To do so, type these commands from the main directory: 160 161 cd VC 162 rename_all 163 164IMPORTANT: this is automatically run if you get the .exe installer and 165 you install the source code with it. 166 167There is one sub-directory for each tool and one for each library. 168 169You will need to download the JPEG, zlib, iconv and freetype packages 170if you want to use all the features in SSWF. The header files can be 171put in the include directory. The libraries can be put in the main 172lib directory or a directory you like to use for .lib files. 173 174The libraries from MinGW do work very well with cl. You can download 175them from: 176 177 http://www.sourceforge.net/projects/gnuwin32 178 179Note that I'm not currently maintaining anything in regard to cl and 180thus it is likely that you will have some work to do in order to make 181it compile in your project. I have however had several emails of people 182who succeeded in doing so. There is also someone who posted a message 183saying he would help. At this time, I do not know whether he replies 184to these posts however. 185 186