From 16f5aa26027482cb572326c044f2dc577db1726f Mon Sep 17 00:00:00 2001 From: simorl Date: Mon, 22 Jun 2009 11:57:59 +0200 Subject: [PATCH] - add a 'make setup.exe' target - add icon to .exe --- linphone/Makefile.am | 85 ++++++++++++++-- linphone/README.mingw | 15 ++- linphone/configure.in | 1 + linphone/coreapi/linphonecore.c | 4 +- linphone/gen-gtkfilelist.sh | 24 +++++ linphone/gtk+-2.16.2.filelist | 165 ++++++++++++++++++++++++++++++++ linphone/gtk-glade/Makefile.am | 9 +- linphone/gtk-glade/linphone.rc | 5 + linphone/linphone-deps.filelist | 11 +++ linphone/linphone.iss.in | 31 ++++++ 10 files changed, 328 insertions(+), 22 deletions(-) create mode 100755 linphone/gen-gtkfilelist.sh create mode 100755 linphone/gtk+-2.16.2.filelist create mode 100755 linphone/gtk-glade/linphone.rc create mode 100755 linphone/linphone-deps.filelist create mode 100644 linphone/linphone.iss.in diff --git a/linphone/Makefile.am b/linphone/Makefile.am index 8784af9c8..284441cd5 100644 --- a/linphone/Makefile.am +++ b/linphone/Makefile.am @@ -13,6 +13,29 @@ SUBDIRS = m4 pixmaps po ipkg $(ORTP_DIR) mediastreamer2\ coreapi console gtk-glade share + +ACLOCAL_FLAGS=-I$(top_srcdir)/m4 + + +INSTALLDIR=$(shell cd $(top_builddir) && pwd)/linphone-install +INSTALLDIR_WITH_PREFIX=$(INSTALLDIR)/$(prefix) +ZIPFILE=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-win32-$(VERSION).zip +ZIP_EXCLUDED=include lib \ + share/sounds/linphone/rings/synth.wav \ + share/sounds/linphone/rings/tapping.wav \ + share/sounds/linphone/rings/orig.wav + +GTK_PREFIX=/usr/local +GTK_FILELIST=gtk+-2.16.2.filelist +GTK_FILELIST_PATH=$(shell cd $(top_srcdir) && pwd)/$(GTK_FILELIST) +LINPHONEDEPS_FILELIST=linphone-deps.filelist +WINBINDIST_FILES=$(shell cat $(top_srcdir)/$(LINPHONEDEPS_FILELIST)) +ISS_SCRIPT=linphone.iss +ISS_SCRIPT_PATH=$(shell cd $(top_srcdir) && pwd)/$(ISS_SCRIPT) +#path to Inno Setup 5 compiler +ISCC=/c/Program\ Files/Inno\ Setup\ 5/ISCC.exe +PACKAGE_WIN32_FILELIST=$(PACKAGE)-win32.filelist + EXTRA_DIST = config.rpath BUGS linphone.kdevprj \ intltool-extract.in \ intltool-merge.in \ @@ -20,14 +43,13 @@ EXTRA_DIST = config.rpath BUGS linphone.kdevprj \ README.arm \ README.mingw \ autogen.sh \ - linphone.spec.in linphone.spec -ACLOCAL_FLAGS=-I$(top_srcdir)/m4 + linphone.spec.in \ + $(GTK_FILELIST) \ + gen-gtkfilelist.sh \ + $(LINPHONEDEPS_FILELIST) \ + $(ISS_SCRIPT).in -DISTCLEANFILES= intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache - -INSTALLDIR=$(shell cd $(top_builddir) && pwd)/linphone-install -ZIPFILE=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-win32-$(VERSION).zip -ZIP_EXCLUDED=include lib +DISTCLEANFILES= intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache $(ISS_SCRIPT) $(PACKAGE_WIN32_FILELIST) # `make rpm' @@ -48,14 +70,57 @@ rpm: #a zip containing win32 binaries, suitable to generate an installer +other-cherrypick: + cd $(GTK_PREFIX) && \ + for file in $(WINBINDIST_FILES) ; do \ + if test -d $$file; then \ + mkdir -p $(INSTALLDIR_WITH_PREFIX)/$$file ;\ + else \ + cp $$file $(INSTALLDIR_WITH_PREFIX)/$$file ;\ + fi \ + done +gtk-cherrypick: + cd $(GTK_PREFIX) && \ + for file in `cat $(GTK_FILELIST_PATH)` ; do \ + if test -d $$file; then \ + mkdir -p $(INSTALLDIR_WITH_PREFIX)/$$file ;\ + else \ + cp $$file $(INSTALLDIR_WITH_PREFIX)/$$file ;\ + fi \ + done && \ + cp -rf share/themes $(INSTALLDIR_WITH_PREFIX)/share/. zip: rm -f $(ZIPFILE) rm -rf $(INSTALLDIR) mkdir -p $(INSTALLDIR) make install DESTDIR=$(INSTALLDIR) - cd $(INSTALLDIR)/$(prefix) && rm -rf $(ZIP_EXCLUDED) && \ - zip -r $(ZIPFILE) * +#remove unwanted linphone stuff + cd $(INSTALLDIR_WITH_PREFIX) && rm -rf $(ZIP_EXCLUDED) +#add gtk dlls and files + make gtk-cherrypick + make other-cherrypick + cp -f $(top_srcdir)/gtk-glade/gtkrc $(INSTALLDIR_WITH_PREFIX)/. + cp -f $(top_srcdir)/README $(INSTALLDIR_WITH_PREFIX)/. + cp -f $(top_srcdir)/COPYING $(INSTALLDIR_WITH_PREFIX)/. + cd $(INSTALLDIR_WITH_PREFIX) && zip -r $(ZIPFILE) * + +setup.exe: zip + cd $(INSTALLDIR_WITH_PREFIX) && \ + rm -f $(PACKAGE_WIN32_FILELIST) && \ + for file in `find` ; do \ + if ! test -d $$file ; then \ + echo "Source: $$file; Destdir: {app}\\`dirname $$file`; Flags: ignoreversion" \ + >> $(PACKAGE_WIN32_FILELIST) ;\ + fi \ + done + cp $(ISS_SCRIPT) $(INSTALLDIR_WITH_PREFIX)/. + cd $(INSTALLDIR_WITH_PREFIX) && \ + $(ISCC) $(ISS_SCRIPT) + mv $(INSTALLDIR_WITH_PREFIX)/Output/setup.exe $(PACKAGE)-$(VERSION)-setup.exe + rm -rf $(INSTALLDIR_WITH_PREFIX)/Output + rm -f $(INSTALLDIR_WITH_PREFIX)/$(PACKAGE_WIN32_FILELIST) + rm -f $(INSTALLDIR_WITH_PREFIX)/$(ISS_SCRIPT) + - diff --git a/linphone/README.mingw b/linphone/README.mingw index ea9fb59b9..08afc7bda 100644 --- a/linphone/README.mingw +++ b/linphone/README.mingw @@ -14,26 +14,25 @@ Software to install Building +******** -WARNING: During the build, windows might slow down suddenly. Using ctl+alt+del to start the windows system monitor, you might see a process 'LVpSRV.exe' or something like this that eats 90% of cpu. Kill it. Don't know what it is, but once killed, windows runs normally. - - -Building - -WARNING: During the build, windows might slow down suddenly. Using ctl+alt+del to start the windows system monitor, you might see a process 'LVpSRV.exe' or something like this that eats 90% of cpu. Kill it. Don't know what it is, but once killed, windows runs normally. +WARNING: During the build, windows might slow down suddenly. Using ctl+alt+del to start the windows system monitor, + you might see a process 'LVpSRV.exe' or something like this that eats 90% of cpu. +Kill it. Don't know what it is, but once killed, windows runs normally. #use ActiveState perl instead of mingw perl export PERL="/c/Perl/bin/perl" export INTLTOOL_PERL="/c/Perl/bin/perl" #run autogen.sh after a git/svn checkout or update ./autogen.sh -./configure --prefix=/opt/linphone --enable-shared --disable-static --with-osip=/usr/local +./configure --prefix=/opt/linphone --enable-shared --disable-static --with-osip=/usr/local --with-gsm=/usr/local make #will install to /opt/linphone, useful for compilation of plugins. make install #make a binary zip of linphone make zip - +#additionally you can make binary installer if you have Inno Setup 5 installed in its default path +make setup.exe #build plugins cd mediastreamer2/plugins/msx264 diff --git a/linphone/configure.in b/linphone/configure.in index f3b06e185..cdab69b90 100644 --- a/linphone/configure.in +++ b/linphone/configure.in @@ -376,6 +376,7 @@ share/ja/Makefile share/cs/Makefile share/linphone.pc linphone.spec +linphone.iss ]) echo "Linphone build configuration ended." diff --git a/linphone/coreapi/linphonecore.c b/linphone/coreapi/linphonecore.c index a0a9497ca..2f9803f25 100644 --- a/linphone/coreapi/linphonecore.c +++ b/linphone/coreapi/linphonecore.c @@ -672,8 +672,8 @@ void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vtable, co rtp_profile_set_payload(&av_profile,98,linphone_h263_1998); linphone_h263_old=payload_type_clone(&payload_type_h263); - payload_type_set_recv_fmtp(linphone_h263_old,"QCIF=2"); - rtp_profile_set_payload(&av_profile,34,linphone_h263_old); + payload_type_set_recv_fmtp(linphone_h263_old,"QCIF=2"); + rtp_profile_set_payload(&av_profile,34,linphone_h263_old); linphone_mp4v_es=payload_type_clone(&payload_type_mp4v); payload_type_set_recv_fmtp(linphone_mp4v_es,"profile-level-id=3"); diff --git a/linphone/gen-gtkfilelist.sh b/linphone/gen-gtkfilelist.sh new file mode 100755 index 000000000..10a7de133 --- /dev/null +++ b/linphone/gen-gtkfilelist.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# this script is used to generate a file list of gtk+ files necessary for +# execution. This is useful for generating linphone packages. +# It must be run within a gtk+ binary bundle tree, such as in the zip bundle +# downloadable from www.gtk.org +echo bin +echo bin/libglade-2.0.0.dll +find bin -name *.dll +find lib/gtk-2.0 +find etc +find share/locale/fr +find share/locale/de +find share/locale/sv +find share/locale/cs +find share/locale/es +find share/locale/hu +find share/locale/it +find share/locale/ja +find share/locale/nl +find share/locale/pl +find share/locale/ru +find share/locale/pt_BR +find share/themes + diff --git a/linphone/gtk+-2.16.2.filelist b/linphone/gtk+-2.16.2.filelist new file mode 100755 index 000000000..5dce6ce85 --- /dev/null +++ b/linphone/gtk+-2.16.2.filelist @@ -0,0 +1,165 @@ +bin +bin/libglade-2.0.0.dll +bin/intl.dll +bin/jpeg62.dll +bin/libasprintf-0.dll +bin/libatk-1.0-0.dll +bin/libcairo-2.dll +bin/libgailutil-18.dll +bin/libgdk-win32-2.0-0.dll +bin/libgdk_pixbuf-2.0-0.dll +bin/libgettextlib-0-17.dll +bin/libgettextpo-0.dll +bin/libgettextsrc-0-17.dll +bin/libgio-2.0-0.dll +bin/libglib-2.0-0.dll +bin/libgmodule-2.0-0.dll +bin/libgobject-2.0-0.dll +bin/libgthread-2.0-0.dll +bin/libgtk-win32-2.0-0.dll +bin/libpango-1.0-0.dll +bin/libpangocairo-1.0-0.dll +bin/libpangoft2-1.0-0.dll +bin/libpangowin32-1.0-0.dll +bin/libpng12-0.dll +bin/libtiff3.dll +bin/zlib1.dll +lib/gtk-2.0 +lib/gtk-2.0/2.10.0 +lib/gtk-2.0/2.10.0/engines +lib/gtk-2.0/2.10.0/engines/libpixmap.dll +lib/gtk-2.0/2.10.0/engines/libwimp.dll +lib/gtk-2.0/2.10.0/loaders +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ani.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-bmp.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-gif.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-icns.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ico.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-jpeg.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-pcx.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-pnm.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ras.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tga.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tiff.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-wbmp.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xbm.dll +lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.dll +lib/gtk-2.0/include +lib/gtk-2.0/include/gdkconfig.h +lib/gtk-2.0/modules +lib/gtk-2.0/modules/libgail.dll +etc +etc/gtk-2.0 +etc/gtk-2.0/gdk-pixbuf.loaders +etc/gtk-2.0/gtk.immodules +etc/gtk-2.0/im-multipress.conf +etc/pango +etc/pango/pango.modules +share/locale/fr +share/locale/fr/LC_MESSAGES +share/locale/fr/LC_MESSAGES/atk10.mo +share/locale/fr/LC_MESSAGES/gettext-runtime.mo +share/locale/fr/LC_MESSAGES/gettext-tools.mo +share/locale/fr/LC_MESSAGES/glib20.mo +share/locale/fr/LC_MESSAGES/gtk20-properties.mo +share/locale/fr/LC_MESSAGES/gtk20.mo +share/locale/de +share/locale/de/LC_MESSAGES +share/locale/de/LC_MESSAGES/atk10.mo +share/locale/de/LC_MESSAGES/gettext-runtime.mo +share/locale/de/LC_MESSAGES/gettext-tools.mo +share/locale/de/LC_MESSAGES/glib20.mo +share/locale/de/LC_MESSAGES/gtk20-properties.mo +share/locale/de/LC_MESSAGES/gtk20.mo +share/locale/sv +share/locale/sv/LC_MESSAGES +share/locale/sv/LC_MESSAGES/atk10.mo +share/locale/sv/LC_MESSAGES/gettext-runtime.mo +share/locale/sv/LC_MESSAGES/gettext-tools.mo +share/locale/sv/LC_MESSAGES/glib20.mo +share/locale/sv/LC_MESSAGES/gtk20-properties.mo +share/locale/sv/LC_MESSAGES/gtk20.mo +share/locale/cs +share/locale/cs/LC_MESSAGES +share/locale/cs/LC_MESSAGES/atk10.mo +share/locale/cs/LC_MESSAGES/gettext-runtime.mo +share/locale/cs/LC_MESSAGES/gettext-tools.mo +share/locale/cs/LC_MESSAGES/glib20.mo +share/locale/cs/LC_MESSAGES/gtk20-properties.mo +share/locale/cs/LC_MESSAGES/gtk20.mo +share/locale/es +share/locale/es/LC_MESSAGES +share/locale/es/LC_MESSAGES/atk10.mo +share/locale/es/LC_MESSAGES/gettext-runtime.mo +share/locale/es/LC_MESSAGES/gettext-tools.mo +share/locale/es/LC_MESSAGES/glib20.mo +share/locale/es/LC_MESSAGES/gtk20-properties.mo +share/locale/es/LC_MESSAGES/gtk20.mo +share/locale/hu +share/locale/hu/LC_MESSAGES +share/locale/hu/LC_MESSAGES/atk10.mo +share/locale/hu/LC_MESSAGES/glib20.mo +share/locale/hu/LC_MESSAGES/gtk20-properties.mo +share/locale/hu/LC_MESSAGES/gtk20.mo +share/locale/it +share/locale/it/LC_MESSAGES +share/locale/it/LC_MESSAGES/atk10.mo +share/locale/it/LC_MESSAGES/gettext-runtime.mo +share/locale/it/LC_MESSAGES/gettext-tools.mo +share/locale/it/LC_MESSAGES/glib20.mo +share/locale/it/LC_MESSAGES/gtk20-properties.mo +share/locale/it/LC_MESSAGES/gtk20.mo +share/locale/ja +share/locale/ja/LC_MESSAGES +share/locale/ja/LC_MESSAGES/atk10.mo +share/locale/ja/LC_MESSAGES/gettext-runtime.mo +share/locale/ja/LC_MESSAGES/gettext-tools.mo +share/locale/ja/LC_MESSAGES/glib20.mo +share/locale/ja/LC_MESSAGES/gtk20-properties.mo +share/locale/ja/LC_MESSAGES/gtk20.mo +share/locale/nl +share/locale/nl/LC_MESSAGES +share/locale/nl/LC_MESSAGES/atk10.mo +share/locale/nl/LC_MESSAGES/gettext-runtime.mo +share/locale/nl/LC_MESSAGES/gettext-tools.mo +share/locale/nl/LC_MESSAGES/glib20.mo +share/locale/nl/LC_MESSAGES/gtk20-properties.mo +share/locale/nl/LC_MESSAGES/gtk20.mo +share/locale/pl +share/locale/pl/LC_MESSAGES +share/locale/pl/LC_MESSAGES/atk10.mo +share/locale/pl/LC_MESSAGES/gettext-runtime.mo +share/locale/pl/LC_MESSAGES/gettext-tools.mo +share/locale/pl/LC_MESSAGES/glib20.mo +share/locale/pl/LC_MESSAGES/gtk20-properties.mo +share/locale/pl/LC_MESSAGES/gtk20.mo +share/locale/ru +share/locale/ru/LC_MESSAGES +share/locale/ru/LC_MESSAGES/atk10.mo +share/locale/ru/LC_MESSAGES/gettext-runtime.mo +share/locale/ru/LC_MESSAGES/gettext-tools.mo +share/locale/ru/LC_MESSAGES/glib20.mo +share/locale/ru/LC_MESSAGES/gtk20-properties.mo +share/locale/ru/LC_MESSAGES/gtk20.mo +share/locale/pt_BR +share/locale/pt_BR/LC_MESSAGES +share/locale/pt_BR/LC_MESSAGES/atk10.mo +share/locale/pt_BR/LC_MESSAGES/gettext-runtime.mo +share/locale/pt_BR/LC_MESSAGES/gettext-tools.mo +share/locale/pt_BR/LC_MESSAGES/glib20.mo +share/locale/pt_BR/LC_MESSAGES/gtk20-properties.mo +share/locale/pt_BR/LC_MESSAGES/gtk20.mo +share/themes +share/themes/Default +share/themes/Default/gtk-2.0-key +share/themes/Default/gtk-2.0-key/gtkrc +share/themes/Emacs +share/themes/Emacs/gtk-2.0-key +share/themes/Emacs/gtk-2.0-key/gtkrc +share/themes/MS-Windows +share/themes/MS-Windows/gtk-2.0 +share/themes/MS-Windows/gtk-2.0/gtkrc +share/themes/Raleigh +share/themes/Raleigh/gtk-2.0 +share/themes/Raleigh/gtk-2.0/gtkrc diff --git a/linphone/gtk-glade/Makefile.am b/linphone/gtk-glade/Makefile.am index e75b5977c..884d9ecfb 100644 --- a/linphone/gtk-glade/Makefile.am +++ b/linphone/gtk-glade/Makefile.am @@ -43,9 +43,14 @@ linphone_3_LDADD=$(top_builddir)/oRTP/src/libortp.la \ $(LIBGTK_LIBS) $(INTLLIBS) \ $(LIBGLADE_LIBS) + if BUILD_WIN32 -linphone_3_LDADD+=-lwininet -linphone_3_LDFLAGS=-Wl,--export-all-symbols + +linphone.res: linphone.rc linphone.ico + windres linphone.rc -O coff -o linphone.res + +linphone_3_LDADD+=linphone.res -lwininet +linphone_3_LDFLAGS=-Wl,--export-all-symbols -mwindows else linphone_3_LDFLAGS=-export-dynamic endif diff --git a/linphone/gtk-glade/linphone.rc b/linphone/gtk-glade/linphone.rc new file mode 100755 index 000000000..9455ab6b3 --- /dev/null +++ b/linphone/gtk-glade/linphone.rc @@ -0,0 +1,5 @@ +// This file is automatically generated by wxDev-C++. +// All changes to this file will be lost when the project is recompiled. + +A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "linphone.ico" + diff --git a/linphone/linphone-deps.filelist b/linphone/linphone-deps.filelist new file mode 100755 index 000000000..40d31692f --- /dev/null +++ b/linphone/linphone-deps.filelist @@ -0,0 +1,11 @@ +./bin/avcodec-52.dll +./bin/avformat-52.dll +./bin/avutil-50.dll +./bin/exosip2.dll +./bin/libogg-0.dll +./bin/libsoup-2.4-1.dll +./bin/libtheora-0.dll +./bin/libxml2.dll +./bin/osip2.dll +./bin/osipparser2.dll +./bin/swscale-0.dll diff --git a/linphone/linphone.iss.in b/linphone/linphone.iss.in new file mode 100644 index 000000000..f2dd5c4a7 --- /dev/null +++ b/linphone/linphone.iss.in @@ -0,0 +1,31 @@ +[Setup] +AppName=Linphone +AppVerName=Linphone version @LINPHONE_VERSION@ +AppPublisher=linphone.org +AppPublisherURL=http://www.linphone.org +AppSupportURL=http://www.linphone.org +AppUpdatesURL=http://www.linphone.org +DefaultDirName={pf}\Linphone +DefaultGroupName=Linphone +LicenseFile=COPYING +;InfoBeforeFile=README +OutputBaseFilename=setup +Compression=lzma +SolidCompression=yes + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Files] +#include "linphone-win32.filelist" + +[Icons] +Name: "{group}\Linphone"; Filename: "{app}\bin\linphone-3.exe" ; WorkingDir: "{app}" +Name: "{userdesktop}\Linphone"; Filename: "{app}\bin\linphone-3.exe"; WorkingDir: "{app}" ; Tasks: desktopicon + +[Run] +Filename: "{app}\bin\linphone-3.exe"; Description: "{cm:LaunchProgram,Linphone}"; WorkingDir: "{app}" ; Flags: nowait postinstall skipifsilent +