<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>JPGalleg 2.6 release candidate</title>
		<link>http://www.allegro.cc/forums/view/583497</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 07 Jun 2006 16:05:10 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hello all,</p><p>I&#39;ve finally managed to put together a new release of JPGalleg, version 2.6. I&#39;ve had some patches sitting on my HD collecting dust for some time, and this release brings them onto the main package. 2.6 brings some little bugfixes and improvements, more JFIF variants compatibility, plus PyJPGalleg, a Python wrapper for JPGalleg kindly donated by Grzegorz Adam Hankiewicz. Changelog follows:</p><ul><li><p> Added more JFIF variants compatibility</p></li><li><p> Fixed 1-byte memory leak in the decoder</p></li><li><p> Made compatible with Allegro 4.2.x</p></li><li><p> Refactored source code to avoid linking decoder or encoder functions when one of these is not used by the user application</p></li><li><p> Introduced a new jpgalleg_error_string() function to return the last error message in string form</p></li><li><p> Small makefile fixes</p></li></ul><p>&lt;/li&gt;</p><p>I&#39;m releasing 2.6 as a release candidate for the moment, so you are encouraged to test it and give feedback so I can finalize it. I&#39;m particularly interested to know if the build system actually works in various environments, expecially Visual C++ (I don&#39;t have VC over here, so if you spot problems, please be constructive and provide a possible fix).</p><p>Here is the package: <a href="http://www.ecplusplus.com/jpgalleg-2.6-rc.tar.gz">http://www.ecplusplus.com/jpgalleg-2.6-rc.tar.gz</a></p><p>Thanks for your support!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (lillo)</author>
		<pubDate>Sat, 06 May 2006 15:03:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I wasn&#39;t expecting any updates, because it was already excellent:) Very nice work! And thanks...</p><p>I don&#39;t have MSVC so I tested it only with MinGW, everything went fine.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Murat AYIK)</author>
		<pubDate>Sat, 06 May 2006 18:10:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Hi,</p><p>I was guy who previously sorted out issues with JPGalleg under Cygwin and MSVC back in 2003. I have not yet had the time to test it under MSVC (I suspect that there may be some issues with building the MSVC build with Cygwin), but I&#39;ve tried building the mingw32 version with Cygwin.</p><p>Firstly, both the dynamically linked, statically-linked and debug versions of libjpgal.a have the same name. This can cause a conflict if the user wishes to install all possible versions at once. To remedy this, I suggest that the debug libs have the last &#39;l&#39; in libjpgal changed to a &#39;d&#39;, and that the statically-linked ibs should have &#39;_s&#39; added to the end.</p><p>Under Cygwin, the &quot;make uninstall&quot; target does not change the backslashes into forward slashes in the paths for the lib and include. Below is the output. Because of this quirk, these two files are not removed.
</p><div class="quote_container"><div class="title">cygwin output said:</div><div class="quote"><p>

$ make uninstall<br />rm -f \usr\local\lib\libjpgal.a<br />rm -f \usr\local\include\jpgalleg.h<br />rm -f /allegro\tools\plugins\datjpeg.c<br />rm -f /allegro\tools\plugins\datjpeg.inc<br />rm -f /allegro\tools\plugins\jpgalleg.scm<br />rm -f /allegro\tools\plugins\jpgalleg.scr<br />rm -f /allegro\tools\plugins\jpgalleg.scu<br />rm -f /allegro\tools\plugins\jpgalleg.scv<br />rm -f /allegro\obj\mingw32\plugins.h<br />Grabber plugin removed from system.<br />All gone!
</p></div></div><p>

Also, I notice that /allegro/obj/&lt;compilername&gt;/&lt;libname&gt;/datjpeg.o does not seem to be deleted from the Allegro obj folder whenever a make-distclean is done (although if we&#39;re really being thorough, the grabber would have to be rebuilt without the JPGalleg plugin, but that might be a bit overkill).</p><p>And finally, some good news. Back when I was helping you out, I came accross a jpeg that wouldn&#39;t work. Now, it works fine.</p><p>AE.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Andrei Ellman)</author>
		<pubDate>Wed, 10 May 2006 02:36:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>cool to have someone here who makes not a game, but a helpfull library <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Pavel Hilser)</author>
		<pubDate>Wed, 10 May 2006 21:42:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Just tried it on MSVC - both under Win98 with DJGPP and Win2K with Cygwin. Unfortunately, it failed to build on both systems. Here&#39;s what happened.</p><div class="quote_container"><div class="title">MSVC-build under DJGPP Win98 said:</div><div class="quote"><p>

G:\Program Files\Microsoft Visual Studio\VC98\allegro\jpgalleg-2.6&gt;make<br />Compiling JPGalleg for MSVC<br />Currently no MMX Assembler support available for MSVC...<br />File creation error<br />cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/jpgalleg.c -Foobj/msvc/jpgalle<br />g.obj<br />jpgalleg.c<br />cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/io.c -Foobj/msvc/io.obj<br />io.c<br />cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/encode.c -Foobj/msvc/encode.ob<br />j<br />encode.c<br />cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/decode.c -Foobj/msvc/decode.ob<br />j<br />decode.c<br />cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/init.c -Foobj/msvc/init.obj<br />init.c<br />cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/error.c -Foobj/msvc/error.obj<br />error.c<br />lib -nologo -OUT:lib/msvc/libjpgal.lib obj/msvc/jpgalleg.obj obj/msvc/io.obj obj<br />/msvc/encode.obj obj/msvc/decode.obj obj/msvc/init.obj obj/msvc/error.obj<br />Microsoft (R) Library Manager Version 6.00.8168<br />Copyright (C) Microsoft Corp 1992-1998. All rights reserved.</p><p>LIB : fatal error LNK1181: cannot open input file &quot;obj/msvc/ini&quot;<br />make.exe: *** [lib/msvc/libjpgal.lib] Error 157
</p></div></div><p>

I suspect the problem here is that <tt>lib</tt> is being passed command-lines that are too long. Allegro creates a program called <tt>runner.exe</tt> that sorts out the long command-lines. I think I may have sent you a patch back when you were working on version 2.2</p><div class="quote_container"><div class="title">MSVC-build under Cygwin Win2K said:</div><div class="quote"><p>

$ make<br />Compiling JPGalleg for MSVC<br />Currently no MMX Assembler support available for MSVC...</p><p>cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/jpgalleg.c -Foobj/msvc/jpgalle<br />g.obj<br />jpgalleg.c<br />cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/io.c -Foobj/msvc/io.obj<br />io.c<br />cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/encode.c -Foobj/msvc/encode.ob<br />j<br />encode.c<br />cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/decode.c -Foobj/msvc/decode.ob<br />j<br />decode.c<br />cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/init.c -Foobj/msvc/init.obj<br />init.c<br />cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/error.c -Foobj/msvc/error.obj<br />error.c<br />lib -nologo -OUT:lib/msvc/libjpgal.lib obj/msvc/jpgalleg.obj obj/msvc/io.obj obj<br />/msvc/encode.obj obj/msvc/decode.obj obj/msvc/init.obj obj/msvc/error.obj<br />cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 examples/ex1.c -Foobj/msvc/ex1.obj</p><p>ex1.c<br />link -nologo -OPT:REF -OPT:ICF -INCREMENTAL:NO -MACHINE:IX86 -subsystem:windows<br />-OUT:examples/ex1.exe obj/msvc/ex1.obj lib/msvc/libjpgal.lib alleg.lib<br />link: invalid option -- n<br />Try `link --help&#39; for more information.<br />make: *** [examples/ex1.exe] Error 1
</p></div></div><p>

This is caused by Cygwin installing it&#39;s own program called <tt>link</tt> that is in the path before MSVC&#39;s <tt>link</tt>. The Allegro makefile overcomes this problem by using the full path of <tt>link.exe</tt> . This was mentioned on the [AD] list around March 2005.</p><p>I also tried installing JPGalleg for DJGPP. If I don&#39;t set the <tt>UNIX</tt> environment variable, JPGalleg is set up. However, I can only build the grabber with the plugin if I call <tt>make install</tt> before <tt>make plugin</tt>.</p><p>However, if I set <tt>UNIX=1</tt> under DJGPP, then I can build and install DJGPP JPGalleg, but if I try to build the plugin, I get the following message as part of the ouput...
</p><div class="quote_container"><div class="title">DJGPP Win98 said:</div><div class="quote"><p>

C:\DJGPP\contrib\allegro\contrib\jpgalleg-2.6&gt;make plugin<br />Invalid switch - /datjpeg.c<br />Invalid switch - /OBJ<br />make depend -C C:\DJGPP\contrib\allegro<br />[...]
</p></div></div><p>
(note that I did the above after I built JPGalleg and the plugin and then did <tt>make uninstall</tt> and <tt>make distclean</tt> without the <tt>UNIX</tt> variable being set, and then set <tt>UNIX=1</tt> and <tt>make</tt>)</p><p>Also, with <tt>UNIX=1</tt>, <tt>make distclean</tt> prints out the following
</p><div class="quote_container"><div class="title">DJGPP Win98 said:</div><div class="quote"><p>

C:\DJGPP\contrib\allegro\contrib\jpgalleg-2.6&gt;make distclean<br />Invalid switch - /DJGPP<br />All gone!<br />Invalid switch - /SAVEDCAT.JPG<br />Ready for distribuition
</p></div></div><p>

I&#39;m not sure what&#39;s going on with either of the above.</p><p>Anyway, let me know if you need help fixing this.</p><p>AE.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Andrei Ellman)</author>
		<pubDate>Fri, 12 May 2006 06:21:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks for the feedback!</p><p>I&#39;ve applied some more fixes to the build system and I&#39;ve put up a new release candidate here:</p><p><a href="http://www.ecplusplus.com/jpgalleg-2.6-rc2.tar.gz">http://www.ecplusplus.com/jpgalleg-2.6-rc2.tar.gz</a></p><p>These are the supposed fixes:<br />- when building with DEBUG=1, the library name is now libjpgad.a (or .lib if building with MSVC). There is no need to introduce a _s variant for static linking: JPGalleg is always linked as static library, the STATICLINK=1 flag when building it is just needed to let it know if you&#39;re going to link it with a static version of Allegro itself...<br />- make uninstall under Cygwin should now remove all files successfully.<br />- added the Runner workaround for when building with MSVC<br />- MSVC makefile always use full pathes to its tools to avoid tool name conflicts</p><p>Some issues remain unsolved for a reason:<br />- deleting datjpeg.o is not performed in distclean because it is already part of the uninstall process...<br />- the &quot;plugin&quot; makefile target should always be issued after you have successfully installed the library, no need to worry if it doesn&#39;t work the other way around.<br />- UNIX=1 and DJGPP were not meant to be mixed from the start... UNIX=1 is a way to tell the system you have Unix tools installed onto a Win32 system IMHO. DOS is out of games here.</p><p>Please test again and let me know!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (lillo)</author>
		<pubDate>Mon, 15 May 2006 16:11:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OK, I got round to trying RC2 under Cygwin and MSVC 6 (with Cygwin) builds under Windows 2000 (haven&#39;t yet tried anything on W98 yet).</p><p>The Cygwin (mingw32) build works fine. The problem with backslashes in the filenames when removing the installed files has been fixed, so it can now safely be uninstalled.</p><p>However, the MSVC build under Cygwin still fails to build</p><div class="quote_container"><div class="title">MSVC-build under Cygwin Win2K said:</div><div class="quote"><p>

$ make<br />Compiling JPGalleg for MSVC<br />Currently no MMX Assembler support available for MSVC...</p><p>C:/PROGRA~1/MICROS~4/VC98/bin/cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/<br />jpgalleg.c -Foobj/msvc/jpgalleg.obj<br />jpgalleg.c<br />C:/PROGRA~1/MICROS~4/VC98/bin/cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/<br />io.c -Foobj/msvc/io.obj<br />io.c<br />C:/PROGRA~1/MICROS~4/VC98/bin/cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/<br />encode.c -Foobj/msvc/encode.obj<br />encode.c<br />C:/PROGRA~1/MICROS~4/VC98/bin/cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/<br />decode.c -Foobj/msvc/decode.obj<br />decode.c<br />C:/PROGRA~1/MICROS~4/VC98/bin/cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/<br />init.c -Foobj/msvc/init.obj<br />init.c<br />C:/PROGRA~1/MICROS~4/VC98/bin/cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 src/<br />error.c -Foobj/msvc/error.obj<br />error.c<br />gcc -O -Wall -Werror -o obj/msvc/runner.exe misc/runner.c<br />obj/msvc/runner.exe C:/PROGRA~1/MICROS~4/VC98/bin/lib @ -nologo -OUT:lib/msvc/li<br />bjpgal.lib obj/msvc/jpgalleg.obj obj/msvc/io.obj obj/msvc/encode.obj obj/msvc/de<br />code.obj obj/msvc/init.obj obj/msvc/error.obj<br />C:/PROGRA~1/MICROS~4/VC98/bin/cl -nologo -I./include -Gd -Ox -GB -MD -c -W2 exam<br />ples/ex1.c -Foobj/msvc/ex1.obj<br />ex1.c<br />(MSVCDir_U)/bin/link -nologo -OPT:REF -OPT:ICF -INCREMENTAL:NO -MACHINE:IX86 -su<br />bsystem:windows -OUT:examples/ex1.exe obj/msvc/ex1.obj lib/msvc/libjpgal.lib all<br />eg.lib<br />/bin/sh: -c: line 0: syntax error near unexpected token `/bin/link&#39;<br />/bin/sh: -c: line 0: `(MSVCDir_U)/bin/link -nologo -OPT:REF -OPT:ICF -INCREMENTA<br />L:NO -MACHINE:IX86 -subsystem:windows -OUT:examples/ex1.exe obj/msvc/ex1.obj lib<br />/msvc/libjpgal.lib alleg.lib&#39;<br />make: *** [examples/ex1.exe] Error 2
</p></div></div><p>

As well as MSVC 6, has this been tested under either MSVC7 or MSVC8? I only have MSVC 6.</p><p>Also, I think that for the MSVC builds, you should use the runner program whenever you are calling an MSVC tool (ie. not just on the lib tool).</p><div class="quote_container"><div class="title">lillo said:</div><div class="quote"><p>

There is no need to introduce a _s variant for static linking: JPGalleg is always linked as static library, the STATICLINK=1 flag when building it is just needed to let it know if you&#39;re going to link it with a static version of Allegro itself...
</p></div></div><p>
So if I have both the Allegro DLL-build and statically linked Allegro installed (sometimes, I build versions of my programs that require the DLL, and sometimes, I build statically-linked verrsions), would libjpgal be able to link with either DLL-allegro apps or static-allegro apps? If so, then what is the point of having STATICLINK=1 ?</p><p>AE.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Andrei Ellman)</author>
		<pubDate>Mon, 22 May 2006 12:21:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Andrei: thanks for the feedback, here&#39;s a new (hopefully final this time) release candidate:</p><p><a href="http://www.ecplusplus.com/jpgalleg-2.6-rc3.tar.gz">http://www.ecplusplus.com/jpgalleg-2.6-rc3.tar.gz</a></p><p>I&#39;ve fixed the MSVC problem, and now runner is also used for all tools, not just link. About STATICLINK, I didn&#39;t realize (or was too lazy to) an user could have installed both the static and shared Allegro versions on the same development computer... Ok, now the lib name has a pending &quot;_s&quot; when building with STATICLINK=1 to identify the static version of the lib.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (lillo)</author>
		<pubDate>Mon, 22 May 2006 14:05:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>At last, I have given it a more thorough workout. While RC3 still failed to build under MSVC, I have managed to fix it myself so that it does (although the grabber plugin still doesn&#39;t). Attatched are some patches with various changes.</p><p>In the patch for the MSVC makefile, I have also fixed a long-standing issue with the debug-build under MSVC. When linking the debug lib to a program, the error-message &quot;<tt>LINK : warning LNK4098: defaultlib &quot;MSVCRT&quot; conflicts with use of other libs; use /NODEFAULTLIB:library</tt>&quot; appears. This is because makefile.vc links the wrong run-time library (which means that I get several DEBUG messages about memory-managment warnings and some crashes as well).</p><p>Incidentally, I notice that the other builds do not have the various debug options set - that is, the flags passed to the compiler are more or less identical in the release and debug builds.</p><p>The following are things I did not fix:</p><p>The object files for each build (<tt>libjpgal</tt>, <tt>libjpgad</tt>, <tt>libjpgal_s</tt>, <tt>libjpgad_s</tt>) should have their own subdirectories within the <tt>obj/&lt;compiler&gt;/</tt> folder. The reason for this is that if I call <tt>make DEBUG=1</tt> immediately after I call <tt>make</tt>, make considers the object files up to date, and includes the non-debug objects inside the debug lib. The same happens with the static-link and non-static-link versions of the lib.<br />In the meantime, a workaround can be used. Just remember to call <tt>make clean</tt> with the same options you pased to <tt>make</tt> inbetween making the various builds of jpgalleg.</p><p>When attempting to build the plugin using MSVC, I get the following message
</p><div class="quote_container"><div class="title">MSVC said:</div><div class="quote"><p>

obj/msvc/runner.exe C:/PROGRA~1/MICROS~4/VC98/bin/link @ -nologo -release -subsystem:windows -out:tools/grabber.exe obj/msvc/alleg/grabber.obj lib/msvc/aldat.lib @tools/plugins/jpgalleg.scv lib/msvc/alleg.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib dinput.lib ddraw.lib dxguid.lib winmm.lib dsound.lib<br />LINK : fatal error LNK1181: cannot open input file &quot;@tools/plugins/jpgalleg.scv&quot;
</p></div></div><p>
This I suspect is a bug in allegro and not jpgalleg (the way MSVC handles grabber-plugins). I will shortly post my findings to the [AD] list. <i>[<b>EDIT:</b> I&#39;ve posted it to the [AD] list. See <a href="http://sourceforge.net/mailarchive/forum.php?thread_id=10504056&amp;forum_id=34598">http://sourceforge.net/mailarchive/forum.php?thread_id=10504056&amp;forum_id=34598</a> ]</i></p><p>When DEBUG=1 is set, the grabber plugin uses the release lib instead of the debug lib (although I somehow suspect that this behavour might be deliberate, unless the plugin itself is being debugged).</p><p>When building the MSVC version under DJGPP, the following command produces the following output:
</p><div class="quote_container"><div class="title">DJGPP building MSVC version said:</div><div class="quote"><p>

(cd G:\progra~1\micros~3\vc98\allegro/tools/plugins; rm -f datjpeg.c datjpeg.inc jpgalleg.scm jpgalleg.scr jpgalleg.scu jpgalleg.scv)<br />Command line too long.
</p></div></div><p>
You may have to use the runner for that one.</p><p>The optimisation settings for MSVC coud still do with a bit of tweaking, but at least it works now.</p><p>When copying files to the allegro grabber plugins directory, you may want to use the allegro-makefile&#39;s PLUGIN_SCR variable to determine which of the jpgalleg.sc* files to copy.</p><p>In the documentation, you should mention that when setting the ALLEGRO variable (this might only affect a any DOS-based environment such as DJGPP, but have not tested it with Cygwin), the filenames should not contain spaces (use things like &quot;g:\progra~1\micros~3\vc98\allegro&quot; instead of &quot;G:\Program Files\Micorsoft Visual Studio\VC98\Allegro&quot;).</p><p>Also, I still have a small number of JPEGs that either load incorrectly or don&#39;t load at all in JPGalleg (but load fine elsewhere). Do you want me to send them to you?</p><p>And finally, some good news: The problem with the screwed up jpeg I reported in 2003 (with <tt>ex1.exe</tt> when built under MSVC in Windows 98) has gone.</p><p>Here is a list of changes by patch (including a few minor changes I&#39;ve not mentioned above)</p><p>makefile.all:<br />+ $(RUNNER) is a dependency of more rules.<br />+ The message telling you to run &#39;make install&#39; now reminds you that is should be called with the same paramaters passed to &#39;make&#39; (which is the same combination of &#39;STATICLINK=1&#39; and &#39;DEBUG=1&#39;)</p><p>makefile.vc:<br />+ Fixed the flags for debug build so it uses the correct runtime library. I&#39;ve also added a debug-switch to the debug-build, and removed the optimisation settings from the debug build.<br />+ if UNIX=1, uninstall works properly</p><p>makefile.mgw<br />+ tidied up code for uninstalling plugin</p><p>makefile.mgw makefile.vc:<br />+ if UNIX=1, the plugin is uninstalled using REMOVE_PLUGIN_UNIX</p><p>makefile.mgw makefile.vc makefile.all:<br />+ Fixed typo: environmental -&gt; environment</p><p>datjpeg.c<br />+ made a small change to remove a warning message when compiling in MSVC.</p><p>internal.h<br />+ The TRACE macro only uses <u>_FUNCTION</u>_ if <u>_FUNCTION</u>_ is defined. In MSVC 6, it is not defined.</p><p>AE.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Andrei Ellman)</author>
		<pubDate>Wed, 07 Jun 2006 16:05:10 +0000</pubDate>
	</item>
</rss>
