<commit_before>\documentclass[11pt,letterpaper,onecolumn]{scrartcl}
\usepackage{tocloft}
\usepackage{stdclsdv}
\usepackage{comment}
\usepackage{vmargin}
\usepackage{t1enc}
\usepackage{fancyvrb}
\usepackage{url}
\usepackage{calc}
\usepackage{array}
\usepackage{graphicx}
\usepackage{color}
\usepackage{listings}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{supertabular}
\usepackage{fancyhdr}
\usepackage{multicol}
\usepackage{float}
\usepackage{textcomp}
\usepackage{alltt}
\definecolor{LstColor}{cmyk}{0.1,0.1,0,0.025} 
\setcounter{tocdepth}{1}
\ifx\pdfoutput\undefined
\usepackage[ps2pdf,
            pagebackref=true,
            colorlinks=true,
            linkcolor=blue
           ]{hyperref}
\usepackage{pspicture}
\else
\usepackage[pdftex,
            pagebackref=true,
            colorlinks=true,
            linkcolor=blue,
            pdfpagelabels,
            pdfstartpage=2
           ]{hyperref}
\fi
\renewcommand{\headheight}{14pt}

\begin{document}
\begin{sloppypar}

\lstset{language=c++,basicstyle=\ttfamily\tiny,commentstyle=\ttfamily\tiny,tabsize=2,breaklines,backgroundcolor=\color{LstColor},fontadjust=true,keepspaces=false,fancyvrb=true,showstringspaces=false,moredelim=[is][\textbf]{\\emph\{}{\}}}.
\title{Csound Windows Build}
\author{<NAME> \\ \texttt{<EMAIL>}}
\maketitle

\section{Introduction}
\label{sec:Introduction}

This file should be updated in reasonable detail with each release of the Windows installers for Csound, in order to provide instructions for building Csound on Windows.

Csound on Windows is built using MinGW/MSys from (\url{www.mingw.org}). Code is built for release, with full optimizations including intrinsics and vectorization. These optimizations preclude debugging. A separate debug build must be made in order to debug. However, the only differences between the debug build and the release build must be the presence or absence of optimizations and the generation or not of debugging information. Code generation for both builds must be for ``release versions'' of the runtime libraries and third party libraries. This code generation standard also applies, of course, to actually building the third party libraries.

All third party libraries will be updated from the most recent version that seems to be used by a majority of their users --- whatever that is (trunk, most recent tag, stable release, whatever). If pre-built binaries are available, use them; otherwise, build with the recommended toolchain and build system. If that doesn't work, create a Microsoft Visual C++ solution. If that doesn't work, create an SConstruct file. In practice, I build all third party libraries Microsoft Visual C++ Express Edition except for liblo and FLTK, which I build with MinGW/MSys.

\section{Build Steps}
\label{sec:BuildSteps}

\begin{enumerate}
	\item Update the documentation tools.
		\begin{enumerate}
	    \item (No need) Update the Docbook toolchain.
	    \item (Done) Update LaTeX to the current version (2.2-071608) from proTeXt at \url{http://www.tug.org/protext}.
	    \item (Done) Update Doxygen to the current version (1.5.6) from \url{http://www.stack.nl/~dimitri/doxygen}.
		\end{enumerate}
	\item Update the build tools.   
		\begin{enumerate}
			\item (Done) For Visual C++ from \url{http://www.microsoft.com/express/vc}, probably 2008 is still good (it is as of 6 September 2008). Also install \texttt{dirent.h} from \url{http://www.softagalleria.net/dirent.php} and \texttt{bufferoverflowu.lib}  from Microsoft.
			\item For MinGW/MSys from \url{www.mingw.org}, first update with Twilight Dragon Media's GCC 4 (\url{http://www.tdragon.net/recentgcc}) (current version 4.3.2-tdm-1) (Done). Then add the latest MSys base and MSys supplementary tools from \url{http://sourceforge.net/projects/mingw}.
		\end{enumerate}    
	\item Update third-party dependencies.   
		\begin{enumerate}
  		\item (Done) Update Python from \url{www.python.org} to the most recent ``standard'' version (currently 2.5.2).
	    \item (Done) Update the Java Development Kit from \url{http://java.sun.com/javase/downloads/index.jsp} to the most recent ``standard'' version (currently Java SE 6 Update 10 RC).
	    \item (Done) Update SCons from \url{www.scons.org} to the most recent ``standard'' version (currenty 1.0.0).
	    \item (Done) Update SWIG from \url{www.swig.org} to the most recent ``standard'' version (currently 1.3.36).
			\item (Done) Update libsndfile from \url{http://www.mega-nerd.com/libsndfile}. Try the most recent pre-release version first (currently 1.0.18pre22a); if that doesn't work, use the latest stable release (currently 1.0.17). Do not build from sources. 
	    \item (Done) Update the pthread library from \url{http://sources.redhat.com/pthreads-win32} to the most recent stable version (currently 2.8.0). Build using \texttt{nmake clean VC-inlined} (to build the MSVC inlined dll with C cleanup code). Copy the DLL and lib into the pre-built directory. Copy those files and rename them \texttt{pthread.dll} and \texttt{pthread.lib}.
			\item (Done) Update the PortAudio library (\url{http://portmedia.sourceforge.net}) from SVN and build it. Try the trunk version first, if that doesn't work use the most recent tag. Patch PortAudio's \texttt{combase.h} by commenting out lines 219 through 227 (redeclarations of interlocked functions). Copy \verb|portaudio_x86.lib| to \verb|portaudio.lib|
			\item (Done) Update the PortMidi library (\url{http://portmedia.sourceforge.net}) from SVN and build it. Try the trunk version first, if that doesn't work use the most recent tag.
    	\item (Done) Update FLTK from \url{www.fltk.org} to \texttt{branch-1.3 HEAD} from SVN and build it with MinGW using \verb|./configure --enable-threads --enable-shared|. Make sure that \texttt{custom-mingw.py} searches FLTK's \texttt{src} directory for import libraries before it searches FLTK's \texttt{lib} directory for static libraries (both are required).
    	\item (Done) Update boost from \url{www.boost.org} to the most recent stable version (currently 1.36.0).
    	\item (Done) Update FluidSynth from \url{http://fluidsynth.resonance.org/trac} to the most recent stable version (currently 1.0.8). Apply patches from the FluidSynth mailing list on trac. Build it with Visual C++.
    	\item (Done) Update the Synthesis Toolkit in C++ (STK) from \url{http://ccrma.stanford.edu/software/stk} to the most recent version (currently 4.3.1). Apply any patches from the web site and mailing list. Copy all contents of the STK directory into the Csound \texttt{Opcodes} directory.
    	\item (Done) Install the VST SDK 2.4 from \url{http://www.steinberg.net/en/company/3rd_party_developer.html}.
    	\item (Done) Update liblo from \url{http://liblo.sourceforge.net} from SVN trunk and build it using my \texttt{SConstruct} file and MinGW.
    	\item (Done) Update LuaJIT from \url{http://luajit.org} to the most recent stable version (currently 1.1.4) and build it in the MSVC shell using \url{etc/luavs.bat}.
		\end{enumerate}
	\item Build   
		\begin{enumerate}
    	\item (Done) Update \texttt{custom-mingw.py} and \texttt{custom-msvc.py} to reflect the locations of third-party header files and libraries.
			\item (Done) Update Csound from CVS at \verb|csound.cvs.sourceforge.net:/cvsroot/csound|, module \texttt{csound5}..
			\item (Done) Update \emph{The Canonical Csound Reference Manual} from CVS at \verb|csound.cvs.sourceforge.net:/cvsroot/csound|, module \texttt{manual}.
			\item (Done) Run \texttt{./cleanup.sh} to make everything really clean.
	    \item (Done) Build Csound using \texttt{build-mingw-release-double.bat}. You will have to make some additional patches to the STK sources for the updated MinGW compiler. The patches should be obvious from context. Mostly you need to \verb|#include <some_std_header>|.
	    \item (Done) Build the manual.
	    \item (Done) Build the API reference by executing doxygen, and LaTeXing \texttt{doc/latex/refman.tex} to a PDF file.
	    \item Build the installers using NSIS from \url{http://nsis.sourceforge.net/Main_Page} with and without the VST stuff.   
	    \item Repeat this entire build in a separate directory using \texttt{build-mingw-release-double.bat}. 
	    \item Update this document to reflect any changes in procedure or dependencies. 
	    \item Upload the installers to SourceForge and update the release package.
		\end{enumerate}
 \end{enumerate}

\section{Bug Fixes and Tests}
\label{sec:BugFixesAndTests}

\begin{enumerate}
	\item (Done) Move \texttt{spoutlock} and \texttt{spinlock} to dummy slots in CSOUND structure to preserve Csound API compatibility.
	\item (Done) Change \texttt{SConstruct} to define \verb|FL_DLL| for linking with the FLTK DLL.
	\item (Done) Change \texttt{SConstruct} to define \verb|_SCL_SECURE_NO_DEPRECATE| for compiling Gmm++.
	\item \verb|WAVE_FORMAT_EXTENSIBLE| now seems to be defined in the Windows API for MinGW; fix the build?
	\item (Done) Ensure \texttt{csound /examples/trapped.csd} works.
	\item (Done) Ensure \texttt{csound /examples/trapped.csd -otrapped.wav} works.
	\item (Done) Ensure Python works with \texttt{python examples/koch.py}, which uses SoundFonts in FluidSynth opcodes, and \texttt{python examples/Lindenmayer.py}, which uses \texttt{CsoundAC}. 
	\item Ensure the Python opcodes work with some of the tests in \url{Opcodes/py/examples}.
	\item (Done) Ensure Lua works with \verb|luajit examples/lua_example.lua|.
	\item (Done) Ensure Lisp works with \verb|clisp interfaces/test.lisp|.
	\item (Done) Ensure Java works with \verb|java -jar examples\java\CsoundEditor.jar|.
	\item Fix bugs in \texttt{csound5gui}.
	\item Ensure \texttt{csound5gui} renders \texttt{trapped.csd} to audio, and can be stopped and restarted.
	\item Ensure \texttt{csound5gui} renders \texttt{trapped.csd} to soundfile, and can be stopped and restarted.
	\item (Done) Ensure \texttt{CsoundVstShell} can load \texttt{examples/CsoundAC.csd} and perform as a live MIDI instrument using a SoundFont in a FluidSynth instrument, and an STK instrument.
	\item Ensure \texttt{CsoundVST} plugin works with \texttt{examples/CsoundAC.csd} using VSTHost from \url{http://www.hermannseib.com/english/vsthost.htm} and LMMS for Windows from \url{http://lmms.sourceforge.net}.
	\item Ensure VST hosting works using Green Oak Crystal from \url{http://www.greenoak.com/crystal}.
	\item Ensure OSC works by connecting to Pure Data.
	\item Fix up installers for correct third party DLLs.
	\item Fix up installers for correct Csound examples.
	\item Make sure installers link to the frames version of the manual and include the quick reference.
\end{enumerate}

\end{sloppypar}
\end{document}
<commit_msg>no message<commit_after>\documentclass[11pt,letterpaper,onecolumn]{scrartcl}
\usepackage{tocloft}
\usepackage{stdclsdv}
\usepackage{comment}
\usepackage{vmargin}
\usepackage{t1enc}
\usepackage{fancyvrb}
\usepackage{url}
\usepackage{calc}
\usepackage{array}
\usepackage{graphicx}
\usepackage{color}
\usepackage{listings}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{supertabular}
\usepackage{fancyhdr}
\usepackage{multicol}
\usepackage{float}
\usepackage{textcomp}
\usepackage{alltt}
\definecolor{LstColor}{cmyk}{0.1,0.1,0,0.025} 
\setcounter{tocdepth}{1}
\ifx\pdfoutput\undefined
\usepackage[ps2pdf,
            pagebackref=true,
            colorlinks=true,
            linkcolor=blue
           ]{hyperref}
\usepackage{pspicture}
\else
\usepackage[pdftex,
            pagebackref=true,
            colorlinks=true,
            linkcolor=blue,
            pdfpagelabels,
            pdfstartpage=2
           ]{hyperref}
\fi
\renewcommand{\headheight}{14pt}

\begin{document}
\begin{sloppypar}

\lstset{language=c++,basicstyle=\ttfamily\tiny,commentstyle=\ttfamily\tiny,tabsize=2,breaklines,backgroundcolor=\color{LstColor},fontadjust=true,keepspaces=false,fancyvrb=true,showstringspaces=false,moredelim=[is][\textbf]{\\emph\{}{\}}}.
\title{Csound Windows Build}
\author{<NAME> \\ \texttt{<EMAIL>}}
\maketitle

\section{Introduction}
\label{sec:Introduction}

This file should be updated in reasonable detail with each release of the Windows installers for Csound, in order to provide instructions for building Csound on Windows.

Csound on Windows is built using MinGW/MSys from (\url{www.mingw.org}). Code is built for release, with full optimizations including intrinsics and vectorization.  

These optimizations preclude debugging. A separate debug build must be made in order to debug. However, the only differences between the debug build and the release build must be the presence or absence of optimizations and the generation or not of debugging information. Code generation for both builds must be for ``release versions'' of the runtime libraries and third party libraries. This code generation standard also applies, of course, to actually building the third party libraries.

All third party libraries will be updated from the most recent version that seems to be used by a majority of their users --- whatever that is (trunk, most recent tag, stable release, whatever). If pre-built binaries are available, use them; otherwise, build with the recommended toolchain and build system. If that doesn't work, create a Microsoft Visual C++ solution. If that doesn't work, create an SConstruct file. In practice, I build all third party libraries Microsoft Visual C++ Express Edition except for liblo and FLTK, which I build with MinGW/MSys.

\section{Build Steps}
\label{sec:BuildSteps}

\begin{enumerate}
	\item Update the documentation tools.
		\begin{enumerate}
	    \item (No need) Update the Docbook toolchain.
	    \item (Done) Update LaTeX to the current version (2.2-071608) from proTeXt at \url{http://www.tug.org/protext}.
	    \item (Done) Update Doxygen to the current version (1.5.6) from \url{http://www.stack.nl/~dimitri/doxygen}.
		\end{enumerate}
	\item Update the build tools.   
		\begin{enumerate}
			\item (Done) For Visual C++ from \url{http://www.microsoft.com/express/vc}, probably 2008 is still good (it is as of 6 September 2008). Also install \texttt{dirent.h} from \url{http://www.softagalleria.net/dirent.php} and \texttt{bufferoverflowu.lib}  from Microsoft.
			\item For MinGW/MSys from \url{www.mingw.org}, first update with Twilight Dragon Media's GCC 4 (\url{http://www.tdragon.net/recentgcc}) (current version 4.3.2-tdm-1) (Done). Then add the latest MSys base and MSys supplementary tools from \url{http://sourceforge.net/projects/mingw}.
		\end{enumerate}    
	\item Update third-party dependencies.   
		\begin{enumerate}
  		\item (Done) Update Python from \url{www.python.org} to the most recent ``standard'' version (currently 2.5.2).
	    \item (Done) Update the Java Development Kit from \url{http://java.sun.com/javase/downloads/index.jsp} to the most recent ``standard'' version (currently Java SE 6 Update 10 RC).
	    \item (Done) Update SCons from \url{www.scons.org} to the most recent ``standard'' version (currenty 1.0.0).
	    \item (Done) Update SWIG from \url{www.swig.org} to the most recent ``standard'' version (currently 1.3.36).
			\item (Done) Update libsndfile from \url{http://www.mega-nerd.com/libsndfile}. Try the most recent pre-release version first (currently 1.0.18pre22a); if that doesn't work, use the latest stable release (currently 1.0.17). Do not build from sources. 
	    \item (Done) Update the pthread library from \url{http://sources.redhat.com/pthreads-win32} to the most recent stable version (currently 2.8.0). Build using \texttt{nmake clean VC-inlined} (to build the MSVC inlined dll with C cleanup code). Copy the DLL and lib into the pre-built directory. Copy those files and rename them \texttt{pthread.dll} and \texttt{pthread.lib}.
			\item (Done) Update the PortAudio library (\url{http://portmedia.sourceforge.net}) from SVN and build it. Try the trunk version first, if that doesn't work use the most recent tag. Patch PortAudio's \texttt{combase.h} by commenting out lines 219 through 227 (redeclarations of interlocked functions). Copy \verb|portaudio_x86.lib| to \verb|portaudio.lib|
			\item (Done) Update the PortMidi library (\url{http://portmedia.sourceforge.net}) from SVN and build it. Try the trunk version first, if that doesn't work use the most recent tag.
    	\item (Done) Update FLTK from \url{www.fltk.org} to \texttt{branch-1.3 HEAD} from SVN and build it with MinGW using \verb|./configure --enable-threads --enable-shared|. Make sure that \texttt{custom-mingw.py} searches FLTK's \texttt{src} directory for import libraries before it searches FLTK's \texttt{lib} directory for static libraries (both are required).
    	\item (Done) Update boost from \url{www.boost.org} to the most recent stable version (currently 1.36.0).
    	\item (Done) Update FluidSynth from \url{http://fluidsynth.resonance.org/trac} to the most recent stable version (currently 1.0.8). Apply patches from the FluidSynth mailing list on trac. Build it with Visual C++.
    	\item (Done) Update the Synthesis Toolkit in C++ (STK) from \url{http://ccrma.stanford.edu/software/stk} to the most recent version (currently 4.3.1). Apply any patches from the web site and mailing list. Copy all contents of the STK directory into the Csound \texttt{Opcodes} directory.
    	\item (Done) Install the VST SDK 2.4 from \url{http://www.steinberg.net/en/company/3rd_party_developer.html}.
    	\item (Done) Update liblo from \url{http://liblo.sourceforge.net} from SVN trunk and build it using my \texttt{SConstruct} file and MinGW.
    	\item (Done) Update LuaJIT from \url{http://luajit.org} to the most recent stable version (currently 1.1.4) and build it in the MSVC shell using \url{etc/luavs.bat}.
		\end{enumerate}
	\item Build   
		\begin{enumerate}
    	\item (Done) Update \texttt{custom-mingw.py} and \texttt{custom-msvc.py} to reflect the locations of third-party header files and libraries.
			\item (Done) Update Csound from CVS at \verb|csound.cvs.sourceforge.net:/cvsroot/csound|, module \texttt{csound5}..
			\item (Done) Update \emph{The Canonical Csound Reference Manual} from CVS at \verb|csound.cvs.sourceforge.net:/cvsroot/csound|, module \texttt{manual}.
			\item (Done) Run \texttt{./cleanup.sh} to make everything really clean.
	    \item (Done) Build Csound using \texttt{build-mingw-release-double.bat}. You will have to make some additional patches to the STK sources for the updated MinGW compiler. The patches should be obvious from context. Mostly you need to \verb|#include <some_std_header>|.
	    \item (Done) Build the manual.
	    \item (Done) Build the API reference by executing doxygen, and LaTeXing \texttt{doc/latex/refman.tex} to a PDF file.
	    \item Build the installers using NSIS from \url{http://nsis.sourceforge.net/Main_Page} with and without the VST stuff.   
	    \item Repeat this entire build in a separate directory using \texttt{build-mingw-release-double.bat}. 
	    \item Update this document to reflect any changes in procedure or dependencies. 
	    \item Upload the installers to SourceForge and update the release package.
		\end{enumerate}
 \end{enumerate}

\section{Bug Fixes and Tests}
\label{sec:BugFixesAndTests}

\begin{enumerate}
	\item (Done) Move \texttt{spoutlock} and \texttt{spinlock} to dummy slots in CSOUND structure to preserve Csound API compatibility.
	\item (Done) Change \texttt{SConstruct} to define \verb|FL_DLL| for linking with the FLTK DLL.
	\item (Done) Change \texttt{SConstruct} to define \verb|_SCL_SECURE_NO_DEPRECATE| for compiling Gmm++.
	\item (Done) Ensure \texttt{csound /examples/trapped.csd} works.
	\item (Done) Ensure \texttt{csound /examples/trapped.csd -otrapped.wav} works.
	\item (Done) Ensure Python works with \texttt{python examples/koch.py}, which uses SoundFonts in FluidSynth opcodes, and \texttt{python examples/Lindenmayer.py}, which uses \texttt{CsoundAC}. 
	\item (Done) Ensure Lua works with \verb|luajit examples/lua_example.lua|.
	\item (Done) Ensure Lisp works with \verb|clisp interfaces/test.lisp|.
	\item (Done) Ensure Java works with \verb|java -jar examples\java\CsoundEditor.jar|.
	\item (Done) Ensure \texttt{CsoundVstShell} can load \texttt{examples/CsoundAC.csd} and perform as a live MIDI instrument using a SoundFont in a FluidSynth instrument, and an STK instrument.
	\item (Done) Ensure the Python opcodes work with some of the files in \url{Opcodes/py/examples}.
	\item (Done) Fix bugs in \texttt{csound5gui}.
	\item (Done) Ensure \texttt{csound5gui} renders \texttt{trapped.csd} to audio, and can be stopped and restarted.
	\item (Done) Ensure \texttt{csound5gui} renders \texttt{trapped.csd} to soundfile, and can be stopped and restarted. 	
	\item (Done) Ensure VST hosting works using \verb|CsoundAC-midi.csd|. Fixed a bug with real-time notes not ending, by restoring \texttt{relesing} flag. This needs to be tested for file rendering.
	\item (Done) Ensure OSC works using example files.
	\item Fix up installers for correct third party DLLs.
	\item Fix up installers for correct Csound examples.
	\item Make sure installers link to the frames version of the manual and include the quick reference.
	\item Ensure \texttt{CsoundVST} plugin works with \texttt{examples/CsoundAC.csd} using VSTHost from\url{http://www.hermannseib.com/english/vsthost.htm} and LMMS for Windows from \url{http://lmms.sourceforge.net}.
\end{enumerate}

\end{sloppypar}
\end{document}

{'fraction_non_alphanumeric': 0.10388821385176185, 'fraction_numerical': 0.009533601271146837, 'mean_word_length': 4.183866279069767, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 31, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6369146', 'n_tokens_mistral': 6853, 'n_tokens_neox': 6443, 'n_words': 2382}