lists.geany.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
List overview
Commits
March 2016
----- 2024 -----
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
commits@lists.geany.org
1 participants
100 discussions
Start a n
N
ew thread
[geany/geany] ea94d2: Post release version bump
by Colomban Wendling
13 Mar '16
13 Mar '16
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 13 Mar 2016 13:32:20 UTC Commit: ea94d2a9a1b582dff1e4a11c824a2bfe326ff4bf
https://github.com/geany/geany/commit/ea94d2a9a1b582dff1e4a11c824a2bfe326ff…
Log Message: ----------- Post release version bump Say hello to Geany 1.28 "Malvek"! Modified Paths: -------------- NEWS configure.ac doc/geany.txt geany.exe.manifest geany_private.rc src/geany.h win32-config.h Modified: NEWS 3 lines changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -1,3 +1,6 @@ +Geany 1.28 (unreleased) + + Geany 1.27 (March 13, 2016) General Modified: configure.ac 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.60]) -AC_INIT([Geany], [1.27], +AC_INIT([Geany], [1.28], [
https://sourceforge.net/tracker/?group_id=153444&atid=787791
]) AC_CONFIG_SRCDIR([src/geany.h]) AC_CONFIG_AUX_DIR([build-aux]) Modified: doc/geany.txt 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1,4 +1,4 @@ -.. |(version)| replace:: 1.27 +.. |(version)| replace:: 1.28 .. -*- reStructuredText -*- ======= Modified: geany.exe.manifest 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity - version="1.27.0.0" + version="1.28.0.0" processorArchitecture="X86" name="Geany" type="win32" /> Modified: geany_private.rc 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -1,8 +1,8 @@ #include <windows.h> // include for version info constants -#define VER_FILEVERSION 1,27,0,0 -#define VER_FILEVERSION_STR "1.27" +#define VER_FILEVERSION 1,28,0,0 +#define VER_FILEVERSION_STR "1.28" #define APP_MANIFEST 1 A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "icons/geany.ico" Modified: src/geany.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -41,7 +41,7 @@ G_BEGIN_DECLS * listed in the documentation should not be changed */ #define GEANY_FILEDEFS_SUBDIR "filedefs" #define GEANY_TEMPLATES_SUBDIR "templates" -#define GEANY_CODENAME "Rezer" +#define GEANY_CODENAME "Malvek" #define GEANY_HOMEPAGE "
http://www.geany.org/
" #define GEANY_WIKI "
http://wiki.geany.org/
" #define GEANY_BUG_REPORT "
http://www.geany.org/Support/Bugs
" Modified: win32-config.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -311,7 +311,7 @@ /* #undef volatile */ /* Version number of package */ -#define VERSION "1.27" +#define VERSION "1.28" #define REVISION "-1" -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 34088f: Drop Waf build system support
by Enrico Tröger
13 Mar '16
13 Mar '16
Branch: refs/heads/master Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sun, 13 Dec 2015 13:36:12 UTC Commit: 34088fbbb8535539e588520756aa418934b80941
https://github.com/geany/geany/commit/34088fbbb8535539e588520756aa418934b80…
Log Message: ----------- Drop Waf build system support See #768. Modified Paths: -------------- .gitignore HACKING Makefile.am doc/geany.txt doc/making-a-release geany.spec.in scripts/wafinit.sh waf wscript Modified: .gitignore 7 lines changed, 0 insertions(+), 7 deletions(-) =================================================================== @@ -10,7 +10,6 @@ deps.mak .deps/ .libs/ -.lock-waf_* Makefile Makefile.in .dirstamp @@ -20,7 +19,6 @@ Makefile.in #----------------------------------------------------------------------- /aclocal.m4 /autom4te.cache -/_build_ /build-aux/ /build-stamp /codenames @@ -48,8 +46,6 @@ Makefile.in /intltool-* /libtool /localwin32.mk -/.lock-wscript -/.lock-wafbuild /ltmain.sh /m4/lt*.m4 /m4/intltool.m4 @@ -63,9 +59,6 @@ Makefile.in /stamp-h.in /*.tar.* /TODO.* -# extracted Waf directory (without dot on Windows) -/.waf-* -/waf-* #----------------------------------------------------------------------- # /po/ Modified: HACKING 9 lines changed, 3 insertions(+), 6 deletions(-) =================================================================== @@ -171,9 +171,9 @@ Geany requires GTK >= 2.24 and GLib >= 2.28. API symbols from newer GTK/GLib versions should be avoided or made optional to keep the source code building on older systems. -It is recommended to use the 2.24 API documentation of the GTK -libs (including GLib, GDK and Pango) has the advantages -that you don't get confused by any newer API additions and you +It is recommended to use the 2.24 API documentation of the GTK +libs (including GLib, GDK and Pango) has the advantages +that you don't get confused by any newer API additions and you don't have to take care about whether you can use them or not. Coding @@ -484,7 +484,6 @@ Adding a source file foo.[hc] in src/ or plugins/ ------------------------------------------------- * Add foo.c, foo.h to SRCS in path/Makefile.am. * Add foo.o to OBJS in path/makefile.win32. -* Add path/foo.c to geany_sources in wscript. * Add path/foo.c to po/POTFILES.in (for string translation). Adding a filetype @@ -548,7 +547,6 @@ When adding a lexer, update: * scintilla/Makefile.am * scintilla/makefile.win32 -* wscript * scintilla/src/Catalogue.cxx - add a LINK_LEXER command *manually* For syntax highlighting, you will need to edit highlighting.c and @@ -637,7 +635,6 @@ Method `````` * Add foo.c to SRCS in Makefile.am. * Add foo.o to OBJS in makefile.win32. -* Add path/foo.c to geany_sources in wscript. * Add Foo to parsers.h * Add TM_PARSER_FOO to tagmanager/src/tm_parser.h. The list here must follow exactly the order in parsers.h. Modified: Makefile.am 2 lines changed, 0 insertions(+), 2 deletions(-) =================================================================== @@ -15,8 +15,6 @@ WIN32_BUILD_FILES = \ EXTRA_DIST = \ autogen.sh \ - wscript \ - waf \ geany.desktop.in \ geany.pc.in \ geany.spec \ Modified: doc/geany.txt 67 lines changed, 1 insertions(+), 66 deletions(-) =================================================================== @@ -132,8 +132,7 @@ of these tools are recommended. Autotools based build system ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The Autotools based build system is very mature and has been well tested. -To use it, you just need the Make tool, preferably GNU Make. +To compile Geany yourself, you just need the Make tool, preferably GNU Make. Then run the following commands:: @@ -148,65 +147,6 @@ Or via sudo:: % sudo make install -Waf based build system -^^^^^^^^^^^^^^^^^^^^^^ - -The Waf build system is still quite young and under heavy development but already in a -usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need -to install Python on your system. -The advantage of the Waf build system over the Autotools based build system is that the whole -build process might be a bit faster. Especially when you use the Waf -cache feature for repetitive builds (e.g. when changing only a few source files -to test something) will become much faster since Waf will cache and re-use the -unchanged built files and only compile the changed code again. See `Waf Cache`_ for details. -To build Geany with Waf as run:: - - $ ./waf configure - $ ./waf build - -Then as root:: - - % ./waf install - -Waf cache -````````` - -The Waf build system has a nice and interesting feature which can help to avoid -a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features -or trying to debug something in Geany. -Waf is able to store and retrieve the object files from a cache. This cache is declared -using the environment variable ``WAFCACHE``. -A possible location of the cache directory could be ``~/.cache/waf``. In order to make use of -this, you first need to create this directory:: - - $ mkdir -p ~/.cache/waf - -then add the environment variable to your shell configuration (the following example is for -Bash and should be adjusted to your used shell):: - - export WAFCACHE=/home/username/.cache/waf - -Remember to replace ``username`` with your actual username. - -More information about the Waf cache feature are available at -http://code.google.com/p/waf/wiki/CacheObjectFiles. - -Cleaning the cache -****************** -You should be careful about the size of the cache directory as it may -grow rapidly over time. -Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it -clean by yourself. -An easy way to keep it clean is to run the following command regularly to remove old -cached files:: - - $ find /home/username/.cache/waf -mtime +14 -exec rm {} \; - -This will delete all files in the cache directory which are older than 14 days. - -For details about the ``find`` command and its options, check its manual page. - - Custom installation ^^^^^^^^^^^^^^^^^^^ The configure script supports several common options, for a detailed @@ -214,11 +154,6 @@ list, type:: $ ./configure --help -or:: - - $ ./waf --help - -(depending on which build system you use). You may also want to read the INSTALL file for advanced installation options. Modified: doc/making-a-release 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -9,7 +9,7 @@ to filter commits by a particular developer name. Ensure version numbers are all updated in: configure.ac geany_private.rc geany.exe.manifest - win32-config.h wscript doc/geany.txt + win32-config.h doc/geany.txt Ensure release date is updated in: NEWS doc/geany.txt doc/geany.1.in Check GEANY_CODENAME is set in src/geany.h. Modified: geany.spec.in 4 lines changed, 0 insertions(+), 4 deletions(-) =================================================================== @@ -62,10 +62,6 @@ Geany plug-ins. You do not need to install this package to use Geany. %prep %setup -q -# remove waf since this isn't needed for the build, we're building the package -# with autotools -rm -f waf -rm -f wscript %build %configure Modified: scripts/wafinit.sh 72 lines changed, 0 insertions(+), 72 deletions(-) =================================================================== @@ -1,72 +0,0 @@ -#! /bin/sh -# -# This script creates a "configure" script and a Makefile to imitate autotools -# but Waf is actually used to build - -WAF="./waf" - -# Makefile -cat > Makefile << EOF - -.PHONY: build configure - -all: build - -build: - @$WAF build - -install: - @if test -n "\$(DESTDIR)"; then \\ - ./waf install --destdir="\$(DESTDIR)"; \\ - else \\ - ./waf install; \\ - fi; - -uninstall: - @if test -n "\$(DESTDIR)"; then \\ - $WAF uninstall --destdir="\$(DESTDIR)"; \\ - else \\ - $WAF uninstall; \\ - fi; - -clean: - @$WAF clean - -distclean: - @$WAF distclean - @-rm -f Makefile - -htmldoc: - @$WAF --htmldoc - -apidoc: - @$WAF --apidoc - -configure: - @$WAF configure - -EOF - -template=" -all: build - -build: - cd .. && $WAF build - -" - -echo "$template" > src/Makefile -echo "$template" > tagmanager/Makefile -echo "$template" > scintilla/Makefile -echo "$template" > plugins/Makefile - - -# configure -cat > configure << EOF -#!/bin/sh - -$WAF configure \$@ - -EOF - -chmod 755 configure Modified: waf 0 lines changed, 0 insertions(+), 0 deletions(-) =================================================================== No diff available, check online Modified: wscript 981 lines changed, 0 insertions(+), 981 deletions(-) =================================================================== @@ -1,981 +0,0 @@ -# -*- coding: utf-8 -*- -# -# WAF build script - this file is part of Geany, a fast and lightweight IDE -# -# Copyright 2008-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> -# Copyright 2008-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -""" -This is a WAF build script (
http://code.google.com/p/waf/
). -It can be used as an alternative build system to autotools -for Geany. It does not (yet) cover all of the autotools tests and -configure options but all important things are working. -"make dist" should be done with autotools, most other targets and -functions should work better (regarding performance and flexibility) -or at least equally. - -Missing features: --enable-binreloc, make targets: dist, pdf (in doc/) -Known issues: Dependency handling is buggy, e.g. if src/document.h is - changed, depending source files are not rebuilt (maybe Waf bug). - -The code of this file itself loosely follows PEP 8 with some exceptions -(line width 100 characters and some other minor things). - -Requires WAF 1.6.1 and Python 2.5 (or later). -""" - - -import sys -import os -import tempfile -from waflib import Logs, Options, Scripting, Utils -from waflib.Build import BuildContext -from waflib.Configure import ConfigurationContext -from waflib.Errors import ConfigurationError, WafError -from waflib.TaskGen import feature, before_method -from waflib.Tools.compiler_c import c_compiler -from waflib.Tools.compiler_cxx import cxx_compiler - - -APPNAME = 'geany' -VERSION = '1.26' -LINGUAS_FILE = os.path.join('po', 'LINGUAS') -MINIMUM_GTK_VERSION = '2.24.0' -MINIMUM_GTK3_VERSION = '3.0.0' -MINIMUM_GLIB_VERSION = '2.28.0' - -GEANY_LIB_VERSION = '0.0.0' - -top = '.' -out = '_build_' - -mio_sources = set(['tagmanager/mio/mio.c']) - -ctags_sources = set([ - 'tagmanager/ctags/abaqus.c', - 'tagmanager/ctags/args.c', - 'tagmanager/ctags/abc.c', - 'tagmanager/ctags/actionscript.c', - 'tagmanager/ctags/asciidoc.c', - 'tagmanager/ctags/asm.c', - 'tagmanager/ctags/basic.c', - 'tagmanager/ctags/c.c', - 'tagmanager/ctags/cobol.c', - 'tagmanager/ctags/conf.c', - 'tagmanager/ctags/css.c', - 'tagmanager/ctags/ctags.c', - 'tagmanager/ctags/diff.c', - 'tagmanager/ctags/docbook.c', - 'tagmanager/ctags/erlang.c', - 'tagmanager/ctags/entry.c', - 'tagmanager/ctags/fortran.c', - 'tagmanager/ctags/get.c', - 'tagmanager/ctags/go.c', - 'tagmanager/ctags/haskell.c', - 'tagmanager/ctags/haxe.c', - 'tagmanager/ctags/html.c', - 'tagmanager/ctags/js.c', - 'tagmanager/ctags/json.c', - 'tagmanager/ctags/keyword.c', - 'tagmanager/ctags/latex.c', - 'tagmanager/ctags/lregex.c', - 'tagmanager/ctags/lua.c', - 'tagmanager/ctags/make.c', - 'tagmanager/ctags/markdown.c', - 'tagmanager/ctags/matlab.c', - 'tagmanager/ctags/nsis.c', - 'tagmanager/ctags/nestlevel.c', - 'tagmanager/ctags/objc.c', - 'tagmanager/ctags/options.c', - 'tagmanager/ctags/parse.c', - 'tagmanager/ctags/pascal.c', - 'tagmanager/ctags/r.c', - 'tagmanager/ctags/perl.c', - 'tagmanager/ctags/php.c', - 'tagmanager/ctags/powershell.c', - 'tagmanager/ctags/python.c', - 'tagmanager/ctags/read.c', - 'tagmanager/ctags/rest.c', - 'tagmanager/ctags/ruby.c', - 'tagmanager/ctags/rust.c', - 'tagmanager/ctags/sh.c', - 'tagmanager/ctags/sort.c', - 'tagmanager/ctags/sql.c', - 'tagmanager/ctags/strlist.c', - 'tagmanager/ctags/txt2tags.c', - 'tagmanager/ctags/tcl.c', - 'tagmanager/ctags/vhdl.c', - 'tagmanager/ctags/verilog.c', - 'tagmanager/ctags/vstring.c']) - -tagmanager_sources = set([ - 'tagmanager/src/tm_source_file.c', - 'tagmanager/src/tm_tag.c', - 'tagmanager/src/tm_workspace.c']) - -scintilla_sources = set(['scintilla/gtk/scintilla-marshal.c']) - -geany_sources = set([ - 'src/about.c', 'src/build.c', 'src/callbacks.c', 'src/dialogs.c', 'src/document.c', - 'src/editor.c', 'src/encodings.c', 'src/filetypes.c', 'src/geanyentryaction.c', - 'src/geanymenubuttonaction.c', 'src/geanyobject.c', 'src/geanywraplabel.c', - 'src/highlighting.c', 'src/keybindings.c', - 'src/keyfile.c', 'src/log.c', 'src/libmain.c', 'src/msgwindow.c', 'src/navqueue.c', 'src/notebook.c', 'src/osx.c', - 'src/plugins.c', 'src/pluginutils.c', 'src/prefix.c', 'src/prefs.c', 'src/printing.c', 'src/project.c', - 'src/sciwrappers.c', 'src/search.c', 'src/socket.c', 'src/spawn.c', 'src/stash.c', - 'src/symbols.c', - 'src/templates.c', 'src/toolbar.c', 'src/tools.c', 'src/sidebar.c', - 'src/ui_utils.c', 'src/utils.c']) - -geany_bin_sources = set(['src/main.c']) - -geany_icons = { - 'hicolor/16x16/apps': ['16x16/classviewer-class.png', - '16x16/classviewer-macro.png', - '16x16/classviewer-member.png', - '16x16/classviewer-method.png', - '16x16/classviewer-namespace.png', - '16x16/classviewer-other.png', - '16x16/classviewer-struct.png', - '16x16/classviewer-var.png', - '16x16/geany.png'], - 'hicolor/16x16/actions': ['16x16/geany-build.png', - '16x16/geany-close-all.png', - '16x16/geany-save-all.png'], - 'hicolor/24x24/actions': ['24x24/geany-build.png', - '24x24/geany-close-all.png', - '24x24/geany-save-all.png'], - 'hicolor/32x32/actions': ['32x32/geany-build.png', - '32x32/geany-close-all.png', - '32x32/geany-save-all.png'], - 'hicolor/32x32/apps': ['32x32/geany.png'], - 'hicolor/48x48/actions': ['48x48/geany-build.png', - '48x48/geany-close-all.png', - '48x48/geany-save-all.png'], - 'hicolor/48x48/apps': ['48x48/geany.png'], - 'hicolor/scalable/apps': ['scalable/geany.svg'], - 'hicolor/scalable/actions': ['scalable/geany-build.svg', - 'scalable/geany-close-all.svg', - 'scalable/geany-save-all.svg'], - 'Tango/16x16/actions': ['tango/16x16/geany-save-all.png'], - 'Tango/24x24/actions': ['tango/24x24/geany-save-all.png'], - 'Tango/32x32/actions': ['tango/32x32/geany-save-all.png'], - 'Tango/48x48/actions': ['tango/48x48/geany-save-all.png'], - 'Tango/scalable/actions': ['tango/scalable/geany-save-all.svg'] -} -geany_icons_indexes = { - 'hicolor': ['index.theme'], - 'Tango': ['tango/index.theme'] -} - - -def configure(conf): - - conf.check_waf_version(mini='1.6.1') - - conf.load('compiler_c') - _check_c99(conf) - is_win32 = _target_is_win32(conf) - - visibility_hidden_supported = conf.check_cc(cflags=['-Werror', '-fvisibility=hidden'], mandatory=False) - conf.check_cc(header_name='fcntl.h', mandatory=False) - conf.check_cc(header_name='fnmatch.h', mandatory=False) - conf.check_cc(header_name='glob.h', mandatory=False) - conf.check_cc(header_name='sys/time.h', mandatory=False) - conf.check_cc(header_name='sys/types.h', mandatory=False) - conf.check_cc(header_name='sys/stat.h', mandatory=False) - conf.define('HAVE_STDLIB_H', 1) # are there systems without stdlib.h? - conf.define('STDC_HEADERS', 1) # an optimistic guess ;-) - _add_to_env_and_define(conf, 'HAVE_REGCOMP', 1) # needed for CTags - - conf.check_cc(function_name='fgetpos', header_name='stdio.h', mandatory=False) - conf.check_cc(function_name='fnmatch', header_name='fnmatch.h', mandatory=False) - conf.check_cc(function_name='ftruncate', header_name='unistd.h', mandatory=False) - conf.check_cc(function_name='mkstemp', header_name='stdlib.h', mandatory=False) - conf.check_cc(function_name='strstr', header_name='string.h') - - conf.check_cc(function_name='pow', header_name='math.h', lib='m', uselib_store='M') - - # check sunOS socket support - if Options.platform == 'sunos': - conf.check_cc(function_name='socket', lib='socket', - header_name='sys/socket.h', uselib_store='SUNOS_SOCKET', mandatory=True) - - # check for cxx after the header and function checks have been done to ensure they are - # checked with cc not cxx - conf.load('compiler_cxx') - if is_win32: - conf.load('winres') - _load_intltool_if_available(conf) - - # GTK / GIO version check - gtk_package_name = 'gtk+-3.0' if conf.options.use_gtk3 else 'gtk+-2.0' - minimum_gtk_version = MINIMUM_GTK3_VERSION if conf.options.use_gtk3 else MINIMUM_GTK_VERSION - conf.check_cfg(package=gtk_package_name, atleast_version=minimum_gtk_version, uselib_store='GTK', - mandatory=True, args='--cflags --libs') - conf.check_cfg(package='glib-2.0', atleast_version=MINIMUM_GLIB_VERSION, uselib_store='GLIB', - mandatory=True, args='--cflags --libs') - conf.check_cfg(package='gmodule-2.0', uselib_store='GMODULE', - mandatory=True, args='--cflags --libs') - conf.check_cfg(package='gio-2.0', uselib_store='GIO', args='--cflags --libs', mandatory=True) - gtk_version = conf.check_cfg(modversion=gtk_package_name, uselib_store='GTK') or 'Unknown' - conf.check_cfg(package='gthread-2.0', uselib_store='GTHREAD', args='--cflags --libs') - if conf.options.enable_mac_integration: - pkgname = 'gtk-mac-integration-gtk3' if conf.options.use_gtk3 else 'gtk-mac-integration-gtk2' - conf.check_cfg(package=pkgname, uselib_store='MAC_INTEGRATION', - mandatory=True, args='--cflags --libs') - # remember GTK version for the build step - conf.env['gtk_package_name'] = gtk_package_name - conf.env['gtk_version'] = gtk_version - conf.env['minimum_gtk_version'] = minimum_gtk_version - conf.env['use_gtk3'] = conf.options.use_gtk3 - - revision = _get_git_rev(conf) - - # rst2html for the HTML manual - if not conf.options.no_html_doc and revision is not None: - try: - conf.env['RST2HTML'] = _find_rst2html(conf) - except WafError: - error_msg = '''Documentation enabled but rst2html not found. -You can explicitly disable building of the HTML manual with --disable-html-docs, -but you then may not have a local copy of the HTML manual.''' - raise WafError(error_msg) - - # Windows specials - if is_win32: - if conf.env['PREFIX'].lower() == tempfile.gettempdir().lower(): - # overwrite default prefix on Windows (tempfile.gettempdir() is the Waf default) - new_prefix = os.path.join(str(conf.root), '%s-%s' % (APPNAME, VERSION)) - _add_to_env_and_define(conf, 'PREFIX', new_prefix, quote=True) - _add_to_env_and_define(conf, 'BINDIR', os.path.join(new_prefix, 'bin'), quote=True) - _add_to_env_and_define(conf, 'DOCDIR', os.path.join(conf.env['PREFIX'], 'doc'), quote=True) - _add_to_env_and_define(conf, 'LIBDIR', '%s/lib' % conf.env['PREFIX'], quote=True) - conf.define('LOCALEDIR', os.path.join('share' 'locale'), quote=True) - # overwrite LOCALEDIR to install message catalogues properly - conf.env['LOCALEDIR'] = os.path.join(conf.env['PREFIX'], 'share', 'locale') - # DATADIR is defined in objidl.h, so we remove it from config.h but keep it in env - conf.undefine('DATADIR') - conf.env['DATADIR'] = os.path.join(conf.env['PREFIX'], 'data') - conf.env.append_value('LINKFLAGS_cprogram', [ - '-mwindows', - '-static-libgcc', - '-static-libstdc++']) - conf.env.append_value('LIB_WIN32', ['wsock32', 'uuid', 'ole32', 'comdlg32']) - else: - conf.env['cshlib_PATTERN'] = '%s.so' - # DATADIR and LOCALEDIR are defined by the intltool tool - # but they are not added to the environment, so we need to - _add_define_to_env(conf, 'DATADIR') - _add_define_to_env(conf, 'LOCALEDIR') - docdir = os.path.join(conf.env['DATADIR'], 'doc', 'geany') - libdir = os.path.join(conf.env['PREFIX'], 'lib') - mandir = os.path.join(conf.env['DATADIR'], 'man') - _define_from_opt(conf, 'DOCDIR', conf.options.docdir, docdir) - _define_from_opt(conf, 'LIBDIR', conf.options.libdir, libdir) - _define_from_opt(conf, 'MANDIR', conf.options.mandir, mandir) - - conf.define('ENABLE_NLS', 1) - conf.define('GEANY_LOCALEDIR', '' if is_win32 else conf.env['LOCALEDIR'], quote=True) - conf.define('GEANY_DATADIR', 'data' if is_win32 else conf.env['DATADIR'], quote=True) - conf.define('GEANY_DOCDIR', conf.env['DOCDIR'], quote=True) - conf.define('GEANY_LIBDIR', '' if is_win32 else conf.env['LIBDIR'], quote=True) - conf.define('GEANY_PREFIX', '' if is_win32 else conf.env['PREFIX'], quote=True) - conf.define('PACKAGE', APPNAME, quote=True) - conf.define('VERSION', VERSION, quote=True) - conf.define('REVISION', revision or '-1', quote=True) - - conf.define('GETTEXT_PACKAGE', APPNAME, quote=True) - - # no VTE on Windows - if is_win32: - conf.options.no_vte = True - - _define_from_opt(conf, 'HAVE_PLUGINS', not conf.options.no_plugins, None) - _define_from_opt(conf, 'HAVE_SOCKET', not conf.options.no_socket, None) - _define_from_opt(conf, 'HAVE_VTE', not conf.options.no_vte, None) - - conf.write_config_header('config.h', remove=False) - - # GEANY_EXPORT_SYMBOL and GEANY_API_SYMBOL - if is_win32: - geanyexport_cflags = [] - geanyexport_defines = ['GEANY_EXPORT_SYMBOL=__declspec(dllexport)'] - elif visibility_hidden_supported: - geanyexport_cflags = ['-fvisibility=hidden'] - geanyexport_defines = ['GEANY_EXPORT_SYMBOL=__attribute__((visibility("default")))'] - else: # unknown, define to nothing - geanyexport_cflags = [] - geanyexport_defines = ['GEANY_EXPORT_SYMBOL='] - geanyexport_defines.append('GEANY_API_SYMBOL=GEANY_EXPORT_SYMBOL') - conf.env['DEFINES_geanyexport'] = geanyexport_defines - conf.env['CFLAGS_geanyexport'] = geanyexport_cflags - conf.env['CXXFLAGS_geanyexport'] = geanyexport_cflags - - # some more compiler flags - conf.env.append_value('CFLAGS', ['-DHAVE_CONFIG_H']) - if conf.env['CC_NAME'] == 'gcc' and '-O' not in ''.join(conf.env['CFLAGS']): - conf.env.append_value('CFLAGS', ['-O2']) - if revision is not None: - conf.env.append_value('CFLAGS', ['-g', '-DGEANY_DEBUG']) - # Scintilla flags - conf.env.append_value('CFLAGS', ['-DGTK']) - conf.env.append_value('CXXFLAGS', - ['-DNDEBUG', '-DGTK', '-DSCI_LEXER', '-DG_THREADS_IMPL_NONE']) - if conf.env['CXX_NAME'] == 'gcc' and '-O' not in ''.join(conf.env['CXXFLAGS']): - conf.env.append_value('CXXFLAGS', ['-O2']) - if revision is not None: - conf.env.append_value('CXXFLAGS', ['-g']) - - # summary - Logs.pprint('BLUE', 'Summary:') - conf.msg('Install Geany ' + VERSION + ' in', conf.env['PREFIX']) - conf.msg('Using GTK version', gtk_version) - conf.msg('Build with plugin support', conf.options.no_plugins and 'no' or 'yes') - conf.msg('Use virtual terminal support', conf.options.no_vte and 'no' or 'yes') - if revision is not None: - conf.msg('Compiling Git revision', revision) - # deprecation warning - _show_deprecation_warning(conf) - - -def _show_deprecation_warning(ctx): - Logs.pprint( - 'RED', - 'The Waf build system is deprecated and will be removed in the removed in Geany 1.27. ' - 'Please use the Autotools build system.') - - -def options(opt): - # Disable MSVC detection on win32: building Geany with MSVC is currently not supported - # If anyone wants to add support for building with MSVC, this hack should be removed. - c_compiler['win32'] = ['gcc'] - cxx_compiler['win32'] = ['g++'] - - opt.load('compiler_cc') - opt.load('compiler_cxx') - opt.load('intltool') - - # Option - opt.add_option('--no-scm', action='store_true', default=False, - help='Disable SCM detection [default: No]', dest='no_scm') - # Features - opt.add_option('--disable-plugins', action='store_true', default=False, - help='compile without plugin support [default: No]', dest='no_plugins') - opt.add_option('--disable-socket', action='store_true', default=False, - help='compile without support to detect a running instance [[default: No]', - dest='no_socket') - opt.add_option('--disable-vte', action='store_true', default=False, - help='compile without support for an embedded virtual terminal [[default: No]', - dest='no_vte') - opt.add_option('--enable-gtk3', action='store_true', default=False, - help='compile with GTK3 support (experimental) [[default: No]', - dest='use_gtk3') - opt.add_option('--enable-mac-integration', action='store_true', default=False, - help='use gtk-mac-integration to enable improved OS X integration [[default: No]', - dest='enable_mac_integration') - opt.add_option('--disable-html-docs', action='store_true', default=False, - help='do not generate HTML documentation using rst2html [[default: No]', - dest='no_html_doc') - # Paths - opt.add_option('--mandir', type='string', default='', - help='man documentation', dest='mandir') - opt.add_option('--docdir', type='string', default='', - help='documentation root', dest='docdir') - opt.add_option('--libdir', type='string', default='', - help='object code libraries', dest='libdir') - - -def build(bld): - is_win32 = _target_is_win32(bld) - bld.add_post_fun(_show_deprecation_warning) - - if bld.cmd == 'clean': - _remove_linguas_file() - if bld.cmd in ('install', 'uninstall'): - bld.add_post_fun(_post_install) - - def build_plugin(plugin_name, install=True, uselib_add=[]): - if install: - instpath = '${LIBDIR}/geany' - else: - instpath = None - - bld( - features = ['c', 'cshlib'], - source = 'plugins/%s.c' % plugin_name, - includes = ['.', 'src/', 'scintilla/include', 'tagmanager/src'], - defines = 'G_LOG_DOMAIN="%s"' % plugin_name, - target = plugin_name, - uselib = ['GTK', 'GLIB', 'GMODULE', 'C99'] + uselib_add, - use = ['geany'], - install_path = instpath) - - # CTags - bld.objects( - features = ['c'], - source = ctags_sources, - name = 'ctags', - target = 'ctags', - includes = ['.', 'tagmanager', 'tagmanager/ctags'], - defines = 'G_LOG_DOMAIN="CTags"', - uselib = ['cshlib', 'GLIB', 'geanyexport', 'C99']) - - # Tagmanager - bld.objects( - features = ['c'], - source = tagmanager_sources, - name = 'tagmanager', - target = 'tagmanager', - includes = ['.', 'tagmanager', 'tagmanager/ctags'], - defines = ['GEANY_PRIVATE', 'G_LOG_DOMAIN="Tagmanager"'], - uselib = ['cshlib', 'GTK', 'GLIB', 'geanyexport', 'C99']) - - # MIO - bld.objects( - features = ['c'], - source = mio_sources, - name = 'mio', - target = 'mio', - includes = ['.', 'tagmanager/mio/'], - defines = 'G_LOG_DOMAIN="MIO"', - uselib = ['cshlib', 'GTK', 'GLIB', 'geanyexport']) - - # Scintilla - files = bld.srcnode.ant_glob('scintilla/**/*.cxx', src=True, dir=False) - scintilla_sources.update([file.path_from(bld.srcnode) for file in files]) - bld.objects( - features = ['c', 'cxx'], - name = 'scintilla', - target = 'scintilla', - source = scintilla_sources, - includes = ['.', 'scintilla/include', 'scintilla/src', 'scintilla/lexlib'], - uselib = ['cshlib', 'cxxshlib', 'GTK', 'GLIB', 'GMODULE', 'M', 'geanyexport']) - - # Geany - if bld.env['HAVE_VTE'] == 1: - geany_sources.add('src/vte.c') - if is_win32: - geany_sources.add('src/win32.c') - geany_bin_sources.add('geany_private.rc') - - def gen_signallist(task): - from xml.etree import ElementTree - - def find_handlers(xml_filename): - tree = ElementTree.parse(xml_filename) - signals = tree.getroot().findall(".//signal") - return [sig.attrib["handler"] for sig in signals] - - handlers = [] - for node in task.inputs: - handlers += find_handlers(node.abspath()) - handlers = sorted(set(handlers)) - - for node in task.outputs: - node.write("/* This file is auto-generated, do not edit. */\n" + - ''.join(["ITEM(%s)\n" % h for h in handlers])) - - # signallist.i - bld( - source = 'data/geany.glade', - target = bld.path.get_bld().make_node('src/signallist.i'), - name = 'signallist.i', - rule = gen_signallist) - - base_uselibs = ['GTK', 'GLIB', 'GMODULE', 'GIO', 'GTHREAD', 'WIN32', 'MAC_INTEGRATION', 'SUNOS_SOCKET', 'M', 'C99'] - - # libgeany - bld.shlib( - features = ['c', 'cxx'], - name = 'geany', - target = 'geany', - source = geany_sources, - includes = ['.', 'scintilla/include', 'tagmanager/src', 'src'], - defines = ['G_LOG_DOMAIN="Geany"', 'GEANY_PRIVATE'], - uselib = base_uselibs + ['geanyexport'], - use = ['scintilla', 'ctags', 'tagmanager', 'mio'], - linkflags = bld.env['LINKFLAGS_cprogram'], - vnum = GEANY_LIB_VERSION, - install_path = '${PREFIX}/bin' if is_win32 else '${LIBDIR}') - - # geany executable - t = bld.program( - features = ['c', 'cxx'], - name = 'geany_bin', - target = 'geany', - source = geany_bin_sources, - includes = ['.', 'scintilla/include', 'tagmanager/src'], - defines = ['G_LOG_DOMAIN="Geany"', 'GEANY_PRIVATE'], - uselib = base_uselibs + ['geanyexport'], - use = ['geany']) - if not is_win32: - #
http://www.freehackers.org/~tnagy/testdoc/single.html#common_c
- t.rpath = bld.env['LIBDIR'] - - # Plugins - if bld.env['HAVE_PLUGINS'] == 1: - build_plugin('classbuilder') - build_plugin('demoplugin', False) - build_plugin('export', uselib_add=['M']) - build_plugin('filebrowser') - build_plugin('htmlchars') - build_plugin('saveactions') - build_plugin('splitwindow') - - # Translations - if bld.env['INTLTOOL']: - bld( - features = ['linguas', 'intltool_po'], - podir = 'po', - install_path = '${LOCALEDIR}', - appname = 'geany') - - # HTML documentation (build if it is not part of the tree already, as it is required for install) - html_doc_filename = os.path.join(bld.out_dir, 'doc', 'geany.html') - if bld.env['RST2HTML']: - rst2html = bld.env['RST2HTML'] - bld( - source = ['doc/geany.txt'], - deps = ['doc/geany.css'], - target = bld.path.get_bld().make_node('doc/geany.html'), - name = 'geany.html', - cwd = os.path.join(bld.path.abspath(), 'doc'), - rule = '%s -stg --stylesheet=geany.css geany.txt %s' % (rst2html, html_doc_filename)) - - # geany.pc - if is_win32: - # replace backward slashes by forward slashes as they could be interepreted as escape - # characters - geany_pc_prefix = bld.env['PREFIX'].replace('\\', '/') - else: - geany_pc_prefix = bld.env['PREFIX'] - bld( - source = 'geany.pc.in', - dct = {'VERSION': VERSION, - 'DEPENDENCIES': '%s >= %s glib-2.0 >= %s' % \ - (bld.env['gtk_package_name'], - bld.env['minimum_gtk_version'], - MINIMUM_GLIB_VERSION), - 'prefix': geany_pc_prefix, - 'exec_prefix': '${prefix}', - 'libdir': '${exec_prefix}/lib', - 'includedir': '${prefix}/include', - 'datarootdir': '${prefix}/share', - 'datadir': '${datarootdir}', - 'localedir': '${datarootdir}/locale'}) - - # geany.nsi - bld( - features = 'subst', - source = 'geany.nsi.in', - target = 'geany.nsi', - dct = {'VERSION': VERSION, - 'GTK_VERSION': bld.env['gtk_version']}, - install_path = None) - - if not is_win32: - # geany.desktop - if bld.env['INTLTOOL']: - bld( - features = 'intltool_in', - source = 'geany.desktop.in', - flags = ['-d', '-q', '-u', '-c'], - install_path = '${DATADIR}/applications') - - # geany.1 - bld( - features = 'subst', - source = 'doc/geany.1.in', - target = 'geany.1', - dct = {'VERSION': VERSION, - 'GEANY_DATA_DIR': bld.env['DATADIR'] + '/geany'}, - install_path = '${MANDIR}/man1') - - # geany.spec - bld( - features = 'subst', - source = 'geany.spec.in', - target = 'geany.spec', - install_path = None, - dct = {'VERSION': VERSION}) - - # Doxyfile - bld( - features = 'subst', - source = 'doc/Doxyfile.in', - target = 'doc/Doxyfile', - install_path = None, - dct = {'VERSION': VERSION, - 'top_builddir': bld.out_dir, - 'top_srcdir': bld.top_dir,}) - - # disable build/install phase interleaving - bld.add_group() - - ### - # Install files - ### - # Headers - bld.install_files('${PREFIX}/include/geany', ''' - src/app.h - src/build.h - src/dialogs.h - src/document.h - src/editor.h - src/encodings.h - src/filetypes.h - src/geany.h - src/highlighting.h - src/keybindings.h - src/main.h - src/msgwindow.h - src/navqueue.h - src/plugindata.h - src/pluginutils.h - src/prefs.h - src/project.h - src/sciwrappers.h - src/search.h - src/spawn.h - src/stash.h - src/support.h - src/symbols.h - src/templates.h - src/toolbar.h - src/ui_utils.h - src/utils.h - src/gtkcompat.h - plugins/geanyplugin.h - plugins/geanyfunctions.h - ''') - bld.install_files('${PREFIX}/include/geany/scintilla', ''' - scintilla/include/SciLexer.h scintilla/include/Scintilla.h - scintilla/include/Scintilla.iface scintilla/include/ScintillaWidget.h - scintilla/include/Sci_Position.h ''') - bld.install_files('${PREFIX}/include/geany/tagmanager', ''' - tagmanager/src/tm_source_file.h - tagmanager/src/tm_tag.h - tagmanager/src/tm_tagmanager.h - tagmanager/src/tm_workspace.h ''') - # Docs - base_dir = '${PREFIX}' if is_win32 else '${DOCDIR}' - ext = '.txt' if is_win32 else '' - for filename in 'AUTHORS ChangeLog COPYING README NEWS THANKS TODO'.split(): - basename = _uc_first(filename, bld) - destination_filename = '%s%s' % (basename, ext) - destination = os.path.join(base_dir, destination_filename) - bld.install_as(destination, filename) - - # install HTML documentation only if it exists, i.e. it was built before - # local_html_doc_filename supports installing HTML doc from in-tree geany.html if it exists - local_html_doc_filename = os.path.join(bld.path.abspath(), 'doc', 'geany.html') - if os.path.exists(html_doc_filename) or os.path.exists(local_html_doc_filename): - html_dir = '' if is_win32 else 'html/' - html_name = 'Manual.html' if is_win32 else 'index.html' - start_dir = bld.path.find_dir('doc/images') - bld.install_files('${DOCDIR}/%simages' % html_dir, start_dir.ant_glob('*.png'), cwd=start_dir) - bld.install_as('${DOCDIR}/%s%s' % (html_dir, html_name), 'doc/geany.html') - - bld.install_as('${DOCDIR}/%s' % _uc_first('manual.txt', bld), 'doc/geany.txt') - bld.install_as('${DOCDIR}/ScintillaLicense.txt', 'scintilla/License.txt') - if is_win32: - bld.install_as('${DOCDIR}/ReadMe.I18n.txt', 'README.I18N') - bld.install_as('${DOCDIR}/Hacking.txt', 'HACKING') - # Data - data_dir = '' if is_win32 else 'geany' - start_dir = bld.path.find_dir('data') - bld.install_as('${DATADIR}/%s/GPL-2' % data_dir, 'COPYING') - bld.install_files('${DATADIR}/%s' % data_dir, start_dir.ant_glob('filetype*'), cwd=start_dir) - bld.install_files('${DATADIR}/%s' % data_dir, start_dir.ant_glob('*.tags'), cwd=start_dir) - bld.install_files('${DATADIR}/%s' % data_dir, 'data/geany.glade') - bld.install_files('${DATADIR}/%s' % data_dir, 'data/snippets.conf') - bld.install_files('${DATADIR}/%s' % data_dir, 'data/ui_toolbar.xml') - if bld.env['use_gtk3']: - bld.install_files('${DATADIR}/%s' % data_dir, 'data/geany.css') - else: - bld.install_files('${DATADIR}/%s' % data_dir, 'data/geany.gtkrc') - - start_dir = bld.path.find_dir('data/colorschemes') - template_dest = '${DATADIR}/%s/colorschemes' % data_dir - bld.install_files(template_dest, start_dir.ant_glob('*'), cwd=start_dir) - start_dir = bld.path.find_dir('data/templates') - template_dest = '${DATADIR}/%s/templates' % data_dir - bld.install_files(template_dest, start_dir.ant_glob('**/*'), cwd=start_dir, relative_trick=True) - # Icons - for dest, srcs in geany_icons.items(): - dest_dir = os.path.join('${PREFIX}/share/icons' if is_win32 else '${DATADIR}/icons', dest) - bld.install_files(dest_dir, srcs, cwd=bld.path.find_dir('icons')) - # install theme indexes on Windows - if is_win32: - for dest, srcs in geany_icons_indexes.items(): - bld.install_files(os.path.join('${PREFIX}/share/icons', dest), srcs, cwd=bld.path.find_dir('icons')) - - -def distclean(ctx): - Scripting.distclean(ctx) - _remove_linguas_file() - - -def _remove_linguas_file(): - # remove LINGUAS file as well - try: - os.unlink(LINGUAS_FILE) - except OSError: - pass - - -@feature('linguas') -@before_method('apply_intltool_po') -def write_linguas_file(self): - if os.path.exists(LINGUAS_FILE): - return - linguas = '' - if 'LINGUAS' in self.env: - files = self.env['LINGUAS'] - for po_filename in files.split(' '): - if os.path.exists('po/%s.po' % po_filename): - linguas += '%s ' % po_filename - else: - files = os.listdir('%s/po' % self.path.abspath()) - files.sort() - for filename in files: - if filename.endswith('.po'): - linguas += '%s ' % filename[:-3] - file_h = open(LINGUAS_FILE, 'w') - file_h.write('# This file is autogenerated. Do not edit.\n%s\n' % linguas) - file_h.close() - - -def _post_install(ctx): - is_win32 = _target_is_win32(ctx) - if is_win32: - return - for d in 'hicolor', 'Tango': - theme_dir = Utils.subst_vars('${DATADIR}/icons/' + d, ctx.env) - icon_cache_updated = False - if not ctx.options.destdir: - ctx.exec_command('gtk-update-icon-cache -q -f -t %s' % theme_dir) - Logs.pprint('GREEN', 'GTK icon cache updated.') - icon_cache_updated = True - if not icon_cache_updated: - Logs.pprint('YELLOW', 'Icon cache not updated. After install, run this:') - Logs.pprint('YELLOW', 'gtk-update-icon-cache -q -f -t %s' % theme_dir) - - -def updatepo(ctx): - """update the message catalogs for internationalization""" - potfile = '%s.pot' % APPNAME - os.chdir('%s/po' % top) - try: - try: - old_size = os.stat(potfile).st_size - except OSError: - old_size = 0 - ctx.exec_command('intltool-update --pot -g %s' % APPNAME) - size_new = os.stat(potfile).st_size - if size_new != old_size: - Logs.pprint('CYAN', 'Updated POT file.') - Logs.pprint('CYAN', 'Updating translations') - ret = ctx.exec_command('intltool-update -r -g %s' % APPNAME) - if ret != 0: - Logs.pprint('RED', 'Updating translations failed') - else: - Logs.pprint('CYAN', 'POT file is up to date.') - except OSError: - Logs.pprint('RED', 'Failed to generate pot file.') - - -def apidoc(ctx): - """generate API reference documentation""" - ctx = BuildContext() # create our own context to have ctx.top_dir - basedir = ctx.top_dir - doxygen = _find_program(ctx, 'doxygen') - doxyfile = '%s/doc/Doxyfile' % ctx.out_dir - Logs.pprint('CYAN', 'Generating API documentation') - ret = ctx.exec_command('%s %s' % (doxygen, doxyfile)) - if ret != 0: - raise WafError('Generating API documentation failed') - - -def hackingdoc(ctx): - """generate HACKING documentation""" - ctx = BuildContext() # create our own context to have ctx.top_dir - Logs.pprint('CYAN', 'Generating HACKING documentation') - cmd = _find_rst2html(ctx) - hacking_file = os.path.join(ctx.top_dir, 'HACKING') - hacking_html_file = os.path.join(ctx.top_dir, 'doc', 'hacking.html') - stylesheet = os.path.join(ctx.top_dir, 'doc', 'geany.css') - ret = ctx.exec_command('%s -stg --stylesheet=%s %s %s' % ( - cmd, stylesheet, hacking_file, hacking_html_file)) - if ret != 0: - raise WafError('Generating HACKING documentation failed') - - -def _find_program(ctx, cmd, **kw): - def noop(*args): - pass - - if ctx is None or not isinstance(ctx, ConfigurationContext): - ctx = ConfigurationContext() - ctx.to_log = noop - ctx.msg = noop - return ctx.find_program(cmd, **kw) - - -def _find_rst2html(ctx): - cmds = ['rst2html', 'rst2html2'] - for command in cmds: - cmd = _find_program(ctx, command, mandatory=False, exts=',.py') - if cmd: - break - if not cmd: - raise WafError( - 'rst2html.py could not be found. Please install the Python docutils package.') - return cmd - - -def _add_define_to_env(conf, key): - value = conf.get_define(key) - # strip quotes - value = value.replace('"', '') - conf.env[key] = value - - -def _add_to_env_and_define(conf, key, value, quote=False): - conf.define(key, value, quote) - conf.env[key] = value - - -def _define_from_opt(conf, define_name, opt_value, default_value, quote=1): - value = default_value - if opt_value: - if isinstance(opt_value, bool): - opt_value = 1 - value = opt_value - - if value is not None: - _add_to_env_and_define(conf, define_name, value, quote) - else: - conf.undefine(define_name) - - -def _get_git_rev(conf): - if conf.options.no_scm: - return - - if not os.path.isdir('.git'): - return - - try: - cmd = 'git rev-parse --short --revs-only HEAD' - revision = conf.cmd_and_log(cmd).strip() - except WafError: - return None - else: - return revision - - -def _load_intltool_if_available(conf): - try: - conf.load('intltool') - if 'LINGUAS' in os.environ: - conf.env['LINGUAS'] = os.environ['LINGUAS'] - except WafError: - # on Windows, we don't hard depend on intltool, on all other platforms raise an error - if not _target_is_win32(conf): - raise - - -def _target_is_win32(ctx): - if 'is_win32' in ctx.env: - # cached - return ctx.env['is_win32'] - is_win32 = None - if sys.platform == 'win32': - is_win32 = True - if is_win32 is None: - if ctx.env and 'CC' in ctx.env: - env_cc = ctx.env['CC'] - if not isinstance(env_cc, str): - env_cc = ''.join(env_cc) - is_win32 = (env_cc.find('mingw') != -1) - if is_win32 is None: - is_win32 = False - # cache for future checks - ctx.env['is_win32'] = is_win32 - return is_win32 - - -def _uc_first(string, ctx): - if _target_is_win32(ctx): - return string.title() - return string - - -# Copied from Geany-Plugins -def _check_c99(conf): - # FIXME: improve some checks? - # TODO: look at Autoconf's C99 checks? - fragment = ''' - // single-line comments - - #include <stdbool.h> - - struct s { int a, b; }; - - // inlines - static inline void fun_inline(struct s param) {} - - int main(void) { - _Bool b = false; - - // variable declaration in for body - for (int i = 0; i < 2; i++); - - // compound literals - fun_inline((struct s) { 1, 2 }); - - // mixed declarations and code - int mixed = 0; - - // named initializers - struct s name_inited = { - .a = 42, - .b = 64 - }; - - return (b || mixed || ! name_inited.a); - } - ''' - - exc = None - # list of flags is stolen from Autoconf 2.69 - flags = ['', '-std=gnu99', '-std=c99', '-c99', '-AC99', - '-D_STDC_C99=', '-qlanglvl=extc99'] - for flag in flags: - try: - desc = ['with flag %s' % flag, 'with no flags'][not flag] - conf.check_cc(fragment=fragment, uselib_store='C99', cflags=flag, - msg="Checking for C99 support (%s)" % desc) - exc = None - break - except ConfigurationError as e: - exc = e - if exc: - raise exc - return True -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 40e15c: Set release date
by Colomban Wendling
13 Mar '16
13 Mar '16
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 13 Mar 2016 12:27:54 UTC Commit: 40e15c388bc835fd4aa548d4b07f4314aec08b3d
https://github.com/geany/geany/commit/40e15c388bc835fd4aa548d4b07f4314aec08…
Log Message: ----------- Set release date Modified Paths: -------------- NEWS doc/geany.1.in doc/geany.txt Modified: NEWS 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1,4 +1,4 @@ -Geany 1.27 (unreleased) +Geany 1.27 (March 13, 2016) General * Remove Waf build system (PR#769). Modified: doc/geany.1.in 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1,4 +1,4 @@ -.TH "GEANY" "1" "November 15, 2015" "geany @VERSION@" "" +.TH "GEANY" "1" "March 13, 2016" "geany @VERSION@" "" .SH "NAME" Geany \(em a small and lightweight IDE .SH "SYNOPSIS" Modified: doc/geany.txt 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -14,7 +14,7 @@ Frank Lanitz, Colomban Wendling, Matthew Brush -:Date: 2015-11-15 +:Date: 2016-03-13 :Version: |(version)| Copyright © 2005-2016 -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 3c213f: Update displayed copyright years
by Colomban Wendling
13 Mar '16
13 Mar '16
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 13 Mar 2016 12:27:28 UTC Commit: 3c213f6d9347caf365f1ac446e63391512e6249d
https://github.com/geany/geany/commit/3c213f6d9347caf365f1ac446e63391512e62…
Log Message: ----------- Update displayed copyright years Modified Paths: -------------- doc/geany.txt geany_private.rc src/about.c Modified: doc/geany.txt 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -17,7 +17,7 @@ :Date: 2015-11-15 :Version: |(version)| -Copyright © 2005-2015 +Copyright © 2005-2016 This document is distributed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 Modified: geany_private.rc 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -22,7 +22,7 @@ FILETYPE VFT_APP VALUE "FileVersion", VER_FILEVERSION_STR VALUE "FileDescription", "Geany" VALUE "InternalName", "Geany" - VALUE "LegalCopyright", "Copyright 2005-2014 by the Geany developers" + VALUE "LegalCopyright", "Copyright 2005-2016 by the Geany developers" VALUE "LegalTrademarks", "" VALUE "OriginalFilename", "Geany.exe" VALUE "ProductName", "Geany" Modified: src/about.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -45,7 +45,7 @@ #define INFO "<span size=\"larger\" weight=\"bold\">%s</span>" #define CODENAME "<span weight=\"bold\">\"" GEANY_CODENAME "\"</span>" #define BUILDDATE "<span size=\"smaller\">%s</span>" -#define COPYRIGHT _("Copyright (c) 2005-2015\nColomban Wendling\nNick Treleaven\nMatthew Brush\nEnrico Tröger\nFrank Lanitz\nAll rights reserved.") +#define COPYRIGHT _("Copyright (c) 2005-2016\nColomban Wendling\nNick Treleaven\nMatthew Brush\nEnrico Tröger\nFrank Lanitz\nAll rights reserved.") static const gchar *translators[][2] = { { "ar", "Fayssal Chamekh <chamfay(a)gmail.com>"}, -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 2df951: Update NEWS for last changes
by Colomban Wendling
13 Mar '16
13 Mar '16
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 13 Mar 2016 12:27:28 UTC Commit: 2df9512b6ff18c34fd7491b933dcbb95b099001d
https://github.com/geany/geany/commit/2df9512b6ff18c34fd7491b933dcbb95b0990…
Log Message: ----------- Update NEWS for last changes Modified Paths: -------------- NEWS Modified: NEWS 3 lines changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -57,6 +57,9 @@ Geany 1.27 (unreleased) legacy counterparts `scintilla_send_message()`, `scintilla_get_type()` and `scintilla_new()` (Thomas Martitz, PR#874). + Windows + * Project->Open Font now respects the native dialog setting (PR#961). + Geany 1.26 (November 15, 2015) -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 214365: Merge pull request #769 from eht16/drop_waf_build_system
by Colomban Wendling
13 Mar '16
13 Mar '16
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 13 Mar 2016 12:15:43 UTC Commit: 214365777d4f56aa2adf1ea353a87a6a2161f73e
https://github.com/geany/geany/commit/214365777d4f56aa2adf1ea353a87a6a2161f…
Log Message: ----------- Merge pull request #769 from eht16/drop_waf_build_system Drop Waf build system support Modified Paths: -------------- .gitignore HACKING Makefile.am NEWS doc/geany.txt doc/making-a-release geany.spec.in scripts/wafinit.sh waf wscript Modified: .gitignore 7 lines changed, 0 insertions(+), 7 deletions(-) =================================================================== @@ -10,7 +10,6 @@ deps.mak .deps/ .libs/ -.lock-waf_* Makefile Makefile.in .dirstamp @@ -20,7 +19,6 @@ Makefile.in #----------------------------------------------------------------------- /aclocal.m4 /autom4te.cache -/_build_ /build-aux/ /build-stamp /codenames @@ -48,8 +46,6 @@ Makefile.in /intltool-* /libtool /localwin32.mk -/.lock-wscript -/.lock-wafbuild /ltmain.sh /m4/lt*.m4 /m4/intltool.m4 @@ -63,9 +59,6 @@ Makefile.in /stamp-h.in /*.tar.* /TODO.* -# extracted Waf directory (without dot on Windows) -/.waf-* -/waf-* #----------------------------------------------------------------------- # /po/ Modified: HACKING 9 lines changed, 3 insertions(+), 6 deletions(-) =================================================================== @@ -171,9 +171,9 @@ Geany requires GTK >= 2.24 and GLib >= 2.28. API symbols from newer GTK/GLib versions should be avoided or made optional to keep the source code building on older systems. -It is recommended to use the 2.24 API documentation of the GTK -libs (including GLib, GDK and Pango) has the advantages -that you don't get confused by any newer API additions and you +It is recommended to use the 2.24 API documentation of the GTK +libs (including GLib, GDK and Pango) has the advantages +that you don't get confused by any newer API additions and you don't have to take care about whether you can use them or not. You might want to pass the ``-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_28`` C @@ -498,7 +498,6 @@ Adding a source file foo.[hc] in src/ or plugins/ ------------------------------------------------- * Add foo.c, foo.h to SRCS in path/Makefile.am. * Add foo.o to OBJS in path/makefile.win32. -* Add path/foo.c to geany_sources in wscript. * Add path/foo.c to po/POTFILES.in (for string translation). Adding a filetype @@ -562,7 +561,6 @@ When adding a lexer, update: * scintilla/Makefile.am * scintilla/makefile.win32 -* wscript * scintilla/src/Catalogue.cxx - add a LINK_LEXER command *manually* For syntax highlighting, you will need to edit highlighting.c and @@ -651,7 +649,6 @@ Method `````` * Add foo.c to SRCS in Makefile.am. * Add foo.o to OBJS in makefile.win32. -* Add path/foo.c to geany_sources in wscript. * Add Foo to parsers.h * Add TM_PARSER_FOO to tagmanager/src/tm_parser.h. The list here must follow exactly the order in parsers.h. Modified: Makefile.am 2 lines changed, 0 insertions(+), 2 deletions(-) =================================================================== @@ -17,8 +17,6 @@ WIN32_BUILD_FILES = \ EXTRA_DIST = \ autogen.sh \ scripts/gen-api-gtkdoc.py \ - wscript \ - waf \ geany.desktop.in \ geany.pc.in \ geany.spec \ Modified: NEWS 3 lines changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -1,5 +1,8 @@ Geany 1.27 (unreleased) + General + * Remove Waf build system (PR#769). + Bug fixes * Fix build with GLib < 2.32 (Issue#764). * Fix missing progress bar during build runs (Issue#765). Modified: doc/geany.txt 67 lines changed, 1 insertions(+), 66 deletions(-) =================================================================== @@ -132,8 +132,7 @@ of these tools are recommended. Autotools based build system ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The Autotools based build system is very mature and has been well tested. -To use it, you just need the Make tool, preferably GNU Make. +To compile Geany yourself, you just need the Make tool, preferably GNU Make. Then run the following commands:: @@ -148,65 +147,6 @@ Or via sudo:: % sudo make install -Waf based build system -^^^^^^^^^^^^^^^^^^^^^^ - -The Waf build system is still quite young and under heavy development but already in a -usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need -to install Python on your system. -The advantage of the Waf build system over the Autotools based build system is that the whole -build process might be a bit faster. Especially when you use the Waf -cache feature for repetitive builds (e.g. when changing only a few source files -to test something) will become much faster since Waf will cache and re-use the -unchanged built files and only compile the changed code again. See `Waf Cache`_ for details. -To build Geany with Waf as run:: - - $ ./waf configure - $ ./waf build - -Then as root:: - - % ./waf install - -Waf cache -````````` - -The Waf build system has a nice and interesting feature which can help to avoid -a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features -or trying to debug something in Geany. -Waf is able to store and retrieve the object files from a cache. This cache is declared -using the environment variable ``WAFCACHE``. -A possible location of the cache directory could be ``~/.cache/waf``. In order to make use of -this, you first need to create this directory:: - - $ mkdir -p ~/.cache/waf - -then add the environment variable to your shell configuration (the following example is for -Bash and should be adjusted to your used shell):: - - export WAFCACHE=/home/username/.cache/waf - -Remember to replace ``username`` with your actual username. - -More information about the Waf cache feature are available at -http://code.google.com/p/waf/wiki/CacheObjectFiles. - -Cleaning the cache -****************** -You should be careful about the size of the cache directory as it may -grow rapidly over time. -Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it -clean by yourself. -An easy way to keep it clean is to run the following command regularly to remove old -cached files:: - - $ find /home/username/.cache/waf -mtime +14 -exec rm {} \; - -This will delete all files in the cache directory which are older than 14 days. - -For details about the ``find`` command and its options, check its manual page. - - Custom installation ^^^^^^^^^^^^^^^^^^^ The configure script supports several common options, for a detailed @@ -214,11 +154,6 @@ list, type:: $ ./configure --help -or:: - - $ ./waf --help - -(depending on which build system you use). You may also want to read the INSTALL file for advanced installation options. Modified: doc/making-a-release 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -9,7 +9,7 @@ to filter commits by a particular developer name. Ensure version numbers are all updated in: configure.ac geany_private.rc geany.exe.manifest - win32-config.h wscript doc/geany.txt + win32-config.h doc/geany.txt Ensure release date is updated in: NEWS doc/geany.txt doc/geany.1.in Check GEANY_CODENAME is set in src/geany.h. Modified: geany.spec.in 4 lines changed, 0 insertions(+), 4 deletions(-) =================================================================== @@ -62,10 +62,6 @@ Geany plug-ins. You do not need to install this package to use Geany. %prep %setup -q -# remove waf since this isn't needed for the build, we're building the package -# with autotools -rm -f waf -rm -f wscript %build %configure Modified: scripts/wafinit.sh 72 lines changed, 0 insertions(+), 72 deletions(-) =================================================================== @@ -1,72 +0,0 @@ -#! /bin/sh -# -# This script creates a "configure" script and a Makefile to imitate autotools -# but Waf is actually used to build - -WAF="./waf" - -# Makefile -cat > Makefile << EOF - -.PHONY: build configure - -all: build - -build: - @$WAF build - -install: - @if test -n "\$(DESTDIR)"; then \\ - ./waf install --destdir="\$(DESTDIR)"; \\ - else \\ - ./waf install; \\ - fi; - -uninstall: - @if test -n "\$(DESTDIR)"; then \\ - $WAF uninstall --destdir="\$(DESTDIR)"; \\ - else \\ - $WAF uninstall; \\ - fi; - -clean: - @$WAF clean - -distclean: - @$WAF distclean - @-rm -f Makefile - -htmldoc: - @$WAF --htmldoc - -apidoc: - @$WAF --apidoc - -configure: - @$WAF configure - -EOF - -template=" -all: build - -build: - cd .. && $WAF build - -" - -echo "$template" > src/Makefile -echo "$template" > tagmanager/Makefile -echo "$template" > scintilla/Makefile -echo "$template" > plugins/Makefile - - -# configure -cat > configure << EOF -#!/bin/sh - -$WAF configure \$@ - -EOF - -chmod 755 configure Modified: waf 0 lines changed, 0 insertions(+), 0 deletions(-) =================================================================== No diff available, check online Modified: wscript 980 lines changed, 0 insertions(+), 980 deletions(-) =================================================================== @@ -1,980 +0,0 @@ -# -*- coding: utf-8 -*- -# -# WAF build script - this file is part of Geany, a fast and lightweight IDE -# -# Copyright 2008-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> -# Copyright 2008-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -""" -This is a WAF build script (
http://code.google.com/p/waf/
). -It can be used as an alternative build system to autotools -for Geany. It does not (yet) cover all of the autotools tests and -configure options but all important things are working. -"make dist" should be done with autotools, most other targets and -functions should work better (regarding performance and flexibility) -or at least equally. - -Missing features: --enable-binreloc, make targets: dist, pdf (in doc/) -Known issues: Dependency handling is buggy, e.g. if src/document.h is - changed, depending source files are not rebuilt (maybe Waf bug). - -The code of this file itself loosely follows PEP 8 with some exceptions -(line width 100 characters and some other minor things). - -Requires WAF 1.6.1 and Python 2.5 (or later). -""" - - -import sys -import os -import tempfile -from waflib import Logs, Options, Scripting, Utils -from waflib.Build import BuildContext -from waflib.Configure import ConfigurationContext -from waflib.Errors import ConfigurationError, WafError -from waflib.TaskGen import feature, before_method -from waflib.Tools.compiler_c import c_compiler -from waflib.Tools.compiler_cxx import cxx_compiler - - -APPNAME = 'geany' -VERSION = '1.26' -LINGUAS_FILE = os.path.join('po', 'LINGUAS') -MINIMUM_GTK_VERSION = '2.24.0' -MINIMUM_GTK3_VERSION = '3.0.0' -MINIMUM_GLIB_VERSION = '2.28.0' - -GEANY_LIB_VERSION = '0.0.0' - -top = '.' -out = '_build_' - -mio_sources = set(['tagmanager/mio/mio.c']) - -ctags_sources = set([ - 'tagmanager/ctags/abaqus.c', - 'tagmanager/ctags/args.c', - 'tagmanager/ctags/abc.c', - 'tagmanager/ctags/actionscript.c', - 'tagmanager/ctags/asciidoc.c', - 'tagmanager/ctags/asm.c', - 'tagmanager/ctags/basic.c', - 'tagmanager/ctags/c.c', - 'tagmanager/ctags/cobol.c', - 'tagmanager/ctags/conf.c', - 'tagmanager/ctags/css.c', - 'tagmanager/ctags/ctags.c', - 'tagmanager/ctags/diff.c', - 'tagmanager/ctags/docbook.c', - 'tagmanager/ctags/erlang.c', - 'tagmanager/ctags/entry.c', - 'tagmanager/ctags/fortran.c', - 'tagmanager/ctags/get.c', - 'tagmanager/ctags/go.c', - 'tagmanager/ctags/haskell.c', - 'tagmanager/ctags/haxe.c', - 'tagmanager/ctags/html.c', - 'tagmanager/ctags/js.c', - 'tagmanager/ctags/json.c', - 'tagmanager/ctags/keyword.c', - 'tagmanager/ctags/latex.c', - 'tagmanager/ctags/lregex.c', - 'tagmanager/ctags/lua.c', - 'tagmanager/ctags/make.c', - 'tagmanager/ctags/markdown.c', - 'tagmanager/ctags/matlab.c', - 'tagmanager/ctags/nsis.c', - 'tagmanager/ctags/nestlevel.c', - 'tagmanager/ctags/objc.c', - 'tagmanager/ctags/options.c', - 'tagmanager/ctags/parse.c', - 'tagmanager/ctags/pascal.c', - 'tagmanager/ctags/r.c', - 'tagmanager/ctags/perl.c', - 'tagmanager/ctags/php.c', - 'tagmanager/ctags/powershell.c', - 'tagmanager/ctags/python.c', - 'tagmanager/ctags/read.c', - 'tagmanager/ctags/rest.c', - 'tagmanager/ctags/ruby.c', - 'tagmanager/ctags/rust.c', - 'tagmanager/ctags/sh.c', - 'tagmanager/ctags/sort.c', - 'tagmanager/ctags/sql.c', - 'tagmanager/ctags/strlist.c', - 'tagmanager/ctags/txt2tags.c', - 'tagmanager/ctags/tcl.c', - 'tagmanager/ctags/vhdl.c', - 'tagmanager/ctags/verilog.c', - 'tagmanager/ctags/vstring.c']) - -tagmanager_sources = set([ - 'tagmanager/src/tm_source_file.c', - 'tagmanager/src/tm_tag.c', - 'tagmanager/src/tm_workspace.c']) - -scintilla_sources = set(['scintilla/gtk/scintilla-marshal.c']) - -geany_sources = set([ - 'src/about.c', 'src/build.c', 'src/callbacks.c', 'src/dialogs.c', 'src/document.c', - 'src/editor.c', 'src/encodings.c', 'src/filetypes.c', 'src/geanyentryaction.c', - 'src/geanymenubuttonaction.c', 'src/geanyobject.c', 'src/geanywraplabel.c', - 'src/highlighting.c', 'src/keybindings.c', - 'src/keyfile.c', 'src/log.c', 'src/libmain.c', 'src/msgwindow.c', 'src/navqueue.c', 'src/notebook.c', 'src/osx.c', - 'src/plugins.c', 'src/pluginutils.c', 'src/prefix.c', 'src/prefs.c', 'src/printing.c', 'src/project.c', - 'src/sciwrappers.c', 'src/search.c', 'src/socket.c', 'src/spawn.c', 'src/stash.c', - 'src/symbols.c', - 'src/templates.c', 'src/toolbar.c', 'src/tools.c', 'src/sidebar.c', - 'src/ui_utils.c', 'src/utils.c']) - -geany_bin_sources = set(['src/main.c']) - -geany_icons = { - 'hicolor/16x16/apps': ['16x16/classviewer-class.png', - '16x16/classviewer-macro.png', - '16x16/classviewer-member.png', - '16x16/classviewer-method.png', - '16x16/classviewer-namespace.png', - '16x16/classviewer-other.png', - '16x16/classviewer-struct.png', - '16x16/classviewer-var.png', - '16x16/geany.png'], - 'hicolor/16x16/actions': ['16x16/geany-build.png', - '16x16/geany-close-all.png', - '16x16/geany-save-all.png'], - 'hicolor/24x24/actions': ['24x24/geany-build.png', - '24x24/geany-close-all.png', - '24x24/geany-save-all.png'], - 'hicolor/32x32/actions': ['32x32/geany-build.png', - '32x32/geany-close-all.png', - '32x32/geany-save-all.png'], - 'hicolor/32x32/apps': ['32x32/geany.png'], - 'hicolor/48x48/actions': ['48x48/geany-build.png', - '48x48/geany-close-all.png', - '48x48/geany-save-all.png'], - 'hicolor/48x48/apps': ['48x48/geany.png'], - 'hicolor/scalable/apps': ['scalable/geany.svg'], - 'hicolor/scalable/actions': ['scalable/geany-build.svg', - 'scalable/geany-close-all.svg', - 'scalable/geany-save-all.svg'], - 'Tango/16x16/actions': ['tango/16x16/geany-save-all.png'], - 'Tango/24x24/actions': ['tango/24x24/geany-save-all.png'], - 'Tango/32x32/actions': ['tango/32x32/geany-save-all.png'], - 'Tango/48x48/actions': ['tango/48x48/geany-save-all.png'], - 'Tango/scalable/actions': ['tango/scalable/geany-save-all.svg'] -} -geany_icons_indexes = { - 'hicolor': ['index.theme'], - 'Tango': ['tango/index.theme'] -} - - -def configure(conf): - - conf.check_waf_version(mini='1.6.1') - - conf.load('compiler_c') - _check_c99(conf) - is_win32 = _target_is_win32(conf) - - visibility_hidden_supported = conf.check_cc(cflags=['-Werror', '-fvisibility=hidden'], mandatory=False) - conf.check_cc(header_name='fcntl.h', mandatory=False) - conf.check_cc(header_name='fnmatch.h', mandatory=False) - conf.check_cc(header_name='glob.h', mandatory=False) - conf.check_cc(header_name='sys/time.h', mandatory=False) - conf.check_cc(header_name='sys/types.h', mandatory=False) - conf.check_cc(header_name='sys/stat.h', mandatory=False) - conf.define('HAVE_STDLIB_H', 1) # are there systems without stdlib.h? - conf.define('STDC_HEADERS', 1) # an optimistic guess ;-) - _add_to_env_and_define(conf, 'HAVE_REGCOMP', 1) # needed for CTags - - conf.check_cc(function_name='fgetpos', header_name='stdio.h', mandatory=False) - conf.check_cc(function_name='fnmatch', header_name='fnmatch.h', mandatory=False) - conf.check_cc(function_name='ftruncate', header_name='unistd.h', mandatory=False) - conf.check_cc(function_name='mkstemp', header_name='stdlib.h', mandatory=False) - conf.check_cc(function_name='strstr', header_name='string.h') - - conf.check_cc(function_name='pow', header_name='math.h', lib='m', uselib_store='M') - - # check sunOS socket support - if Options.platform == 'sunos': - conf.check_cc(function_name='socket', lib='socket', - header_name='sys/socket.h', uselib_store='SUNOS_SOCKET', mandatory=True) - - # check for cxx after the header and function checks have been done to ensure they are - # checked with cc not cxx - conf.load('compiler_cxx') - if is_win32: - conf.load('winres') - _load_intltool_if_available(conf) - - # GTK / GIO version check - gtk_package_name = 'gtk+-3.0' if conf.options.use_gtk3 else 'gtk+-2.0' - minimum_gtk_version = MINIMUM_GTK3_VERSION if conf.options.use_gtk3 else MINIMUM_GTK_VERSION - conf.check_cfg(package=gtk_package_name, atleast_version=minimum_gtk_version, uselib_store='GTK', - mandatory=True, args='--cflags --libs') - conf.check_cfg(package='glib-2.0', atleast_version=MINIMUM_GLIB_VERSION, uselib_store='GLIB', - mandatory=True, args='--cflags --libs') - conf.check_cfg(package='gmodule-2.0', uselib_store='GMODULE', - mandatory=True, args='--cflags --libs') - conf.check_cfg(package='gio-2.0', uselib_store='GIO', args='--cflags --libs', mandatory=True) - gtk_version = conf.check_cfg(modversion=gtk_package_name, uselib_store='GTK') or 'Unknown' - conf.check_cfg(package='gthread-2.0', uselib_store='GTHREAD', args='--cflags --libs') - if conf.options.enable_mac_integration: - pkgname = 'gtk-mac-integration-gtk3' if conf.options.use_gtk3 else 'gtk-mac-integration-gtk2' - conf.check_cfg(package=pkgname, uselib_store='MAC_INTEGRATION', - mandatory=True, args='--cflags --libs') - # remember GTK version for the build step - conf.env['gtk_package_name'] = gtk_package_name - conf.env['gtk_version'] = gtk_version - conf.env['minimum_gtk_version'] = minimum_gtk_version - conf.env['use_gtk3'] = conf.options.use_gtk3 - - revision = _get_git_rev(conf) - - # rst2html for the HTML manual - if not conf.options.no_html_doc and revision is not None: - try: - conf.env['RST2HTML'] = _find_rst2html(conf) - except WafError: - error_msg = '''Documentation enabled but rst2html not found. -You can explicitly disable building of the HTML manual with --disable-html-docs, -but you then may not have a local copy of the HTML manual.''' - raise WafError(error_msg) - - # Windows specials - if is_win32: - if conf.env['PREFIX'].lower() == tempfile.gettempdir().lower(): - # overwrite default prefix on Windows (tempfile.gettempdir() is the Waf default) - new_prefix = os.path.join(str(conf.root), '%s-%s' % (APPNAME, VERSION)) - _add_to_env_and_define(conf, 'PREFIX', new_prefix, quote=True) - _add_to_env_and_define(conf, 'BINDIR', os.path.join(new_prefix, 'bin'), quote=True) - _add_to_env_and_define(conf, 'DOCDIR', os.path.join(conf.env['PREFIX'], 'doc'), quote=True) - _add_to_env_and_define(conf, 'LIBDIR', '%s/lib' % conf.env['PREFIX'], quote=True) - conf.define('LOCALEDIR', os.path.join('share' 'locale'), quote=True) - # overwrite LOCALEDIR to install message catalogues properly - conf.env['LOCALEDIR'] = os.path.join(conf.env['PREFIX'], 'share', 'locale') - # DATADIR is defined in objidl.h, so we remove it from config.h but keep it in env - conf.undefine('DATADIR') - conf.env['DATADIR'] = os.path.join(conf.env['PREFIX'], 'data') - conf.env.append_value('LINKFLAGS_cprogram', [ - '-mwindows', - '-static-libgcc', - '-static-libstdc++']) - conf.env.append_value('LIB_WIN32', ['wsock32', 'uuid', 'ole32', 'comdlg32']) - else: - conf.env['cshlib_PATTERN'] = '%s.so' - # DATADIR and LOCALEDIR are defined by the intltool tool - # but they are not added to the environment, so we need to - _add_define_to_env(conf, 'DATADIR') - _add_define_to_env(conf, 'LOCALEDIR') - docdir = os.path.join(conf.env['DATADIR'], 'doc', 'geany') - libdir = os.path.join(conf.env['PREFIX'], 'lib') - mandir = os.path.join(conf.env['DATADIR'], 'man') - _define_from_opt(conf, 'DOCDIR', conf.options.docdir, docdir) - _define_from_opt(conf, 'LIBDIR', conf.options.libdir, libdir) - _define_from_opt(conf, 'MANDIR', conf.options.mandir, mandir) - - conf.define('ENABLE_NLS', 1) - conf.define('GEANY_LOCALEDIR', '' if is_win32 else conf.env['LOCALEDIR'], quote=True) - conf.define('GEANY_DATADIR', 'data' if is_win32 else conf.env['DATADIR'], quote=True) - conf.define('GEANY_DOCDIR', conf.env['DOCDIR'], quote=True) - conf.define('GEANY_LIBDIR', '' if is_win32 else conf.env['LIBDIR'], quote=True) - conf.define('GEANY_PREFIX', '' if is_win32 else conf.env['PREFIX'], quote=True) - conf.define('PACKAGE', APPNAME, quote=True) - conf.define('VERSION', VERSION, quote=True) - conf.define('REVISION', revision or '-1', quote=True) - - conf.define('GETTEXT_PACKAGE', APPNAME, quote=True) - - # no VTE on Windows - if is_win32: - conf.options.no_vte = True - - _define_from_opt(conf, 'HAVE_PLUGINS', not conf.options.no_plugins, None) - _define_from_opt(conf, 'HAVE_SOCKET', not conf.options.no_socket, None) - _define_from_opt(conf, 'HAVE_VTE', not conf.options.no_vte, None) - - conf.write_config_header('config.h', remove=False) - - # GEANY_EXPORT_SYMBOL and GEANY_API_SYMBOL - if is_win32: - geanyexport_cflags = [] - geanyexport_defines = ['GEANY_EXPORT_SYMBOL=__declspec(dllexport)'] - elif visibility_hidden_supported: - geanyexport_cflags = ['-fvisibility=hidden'] - geanyexport_defines = ['GEANY_EXPORT_SYMBOL=__attribute__((visibility("default")))'] - else: # unknown, define to nothing - geanyexport_cflags = [] - geanyexport_defines = ['GEANY_EXPORT_SYMBOL='] - geanyexport_defines.append('GEANY_API_SYMBOL=GEANY_EXPORT_SYMBOL') - conf.env['DEFINES_geanyexport'] = geanyexport_defines - conf.env['CFLAGS_geanyexport'] = geanyexport_cflags - conf.env['CXXFLAGS_geanyexport'] = geanyexport_cflags - - # some more compiler flags - conf.env.append_value('CFLAGS', ['-DHAVE_CONFIG_H']) - if conf.env['CC_NAME'] == 'gcc' and '-O' not in ''.join(conf.env['CFLAGS']): - conf.env.append_value('CFLAGS', ['-O2']) - if revision is not None: - conf.env.append_value('CFLAGS', ['-g', '-DGEANY_DEBUG']) - # Scintilla flags - conf.env.append_value('CFLAGS', ['-DGTK']) - conf.env.append_value('CXXFLAGS', - ['-DNDEBUG', '-DGTK', '-DSCI_LEXER', '-DG_THREADS_IMPL_NONE']) - if conf.env['CXX_NAME'] == 'gcc' and '-O' not in ''.join(conf.env['CXXFLAGS']): - conf.env.append_value('CXXFLAGS', ['-O2']) - if revision is not None: - conf.env.append_value('CXXFLAGS', ['-g']) - - # summary - Logs.pprint('BLUE', 'Summary:') - conf.msg('Install Geany ' + VERSION + ' in', conf.env['PREFIX']) - conf.msg('Using GTK version', gtk_version) - conf.msg('Build with plugin support', conf.options.no_plugins and 'no' or 'yes') - conf.msg('Use virtual terminal support', conf.options.no_vte and 'no' or 'yes') - if revision is not None: - conf.msg('Compiling Git revision', revision) - # deprecation warning - _show_deprecation_warning(conf) - - -def _show_deprecation_warning(ctx): - Logs.pprint( - 'RED', - 'The Waf build system is deprecated and will be removed in the removed in Geany 1.27. ' - 'Please use the Autotools build system.') - - -def options(opt): - # Disable MSVC detection on win32: building Geany with MSVC is currently not supported - # If anyone wants to add support for building with MSVC, this hack should be removed. - c_compiler['win32'] = ['gcc'] - cxx_compiler['win32'] = ['g++'] - - opt.load('compiler_cc') - opt.load('compiler_cxx') - opt.load('intltool') - - # Option - opt.add_option('--no-scm', action='store_true', default=False, - help='Disable SCM detection [default: No]', dest='no_scm') - # Features - opt.add_option('--disable-plugins', action='store_true', default=False, - help='compile without plugin support [default: No]', dest='no_plugins') - opt.add_option('--disable-socket', action='store_true', default=False, - help='compile without support to detect a running instance [[default: No]', - dest='no_socket') - opt.add_option('--disable-vte', action='store_true', default=False, - help='compile without support for an embedded virtual terminal [[default: No]', - dest='no_vte') - opt.add_option('--enable-gtk3', action='store_true', default=False, - help='compile with GTK3 support (experimental) [[default: No]', - dest='use_gtk3') - opt.add_option('--enable-mac-integration', action='store_true', default=False, - help='use gtk-mac-integration to enable improved OS X integration [[default: No]', - dest='enable_mac_integration') - opt.add_option('--disable-html-docs', action='store_true', default=False, - help='do not generate HTML documentation using rst2html [[default: No]', - dest='no_html_doc') - # Paths - opt.add_option('--mandir', type='string', default='', - help='man documentation', dest='mandir') - opt.add_option('--docdir', type='string', default='', - help='documentation root', dest='docdir') - opt.add_option('--libdir', type='string', default='', - help='object code libraries', dest='libdir') - - -def build(bld): - is_win32 = _target_is_win32(bld) - bld.add_post_fun(_show_deprecation_warning) - - if bld.cmd == 'clean': - _remove_linguas_file() - if bld.cmd in ('install', 'uninstall'): - bld.add_post_fun(_post_install) - - def build_plugin(plugin_name, install=True, uselib_add=[]): - if install: - instpath = '${LIBDIR}/geany' - else: - instpath = None - - bld( - features = ['c', 'cshlib'], - source = 'plugins/%s.c' % plugin_name, - includes = ['.', 'src/', 'scintilla/include', 'tagmanager/src'], - defines = 'G_LOG_DOMAIN="%s"' % plugin_name, - target = plugin_name, - uselib = ['GTK', 'GLIB', 'GMODULE', 'C99'] + uselib_add, - use = ['geany'], - install_path = instpath) - - # CTags - bld.objects( - features = ['c'], - source = ctags_sources, - name = 'ctags', - target = 'ctags', - includes = ['.', 'tagmanager', 'tagmanager/ctags'], - defines = 'G_LOG_DOMAIN="CTags"', - uselib = ['cshlib', 'GLIB', 'geanyexport', 'C99']) - - # Tagmanager - bld.objects( - features = ['c'], - source = tagmanager_sources, - name = 'tagmanager', - target = 'tagmanager', - includes = ['.', 'tagmanager', 'tagmanager/ctags'], - defines = ['GEANY_PRIVATE', 'G_LOG_DOMAIN="Tagmanager"'], - uselib = ['cshlib', 'GTK', 'GLIB', 'geanyexport', 'C99']) - - # MIO - bld.objects( - features = ['c'], - source = mio_sources, - name = 'mio', - target = 'mio', - includes = ['.', 'tagmanager/mio/'], - defines = 'G_LOG_DOMAIN="MIO"', - uselib = ['cshlib', 'GTK', 'GLIB', 'geanyexport']) - - # Scintilla - files = bld.srcnode.ant_glob('scintilla/**/*.cxx', src=True, dir=False) - scintilla_sources.update([file.path_from(bld.srcnode) for file in files]) - bld.objects( - features = ['c', 'cxx'], - name = 'scintilla', - target = 'scintilla', - source = scintilla_sources, - includes = ['.', 'scintilla/include', 'scintilla/src', 'scintilla/lexlib'], - uselib = ['cshlib', 'cxxshlib', 'GTK', 'GLIB', 'GMODULE', 'M', 'geanyexport']) - - # Geany - if bld.env['HAVE_VTE'] == 1: - geany_sources.add('src/vte.c') - if is_win32: - geany_sources.add('src/win32.c') - geany_bin_sources.add('geany_private.rc') - - def gen_signallist(task): - from xml.etree import ElementTree - - def find_handlers(xml_filename): - tree = ElementTree.parse(xml_filename) - signals = tree.getroot().findall(".//signal") - return [sig.attrib["handler"] for sig in signals] - - handlers = [] - for node in task.inputs: - handlers += find_handlers(node.abspath()) - handlers = sorted(set(handlers)) - - for node in task.outputs: - node.write("/* This file is auto-generated, do not edit. */\n" + - ''.join(["ITEM(%s)\n" % h for h in handlers])) - - # signallist.i - bld( - source = 'data/geany.glade', - target = bld.path.get_bld().make_node('src/signallist.i'), - name = 'signallist.i', - rule = gen_signallist) - - base_uselibs = ['GTK', 'GLIB', 'GMODULE', 'GIO', 'GTHREAD', 'WIN32', 'MAC_INTEGRATION', 'SUNOS_SOCKET', 'M', 'C99'] - - # libgeany - bld.shlib( - features = ['c', 'cxx'], - name = 'geany', - target = 'geany', - source = geany_sources, - includes = ['.', 'scintilla/include', 'tagmanager/src', 'src'], - defines = ['G_LOG_DOMAIN="Geany"', 'GEANY_PRIVATE'], - uselib = base_uselibs + ['geanyexport'], - use = ['scintilla', 'ctags', 'tagmanager', 'mio'], - linkflags = bld.env['LINKFLAGS_cprogram'], - vnum = GEANY_LIB_VERSION, - install_path = '${PREFIX}/bin' if is_win32 else '${LIBDIR}') - - # geany executable - t = bld.program( - features = ['c', 'cxx'], - name = 'geany_bin', - target = 'geany', - source = geany_bin_sources, - includes = ['.', 'scintilla/include', 'tagmanager/src'], - defines = ['G_LOG_DOMAIN="Geany"', 'GEANY_PRIVATE'], - uselib = base_uselibs + ['geanyexport'], - use = ['geany']) - if not is_win32: - #
http://www.freehackers.org/~tnagy/testdoc/single.html#common_c
- t.rpath = bld.env['LIBDIR'] - - # Plugins - if bld.env['HAVE_PLUGINS'] == 1: - build_plugin('classbuilder') - build_plugin('demoplugin', False) - build_plugin('export', uselib_add=['M']) - build_plugin('filebrowser') - build_plugin('htmlchars') - build_plugin('saveactions') - build_plugin('splitwindow') - - # Translations - if bld.env['INTLTOOL']: - bld( - features = ['linguas', 'intltool_po'], - podir = 'po', - install_path = '${LOCALEDIR}', - appname = 'geany') - - # HTML documentation (build if it is not part of the tree already, as it is required for install) - html_doc_filename = os.path.join(bld.out_dir, 'doc', 'geany.html') - if bld.env['RST2HTML']: - rst2html = bld.env['RST2HTML'] - bld( - source = ['doc/geany.txt'], - deps = ['doc/geany.css'], - target = bld.path.get_bld().make_node('doc/geany.html'), - name = 'geany.html', - cwd = os.path.join(bld.path.abspath(), 'doc'), - rule = '%s -stg --stylesheet=geany.css geany.txt %s' % (rst2html, html_doc_filename)) - - # geany.pc - if is_win32: - # replace backward slashes by forward slashes as they could be interepreted as escape - # characters - geany_pc_prefix = bld.env['PREFIX'].replace('\\', '/') - else: - geany_pc_prefix = bld.env['PREFIX'] - bld( - source = 'geany.pc.in', - dct = {'VERSION': VERSION, - 'DEPENDENCIES': '%s >= %s glib-2.0 >= %s' % \ - (bld.env['gtk_package_name'], - bld.env['minimum_gtk_version'], - MINIMUM_GLIB_VERSION), - 'prefix': geany_pc_prefix, - 'exec_prefix': '${prefix}', - 'libdir': '${exec_prefix}/lib', - 'includedir': '${prefix}/include', - 'datarootdir': '${prefix}/share', - 'datadir': '${datarootdir}', - 'localedir': '${datarootdir}/locale'}) - - # geany.nsi - bld( - features = 'subst', - source = 'geany.nsi.in', - target = 'geany.nsi', - dct = {'VERSION': VERSION, - 'GTK_VERSION': bld.env['gtk_version']}, - install_path = None) - - if not is_win32: - # geany.desktop - if bld.env['INTLTOOL']: - bld( - features = 'intltool_in', - source = 'geany.desktop.in', - flags = ['-d', '-q', '-u', '-c'], - install_path = '${DATADIR}/applications') - - # geany.1 - bld( - features = 'subst', - source = 'doc/geany.1.in', - target = 'geany.1', - dct = {'VERSION': VERSION, - 'GEANY_DATA_DIR': bld.env['DATADIR'] + '/geany'}, - install_path = '${MANDIR}/man1') - - # geany.spec - bld( - features = 'subst', - source = 'geany.spec.in', - target = 'geany.spec', - install_path = None, - dct = {'VERSION': VERSION}) - - # Doxyfile - bld( - features = 'subst', - source = 'doc/Doxyfile.in', - target = 'doc/Doxyfile', - install_path = None, - dct = {'VERSION': VERSION, - 'top_builddir': bld.out_dir, - 'top_srcdir': bld.top_dir,}) - - # disable build/install phase interleaving - bld.add_group() - - ### - # Install files - ### - # Headers - bld.install_files('${PREFIX}/include/geany', ''' - src/app.h - src/build.h - src/dialogs.h - src/document.h - src/editor.h - src/encodings.h - src/filetypes.h - src/geany.h - src/highlighting.h - src/keybindings.h - src/main.h - src/msgwindow.h - src/navqueue.h - src/plugindata.h - src/pluginutils.h - src/prefs.h - src/project.h - src/sciwrappers.h - src/search.h - src/spawn.h - src/stash.h - src/support.h - src/symbols.h - src/templates.h - src/toolbar.h - src/ui_utils.h - src/utils.h - src/gtkcompat.h - plugins/geanyplugin.h - plugins/geanyfunctions.h - ''') - bld.install_files('${PREFIX}/include/geany/scintilla', ''' - scintilla/include/SciLexer.h scintilla/include/Scintilla.h - scintilla/include/Scintilla.iface scintilla/include/ScintillaWidget.h - scintilla/include/Sci_Position.h ''') - bld.install_files('${PREFIX}/include/geany/tagmanager', ''' - tagmanager/src/tm_source_file.h - tagmanager/src/tm_tag.h - tagmanager/src/tm_tagmanager.h - tagmanager/src/tm_workspace.h - tagmanager/src/tm_parser.h ''') - # Docs - base_dir = '${DOCDIR}' - ext = '.txt' if is_win32 else '' - for filename in 'AUTHORS ChangeLog COPYING README NEWS THANKS TODO'.split(): - basename = _uc_first(filename, bld) - destination_filename = '%s%s' % (basename, ext) - destination = os.path.join(base_dir, destination_filename) - bld.install_as(destination, filename) - - # install HTML documentation only if it exists, i.e. it was built before - # local_html_doc_filename supports installing HTML doc from in-tree geany.html if it exists - local_html_doc_filename = os.path.join(bld.path.abspath(), 'doc', 'geany.html') - if os.path.exists(html_doc_filename) or os.path.exists(local_html_doc_filename): - start_dir = bld.path.find_dir('doc/images') - bld.install_files('${DOCDIR}/html/images', start_dir.ant_glob('*.png'), cwd=start_dir) - bld.install_as('${DOCDIR}/html/index.html', 'doc/geany.html') - - bld.install_as('${DOCDIR}/%s' % _uc_first('manual.txt', bld), 'doc/geany.txt') - bld.install_as('${DOCDIR}/ScintillaLicense.txt', 'scintilla/License.txt') - if is_win32: - bld.install_as('${DOCDIR}/ReadMe.I18n.txt', 'README.I18N') - bld.install_as('${DOCDIR}/Hacking.txt', 'HACKING') - # Data - data_dir = '' if is_win32 else 'geany' - start_dir = bld.path.find_dir('data') - bld.install_as('${DATADIR}/%s/GPL-2' % data_dir, 'COPYING') - bld.install_files('${DATADIR}/%s' % data_dir, start_dir.ant_glob('filetype*'), cwd=start_dir) - bld.install_files('${DATADIR}/%s' % data_dir, start_dir.ant_glob('*.tags'), cwd=start_dir) - bld.install_files('${DATADIR}/%s' % data_dir, 'data/geany.glade') - bld.install_files('${DATADIR}/%s' % data_dir, 'data/snippets.conf') - bld.install_files('${DATADIR}/%s' % data_dir, 'data/ui_toolbar.xml') - if bld.env['use_gtk3']: - bld.install_files('${DATADIR}/%s' % data_dir, 'data/geany.css') - else: - bld.install_files('${DATADIR}/%s' % data_dir, 'data/geany.gtkrc') - - start_dir = bld.path.find_dir('data/colorschemes') - template_dest = '${DATADIR}/%s/colorschemes' % data_dir - bld.install_files(template_dest, start_dir.ant_glob('*'), cwd=start_dir) - start_dir = bld.path.find_dir('data/templates') - template_dest = '${DATADIR}/%s/templates' % data_dir - bld.install_files(template_dest, start_dir.ant_glob('**/*'), cwd=start_dir, relative_trick=True) - # Icons - for dest, srcs in geany_icons.items(): - dest_dir = os.path.join('${PREFIX}/share/icons' if is_win32 else '${DATADIR}/icons', dest) - bld.install_files(dest_dir, srcs, cwd=bld.path.find_dir('icons')) - # install theme indexes on Windows - if is_win32: - for dest, srcs in geany_icons_indexes.items(): - bld.install_files(os.path.join('${PREFIX}/share/icons', dest), srcs, cwd=bld.path.find_dir('icons')) - - -def distclean(ctx): - Scripting.distclean(ctx) - _remove_linguas_file() - - -def _remove_linguas_file(): - # remove LINGUAS file as well - try: - os.unlink(LINGUAS_FILE) - except OSError: - pass - - -@feature('linguas') -@before_method('apply_intltool_po') -def write_linguas_file(self): - if os.path.exists(LINGUAS_FILE): - return - linguas = '' - if 'LINGUAS' in self.env: - files = self.env['LINGUAS'] - for po_filename in files.split(' '): - if os.path.exists('po/%s.po' % po_filename): - linguas += '%s ' % po_filename - else: - files = os.listdir('%s/po' % self.path.abspath()) - files.sort() - for filename in files: - if filename.endswith('.po'): - linguas += '%s ' % filename[:-3] - file_h = open(LINGUAS_FILE, 'w') - file_h.write('# This file is autogenerated. Do not edit.\n%s\n' % linguas) - file_h.close() - - -def _post_install(ctx): - is_win32 = _target_is_win32(ctx) - if is_win32: - return - for d in 'hicolor', 'Tango': - theme_dir = Utils.subst_vars('${DATADIR}/icons/' + d, ctx.env) - icon_cache_updated = False - if not ctx.options.destdir: - ctx.exec_command('gtk-update-icon-cache -q -f -t %s' % theme_dir) - Logs.pprint('GREEN', 'GTK icon cache updated.') - icon_cache_updated = True - if not icon_cache_updated: - Logs.pprint('YELLOW', 'Icon cache not updated. After install, run this:') - Logs.pprint('YELLOW', 'gtk-update-icon-cache -q -f -t %s' % theme_dir) - - -def updatepo(ctx): - """update the message catalogs for internationalization""" - potfile = '%s.pot' % APPNAME - os.chdir('%s/po' % top) - try: - try: - old_size = os.stat(potfile).st_size - except OSError: - old_size = 0 - ctx.exec_command('intltool-update --pot -g %s' % APPNAME) - size_new = os.stat(potfile).st_size - if size_new != old_size: - Logs.pprint('CYAN', 'Updated POT file.') - Logs.pprint('CYAN', 'Updating translations') - ret = ctx.exec_command('intltool-update -r -g %s' % APPNAME) - if ret != 0: - Logs.pprint('RED', 'Updating translations failed') - else: - Logs.pprint('CYAN', 'POT file is up to date.') - except OSError: - Logs.pprint('RED', 'Failed to generate pot file.') - - -def apidoc(ctx): - """generate API reference documentation""" - ctx = BuildContext() # create our own context to have ctx.top_dir - basedir = ctx.top_dir - doxygen = _find_program(ctx, 'doxygen') - doxyfile = '%s/doc/Doxyfile' % ctx.out_dir - Logs.pprint('CYAN', 'Generating API documentation') - ret = ctx.exec_command('%s %s' % (doxygen, doxyfile)) - if ret != 0: - raise WafError('Generating API documentation failed') - - -def hackingdoc(ctx): - """generate HACKING documentation""" - ctx = BuildContext() # create our own context to have ctx.top_dir - Logs.pprint('CYAN', 'Generating HACKING documentation') - cmd = _find_rst2html(ctx) - hacking_file = os.path.join(ctx.top_dir, 'HACKING') - hacking_html_file = os.path.join(ctx.top_dir, 'doc', 'hacking.html') - stylesheet = os.path.join(ctx.top_dir, 'doc', 'geany.css') - ret = ctx.exec_command('%s -stg --stylesheet=%s %s %s' % ( - cmd, stylesheet, hacking_file, hacking_html_file)) - if ret != 0: - raise WafError('Generating HACKING documentation failed') - - -def _find_program(ctx, cmd, **kw): - def noop(*args): - pass - - if ctx is None or not isinstance(ctx, ConfigurationContext): - ctx = ConfigurationContext() - ctx.to_log = noop - ctx.msg = noop - return ctx.find_program(cmd, **kw) - - -def _find_rst2html(ctx): - cmds = ['rst2html', 'rst2html2'] - for command in cmds: - cmd = _find_program(ctx, command, mandatory=False, exts=',.py') - if cmd: - break - if not cmd: - raise WafError( - 'rst2html.py could not be found. Please install the Python docutils package.') - return cmd - - -def _add_define_to_env(conf, key): - value = conf.get_define(key) - # strip quotes - value = value.replace('"', '') - conf.env[key] = value - - -def _add_to_env_and_define(conf, key, value, quote=False): - conf.define(key, value, quote) - conf.env[key] = value - - -def _define_from_opt(conf, define_name, opt_value, default_value, quote=1): - value = default_value - if opt_value: - if isinstance(opt_value, bool): - opt_value = 1 - value = opt_value - - if value is not None: - _add_to_env_and_define(conf, define_name, value, quote) - else: - conf.undefine(define_name) - - -def _get_git_rev(conf): - if conf.options.no_scm: - return - - if not os.path.isdir('.git'): - return - - try: - cmd = 'git rev-parse --short --revs-only HEAD' - revision = conf.cmd_and_log(cmd).strip() - except WafError: - return None - else: - return revision - - -def _load_intltool_if_available(conf): - try: - conf.load('intltool') - if 'LINGUAS' in os.environ: - conf.env['LINGUAS'] = os.environ['LINGUAS'] - except WafError: - # on Windows, we don't hard depend on intltool, on all other platforms raise an error - if not _target_is_win32(conf): - raise - - -def _target_is_win32(ctx): - if 'is_win32' in ctx.env: - # cached - return ctx.env['is_win32'] - is_win32 = None - if sys.platform == 'win32': - is_win32 = True - if is_win32 is None: - if ctx.env and 'CC' in ctx.env: - env_cc = ctx.env['CC'] - if not isinstance(env_cc, str): - env_cc = ''.join(env_cc) - is_win32 = (env_cc.find('mingw') != -1) - if is_win32 is None: - is_win32 = False - # cache for future checks - ctx.env['is_win32'] = is_win32 - return is_win32 - - -def _uc_first(string, ctx): - if _target_is_win32(ctx): - return string.title() - return string - - -# Copied from Geany-Plugins -def _check_c99(conf): - # FIXME: improve some checks? - # TODO: look at Autoconf's C99 checks? - fragment = ''' - // single-line comments - - #include <stdbool.h> - - struct s { int a, b; }; - - // inlines - static inline void fun_inline(struct s param) {} - - int main(void) { - _Bool b = false; - - // variable declaration in for body - for (int i = 0; i < 2; i++); - - // compound literals - fun_inline((struct s) { 1, 2 }); - - // mixed declarations and code - int mixed = 0; - - // named initializers - struct s name_inited = { - .a = 42, - .b = 64 - }; - - return (b || mixed || ! name_inited.a); - } - ''' - - exc = None - # list of flags is stolen from Autoconf 2.69 - flags = ['', '-std=gnu99', '-std=c99', '-c99', '-AC99', - '-D_STDC_C99=', '-qlanglvl=extc99'] - for flag in flags: - try: - desc = ['with flag %s' % flag, 'with no flags'][not flag] - conf.check_cc(fragment=fragment, uselib_store='C99', cflags=flag, - msg="Checking for C99 support (%s)" % desc) - exc = None - break - except ConfigurationError as e: - exc = e - if exc: - raise exc - return True -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] c344ba: Merge pull request #959 from eht16/gtk_bundle_script
by Enrico Tröger
13 Mar '16
13 Mar '16
Branch: refs/heads/master Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sun, 13 Mar 2016 11:47:53 UTC Commit: c344baca07474e6ee413446c335f62112ffc76b6
https://github.com/geany/geany/commit/c344baca07474e6ee413446c335f62112ffc7…
Log Message: ----------- Merge pull request #959 from eht16/gtk_bundle_script Improve Windows GTK runtime bundle creation script Modified Paths: -------------- scripts/gtk-bundle-from-msys2.sh Modified: scripts/gtk-bundle-from-msys2.sh 338 lines changed, 251 insertions(+), 87 deletions(-) =================================================================== @@ -1,109 +1,273 @@ #!/bin/sh +# +# Fetch and extract Geany dependencies for Windows/MSYS2 +# This script will download (or use Pacman's cache) to extract +# dependencies as defined below needed to run Geany. +# To be run within a MSYS2 shell. The extracted files will be +# placed into the current directory. ABI=i686 - -GLIB= -ADW= -GTK= - use_cache="no" make_zip="no" gtkv="3" +run_pi="y" -for opt in "$@"; do - case "$opt" in - "-c"|"--cache") - use_cache="yes" - ;; - "-z"|"--zip") - make_zip="yes" - ;; - "-2") - gtkv="2" - ;; - "-3") - gtkv="3" - ;; - "-h"|"--help") - echo "gtk-bundle-from-msys2.sh [-c] [-z] [-2 | -3]" - echo " -c Use pacman cache. Otherwise pacman will download" - echo " archive files" - echo " -z Create a zip afterwards" - echo " -2 Prefer gtk2" - echo " -3 Prefer gtk3" - exit 1 - ;; - *) - cachedir="$opt" - ;; - esac -done +UNX_UTILS_URL="
http://unxutils.sourceforge.net/UnxUpdates.zip
" +GREP_URL="
https://download.geany.org/contrib/grep-2.23.tar.xz
" -if [ -z "$cachedir" ]; then - cachedir="/var/cache/pacman/pkg" -fi +package_urls="" +gtk2_dependency_pkgs="" +gtk3_dependency_pkgs=" +libepoxy +hicolor-icon-theme +adwaita-icon-theme +" -if [ "$use_cache" = "yes" ] && ! [ -d "$cachedir" ]; then - echo "Cache dir \"$cachedir\" not a directory" - exit 1 -fi +packages=" +gcc-libs +pcre +zlib +expat +libffi +libiconv +bzip2 +libffi +libpng +gettext +glib2 +libwinpthread-git +harfbuzz +fontconfig +freetype +atk +pango +cairo +pixman +gdk-pixbuf2 +" -gtk="gtk$gtkv" +handle_command_line_options() { + for opt in "$@"; do + case "$opt" in + "-c"|"--cache") + use_cache="yes" + ;; + "-z"|"--zip") + make_zip="yes" + ;; + "-2") + gtkv="2" + ;; + "-3") + gtkv="3" + ;; + "-n") + run_pi="" + ;; + "-h"|"--help") + echo "gtk-bundle-from-msys2.sh [-c] [-h] [-n] [-z] [-2 | -3] [CACHEDIR]" + echo " -c Use pacman cache. Otherwise pacman will download" + echo " archive files" + echo " -h Show this help screen" + echo " -n Do not run post install scripts of the packages" + echo " -z Create a zip afterwards" + echo " -2 Prefer gtk2" + echo " -3 Prefer gtk3" + echo "CACHEDIR Directory where to look for cached packages (default: /var/cache/pacman/pkg)" + exit 1 + ;; + *) + cachedir="$opt" + ;; + esac + done +} -getpkg() { - if [ "$use_cache" = "yes" ]; then - ls $cachedir/mingw-w64-$ABI-$1-* | sort -V | tail -n 1 - else - pacman -Sp mingw-w64-$ABI-$1 +initialize() { + if [ -z "$cachedir" ]; then + cachedir="/var/cache/pacman/pkg" fi -} -GLIB=$(getpkg glib2) -ATK=$(getpkg atk) -PANGO=$(getpkg pango) -CAIRO=$(getpkg cairo) -ADW=$(getpkg adwaita-icon-theme) -GTK=$(getpkg $gtk) - -cat <<EOF -Using: -glib: $GLIB -atk: $ATK -pango: $PANGO -cairo: $CAIRO -adwaita $ADW -$gtk: $GTK -EOF + if [ "$use_cache" = "yes" ] && ! [ -d "$cachedir" ]; then + echo "Cache dir \"$cachedir\" not a directory" + exit 1 + fi + + gtk="gtk$gtkv" + eval "gtk_dependency_pkgs=\${${gtk}_dependency_pkgs}" + pkgs=" +${packages} +${gtk_dependency_pkgs} +${gtk} +" +} -for i in $GLIB $ATK $PANGO $CAURIO $ADW $GTK; do - if [ "$use_cache" = "yes" -a -e "$i" ]; then - echo "Extracting $i from cache" - tar xaf $i +_getpkg() { + if [ "$use_cache" = "yes" ]; then + package_info=`pacman -Qi mingw-w64-$ABI-$1` + package_version=`echo "$package_info" | grep "^Version " | cut -d':' -f 2 | tr -d '[[:space:]]'` + ls $cachedir/mingw-w64-${ABI}-${1}-${package_version}-* | sort -V | tail -n 1 else - echo "Download $i using curl" - curl -L "$i" | tar -x --xz + pacman -Sp mingw-w64-${ABI}-${1} fi - echo "Running post_install script" - test -f .INSTALL && /bin/bash -c ". .INSTALL; post_install" - if [ "$make_zip" = "yes" -a "$i" = "$GTK" ]; then - VERSION=$(grep ^pkgver .PKGINFO | sed -e 's,^pkgver = ,,' -e 's,-.*$,,') +} + +_remember_package_source() { + if [ "$use_cache" = "yes" ]; then + package_url=`pacman -Sp mingw-w64-${ABI}-${2}` + else + package_url="${1}" fi - rm -f .INSTALL .MTREE .PKGINFO -done + package_urls="${package_urls}\n${package_url}" +} -if [ -d mingw32 ]; then - for d in bin etc include lib locale share; do - rm -rf $d - mv mingw32/$d . +extract_packages() { + for i in $pkgs; do + pkg=$(_getpkg $i) + _remember_package_source $pkg $i + if [ "$use_cache" = "yes" ]; then + if [ -e "$pkg" ]; then + echo "Extracting $pkg from cache" + tar xaf $pkg + else + echo "ERROR: File $pkg not found" + exit 1 + fi + else + echo "Download $pkg using curl" + curl -L "$pkg" | tar -x --xz + fi + if [ -n "$run_pi" ] && [ -f .INSTALL ]; then + echo "Running post_install script for \"$i\"" + /bin/bash -c ". .INSTALL; post_install" + fi + if [ "$make_zip" = "yes" -a "$i" = "$gtk" ]; then + VERSION=$(grep ^pkgver .PKGINFO | sed -e 's,^pkgver = ,,' -e 's,-.*$,,') + fi + rm -f .INSTALL .MTREE .PKGINFO .BUILDINFO done - rmdir mingw32 -fi +} -if [ "$make_zip" = "yes" ]; then - if [ -z "$VERSION" ]; then - VERSION="unknown-version" +move_extracted_files() { + echo "Move extracted data to destination directory" + if [ -d mingw32 ]; then + for d in bin etc home include lib locale share var; do + if [ -d "mingw32/$d" ]; then + rm -rf $d + # prevent sporadic 'permission denied' errors on my system, not sure why they happen + sleep 0.5 + mv mingw32/$d . + fi + done + rmdir mingw32 fi - echo "Packing the bundle" - zip -r gtk-$VERSION.zip bin etc include lib locale share -fi +} + +cleanup_unnecessary_files() { + echo "Cleanup unnecessary files" + # cleanup temporary files + rm -rf var/cache/fontconfig + rmdir var/cache + rmdir var + # cleanup development and other unnecessary files + rm -rf include + rm -rf lib/gettext + rm -rf lib/libffi-* + rm -rf lib/pkgconfig + find lib -name '*.a' -delete + find lib -name '*.typelib' -delete + find lib -name '*.def' -delete + find lib -name '*.h' -delete + find lib -name '*.sh' -delete + # cleanup other unnecessary files + rm -rf share/aclocal + rm -rf share/applications + rm -rf share/bash-completion + rm -rf share/doc + rm -rf share/gdb + rm -rf share/gettext + rm -rf share/gir-1.0 + rm -rf share/glib-2.0 + rm -rf share/gtk-2.0 + rm -rf share/gtk-3.0 + rm -rf share/gtk-doc + rm -rf share/info + rm -rf share/man + rm -rf share/xml + # cleanup binaries and libs (delete anything except *.dll) + find bin ! -name '*.dll' -type f -delete + # cleanup empty directories + find . -type d -empty -delete +} + +download_and_compile_grep() { + grep_archive="grep_source.tar.xz" + grep_build_dir="grep_build" + grep_build_log="grep_build.log" + echo "Download and compile 'grep' (see ${grep_build_dir}/${grep_build_log} for details)" + mkdir ${grep_build_dir} + cd ${grep_build_dir} + wget --no-verbose -O ${grep_archive} ${GREP_URL} + tar xf ${grep_archive} + grep-2*/configure > ${grep_build_log} 2>&1 || exit 1 + make >> ${grep_build_log} 2>&1 || exit 1 + strip src/grep.exe + cp src/grep.exe ../bin/ + cd .. + rm -rf ${grep_build_dir} +} + +download_and_extract_sort() { + echo "Download and unpack 'sort'" + # add sort to the bin directory + unxutils_archive="unxutilsupdates.zip" + wget --no-verbose -O ${unxutils_archive} ${UNX_UTILS_URL} + unzip ${unxutils_archive} sort.exe -d bin/ + rm ${unxutils_archive} +} + +create_bundle_dependency_info_file() { + filename="ReadMe.Dependencies.Geany.txt" + cat << EOF > "${filename}" +This installation contains dependencies for Geany which are distributed +as binaries (usually .dll files) as well as additional files +necessary for these dependencies. +Following is a list of all included binary packages with their +full download URL as used to create this installation. + +sort.exe is extracted from the ZIP archive at +${UNX_UTILS_URL}. + +grep.exe is self-compiled from the sources available at +${GREP_URL}. +Used command to compile: ./configure && make + +Other dependencies are provided by the MSYS2 project +(https://msys2.github.io) and were downloaded from: +EOF + echo -e "${package_urls}" >> "${filename}" + unix2dos "${filename}" +} + +create_zip_archive() { + if [ "$make_zip" = "yes" ]; then + if [ -z "$VERSION" ]; then + VERSION="unknown-version" + fi + echo "Packing the bundle" + zip -r gtk-$VERSION.zip bin etc include lib locale share var + fi +} + + +# main() +handle_command_line_options $@ +initialize +extract_packages +move_extracted_files +cleanup_unnecessary_files +download_and_compile_grep +download_and_extract_sort +create_bundle_dependency_info_file +create_zip_archive -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] f8f095: Merge pull request #961 from codebrainz/non-native-project-open
by Enrico Tröger
13 Mar '16
13 Mar '16
Branch: refs/heads/master Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sun, 13 Mar 2016 11:47:04 UTC Commit: f8f0951ef7289b38db1df8072bc4dee2a9eba43b
https://github.com/geany/geany/commit/f8f0951ef7289b38db1df8072bc4dee2a9eba…
Log Message: ----------- Merge pull request #961 from codebrainz/non-native-project-open Respect native dialog pref in Project->Open Modified Paths: -------------- src/project.c Modified: src/project.c 104 lines changed, 52 insertions(+), 52 deletions(-) =================================================================== @@ -281,7 +281,6 @@ gboolean project_load_file_with_session(const gchar *locale_file_name) } -#ifndef G_OS_WIN32 static void run_open_dialog(GtkDialog *dialog) { while (gtk_dialog_run(dialog) == GTK_RESPONSE_ACCEPT) @@ -303,71 +302,72 @@ static void run_open_dialog(GtkDialog *dialog) break; } } -#endif void project_open(void) { const gchar *dir = local_prefs.project_file_path; -#ifdef G_OS_WIN32 - gchar *file; -#else - GtkWidget *dialog; - GtkFileFilter *filter; - gchar *locale_path; -#endif + if (! project_ask_close()) return; #ifdef G_OS_WIN32 - file = win32_show_project_open_dialog(main_widgets.window, _("Open Project"), dir, FALSE, TRUE); - if (file != NULL) + if (interface_prefs.use_native_windows_dialogs) { - /* try to load the config */ - if (! project_load_file_with_session(file)) + gchar *file = win32_show_project_open_dialog(main_widgets.window, _("Open Project"), dir, FALSE, TRUE); + if (file != NULL) { - SHOW_ERR1(_("Project file \"%s\" could not be loaded."), file); + /* try to load the config */ + if (! project_load_file_with_session(file)) + { + SHOW_ERR1(_("Project file \"%s\" could not be loaded."), file); + } + g_free(file); } - g_free(file); } -#else - - dialog = gtk_file_chooser_dialog_new(_("Open Project"), GTK_WINDOW(main_widgets.window), - GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); - gtk_widget_set_name(dialog, "GeanyDialogProject"); - - /* set default Open, so pressing enter can open multiple files */ - gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); - gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); - gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), TRUE); - gtk_window_set_type_hint(GTK_WINDOW(dialog), GDK_WINDOW_TYPE_HINT_DIALOG); - gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(main_widgets.window)); - gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE); - - /* add FileFilters */ - filter = gtk_file_filter_new(); - gtk_file_filter_set_name(filter, _("All files")); - gtk_file_filter_add_pattern(filter, "*"); - gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); - filter = gtk_file_filter_new(); - gtk_file_filter_set_name(filter, _("Project files")); - gtk_file_filter_add_pattern(filter, "*." GEANY_PROJECT_EXT); - gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); - gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter); - - locale_path = utils_get_locale_from_utf8(dir); - if (g_file_test(locale_path, G_FILE_TEST_EXISTS) && - g_file_test(locale_path, G_FILE_TEST_IS_DIR)) + else +#endif { - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), locale_path); - } - g_free(locale_path); + GtkWidget *dialog; + GtkFileFilter *filter; + gchar *locale_path; + + dialog = gtk_file_chooser_dialog_new(_("Open Project"), GTK_WINDOW(main_widgets.window), + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); + gtk_widget_set_name(dialog, "GeanyDialogProject"); + + /* set default Open, so pressing enter can open multiple files */ + gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); + gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); + gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), TRUE); + gtk_window_set_type_hint(GTK_WINDOW(dialog), GDK_WINDOW_TYPE_HINT_DIALOG); + gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(main_widgets.window)); + gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE); + + /* add FileFilters */ + filter = gtk_file_filter_new(); + gtk_file_filter_set_name(filter, _("All files")); + gtk_file_filter_add_pattern(filter, "*"); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); + filter = gtk_file_filter_new(); + gtk_file_filter_set_name(filter, _("Project files")); + gtk_file_filter_add_pattern(filter, "*." GEANY_PROJECT_EXT); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); + gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter); + + locale_path = utils_get_locale_from_utf8(dir); + if (g_file_test(locale_path, G_FILE_TEST_EXISTS) && + g_file_test(locale_path, G_FILE_TEST_IS_DIR)) + { + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), locale_path); + } + g_free(locale_path); - gtk_widget_show_all(dialog); - run_open_dialog(GTK_DIALOG(dialog)); - gtk_widget_destroy(GTK_WIDGET(dialog)); -#endif + gtk_widget_show_all(dialog); + run_open_dialog(GTK_DIALOG(dialog)); + gtk_widget_destroy(GTK_WIDGET(dialog)); + } } -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 38f073: Respect native dialog pref in Project->Open
by Matthew Brush
12 Mar '16
12 Mar '16
Branch: refs/heads/master Author: Matthew Brush <matt(a)geany.org> Committer: Matthew Brush <matt(a)geany.org> Date: Sat, 12 Mar 2016 19:57:14 UTC Commit: 38f073673eef2f630f8ba742521dc1669e7fb775
https://github.com/geany/geany/commit/38f073673eef2f630f8ba742521dc1669e7fb…
Log Message: ----------- Respect native dialog pref in Project->Open Fixes #960 Modified Paths: -------------- src/project.c Modified: src/project.c 104 lines changed, 52 insertions(+), 52 deletions(-) =================================================================== @@ -281,7 +281,6 @@ gboolean project_load_file_with_session(const gchar *locale_file_name) } -#ifndef G_OS_WIN32 static void run_open_dialog(GtkDialog *dialog) { while (gtk_dialog_run(dialog) == GTK_RESPONSE_ACCEPT) @@ -303,71 +302,72 @@ static void run_open_dialog(GtkDialog *dialog) break; } } -#endif void project_open(void) { const gchar *dir = local_prefs.project_file_path; -#ifdef G_OS_WIN32 - gchar *file; -#else - GtkWidget *dialog; - GtkFileFilter *filter; - gchar *locale_path; -#endif + if (! project_ask_close()) return; #ifdef G_OS_WIN32 - file = win32_show_project_open_dialog(main_widgets.window, _("Open Project"), dir, FALSE, TRUE); - if (file != NULL) + if (interface_prefs.use_native_windows_dialogs) { - /* try to load the config */ - if (! project_load_file_with_session(file)) + gchar *file = win32_show_project_open_dialog(main_widgets.window, _("Open Project"), dir, FALSE, TRUE); + if (file != NULL) { - SHOW_ERR1(_("Project file \"%s\" could not be loaded."), file); + /* try to load the config */ + if (! project_load_file_with_session(file)) + { + SHOW_ERR1(_("Project file \"%s\" could not be loaded."), file); + } + g_free(file); } - g_free(file); } -#else - - dialog = gtk_file_chooser_dialog_new(_("Open Project"), GTK_WINDOW(main_widgets.window), - GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); - gtk_widget_set_name(dialog, "GeanyDialogProject"); - - /* set default Open, so pressing enter can open multiple files */ - gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); - gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); - gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), TRUE); - gtk_window_set_type_hint(GTK_WINDOW(dialog), GDK_WINDOW_TYPE_HINT_DIALOG); - gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(main_widgets.window)); - gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE); - - /* add FileFilters */ - filter = gtk_file_filter_new(); - gtk_file_filter_set_name(filter, _("All files")); - gtk_file_filter_add_pattern(filter, "*"); - gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); - filter = gtk_file_filter_new(); - gtk_file_filter_set_name(filter, _("Project files")); - gtk_file_filter_add_pattern(filter, "*." GEANY_PROJECT_EXT); - gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); - gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter); - - locale_path = utils_get_locale_from_utf8(dir); - if (g_file_test(locale_path, G_FILE_TEST_EXISTS) && - g_file_test(locale_path, G_FILE_TEST_IS_DIR)) + else +#endif { - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), locale_path); - } - g_free(locale_path); + GtkWidget *dialog; + GtkFileFilter *filter; + gchar *locale_path; + + dialog = gtk_file_chooser_dialog_new(_("Open Project"), GTK_WINDOW(main_widgets.window), + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); + gtk_widget_set_name(dialog, "GeanyDialogProject"); + + /* set default Open, so pressing enter can open multiple files */ + gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); + gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); + gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), TRUE); + gtk_window_set_type_hint(GTK_WINDOW(dialog), GDK_WINDOW_TYPE_HINT_DIALOG); + gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(main_widgets.window)); + gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE); + + /* add FileFilters */ + filter = gtk_file_filter_new(); + gtk_file_filter_set_name(filter, _("All files")); + gtk_file_filter_add_pattern(filter, "*"); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); + filter = gtk_file_filter_new(); + gtk_file_filter_set_name(filter, _("Project files")); + gtk_file_filter_add_pattern(filter, "*." GEANY_PROJECT_EXT); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); + gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter); + + locale_path = utils_get_locale_from_utf8(dir); + if (g_file_test(locale_path, G_FILE_TEST_EXISTS) && + g_file_test(locale_path, G_FILE_TEST_IS_DIR)) + { + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), locale_path); + } + g_free(locale_path); - gtk_widget_show_all(dialog); - run_open_dialog(GTK_DIALOG(dialog)); - gtk_widget_destroy(GTK_WIDGET(dialog)); -#endif + gtk_widget_show_all(dialog); + run_open_dialog(GTK_DIALOG(dialog)); + gtk_widget_destroy(GTK_WIDGET(dialog)); + } } -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 12f6ad: Install and uninstall ReadMe.Dependencies.Geany.txt
by Enrico Tröger
12 Mar '16
12 Mar '16
Branch: refs/heads/master Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sat, 12 Mar 2016 17:32:40 UTC Commit: 12f6ad69159c723bd6264e5f18b7aa58ca19438d
https://github.com/geany/geany/commit/12f6ad69159c723bd6264e5f18b7aa58ca194…
Log Message: ----------- Install and uninstall ReadMe.Dependencies.Geany.txt Modified Paths: -------------- geany.nsi.in Modified: geany.nsi.in 3 lines changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -219,6 +219,8 @@ SectionEnd Section "GTK ${GTK_VERSION} Runtime Environment" SEC06 SectionIn 1 SetOverwrite ifnewer + SetOutPath "$INSTDIR" + File "gtk\ReadMe.Dependencies.Geany.txt" SetOutPath "$INSTDIR\bin" File /r "gtk\bin\*" SetOutPath "$INSTDIR\etc" @@ -293,6 +295,7 @@ Section Uninstall Delete "$INSTDIR\uninst.exe" Delete "$INSTDIR\News.txt" Delete "$INSTDIR\ReadMe.txt" + Delete "$INSTDIR\ReadMe.Dependencies.Geany.txt" Delete "$INSTDIR\Thanks.txt" Delete "$INSTDIR\ToDo.txt" Delete "$INSTDIR\Authors.txt" -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
10
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
Results per page:
10
25
50
100
200