Welcome to http://www.marssoft.de/
 
Tuesday, 11th December 2018 21:22:25 (GMT+1) 

Compile Unison for Cygwin on Windows

  • Install Cygwin
  • In Cygwin, install the packages:
    • make, ctags, ocaml, ocaml-compiler-libs, libncurses-devel, subversion
  • In Cygwin, check out the sources and compile them:
  • Copy unison to your bin directory:
    • mkdir -p ~/usr/bin/
    • mv src/unison.exe ~/usr/bin/
  • Be sure to add usr/bin to your path in .bashrc: export PATH=“$HOME/usr/bin:$PATH”
  • Afterwards, you can uninstall in Cygwin the pckages:
    • make, ctags, ocaml, ocaml-compiler-libs, libncurses-devel, subversion,
    • w32api-headers, w32api-runtime, libgomp1, libmpc3, libfontconfig1, gcc-core, cygwin-devel, binutils, and a bunch of libX's

Running Unison on Cygwin Windows

Sometimes Windows network drives can pose problems with file permissions and ownership, that Unison tries to keep correct. Therefore, syncs can fail. To work around this problem, a cheap solution is to avoid having Cygwin support any permissions at all. This can be achieved by setting the “noacl” option in cygwins /etc/fstab. Here an example where cygwin is installed on the H:\-drive, and unison-synced data resides in /home/ and in /cygdrive/h/:

# Windows-path   mount-point filesystem settings
H:/cygwin64/home /home       ntfs       noacl,binary              0 0

# This is default anyway:
none             /cygdrive   cygdrive   noacl,binary,posix=0,user 0 0

Compile Unison for Native Windows x64

rm -fr ~/gtk2-sdk-2.24.24-2014-09-28-ts-win64
mkdir -p ~/gtk2-sdk-2.24.24-2014-09-28-ts-win64
cd ~/gtk2-sdk-2.24.24-2014-09-28-ts-win64/
unzip /cygdrive/c/OCamlCompile/gtk2-sdk-2.24.24-2014-09-28-ts-win64.zip
chmod +x /home/emmenlau/gtk2-sdk-2.24.24-2014-09-28-ts-win64/bin/*
export PATH="/home/emmenlau/gtk2-sdk-2.24.24-2014-09-28-ts-win64/bin:$PATH"

rm -fr ~/lablgtk-2.18.3 /cygdrive/c/OCamlCompile/OCPWin64/lib/lablgtk2
cd ~/
tar -xzf /cygdrive/c/OCamlCompile/lablgtk-2.18.3.tar.gz
cd ~/lablgtk-2.18.3/
./configure --prefix=/cygdrive/c/OCamlCompile/OCPWin64/lib/lablgtk2 --disable-gtktest
make world
make old-install

rm -fr ~/unison-src-2.40
cd ~/
svn checkout https://webdav.seas.upenn.edu/svn/unison/branches/2.40/ unison-src-2.40
cd ~/unison-src-2.40/
make UISTYLE=gtk2 NATIVE=true OSCOMP=cygwingnuc

rm -fr ~/unison-src-2.48
cd ~/
svn checkout https://webdav.seas.upenn.edu/svn/unison/branches/2.48/ unison-src-2.48
cd ~/unison-src-2.48/
make UISTYLE=gtk2 NATIVE=true OSCOMP=cygwingnuc

cd ~/
mkdir -p /cygdrive/c/Unison
COPYFILES="
  unison.exe unison-fsmonitor.exe
  libgdk-win32-2.*.dll libgtk-win32-2.*.dll libgdk_pixbuf-2.*dll libglib-2.*dll
  libgobject-2.*dll libgmodule-2.*dll libpango-1.*dll libpangocairo-1.*dll
  libpangowin32-1.*dll libpangoft2-1.*dll libcairo-2.*dll libgio-2.*dll
  libgthread-2.*dll libintl-8.dll libfontconfig-1.*dll libfreetype*dll
  libatk-1.*dll libpng*dll libffi*dll libpixman*dll libxml*dll 
  libharfbuzz*dll zlib*dll
"
for I in $COPYFILES ; do
    find . -name "$I" -exec cp -v \{\} /cygdrive/c/Unison/ \;
done
COPYFILES="
 ssh.exe ssh-keygen.exe chmod.exe chgrp.exe cygwin1.dll cygssp*.dll cygintl*.dll cygiconv*.dll
 cygz.dll cygcom_err*.dll cygkrb5support*.dll cygkrb5*.dll cygk5crypto*.dll cyggcc_s-seh*.dll
 cyggssapi_krb5*.dll cygcrypto-1.*.dll
"
for I in $COPYFILES ; do
    find /bin/ -name "$I" -exec cp -v \{\} /cygdrive/c/Unison/ \;
done
guides/unison-compile-for-windows.txt · Last modified: 2015/01/13 01:03 by mario