final revision for uniformity by Andrea
[goodguy/cin-manual-latex.git] / parts / Installation.tex
index 494db436db75e786eedfba5769169789de7bcb6c..b35e81bd015c51856d5d25b1eeb96ca358e4b418 100644 (file)
@@ -68,7 +68,7 @@ $ make 2>&1 | tee log        # make and log the build
 $ grep "\*\*\*.*error" -ai log
         \end{lstlisting}
         If this reports errors and you need assistance or you think improvements can be made to the builds,
-        email the log which is listed below to {\small \url{cin@lists.cinelerra-gg.org:}}
+        email the log which is listed below to: \href{mailto:cin@lists.cinelerra-gg.org}{cin@lists.cinelerra-gg.org}
         \begin{lstlisting}[language=bash,numbers=none]
 $ /<build_path>/cinelerra5/cinelerra-5.1/log
         \end{lstlisting}
@@ -162,7 +162,7 @@ NOTE:  when you specify parameters to the configure program, it will create a ma
 Since in a make file, the \$ is a special character, it must be escaped so in order to represent a \$ as part of an input parameter, it has to be stuttered.  
 That is, you will need \$\$ (2 dollar signs) to represent a single dollar sign. 
 
-It may be necessary on some distros which have missing or incomplete up-to-date libraries, to build cinelerra without Ladspa.  
+It may be necessary on some distros which have missing or incomplete up-to-date libraries, to build Cinelerra without Ladspa.  
 To do so, use:
 
 \begin{lstlisting}[language=bash,numbers=none]
@@ -470,13 +470,13 @@ yum install cinelerra
 apt install software-properties-common apt-transport-https
 apt-add-repository https://cinelerra-gg.org/download/pkgs/ub14
 # UBUNTU 16/17/18 note - This has been known to work, but things change quickly:
-# VIP - for the first install, the above line adds cinelerra to /etc/apt/sources.list but...
+# VIP - for the first install, the above line adds Cinelerra to /etc/apt/sources.list but...
 # Version 16/17/18 of Ubuntu are more strict for licensing so you will have to edit
 #  the file /etc/apt/sources.list to add [trusted=yes] after deb and before https...cin...
 # For example the line should be: deb [trusted=yes] https://cinelerra-gg.org/download/pkgs/ub16 xenial main
 #   Or for ub17: deb [trusted=yes] https://cinelerra-gg.org/download/pkgs/ub17 zesty main
 #   Or for ub18: deb [trusted=yes] https://cinelerra-gg.org/download/pkgs/ub18 bionic main
-# Also, on the install you will get an error message that you can either ignore as cinelerra
+# Also, on the install you will get an error message that you can either ignore as Cinelerra
 #  will run anyway, or else (the first time only) on the commnand line keyin: 
 #  echo > /etc/sysctl.d/50-cin.conf "kernel.shmmax=0x7fffffff"
 apt update
@@ -486,11 +486,15 @@ apt update
 apt upgrade cin
 ##apt remove cin
 
-# MINT should use the same procedure as Ubuntu, but: 
-# Note: apt-add-repository did not work for me, I had to use the gui version:
-#  System_OR_Administration->Software Sources->Additional Repositories->Add a new repository
+# MINT should use the same procedure as Ubuntu, but apt-add-repository does not seem to work,
+#  so use the GUI UpdateManager as follows:
+#  Administration->Software Sources->Additional Repositories->Add a new repository
+#    (Note instead of Administration, some versions of Mint GUI UpdateManager might be System)
 #  For Mint18,add: deb [trusted=yes] https://cinelerra-gg.org/download/pkgs/mint18 xenial main
-#  For Mint19,add: deb [trusted=yes] https://cinelerra-gg.org/download/pkgs/mint19 bionic main 
+#  For Mint19,add: deb [trusted=yes] https://cinelerra-gg.org/download/pkgs/mint19 bionic main
+# IMPORTANT NOTE: if you get "malformed input" error, you will have to create a file
+#    by typing the command: sudo touch /etc/apt/sources.list.d/additional-repositories.list
+#    then wait 10 minutes or so and try using the Gui Update Manager again.
 apt update
 apt install cin
 #to update a previous install
@@ -563,6 +567,160 @@ pacman -S cin
 ##pacman -R cin
 \end{lstlisting}
 
+\section{Windows 10 with Cygwin for Cinelerra limited}%
+\label{sec:ms_windows10}
+
+To run Cinelerra on a Windows 10 computer, you will need to have Cygwin installed on your system, 
+along with the  Cinelerra static tar and a patched library: libxbc.  This setup has been tested 
+with Windows 10, version 1909, on an HP EliteBook 820 at 2.3 GHz.
+
+This limited version provides \textit{core} functionality at this time with the standard Windows FFmpeg
+executable, meaning that specific modifications in FFmpeg needed for Cinelerra are not available. 
+Limited capabilities include only a few render output formats available - for example \textit{mov}, \textit{qt} 
+as \textit{mjpeg}, and \textit{mpeg} for videos and \textit{avi} and \textit{qt} as \textit{s16le} 
+for audio, but not \textit{mkv} or \textit{mp4}.  
+This is due to the fact that several codec and utility libraries are not currently compiled to 
+work with Windows.
+
+\underline{Installing Cygwin:}
+
+Cygwin is an environment that runs natively on Windows which allows Unix programs to be compiled 
+and run on Windows.  With cygwin installed on your Windows 10 computer, you will be able to run 
+Cinelerra.  Before installing cygwin, you need to be warned that the Avast anti-virus software 
+kills files necessary for cygwin installation and execution, so you will have to remove it and 
+use alternative anti-virus software (the standard default already included with Windows 10 
+is Defender). Below are the steps for installation:
+
+\begin{enumerate}
+       \item Download cygwin for your 64-bit computer at: {\small \url{https://www.cygwin.com/}}
+       \item Generally just take the defaults as they show up, but the next steps show what comes up.
+       \item When a warning window pops up, click \textit{Yes}.
+       \item Click \textit{Next}.
+       \item Choose \textit{Install from Internet} option and then click \textit{Next}.
+       \item Choose your desired directory by clicking on Browse button. Choose \textit{All Users (Recommended)} and then click \textit{Next}.
+       \item Choose the local package directory where you would like your installation files to be placed. Click \textit{Next}.
+       \item Choose \textit{Direct Connection} if you are using Internet with plug and play device. Click \textit{Next}.
+       \item Choose any download site preferably "cygwin.mirror.constant.com" and then click \textit{Next}.
+       \item For list of things to install, leave all set to \textit{Default} except these to \textit{Install} instead:
+
+\begin{tabular}{ll}
+       base& devel\\
+       gnome& graphics\\
+       system& video\\
+       X11 \\
+\end{tabular}
+
+     This install takes a long time; approximately 2 hours on an EliteBook and requires approximately 20GB storage.
+       \item Finally you will want to have the icons on your desktop (already default) and then click \textit{Finish}.
+\end{enumerate}
+
+Then to install the Cinelerra tar files, you will need to start a cygwin console terminal from the startup menu as shown here:
+       \texttt{Start $\rightarrow$ Cygwin $\rightarrow$ Cygwin64} Terminal
+
+\underline{Installing Cinelerra:}
+
+\begin{enumerate}
+       \item Download the tar file at:\\
+        {\small \url{https://cinelerra-gg.org/download/testing/libxcb-bld.tar.bz2}}
+       \item Install libxbc from the tar file -- installs into \texttt{/usr/local} and requires approximately 21MB storage.
+\begin{lstlisting}[language=bash,numbers=none]
+       $ tar -C /usr/local -xJf /path/libxcb-bld.tar.bz2
+\end{lstlisting}
+The libxcb path repairs an error (XIOError), which stops the program.
+       \item Download the tar file at:\\
+       {\small \url{https://cinelerra-gg.org/download/testing/cygcin-bld.tar.bz2}}     
+       \item Install cygcin from the tar file - this installs into home directory.  Note this is cygcin NOT cygwin.
+\begin{lstlisting}[language=bash,numbers=none]
+       $ cd
+       $ tar -xJf /path/cygcin-bld.tar.bz2
+\end{lstlisting}
+\end{enumerate}
+This creates \texttt{\~{}/cygcin} , a user build installation of Cinelerra and requires approximately 400MB storage.
+
+\underline{Running Cinelerra:}
+
+You will need to start a cygwin desktop from the startup menu:
+\begin{enumerate}
+       \item \texttt{Start$\rightarrow$ Cygwin-X $\rightarrow$ Openbox}
+
+You should start a console controlling terminal so that you can see program logging.
+       \item \texttt{Start$\rightarrow$ Cygwin $\rightarrow$ Cygwin64} Terminal
+
+This opens a separate window that can survive a cygwin hang and bugs. Without these logs, it is much more difficult to use.
+
+       \item Type into that console controlling window, the following:
+\begin{lstlisting}[language=bash,numbers=none]
+       $ export DISPLAY=:0.0
+\end{lstlisting}
+       \item Change directories to where Cinelerra is installed:
+\begin{lstlisting}[language=bash,numbers=none]
+       $ cd /path/cygcin    (NOT cygwin)
+\end{lstlisting}
+       \item Finally keyin:
+\begin{lstlisting}[language=bash,numbers=none]
+       $ ./cin
+\end{lstlisting}
+which starts up your 4 Cinelerra windows.
+\end{enumerate}
+
+The most noticeable difference from the Linux versions is that Cinelerra seems to run 
+very slowly on Windows 10. You must be very tolerant and patient to see this work.  
+It can however exhibit astonishing speed when encoding.  Cinelerra has to be downgraded significantly due to lack of supported interfaces, codecs (for example h264/h265), and utilities.  
+The only graphics driver is X11 and the only sound driver is pulseaudio.  Almost all configurable
+omissions are applied to this build.  
+
+\underline{Cinelerra build on cygwin from source code:}
+
+\begin{enumerate}
+       \item Download and install ffmpeg into /usr/local :
+
+       download ffmpeg (currently 4.2.2)
+\begin{lstlisting}[language=bash,numbers=none]
+       $ cd /tmp
+       $ tar -xJf /path/ffmpeg-4.2.2.tar.bz2
+       $ cd ffmpeg-4.2.2
+       $ ./configure
+       $ make -j
+       $ make install
+\end{lstlisting}
+       \item Download and install a patched libxcb:
+\begin{lstlisting}[language=bash,numbers=none]
+       $ cd /tmp
+       $ rm -rf libxcb-1.13/
+       $ tar -xf /path/libxcb-1.13.tar.bz2
+       $ cd libxcb-1.13/
+       $ patch -p1 < /path/cinelerra-5.1/thirdparty/src/libxcb.patch1
+          patching file configure.ac
+          patching file src/xcb_in.c
+       $ ./autogen.sh
+       $ ./configure
+       $ make -j
+       $ make install
+\end{lstlisting}
+       \item Download cinelerra-gg:
+\begin{lstlisting}[language=bash,numbers=none]
+       $ cd /build_path/
+       $ git clone "git://git.cinelerra-gg.org/goodguy/cinelerra.git"
+       $ cd cinelerra-gg/cinelerra-5.1
+\end{lstlisting}
+       \item Apply cygwin patch:
+\begin{lstlisting}[language=bash,numbers=none]
+       $ patch -p2 < blds/cygwin.patch
+\end{lstlisting}
+       \item Run the build with:
+\begin{lstlisting}[language=bash,numbers=none]
+       $ ./blds/cygwin.bld
+\end{lstlisting}
+\end{enumerate}
+
+This produces a directory: $/build\_path$/cinelerra-gg$/cinelerra$-5.1/bin \newline
+which is used to create the cygcin archive.
+
+Currently, the targets are not stripped and can be run from gdb.
+There is only very limited signal handler dmp file support.
+Running gdb from inside a desktop resident console (not a cygwin64 window) will hang cygwin (and cin) when it hits a breakpoint.  You must run from an external console window to avoid this issue.
+
+
 \section{Distribution Systems with Cinelerra Included}%
 \label{sec:distribution_systems_with_cinelerra_included}