Building synfig on Windows with provided shell script in SRC


#1

In the AutoBuild folder provided with source there is a synfigstudio-cygwin-mingw-build.sh which has some instructions to build synfig on Windows . I ve installed cygwin , Mingw , NSIS and followed the instructions specified in that script . But I get some errors regarding unexpected syntax when i give the cmd :-> bash /cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh . I ve attached a snapshot of it .

$ bash /cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh
/cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh: line 46: $'\r': command not found
/cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh: line 47: $'\r': command not found
/cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh: line 48: $'\r': command not found
/cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh: line 50: $'\r': command not found
/cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh: line 72: syntax error near unexpected token `elif'
'cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh: line 72: `elif [[ $ARCH == "64" ]]; then

I’ve tried a quick work around commenting out the

if [[ $ARCH == 32 ]] ; then 

But it creates another error . Please help me out . ( kind of new to this :confused: )

$ bash /cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh /cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh: line 46: $'\r': command not found /cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh: line 47: $'\r': command not found /cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh: line 48: $'\r': command not found /cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh: line 50: $'\r': command not found /cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh: line 95: syntax error near unexpected token `$'\r'' 'cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh: line 95: `prepare_mingw_env()

[size=150]EDIT[/size] : I found out that it was a line encoding problem but i still get the following errors when i run after clearing ‘\r’ from the file :

temp.sh: line 92: git: command not found
cat: /prep-done: No such file or directory
temp.sh: line 418: /cygdrive/c/synfig-build/cygwin-dist/setup-x86.exe: No such file or directory

#2

Have you strictly followed the instructions on the script header?

[code]# = Usage notes =

* Download and install Git (http://msysgit.github.io/).

* Open Git Bash and execute following commands:

** mkdir C:\synfig-build

** cd C:\synfig-build

** git clone https://github.com/synfig/synfig.git

** mkdir cygwin-dist

** cd synfig

** git config --global core.autocrlf input

** exit

* Download Cygwin setup binary (http://www.cygwin.com/) and save it into C:\synfig-build\cygwin-dist\ directory.

* Run Cygwin setup and install with the default parameters.

* Download and install NSIS >=3.0 (http://nsis.sourceforge.net/). Install into C:\synfig-build\NSIS\ directory.

* (64-bit build only!) Download and install 7zip (http://downloads.sourceforge.net/sevenzip/7z920-x64.msi). Install into C:\synfig-build\7zip\ directory.

* Open Cygwin console (with administrator previlegies) and run the build script:

** bash /cygdrive/c/synfig-build/synfig/autobuild/synfigstudio-cygwin-mingw-build.sh

* Installation bundle will be written to C:\synfig-build[/code]

If you keep close to that, you’ll be success.
Once you install git and clone synfig repository, do not edit the script unless you’re using a safe editor (Notepad++ is a good choice for Windows). Then follow the instructions and finally run the untouched script.
Later, if you success, you can edit the script for your needs but at your own risk.
-G