├── po ├── LINGUAS ├── meson.build ├── CMakeLists.txt └── POTFILES.in ├── debian ├── compat ├── postinst ├── postrm ├── rules └── control ├── gedit_plugin ├── po │ ├── POTFILES.in │ ├── CMakeLists.txt │ ├── gedit_plugin.pot │ ├── valaplugin.pot │ └── es.po ├── debian │ ├── postrm │ ├── postinst │ ├── rules │ ├── control │ └── changelog ├── packages │ ├── rpm.spec.base │ ├── PKGBUILD.base │ └── control.base ├── data │ ├── autovala.plugin │ ├── local │ │ └── CMakeLists.txt │ └── CMakeLists.txt ├── cmake │ ├── Tests.cmake │ ├── README │ ├── CMakeLists.txt │ ├── FindValadoc.cmake │ ├── Valadoc.cmake │ ├── ParseArguments.cmake │ ├── GSettings.cmake │ ├── GObjectIntrospectionMacros.cmake │ └── Translations.cmake ├── src │ ├── autovalagedit.deps │ ├── Config.vala.base │ ├── Config.vala.cmake │ └── autovalagedit.pc ├── doc │ └── CMakeLists.txt ├── PKGBUILD ├── HISTORY.md ├── autovala_gedit.avprj ├── AUR │ └── PKGBUILD ├── README.md ├── rpmbuild │ └── SPECS │ │ └── gedit_plugin.spec └── CMakeLists.txt ├── packages └── examples │ ├── rpm.spec.base │ ├── control.base │ └── PKGBUILD.base ├── scratch_plugin ├── po │ ├── POTFILES.in │ ├── CMakeLists.txt │ ├── scratch_plugin.pot │ └── es.po ├── cmake │ ├── Tests.cmake │ ├── README │ ├── CMakeLists.txt │ ├── FindValadoc.cmake │ ├── Valadoc.cmake │ ├── ParseArguments.cmake │ ├── GSettings.cmake │ ├── GObjectIntrospectionMacros.cmake │ ├── Translations.cmake │ └── FindVala.cmake~ ├── src │ ├── autovalascratch.deps │ ├── Config.vala.cmake │ └── autovalascratch.pc ├── data │ ├── autovalascratch.plugin │ ├── CMakeLists.txt │ └── local │ │ └── CMakeLists.txt ├── doc │ └── CMakeLists.txt ├── scratch_plugin.avprj ├── README.md └── CMakeLists.txt ├── AUTHORS ├── wiki ├── footer.html ├── header.html ├── To-Do.md ├── convert.sh ├── Home.md ├── index.html.md ├── plugins.1.md └── CMakeLists.txt ├── autovala-atom ├── capture.png ├── TODO ├── CHANGELOG.md ├── package.json ├── grammars │ └── autovala.cson ├── README.md ├── LICENSE.md ├── styles │ └── icons.less ├── spec │ └── autovala-atom-spec.coffee └── lib │ └── svg │ └── vala.svg ├── data ├── interface │ └── CMakeLists.txt ├── cmake │ ├── Tests.cmake │ ├── README │ ├── CMakeLists.txt │ ├── FindValadoc.cmake │ ├── Valadoc.cmake │ ├── ParseArguments.cmake │ ├── GSettings.cmake │ ├── GObjectIntrospectionMacros.cmake │ └── Translations.cmake ├── debian │ ├── CMakeLists.txt │ └── rules ├── bash_completion │ ├── autovala │ └── CMakeLists.txt ├── local │ └── CMakeLists.txt ├── extras.gresource.xml ├── pixmaps │ ├── CMakeLists.txt │ └── vala.svg ├── CMakeLists.txt └── com.rastersoft.autovala.metainfo.xml ├── meson_scripts ├── check_path.sh ├── install_data.sh ├── install_manpage.sh └── install_library.sh ├── src ├── autovalaLib │ ├── AutoVala.deps │ ├── AutoVala.pc │ ├── Config.vala.base │ ├── Config.vala.cmake │ ├── elementIgnore.vala │ ├── elementBDepend.vala │ ├── elementVapidir.vala │ ├── elementPolkit.vala │ ├── elementDefine.vala │ ├── elementBinary.vala │ ├── elementDBusConf.vala │ ├── elementPixmap.vala │ ├── elementExternal.vala │ ├── elementScheme.vala │ ├── elementInclude.vala │ ├── elementGlade.vala │ ├── elementMimetype.vala │ ├── elementEosPlug.vala │ ├── elementSDepend.vala │ ├── elementData.vala │ └── elementDoc.vala ├── autovalaPlugin │ ├── AutovalaPlugin.deps │ ├── Config.vala.base │ ├── Config.vala.cmake │ ├── AutovalaPlugin.pc │ ├── PanedPercentage.vala │ ├── outputview.vala │ ├── ProjectViewerMenu.vala │ └── CreateNewProject.vala ├── Config.vala.base ├── Config.vala.cmake ├── meson.build └── CMakeLists.txt ├── cmake ├── Tests.cmake ├── README ├── CMakeLists.txt ├── FindValadoc.cmake ├── Valadoc.cmake ├── ParseArguments.cmake ├── GSettings.cmake ├── GObjectIntrospectionMacros.cmake └── Translations.cmake ├── doc ├── To-Do ├── CMakeLists.txt ├── view.css ├── Home ├── index.html └── plugins.1 ├── INSTALL.md ├── PKGBUILD ├── CMakeLists.txt └── README.md /po/LINGUAS: -------------------------------------------------------------------------------- 1 | es 2 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ldconfig 4 | -------------------------------------------------------------------------------- /debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ldconfig 4 | -------------------------------------------------------------------------------- /gedit_plugin/po/POTFILES.in: -------------------------------------------------------------------------------- 1 | src/gedit_plugin.vala 2 | -------------------------------------------------------------------------------- /packages/examples/rpm.spec.base: -------------------------------------------------------------------------------- 1 | Requires: pandoc 2 | -------------------------------------------------------------------------------- /gedit_plugin/debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ldconfig 4 | -------------------------------------------------------------------------------- /packages/examples/control.base: -------------------------------------------------------------------------------- 1 | 2 | Depends: pandoc 3 | -------------------------------------------------------------------------------- /scratch_plugin/po/POTFILES.in: -------------------------------------------------------------------------------- 1 | src/scratch_plugin.vala 2 | -------------------------------------------------------------------------------- /gedit_plugin/debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ldconfig 4 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | rastersoft = Sergio Costas Rodríguez 2 | -------------------------------------------------------------------------------- /gedit_plugin/packages/rpm.spec.base: -------------------------------------------------------------------------------- 1 | BuildRequires: autovala 2 | Requires: autovala 3 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | i18n = import('i18n') 2 | i18n.gettext('autovala', languages: ['es']) 3 | -------------------------------------------------------------------------------- /gedit_plugin/packages/PKGBUILD.base: -------------------------------------------------------------------------------- 1 | depends=( 'autovala' ) 2 | makedepends=( 'autovala' ) 3 | -------------------------------------------------------------------------------- /gedit_plugin/packages/control.base: -------------------------------------------------------------------------------- 1 | Build-Depends: autovala 2 | 3 | Depends: autovala 4 | -------------------------------------------------------------------------------- /wiki/footer.html: -------------------------------------------------------------------------------- 1 |

Home

2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /autovala-atom/capture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rastersoft/autovala/HEAD/autovala-atom/capture.png -------------------------------------------------------------------------------- /packages/examples/PKGBUILD.base: -------------------------------------------------------------------------------- 1 | source=( 'https://github.com/rastersoft/autovala/archive/master.zip' ) 2 | -------------------------------------------------------------------------------- /data/interface/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | -------------------------------------------------------------------------------- /meson_scripts/check_path.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -e $1 ] 4 | then 5 | exit 0 6 | else 7 | exit 1 8 | fi 9 | -------------------------------------------------------------------------------- /meson_scripts/install_data.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | mkdir -p $DESTDIR/$1 3 | if [ -d "$2" ]; then 4 | cp -a $2/* $DESTDIR/$1 5 | else 6 | cp -a $2 $DESTDIR/$1 7 | fi 8 | -------------------------------------------------------------------------------- /scratch_plugin/po/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | include (Translations) 5 | add_translations_directory("scratch_plugin") 6 | -------------------------------------------------------------------------------- /wiki/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |

Home

8 | -------------------------------------------------------------------------------- /wiki/To-Do.md: -------------------------------------------------------------------------------- 1 | # TO DO 2 | 3 | While Autovala is fully usable, there are still a lot of things that I want to add to it, and I will need help. 4 | 5 | * Support localization of desktop files 6 | -------------------------------------------------------------------------------- /src/autovalaLib/AutoVala.deps: -------------------------------------------------------------------------------- 1 | posix 2 | readline 3 | cairo 4 | gdk-3.0 5 | gdk-pixbuf-2.0 6 | gee-0.8 7 | gio-2.0 8 | glib-2.0 9 | gobject-2.0 10 | libxml-2.0 11 | pango 12 | pangocairo 13 | -------------------------------------------------------------------------------- /gedit_plugin/data/autovala.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=autovalagedit.so 3 | IAge=3 4 | Name=Autovala Plugin 5 | Description=An AutoVala Plugin for Gedit 6 | Authors=Sergio Costas 7 | -------------------------------------------------------------------------------- /cmake/Tests.cmake: -------------------------------------------------------------------------------- 1 | # Test macros for Marlin, feel free to re-use them. 2 | 3 | macro(add_test_executable EXE_NAME) 4 | add_test(${EXE_NAME} gtester ${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}) 5 | endmacro() 6 | -------------------------------------------------------------------------------- /data/cmake/Tests.cmake: -------------------------------------------------------------------------------- 1 | # Test macros for Marlin, feel free to re-use them. 2 | 3 | macro(add_test_executable EXE_NAME) 4 | add_test(${EXE_NAME} gtester ${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}) 5 | endmacro() 6 | -------------------------------------------------------------------------------- /gedit_plugin/cmake/Tests.cmake: -------------------------------------------------------------------------------- 1 | # Test macros for Marlin, feel free to re-use them. 2 | 3 | macro(add_test_executable EXE_NAME) 4 | add_test(${EXE_NAME} gtester ${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}) 5 | endmacro() 6 | -------------------------------------------------------------------------------- /scratch_plugin/cmake/Tests.cmake: -------------------------------------------------------------------------------- 1 | # Test macros for Marlin, feel free to re-use them. 2 | 3 | macro(add_test_executable EXE_NAME) 4 | add_test(${EXE_NAME} gtester ${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}) 5 | endmacro() 6 | -------------------------------------------------------------------------------- /src/autovalaPlugin/AutovalaPlugin.deps: -------------------------------------------------------------------------------- 1 | AutoVala 2 | atk 3 | gtk+-3.0 4 | x11 5 | cairo 6 | gdk-3.0 7 | gdk-pixbuf-2.0 8 | gee-0.8 9 | gio-2.0 10 | glib-2.0 11 | gobject-2.0 12 | pango 13 | pangocairo 14 | vte-2.91 15 | -------------------------------------------------------------------------------- /gedit_plugin/po/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | include (Translations) 5 | add_translations_directory("autovala_gedit") 6 | add_translations_catalog("autovala_gedit" ../src ) 7 | -------------------------------------------------------------------------------- /po/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | include (Translations) 5 | add_translations_directory("autovala") 6 | add_translations_catalog("autovala" ../src ../src/autovalaLib ../src/autovalaPlugin ../data/interface ) 7 | -------------------------------------------------------------------------------- /wiki/convert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cp ../HISTORY.md ./versions.md 3 | for file in *.md; do 4 | cat header.html > "../doc/`basename $file .md`" 5 | pandoc -f markdown_github -t html "$file" >> "../doc/`basename $file .md`" 6 | cat footer.html >> "../doc/`basename $file .md`" 7 | done 8 | -------------------------------------------------------------------------------- /scratch_plugin/src/autovalascratch.deps: -------------------------------------------------------------------------------- 1 | AutoVala 2 | AutovalaPlugin 3 | atk 4 | cairo 5 | gdk-3.0 6 | gdk-pixbuf-2.0 7 | gee-0.8 8 | gio-2.0 9 | glib-2.0 10 | gobject-2.0 11 | gobject-introspection-1.0 12 | gtk+-3.0 13 | libpeas-1.0 14 | libxml-2.0 15 | pango 16 | pangocairo 17 | vte-2.91 18 | x11 19 | -------------------------------------------------------------------------------- /cmake/README: -------------------------------------------------------------------------------- 1 | Elementary CMake modules 2 | 3 | This is a set of CMake modules: Translations, GSettings, and Vala modules. 4 | 5 | For all the Vala related modules see README.Vala.rst: 6 | - ParseArguments.cmake 7 | - ValaPrecompile.cmake 8 | - ValaVersion.cmake 9 | - FindVala.cmake 10 | 11 | -------------------------------------------------------------------------------- /data/cmake/README: -------------------------------------------------------------------------------- 1 | Elementary CMake modules 2 | 3 | This is a set of CMake modules: Translations, GSettings, and Vala modules. 4 | 5 | For all the Vala related modules see README.Vala.rst: 6 | - ParseArguments.cmake 7 | - ValaPrecompile.cmake 8 | - ValaVersion.cmake 9 | - FindVala.cmake 10 | 11 | -------------------------------------------------------------------------------- /meson_scripts/install_manpage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir -p $DESTDIR/$MESON_INSTALL_PREFIX/$2 4 | if [ $1 -eq '2' ]; then 5 | pandoc ${MESON_SOURCE_ROOT}/$3 -o - -f $4 -t man -s | gzip - > $MESON_INSTALL_DESTDIR_PREFIX/$2/$5.gz 6 | else 7 | cat ${MESON_SOURCE_ROOT}/$3 | gzip - > $MESON_INSTALL_DESTDIR_PREFIX/$2/$5.gz 8 | fi 9 | -------------------------------------------------------------------------------- /scratch_plugin/data/autovalascratch.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=autovalascratch 3 | Loader=C 4 | IAge=2 5 | Name=Autovala Plugin 6 | Description=Manage Autovala projects 7 | Icon=system-file-manager 8 | Authors=Sergio Costas 9 | Copyright=Copyright © 2014 Raster Software Vigo 10 | Website=http://launchpad.net/scratch 11 | -------------------------------------------------------------------------------- /gedit_plugin/cmake/README: -------------------------------------------------------------------------------- 1 | Elementary CMake modules 2 | 3 | This is a set of CMake modules: Translations, GSettings, and Vala modules. 4 | 5 | For all the Vala related modules see README.Vala.rst: 6 | - ParseArguments.cmake 7 | - ValaPrecompile.cmake 8 | - ValaVersion.cmake 9 | - FindVala.cmake 10 | 11 | -------------------------------------------------------------------------------- /gedit_plugin/src/autovalagedit.deps: -------------------------------------------------------------------------------- 1 | gedit 2 | AutoVala 3 | AutovalaPlugin 4 | atk 5 | cairo 6 | gdk-3.0 7 | gdk-pixbuf-2.0 8 | gee-0.8 9 | gio-2.0 10 | glib-2.0 11 | gobject-2.0 12 | gobject-introspection-1.0 13 | gtk+-3.0 14 | gtksourceview-3.0 15 | libpeas-1.0 16 | libxml-2.0 17 | pango 18 | pangocairo 19 | vte-2.91 20 | x11 21 | -------------------------------------------------------------------------------- /scratch_plugin/cmake/README: -------------------------------------------------------------------------------- 1 | Elementary CMake modules 2 | 3 | This is a set of CMake modules: Translations, GSettings, and Vala modules. 4 | 5 | For all the Vala related modules see README.Vala.rst: 6 | - ParseArguments.cmake 7 | - ValaPrecompile.cmake 8 | - ValaVersion.cmake 9 | - FindVala.cmake 10 | 11 | -------------------------------------------------------------------------------- /scratch_plugin/src/Config.vala.cmake: -------------------------------------------------------------------------------- 1 | namespace autovalascratchConstants { 2 | public const string DATADIR = "@DATADIR@"; 3 | public const string PKGDATADIR = "@PKGDATADIR@"; 4 | public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"; 5 | public const string RELEASE_NAME = "@RELEASE_NAME@"; 6 | public const string VERSION = "@VERSION@"; 7 | } 8 | -------------------------------------------------------------------------------- /autovala-atom/TODO: -------------------------------------------------------------------------------- 1 | # Things to do 2 | 3 | * Allow to resize the Autovala panel 4 | * Add a menu entry to allow to create a new Autovala project 5 | * Add buttons or menu entries to allow to refresh, update and build the project from the editor 6 | * Allow to define binaries and libraries in the project from the editor, without needing to manually edit the .avprj file 7 | -------------------------------------------------------------------------------- /cmake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/) 5 | install(DIRECTORY 6 | ${CMAKE_CURRENT_SOURCE_DIR}/ 7 | DESTINATION 8 | share/autovala/cmake 9 | ) 10 | ELSE() 11 | install(FILES 12 | ${CMAKE_CURRENT_SOURCE_DIR}/ 13 | DESTINATION 14 | share/autovala/cmake 15 | ) 16 | ENDIF() 17 | 18 | -------------------------------------------------------------------------------- /data/cmake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/) 5 | install(DIRECTORY 6 | ${CMAKE_CURRENT_SOURCE_DIR}/ 7 | DESTINATION 8 | share/autovala/cmake 9 | ) 10 | ELSE() 11 | install(FILES 12 | ${CMAKE_CURRENT_SOURCE_DIR}/ 13 | DESTINATION 14 | share/autovala/cmake 15 | ) 16 | ENDIF() 17 | 18 | -------------------------------------------------------------------------------- /data/debian/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/) 5 | install(DIRECTORY 6 | ${CMAKE_CURRENT_SOURCE_DIR}/ 7 | DESTINATION 8 | share/autovala/debian 9 | ) 10 | ELSE() 11 | install(FILES 12 | ${CMAKE_CURRENT_SOURCE_DIR}/ 13 | DESTINATION 14 | share/autovala/debian 15 | ) 16 | ENDIF() 17 | 18 | -------------------------------------------------------------------------------- /src/Config.vala.base: -------------------------------------------------------------------------------- 1 | namespace Constants { 2 | public const string DATADIR = "@DATADIR@"; 3 | public const string PKGDATADIR = "@PKGDATADIR@"; 4 | public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"; 5 | public const string RELEASE_NAME = "@RELEASE_NAME@"; 6 | public const string VERSION = "@VERSION@"; 7 | #if UNITEST 8 | public const string TESTSRCDIR = "@TESTSRCDIR@"; 9 | #endif 10 | } 11 | -------------------------------------------------------------------------------- /src/Config.vala.cmake: -------------------------------------------------------------------------------- 1 | namespace Constants { 2 | public const string DATADIR = "@DATADIR@"; 3 | public const string PKGDATADIR = "@PKGDATADIR@"; 4 | public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"; 5 | public const string RELEASE_NAME = "@RELEASE_NAME@"; 6 | public const string VERSION = "@VERSION@"; 7 | #if UNITEST 8 | public const string TESTSRCDIR = "@TESTSRCDIR@"; 9 | #endif 10 | } 11 | -------------------------------------------------------------------------------- /gedit_plugin/cmake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/) 5 | install(DIRECTORY 6 | ${CMAKE_CURRENT_SOURCE_DIR}/ 7 | DESTINATION 8 | share/autovala/cmake 9 | ) 10 | ELSE() 11 | install(FILES 12 | ${CMAKE_CURRENT_SOURCE_DIR}/ 13 | DESTINATION 14 | share/autovala/cmake 15 | ) 16 | ENDIF() 17 | 18 | -------------------------------------------------------------------------------- /scratch_plugin/cmake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/) 5 | install(DIRECTORY 6 | ${CMAKE_CURRENT_SOURCE_DIR}/ 7 | DESTINATION 8 | share/autovala/cmake 9 | ) 10 | ELSE() 11 | install(FILES 12 | ${CMAKE_CURRENT_SOURCE_DIR}/ 13 | DESTINATION 14 | share/autovala/cmake 15 | ) 16 | ENDIF() 17 | 18 | -------------------------------------------------------------------------------- /src/autovalaLib/AutoVala.pc: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | libdir=@DOLLAR@{prefix}/${CMAKE_INSTALL_LIBDIR} 3 | includedir=@DOLLAR@{prefix}/${CMAKE_INSTALL_INCLUDEDIR} 4 | 5 | Name: AutoVala 6 | Description: AutoVala 7 | Version: 1.10.0 8 | Libs: -L@DOLLAR@{libdir} -lAutoVala 9 | Cflags: -I@DOLLAR@{includedir} 10 | Requires: cairo gdk-3.0 gdk-pixbuf-2.0 gee-0.8 gio-2.0 glib-2.0 gobject-2.0 libxml-2.0 pango pangocairo 11 | -------------------------------------------------------------------------------- /src/autovalaLib/Config.vala.base: -------------------------------------------------------------------------------- 1 | namespace AutoValaConstants { 2 | public const string DATADIR = "@DATADIR@"; 3 | public const string PKGDATADIR = "@PKGDATADIR@"; 4 | public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"; 5 | public const string RELEASE_NAME = "@RELEASE_NAME@"; 6 | public const string VERSION = "@VERSION@"; 7 | #if UNITEST 8 | public const string TESTSRCDIR = "@TESTSRCDIR@"; 9 | #endif 10 | } 11 | -------------------------------------------------------------------------------- /src/autovalaLib/Config.vala.cmake: -------------------------------------------------------------------------------- 1 | namespace AutoValaConstants { 2 | public const string DATADIR = "@DATADIR@"; 3 | public const string PKGDATADIR = "@PKGDATADIR@"; 4 | public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"; 5 | public const string RELEASE_NAME = "@RELEASE_NAME@"; 6 | public const string VERSION = "@VERSION@"; 7 | #if UNITEST 8 | public const string TESTSRCDIR = "@TESTSRCDIR@"; 9 | #endif 10 | } 11 | -------------------------------------------------------------------------------- /gedit_plugin/src/Config.vala.base: -------------------------------------------------------------------------------- 1 | namespace autovalageditConstants { 2 | public const string DATADIR = "@DATADIR@"; 3 | public const string PKGDATADIR = "@PKGDATADIR@"; 4 | public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"; 5 | public const string RELEASE_NAME = "@RELEASE_NAME@"; 6 | public const string VERSION = "@VERSION@"; 7 | #if UNITEST 8 | public const string TESTSRCDIR = "@TESTSRCDIR@"; 9 | #endif 10 | } 11 | -------------------------------------------------------------------------------- /gedit_plugin/src/Config.vala.cmake: -------------------------------------------------------------------------------- 1 | namespace autovalageditConstants { 2 | public const string DATADIR = "@DATADIR@"; 3 | public const string PKGDATADIR = "@PKGDATADIR@"; 4 | public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"; 5 | public const string RELEASE_NAME = "@RELEASE_NAME@"; 6 | public const string VERSION = "@VERSION@"; 7 | #if UNITEST 8 | public const string TESTSRCDIR = "@TESTSRCDIR@"; 9 | #endif 10 | } 11 | -------------------------------------------------------------------------------- /scratch_plugin/src/autovalascratch.pc: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | real_prefix=@CMAKE_INSTALL_PREFIX@ 3 | exec_prefix=@DOLLAR@{prefix} 4 | libdir=@DOLLAR@{exec_prefix}/${CMAKE_INSTALL_LIBDIR} 5 | includedir=@DOLLAR@{exec_prefix}/${CMAKE_INSTALL_INCLUDEDIR} 6 | 7 | Name: autovalascratch 8 | Description: autovalascratch 9 | Version: 1.0.0 10 | Libs: -L@DOLLAR@{libdir} -lautovalascratch 11 | Cflags: -I@DOLLAR@{includedir} 12 | -------------------------------------------------------------------------------- /src/autovalaPlugin/Config.vala.base: -------------------------------------------------------------------------------- 1 | namespace AutovalaPluginConstants { 2 | public const string DATADIR = "@DATADIR@"; 3 | public const string PKGDATADIR = "@PKGDATADIR@"; 4 | public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"; 5 | public const string RELEASE_NAME = "@RELEASE_NAME@"; 6 | public const string VERSION = "@VERSION@"; 7 | #if UNITEST 8 | public const string TESTSRCDIR = "@TESTSRCDIR@"; 9 | #endif 10 | } 11 | -------------------------------------------------------------------------------- /src/autovalaPlugin/Config.vala.cmake: -------------------------------------------------------------------------------- 1 | namespace AutovalaPluginConstants { 2 | public const string DATADIR = "@DATADIR@"; 3 | public const string PKGDATADIR = "@PKGDATADIR@"; 4 | public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"; 5 | public const string RELEASE_NAME = "@RELEASE_NAME@"; 6 | public const string VERSION = "@VERSION@"; 7 | #if UNITEST 8 | public const string TESTSRCDIR = "@TESTSRCDIR@"; 9 | #endif 10 | } 11 | -------------------------------------------------------------------------------- /autovala-atom/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## History of versions ## 2 | * version 0.5.0 (2016-11-01) 3 | * Allows to use dark and light themes 4 | * version 0.4.0 (2016-11-01) 5 | * Fixed error when opening an empty window 6 | * version 0.3.0 (2016-10-30) 7 | * Created accidentally 8 | * version 0.2.0 (2016-10-30) 9 | * Created accidentally 10 | * version 0.1.0 (2016-10-30) 11 | * First version; added basic Autovala support for Atom editor 12 | -------------------------------------------------------------------------------- /src/autovalaPlugin/AutovalaPlugin.pc: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | libdir=@DOLLAR@{prefix}/${CMAKE_INSTALL_LIBDIR} 3 | includedir=@DOLLAR@{prefix}/${CMAKE_INSTALL_INCLUDEDIR} 4 | 5 | Name: AutovalaPlugin 6 | Description: AutovalaPlugin 7 | Version: 0.99 8 | Libs: -L@DOLLAR@{libdir} -lAutovalaPlugin 9 | Cflags: -I@DOLLAR@{includedir} 10 | Requires: AutoVala atk gtk+-3.0 x11 cairo gdk-3.0 gdk-pixbuf-2.0 gee-0.8 gio-2.0 glib-2.0 gobject-2.0 pango pangocairo vte-2.91 11 | -------------------------------------------------------------------------------- /doc/To-Do: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |

Home

8 |

TO DO

9 |

While Autovala is fully usable, there are still a lot of things that I want to add to it, and I will need help.

10 |
    11 |
  • Support localization of desktop files
  • 12 |
13 |

Home

14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /data/bash_completion/autovala: -------------------------------------------------------------------------------- 1 | # bash completion for autovala 2 | 3 | _autovala() 4 | { 5 | local cur prev opts job 6 | job="${COMP_WORDS[0]}" 7 | cur="${COMP_WORDS[COMP_CWORD]}" 8 | prev="${COMP_WORDS[COMP_CWORD-1]}" 9 | if [[ ${COMP_CWORD} = 1 ]] ; then 10 | COMPREPLY=( $(compgen -W "help version init ginit refresh cmake meson update po clear project_files git deb rpm pacman valama external" -- ${cur}) ) 11 | return 0 12 | fi 13 | } 14 | 15 | complete -F _autovala autovala 16 | -------------------------------------------------------------------------------- /scratch_plugin/data/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/autovalascratch.plugin) 5 | install(DIRECTORY 6 | ${CMAKE_CURRENT_SOURCE_DIR}/autovalascratch.plugin 7 | DESTINATION 8 | lib/scratch/plugins/autovala 9 | ) 10 | ELSE() 11 | install(FILES 12 | ${CMAKE_CURRENT_SOURCE_DIR}/autovalascratch.plugin 13 | DESTINATION 14 | lib/scratch/plugins/autovala 15 | ) 16 | ENDIF() 17 | 18 | -------------------------------------------------------------------------------- /autovala-atom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "autovala-atom", 3 | "main": "./lib/autovala-atom", 4 | "version": "0.5.0", 5 | "description": "Adds support for Autovala, simplifying the development of code in Vala.", 6 | "keywords": [], 7 | "repository": "https://github.com/rastersoft/autovala-atom", 8 | "license": "MIT", 9 | "engines": { 10 | "atom": ">=1.0.0 <2.0.0" 11 | }, 12 | "dependencies": { 13 | "atom-space-pen-views": ">=0.1.0", 14 | "event-kit": ">=0.1.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /wiki/Home.md: -------------------------------------------------------------------------------- 1 | # AUTOVALA 2 | 3 | Autovala is a program and a library designed to help in the creation of projects with Vala and CMake. 4 | 5 | The idea is quite simple: CMake is very powerful, but writting the CMakeLists files is boring and repetitive. Why not let the computer create them, by guessing what to do with each file? And if, at the end, there are mistakes, let the user fix them in an easy way, and generate the final CMakeLists files. 6 | 7 | [You can read the documentation by clicking here](wiki/index.html) -------------------------------------------------------------------------------- /meson_scripts/install_library.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir -p "${DESTDIR}${MESON_INSTALL_PREFIX}/share/vala/vapi" 4 | mkdir -p "${DESTDIR}${MESON_INSTALL_PREFIX}/share/gir-1.0" 5 | mkdir -p "${DESTDIR}${MESON_INSTALL_PREFIX}/include" 6 | 7 | install -m 644 "${MESON_BUILD_ROOT}/$1/$2.vapi" "${DESTDIR}${MESON_INSTALL_PREFIX}/share/vala/vapi" 8 | install -m 644 "${MESON_BUILD_ROOT}/$1/$2.h" "${DESTDIR}${MESON_INSTALL_PREFIX}/include" 9 | install -m 644 "${MESON_BUILD_ROOT}/$1/$2@sha/$3" "${DESTDIR}${MESON_INSTALL_PREFIX}/share/gir-1.0" 10 | -------------------------------------------------------------------------------- /data/bash_completion/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | IF( NOT ( ${CMAKE_INSTALL_PREFIX} MATCHES "^/home/" ) ) 5 | EXEC_PROGRAM ( 6 | pkg-config 7 | ARGS 8 | --variable=completionsdir bash-completion 9 | OUTPUT_VARIABLE INSTALL_BASH_COMPLETION 10 | ) 11 | 12 | IF( NOT ( INSTALL_BASH_COMPLETION STREQUAL "" )) 13 | install(FILES 14 | ${CMAKE_CURRENT_SOURCE_DIR}/autovala 15 | DESTINATION 16 | ${INSTALL_BASH_COMPLETION} 17 | ) 18 | ENDIF() 19 | 20 | ENDIF() 21 | 22 | -------------------------------------------------------------------------------- /data/local/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | file(GLOB list_data RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *) 5 | foreach(file_data ${list_data}) 6 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${file_data}) 7 | install(DIRECTORY 8 | ${file_data} 9 | DESTINATION 10 | ${CMAKE_INSTALL_DATAROOTDIR}/autovala 11 | ) 12 | ELSE() 13 | install(FILES 14 | ${file_data} 15 | DESTINATION 16 | ${CMAKE_INSTALL_DATAROOTDIR}/autovala 17 | ) 18 | ENDIF() 19 | endforeach() 20 | 21 | -------------------------------------------------------------------------------- /doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | file(GLOB list_data RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *) 5 | foreach(file_data ${list_data}) 6 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${file_data}) 7 | install(DIRECTORY 8 | ${file_data} 9 | DESTINATION 10 | ${CMAKE_INSTALL_DATAROOTDIR}/doc/autovala 11 | ) 12 | ELSE() 13 | install(FILES 14 | ${file_data} 15 | DESTINATION 16 | ${CMAKE_INSTALL_DATAROOTDIR}/doc/autovala 17 | ) 18 | ENDIF() 19 | endforeach() 20 | 21 | -------------------------------------------------------------------------------- /autovala-atom/grammars/autovala.cson: -------------------------------------------------------------------------------- 1 | 'scopeName': 'text.autovala' 2 | 'name': 'Autovala' 3 | 'fileTypes': ['avprj'] 4 | 5 | 'patterns': [ 6 | { 7 | 'match' : '^#.*' 8 | 'name' : 'comment.line.number-sign.generic-config' 9 | }, { 10 | 'match' : '^[a-z_]+:' 11 | 'name' : 'variable.parameter.generic-config' 12 | }, { 13 | 'match' : '^(\\*)([a-z_]+):' 14 | 'captures': 15 | '1': 16 | 'name' : 'keyword.control.generic-config' 17 | '2': 18 | 'name' : 'variable.parameter.generic-config' 19 | } 20 | ] 21 | -------------------------------------------------------------------------------- /gedit_plugin/data/local/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | file(GLOB list_data RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *) 5 | foreach(file_data ${list_data}) 6 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${file_data}) 7 | install(DIRECTORY 8 | ${file_data} 9 | DESTINATION 10 | ${CMAKE_INSTALL_DATAROOTDIR}/autovala_gedit 11 | ) 12 | ELSE() 13 | install(FILES 14 | ${file_data} 15 | DESTINATION 16 | ${CMAKE_INSTALL_DATAROOTDIR}/autovala_gedit 17 | ) 18 | ENDIF() 19 | endforeach() 20 | 21 | -------------------------------------------------------------------------------- /gedit_plugin/doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | file(GLOB list_data RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *) 5 | foreach(file_data ${list_data}) 6 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${file_data}) 7 | install(DIRECTORY 8 | ${file_data} 9 | DESTINATION 10 | ${CMAKE_INSTALL_DATAROOTDIR}/doc/autovala_gedit 11 | ) 12 | ELSE() 13 | install(FILES 14 | ${file_data} 15 | DESTINATION 16 | ${CMAKE_INSTALL_DATAROOTDIR}/doc/autovala_gedit 17 | ) 18 | ENDIF() 19 | endforeach() 20 | 21 | -------------------------------------------------------------------------------- /scratch_plugin/data/local/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | file(GLOB list_data RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *) 5 | foreach(file_data ${list_data}) 6 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${file_data}) 7 | install(DIRECTORY 8 | ${file_data} 9 | DESTINATION 10 | ${CMAKE_INSTALL_DATAROOTDIR}/scratch_plugin 11 | ) 12 | ELSE() 13 | install(FILES 14 | ${file_data} 15 | DESTINATION 16 | ${CMAKE_INSTALL_DATAROOTDIR}/scratch_plugin 17 | ) 18 | ENDIF() 19 | endforeach() 20 | 21 | -------------------------------------------------------------------------------- /scratch_plugin/doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | file(GLOB list_data RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *) 5 | foreach(file_data ${list_data}) 6 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${file_data}) 7 | install(DIRECTORY 8 | ${file_data} 9 | DESTINATION 10 | ${CMAKE_INSTALL_DATAROOTDIR}/doc/scratch_plugin 11 | ) 12 | ELSE() 13 | install(FILES 14 | ${file_data} 15 | DESTINATION 16 | ${CMAKE_INSTALL_DATAROOTDIR}/doc/scratch_plugin 17 | ) 18 | ENDIF() 19 | endforeach() 20 | 21 | -------------------------------------------------------------------------------- /gedit_plugin/src/autovalagedit.pc: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | real_prefix=@CMAKE_INSTALL_PREFIX@ 3 | exec_prefix=@DOLLAR@{prefix} 4 | libdir=@DOLLAR@{exec_prefix}/${CMAKE_INSTALL_LIBDIR} 5 | includedir=@DOLLAR@{exec_prefix}/${CMAKE_INSTALL_INCLUDEDIR} 6 | 7 | Name: autovalagedit 8 | Description: autovalagedit 9 | Version: 1.0.0 10 | Libs: -L@DOLLAR@{libdir} -lautovalagedit 11 | Cflags: -I@DOLLAR@{includedir} 12 | Requires: gedit AutoVala AutovalaPlugin atk cairo gdk-3.0 gdk-pixbuf-2.0 gee-0.8 gio-2.0 glib-2.0 gobject-2.0 gobject-introspection-1.0 gtk+-3.0 gtksourceview-3.0 libpeas-1.0 libxml-2.0 pango pangocairo vte-2.91 x11 13 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | BUILDDIR = build_dir 4 | 5 | # secondly called by launchpad 6 | build: 7 | mkdir $(BUILDDIR); 8 | cd $(BUILDDIR); cmake -DCMAKE_INSTALL_PREFIX=/usr -DGSETTINGS_COMPILE=OFF -DICON_UPDATE=OFF .. 9 | make -C $(BUILDDIR) 10 | 11 | 12 | # thirdly called by launchpad 13 | binary: binary-indep binary-arch 14 | 15 | binary-indep: 16 | # nothing to be done 17 | 18 | binary-arch: 19 | make install -C $(BUILDDIR) DESTDIR=./debian/tmp 20 | mkdir -p ./debian/tmp/DEBIAN 21 | mv $(BUILDDIR)/debian/tmp/* ./debian/tmp 22 | dpkg-gencontrol -pautovala; 23 | dpkg --build debian/tmp .. 24 | 25 | # firstly called by launchpad 26 | clean: 27 | rm -f build 28 | rm -rf $(BUILDDIR) 29 | 30 | .PHONY: binary binary-arch binary-indep clean 31 | -------------------------------------------------------------------------------- /data/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | BUILDDIR = build_dir 4 | 5 | # secondly called by launchpad 6 | build: 7 | mkdir $(BUILDDIR); 8 | cd $(BUILDDIR); cmake -DCMAKE_INSTALL_PREFIX=/usr -DGSETTINGS_COMPILE=OFF -DICON_UPDATE=OFF .. 9 | make -C $(BUILDDIR) 10 | 11 | 12 | # thirdly called by launchpad 13 | binary: binary-indep binary-arch 14 | 15 | binary-indep: 16 | # nothing to be done 17 | 18 | binary-arch: 19 | make install -C $(BUILDDIR) DESTDIR=./debian/tmp 20 | mkdir -p ./debian/tmp/DEBIAN 21 | mv $(BUILDDIR)/debian/tmp/* ./debian/tmp 22 | dpkg-gencontrol -p%(PROJECT_NAME); 23 | dpkg --build debian/tmp .. 24 | 25 | # firstly called by launchpad 26 | clean: 27 | rm -f build 28 | rm -rf $(BUILDDIR) 29 | 30 | .PHONY: binary binary-arch binary-indep clean 31 | -------------------------------------------------------------------------------- /doc/view.css: -------------------------------------------------------------------------------- 1 | div.main_frame { 2 | width: 900px; 3 | background-color: #FFFFFF; 4 | margin: 2px auto 2px auto; 5 | border: 2px; 6 | border-style: solid; 7 | border-color: #C0C0C0; 8 | padding: 20px; 9 | } 10 | 11 | pre { 12 | width: 100%; 13 | background-color: #F0F0F0; 14 | border: 1px; 15 | border-style: solid; 16 | border-radius: 3px; 17 | border-color: #D0D0D0; 18 | padding: 0px; 19 | margin: 0px; 20 | } 21 | 22 | body { 23 | background-color: #F0F0F0; 24 | line-height:170%; 25 | } 26 | 27 | h1 { 28 | width: 100%; 29 | border-top: 0px; 30 | border-left: 0px; 31 | border-bottom: 1px; 32 | border-right: 0px; 33 | border-style: solid; 34 | border-color: #E0E0E0; 35 | } 36 | 37 | p { 38 | 39 | margin-top: 1.3em; 40 | margin-bottom: 1.3em; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /gedit_plugin/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | BUILDDIR = build_dir 4 | 5 | # secondly called by launchpad 6 | build: 7 | mkdir $(BUILDDIR); 8 | cd $(BUILDDIR); cmake -DCMAKE_INSTALL_PREFIX=/usr -DGSETTINGS_COMPILE=OFF -DICON_UPDATE=OFF .. 9 | make -C $(BUILDDIR) 10 | 11 | 12 | # thirdly called by launchpad 13 | binary: binary-indep binary-arch 14 | 15 | binary-indep: 16 | # nothing to be done 17 | 18 | binary-arch: 19 | make install -C $(BUILDDIR) DESTDIR=./debian/tmp 20 | mkdir -p ./debian/tmp/DEBIAN 21 | mv $(BUILDDIR)/debian/tmp/* ./debian/tmp 22 | dpkg-gencontrol -pgedit_plugin; 23 | dpkg --build debian/tmp .. 24 | 25 | # firstly called by launchpad 26 | clean: 27 | rm -f build 28 | rm -rf $(BUILDDIR) 29 | 30 | .PHONY: binary binary-arch binary-indep clean 31 | -------------------------------------------------------------------------------- /doc/Home: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |

Home

8 |

AUTOVALA

9 |

Autovala is a program and a library designed to help in the creation of projects with Vala and CMake.

10 |

The idea is quite simple: CMake is very powerful, but writting the CMakeLists files is boring and repetitive. Why not let the computer create them, by guessing what to do with each file? And if, at the end, there are mistakes, let the user fix them in an easy way, and generate the final CMakeLists files.

11 |

You can read the documentation by clicking here

12 |

Home

13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /cmake/FindValadoc.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Search for the valadocc executable in the usual system paths. 3 | find_program(VALADOC_EXECUTABLE NAMES valadoc) 4 | 5 | # Handle the QUIETLY and REQUIRED arguments, which may be given to the find call. 6 | # Furthermore set VALA_FOUND to TRUE if Vala has been found (aka. 7 | # VALA_EXECUTABLE is set) 8 | 9 | include(FindPackageHandleStandardArgs) 10 | find_package_handle_standard_args(Valadoc DEFAULT_MSG VALADOC_EXECUTABLE) 11 | 12 | mark_as_advanced(VALADOC_EXECUTABLE) 13 | 14 | # Determine the valac version 15 | if(VALA_FOUND) 16 | execute_process(COMMAND ${VALA_EXECUTABLE} "--version" 17 | OUTPUT_VARIABLE "VALA_VERSION") 18 | string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION}) 19 | string(STRIP ${VALA_VERSION} "VALA_VERSION") 20 | endif(VALA_FOUND) 21 | -------------------------------------------------------------------------------- /data/cmake/FindValadoc.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Search for the valadocc executable in the usual system paths. 3 | find_program(VALADOC_EXECUTABLE NAMES valadoc) 4 | 5 | # Handle the QUIETLY and REQUIRED arguments, which may be given to the find call. 6 | # Furthermore set VALA_FOUND to TRUE if Vala has been found (aka. 7 | # VALA_EXECUTABLE is set) 8 | 9 | include(FindPackageHandleStandardArgs) 10 | find_package_handle_standard_args(Valadoc DEFAULT_MSG VALADOC_EXECUTABLE) 11 | 12 | mark_as_advanced(VALADOC_EXECUTABLE) 13 | 14 | # Determine the valac version 15 | if(VALA_FOUND) 16 | execute_process(COMMAND ${VALA_EXECUTABLE} "--version" 17 | OUTPUT_VARIABLE "VALA_VERSION") 18 | string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION}) 19 | string(STRIP ${VALA_VERSION} "VALA_VERSION") 20 | endif(VALA_FOUND) 21 | -------------------------------------------------------------------------------- /data/extras.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | pixmaps/application.svg 5 | pixmaps/c.svg 6 | pixmaps/h.svg 7 | pixmaps/library.svg 8 | pixmaps/project.svg 9 | pixmaps/test_vala.svg 10 | pixmaps/vala.svg 11 | pixmaps/vapi.svg 12 | pixmaps/build.svg 13 | pixmaps/full_build.svg 14 | pixmaps/refresh.svg 15 | pixmaps/refresh_langs.svg 16 | pixmaps/update.svg 17 | interface/binary_properties.ui 18 | interface/new_project.ui 19 | 20 | 21 | -------------------------------------------------------------------------------- /gedit_plugin/cmake/FindValadoc.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Search for the valadocc executable in the usual system paths. 3 | find_program(VALADOC_EXECUTABLE NAMES valadoc) 4 | 5 | # Handle the QUIETLY and REQUIRED arguments, which may be given to the find call. 6 | # Furthermore set VALA_FOUND to TRUE if Vala has been found (aka. 7 | # VALA_EXECUTABLE is set) 8 | 9 | include(FindPackageHandleStandardArgs) 10 | find_package_handle_standard_args(Valadoc DEFAULT_MSG VALADOC_EXECUTABLE) 11 | 12 | mark_as_advanced(VALADOC_EXECUTABLE) 13 | 14 | # Determine the valac version 15 | if(VALA_FOUND) 16 | execute_process(COMMAND ${VALA_EXECUTABLE} "--version" 17 | OUTPUT_VARIABLE "VALA_VERSION") 18 | string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION}) 19 | string(STRIP ${VALA_VERSION} "VALA_VERSION") 20 | endif(VALA_FOUND) 21 | -------------------------------------------------------------------------------- /scratch_plugin/cmake/FindValadoc.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Search for the valadocc executable in the usual system paths. 3 | find_program(VALADOC_EXECUTABLE NAMES valadoc) 4 | 5 | # Handle the QUIETLY and REQUIRED arguments, which may be given to the find call. 6 | # Furthermore set VALA_FOUND to TRUE if Vala has been found (aka. 7 | # VALA_EXECUTABLE is set) 8 | 9 | include(FindPackageHandleStandardArgs) 10 | find_package_handle_standard_args(Valadoc DEFAULT_MSG VALADOC_EXECUTABLE) 11 | 12 | mark_as_advanced(VALADOC_EXECUTABLE) 13 | 14 | # Determine the valac version 15 | if(VALA_FOUND) 16 | execute_process(COMMAND ${VALA_EXECUTABLE} "--version" 17 | OUTPUT_VARIABLE "VALA_VERSION") 18 | string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION}) 19 | string(STRIP ${VALA_VERSION} "VALA_VERSION") 20 | endif(VALA_FOUND) 21 | -------------------------------------------------------------------------------- /gedit_plugin/data/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | if (ATHOME) 5 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/autovala.plugin) 6 | install(DIRECTORY 7 | ${CMAKE_CURRENT_SOURCE_DIR}/autovala.plugin 8 | DESTINATION 9 | share/gedit/plugins/autovala 10 | ) 11 | ELSE() 12 | install(FILES 13 | ${CMAKE_CURRENT_SOURCE_DIR}/autovala.plugin 14 | DESTINATION 15 | share/gedit/plugins/autovala 16 | ) 17 | ENDIF() 18 | 19 | else () 20 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/autovala.plugin) 21 | install(DIRECTORY 22 | ${CMAKE_CURRENT_SOURCE_DIR}/autovala.plugin 23 | DESTINATION 24 | lib/gedit/plugins/autovala 25 | ) 26 | ELSE() 27 | install(FILES 28 | ${CMAKE_CURRENT_SOURCE_DIR}/autovala.plugin 29 | DESTINATION 30 | lib/gedit/plugins/autovala 31 | ) 32 | ENDIF() 33 | 34 | endif () 35 | -------------------------------------------------------------------------------- /gedit_plugin/po/gedit_plugin.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2014-06-30 21:40+0200\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: src/gedit_plugin.vala:87 src/gedit_plugin.vala:94 21 | msgid "Autovala output" 22 | msgstr "" 23 | 24 | #: src/gedit_plugin.vala:88 src/gedit_plugin.vala:95 25 | msgid "Autovala search" 26 | msgstr "" 27 | -------------------------------------------------------------------------------- /data/pixmaps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/application.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/autovala/ ) 5 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/c.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/autovala/ ) 6 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/h.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/autovala/ ) 7 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/library.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/autovala/ ) 8 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/project.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/autovala/ ) 9 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test_vala.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/autovala/ ) 10 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/vala.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/autovala/ ) 11 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/vapi.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/autovala/ ) 12 | -------------------------------------------------------------------------------- /autovala-atom/README.md: -------------------------------------------------------------------------------- 1 | # autovala-atom package 2 | 3 | This is an Atom package that simplifies working with AutoVala. 4 | 5 | Autovala can be obtained from the GIT repository, at 6 | 7 | git://github.com/rastersoft/autovala 8 | 9 | or from the author's homepage: 10 | 11 | http://www.rastersoft.com 12 | 13 | # Using autovala-atom 14 | 15 | ![Capture](https://raw.github.com/rastersoft/autovala-atom/master/capture.png) 16 | 17 | Autovala-atom adds an extra left panel, which is shown only when a .vala file that belongs to an Autovala project is being edited. It also changes the path in the project view to make it point to the Autovala project to which the file belongs. Changing to a different .vala file refreshes both panels, so you don't need to add the Autovala projects to the project manager: just opening any file from an Autovala project will switch the content in both panels. 18 | 19 | After installing the package, you should run "apm install" from a command line to install the extra modules like "atom-space-pen-views". 20 | -------------------------------------------------------------------------------- /scratch_plugin/scratch_plugin.avprj: -------------------------------------------------------------------------------- 1 | ### AutoVala Project ### 2 | autovala_version: 11 3 | project_name: scratch_plugin 4 | vala_version: 0.24 5 | 6 | custom: data/autovalascratch.plugin lib/scratch/plugins/autovala 7 | 8 | 9 | vala_library: src/autovalascratch 10 | *namespace: autovalascratch 11 | vala_destination: lib/scratch/plugins/autovala 12 | *vala_check_package: AutoVala 13 | *vala_check_package: AutovalaPlugin 14 | *vala_check_package: atk 15 | *vala_check_package: cairo 16 | *vala_check_package: gdk-3.0 17 | *vala_check_package: gdk-pixbuf-2.0 18 | *vala_check_package: gee-0.8 19 | *vala_check_package: gio-2.0 20 | *vala_check_package: glib-2.0 21 | *vala_check_package: gobject-2.0 22 | *vala_check_package: gobject-introspection-1.0 23 | *vala_check_package: gtk+-3.0 24 | *vala_check_package: gtksourceview-3.0 25 | *vala_check_package: libpeas-1.0 26 | *vala_check_package: pango 27 | *vala_check_package: pangocairo 28 | *vala_check_package: scratchcore 29 | *vala_check_package: x11 30 | *vala_source: scratch_plugin.vala 31 | c_library: readline 32 | 33 | *po: po 34 | 35 | *data: data/local 36 | 37 | *doc: doc 38 | 39 | -------------------------------------------------------------------------------- /scratch_plugin/po/scratch_plugin.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2014-06-30 21:38+0200\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: src/scratch_plugin.vala:9 21 | msgid "Autovala Project Manager" 22 | msgstr "" 23 | 24 | #: src/scratch_plugin.vala:10 25 | msgid "Manages Autovala projecs from Scratch" 26 | msgstr "" 27 | 28 | #: src/scratch_plugin.vala:92 29 | msgid "Autovala output" 30 | msgstr "" 31 | 32 | #: src/scratch_plugin.vala:93 33 | msgid "Autovala search" 34 | msgstr "" 35 | 36 | #: src/scratch_plugin.vala:141 37 | msgid "Autovala Project" 38 | msgstr "" 39 | -------------------------------------------------------------------------------- /cmake/Valadoc.cmake: -------------------------------------------------------------------------------- 1 | include(ParseArguments) 2 | find_package(Valadoc REQUIRED) 3 | 4 | macro(valadoc target outdir) 5 | parse_arguments(ARGS "PACKAGES;OPTIONS;CUSTOM_VAPIS" "" ${ARGN}) 6 | set(vala_pkg_opts "") 7 | foreach(pkg ${ARGS_PACKAGES}) 8 | list(APPEND vala_pkg_opts "--pkg=${pkg}") 9 | endforeach(pkg ${ARGS_PACKAGES}) 10 | 11 | set(vapi_dir_opts "") 12 | foreach(src ${ARGS_CUSTOM_VAPIS}) 13 | get_filename_component(pkg ${src} NAME_WE) 14 | list(APPEND vala_pkg_opts "--pkg=${pkg}") 15 | 16 | get_filename_component(path ${src} PATH) 17 | list(APPEND vapi_dir_opts "--vapidir=${path}") 18 | endforeach(src ${ARGS_DEFAULT_ARGS}) 19 | list(REMOVE_DUPLICATES vapi_dir_opts) 20 | 21 | add_custom_command(TARGET ${target} 22 | COMMAND 23 | ${VALADOC_EXECUTABLE} 24 | ARGS 25 | "--force" 26 | "-b" ${CMAKE_CURRENT_SOURCE_DIR} 27 | "-o" ${outdir} 28 | "--package-name=${CMAKE_PROJECT_NAME}" 29 | "--package-version=${PROJECT_VERSION}" 30 | ${vala_pkg_opts} 31 | ${vapi_dir_opts} 32 | ${ARGS_OPTIONS} 33 | ${in_files} 34 | DEPENDS 35 | ${in_files} 36 | ${ARGS_CUSTOM_VAPIS} 37 | ) 38 | endmacro(valadoc) 39 | -------------------------------------------------------------------------------- /data/cmake/Valadoc.cmake: -------------------------------------------------------------------------------- 1 | include(ParseArguments) 2 | find_package(Valadoc REQUIRED) 3 | 4 | macro(valadoc target outdir) 5 | parse_arguments(ARGS "PACKAGES;OPTIONS;CUSTOM_VAPIS" "" ${ARGN}) 6 | set(vala_pkg_opts "") 7 | foreach(pkg ${ARGS_PACKAGES}) 8 | list(APPEND vala_pkg_opts "--pkg=${pkg}") 9 | endforeach(pkg ${ARGS_PACKAGES}) 10 | 11 | set(vapi_dir_opts "") 12 | foreach(src ${ARGS_CUSTOM_VAPIS}) 13 | get_filename_component(pkg ${src} NAME_WE) 14 | list(APPEND vala_pkg_opts "--pkg=${pkg}") 15 | 16 | get_filename_component(path ${src} PATH) 17 | list(APPEND vapi_dir_opts "--vapidir=${path}") 18 | endforeach(src ${ARGS_DEFAULT_ARGS}) 19 | list(REMOVE_DUPLICATES vapi_dir_opts) 20 | 21 | add_custom_command(TARGET ${target} 22 | COMMAND 23 | ${VALADOC_EXECUTABLE} 24 | ARGS 25 | "--force" 26 | "-b" ${CMAKE_CURRENT_SOURCE_DIR} 27 | "-o" ${outdir} 28 | "--package-name=${CMAKE_PROJECT_NAME}" 29 | "--package-version=${PROJECT_VERSION}" 30 | ${vala_pkg_opts} 31 | ${vapi_dir_opts} 32 | ${ARGS_OPTIONS} 33 | ${in_files} 34 | DEPENDS 35 | ${in_files} 36 | ${ARGS_CUSTOM_VAPIS} 37 | ) 38 | endmacro(valadoc) 39 | -------------------------------------------------------------------------------- /autovala-atom/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /gedit_plugin/cmake/Valadoc.cmake: -------------------------------------------------------------------------------- 1 | include(ParseArguments) 2 | find_package(Valadoc REQUIRED) 3 | 4 | macro(valadoc target outdir) 5 | parse_arguments(ARGS "PACKAGES;OPTIONS;CUSTOM_VAPIS" "" ${ARGN}) 6 | set(vala_pkg_opts "") 7 | foreach(pkg ${ARGS_PACKAGES}) 8 | list(APPEND vala_pkg_opts "--pkg=${pkg}") 9 | endforeach(pkg ${ARGS_PACKAGES}) 10 | 11 | set(vapi_dir_opts "") 12 | foreach(src ${ARGS_CUSTOM_VAPIS}) 13 | get_filename_component(pkg ${src} NAME_WE) 14 | list(APPEND vala_pkg_opts "--pkg=${pkg}") 15 | 16 | get_filename_component(path ${src} PATH) 17 | list(APPEND vapi_dir_opts "--vapidir=${path}") 18 | endforeach(src ${ARGS_DEFAULT_ARGS}) 19 | list(REMOVE_DUPLICATES vapi_dir_opts) 20 | 21 | add_custom_command(TARGET ${target} 22 | COMMAND 23 | ${VALADOC_EXECUTABLE} 24 | ARGS 25 | "--force" 26 | "-b" ${CMAKE_CURRENT_SOURCE_DIR} 27 | "-o" ${outdir} 28 | "--package-name=${CMAKE_PROJECT_NAME}" 29 | "--package-version=${PROJECT_VERSION}" 30 | ${vala_pkg_opts} 31 | ${vapi_dir_opts} 32 | ${ARGS_OPTIONS} 33 | ${in_files} 34 | DEPENDS 35 | ${in_files} 36 | ${ARGS_CUSTOM_VAPIS} 37 | ) 38 | endmacro(valadoc) 39 | -------------------------------------------------------------------------------- /scratch_plugin/cmake/Valadoc.cmake: -------------------------------------------------------------------------------- 1 | include(ParseArguments) 2 | find_package(Valadoc REQUIRED) 3 | 4 | macro(valadoc target outdir) 5 | parse_arguments(ARGS "PACKAGES;OPTIONS;CUSTOM_VAPIS" "" ${ARGN}) 6 | set(vala_pkg_opts "") 7 | foreach(pkg ${ARGS_PACKAGES}) 8 | list(APPEND vala_pkg_opts "--pkg=${pkg}") 9 | endforeach(pkg ${ARGS_PACKAGES}) 10 | 11 | set(vapi_dir_opts "") 12 | foreach(src ${ARGS_CUSTOM_VAPIS}) 13 | get_filename_component(pkg ${src} NAME_WE) 14 | list(APPEND vala_pkg_opts "--pkg=${pkg}") 15 | 16 | get_filename_component(path ${src} PATH) 17 | list(APPEND vapi_dir_opts "--vapidir=${path}") 18 | endforeach(src ${ARGS_DEFAULT_ARGS}) 19 | list(REMOVE_DUPLICATES vapi_dir_opts) 20 | 21 | add_custom_command(TARGET ${target} 22 | COMMAND 23 | ${VALADOC_EXECUTABLE} 24 | ARGS 25 | "--force" 26 | "-b" ${CMAKE_CURRENT_SOURCE_DIR} 27 | "-o" ${outdir} 28 | "--package-name=${CMAKE_PROJECT_NAME}" 29 | "--package-version=${PROJECT_VERSION}" 30 | ${vala_pkg_opts} 31 | ${vapi_dir_opts} 32 | ${ARGS_OPTIONS} 33 | ${in_files} 34 | DEPENDS 35 | ${in_files} 36 | ${ARGS_CUSTOM_VAPIS} 37 | ) 38 | endmacro(valadoc) 39 | -------------------------------------------------------------------------------- /src/meson.build: -------------------------------------------------------------------------------- 1 | cfg_autovala = configuration_data() 2 | cfg_autovala.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir'))) 3 | cfg_autovala.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'autovala')) 4 | cfg_autovala.set('GETTEXT_PACKAGE', 'autovala') 5 | cfg_autovala.set('RELEASE_NAME', 'autovala') 6 | cfg_autovala.set('PREFIX', get_option('prefix')) 7 | cfg_autovala.set('VERSION', '1.10.0') 8 | cfg_autovala.set('TESTSRCDIR', meson.source_root()) 9 | 10 | cfgfile_3 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_autovala) 11 | 12 | autovala_deps = [gio_2_0_dep] 13 | autovala_deps += [gee_0_8_dep] 14 | autovala_deps += [glib_2_0_dep] 15 | autovala_sources = [cfgfile_3] 16 | autovala_sources += ['autovala.vala'] 17 | autovala_vala_args = ['--pkg','posix'] 18 | autovala_dependencies = [AutoVala_library] 19 | autovala_link_args = ['-rdynamic'] 20 | autovala_hfolders = ['../src/autovalaLib'] 21 | 22 | executable('autovala',autovala_sources,dependencies: autovala_deps,vala_args: autovala_vala_args,link_args: autovala_link_args,link_with: autovala_dependencies,include_directories: include_directories(autovala_hfolders),install: true) 23 | 24 | -------------------------------------------------------------------------------- /autovala-atom/styles/icons.less: -------------------------------------------------------------------------------- 1 | @import 'ui-variables'; 2 | 3 | @iconWidth: 18px; 4 | @iconHeight: 18px; 5 | 6 | @iconlist: build,full_build,refresh_langs,refresh,test_vala,update; 7 | 8 | .myloop(@mycounter) when (@mycounter < length(@iconlist)) { 9 | @iconName: extract(@iconlist,@mycounter); 10 | .autovala_@{iconName} { 11 | background-image: url("atom://autovala-atom/lib/svg/@{iconName}.svg"); 12 | background-repeat: no-repeat; 13 | background-size: @iconWidth @iconHeight; 14 | padding-left: @iconWidth; 15 | padding-top: @iconHeight; 16 | margin-right: 2px; 17 | margin-bottom: 0px; 18 | } 19 | .myloop((@mycounter + 1)); 20 | } 21 | 22 | @iconlist2: project,application,library,c,h,vala,vapi; 23 | 24 | .myloop2(@mycounter) when (@mycounter < length(@iconlist2)) { 25 | @iconName: extract(@iconlist2,@mycounter); 26 | .autovala_@{iconName} { 27 | padding-left: @iconWidth; 28 | padding-top: @iconHeight; 29 | -webkit-mask: url("atom://autovala-atom/lib/svg/@{iconName}.svg"); 30 | background-color: @text-color; 31 | -webkit-mask-repeat: no-repeat; 32 | -webkit-mask-size: @iconWidth @iconHeight; 33 | margin-top: 1px; 34 | margin-bottom: 1px; 35 | } 36 | .myloop2((@mycounter + 1)); 37 | } 38 | 39 | .myloop(1); 40 | .myloop2(1); 41 | -------------------------------------------------------------------------------- /scratch_plugin/po/es.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # Sergio Costas , 2014. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2014-06-08 21:00+0200\n" 12 | "PO-Revision-Date: 2014-06-08 21:01+0200\n" 13 | "Last-Translator: Sergio Costas \n" 14 | "Language-Team: Español; Castellano <>\n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | "X-Generator: Gtranslator 2.91.6\n" 21 | 22 | #: src/scratch_plugin.vala:9 23 | msgid "Autovala Project Manager" 24 | msgstr "Gestor de proyectos de Autovala" 25 | 26 | #: src/scratch_plugin.vala:10 27 | msgid "Manages Autovala projecs from Scratch" 28 | msgstr "Gestiona proyectos de Autovala desde Scratch" 29 | 30 | #: src/scratch_plugin.vala:92 31 | msgid "Autovala output" 32 | msgstr "Salida de Autovala" 33 | 34 | #: src/scratch_plugin.vala:93 35 | msgid "Autovala search" 36 | msgstr "Búsqueda de Autovala" 37 | 38 | #: src/scratch_plugin.vala:141 39 | msgid "Autovala Project" 40 | msgstr "Projecto Autovala" 41 | -------------------------------------------------------------------------------- /cmake/ParseArguments.cmake: -------------------------------------------------------------------------------- 1 | ## 2 | # This is a helper Macro to parse optional arguments in Macros/Functions 3 | # It has been taken from the public CMake wiki. 4 | # See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and 5 | # licensing. 6 | ## 7 | macro(parse_arguments prefix arg_names option_names) 8 | set(DEFAULT_ARGS) 9 | foreach(arg_name ${arg_names}) 10 | set(${prefix}_${arg_name}) 11 | endforeach(arg_name) 12 | foreach(option ${option_names}) 13 | set(${prefix}_${option} FALSE) 14 | endforeach(option) 15 | 16 | set(current_arg_name DEFAULT_ARGS) 17 | set(current_arg_list) 18 | foreach(arg ${ARGN}) 19 | set(larg_names ${arg_names}) 20 | list(FIND larg_names "${arg}" is_arg_name) 21 | if(is_arg_name GREATER -1) 22 | set(${prefix}_${current_arg_name} ${current_arg_list}) 23 | set(current_arg_name ${arg}) 24 | set(current_arg_list) 25 | else(is_arg_name GREATER -1) 26 | set(loption_names ${option_names}) 27 | list(FIND loption_names "${arg}" is_option) 28 | if(is_option GREATER -1) 29 | set(${prefix}_${arg} TRUE) 30 | else(is_option GREATER -1) 31 | set(current_arg_list ${current_arg_list} ${arg}) 32 | endif(is_option GREATER -1) 33 | endif(is_arg_name GREATER -1) 34 | endforeach(arg) 35 | set(${prefix}_${current_arg_name} ${current_arg_list}) 36 | endmacro(parse_arguments) 37 | -------------------------------------------------------------------------------- /data/cmake/ParseArguments.cmake: -------------------------------------------------------------------------------- 1 | ## 2 | # This is a helper Macro to parse optional arguments in Macros/Functions 3 | # It has been taken from the public CMake wiki. 4 | # See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and 5 | # licensing. 6 | ## 7 | macro(parse_arguments prefix arg_names option_names) 8 | set(DEFAULT_ARGS) 9 | foreach(arg_name ${arg_names}) 10 | set(${prefix}_${arg_name}) 11 | endforeach(arg_name) 12 | foreach(option ${option_names}) 13 | set(${prefix}_${option} FALSE) 14 | endforeach(option) 15 | 16 | set(current_arg_name DEFAULT_ARGS) 17 | set(current_arg_list) 18 | foreach(arg ${ARGN}) 19 | set(larg_names ${arg_names}) 20 | list(FIND larg_names "${arg}" is_arg_name) 21 | if(is_arg_name GREATER -1) 22 | set(${prefix}_${current_arg_name} ${current_arg_list}) 23 | set(current_arg_name ${arg}) 24 | set(current_arg_list) 25 | else(is_arg_name GREATER -1) 26 | set(loption_names ${option_names}) 27 | list(FIND loption_names "${arg}" is_option) 28 | if(is_option GREATER -1) 29 | set(${prefix}_${arg} TRUE) 30 | else(is_option GREATER -1) 31 | set(current_arg_list ${current_arg_list} ${arg}) 32 | endif(is_option GREATER -1) 33 | endif(is_arg_name GREATER -1) 34 | endforeach(arg) 35 | set(${prefix}_${current_arg_name} ${current_arg_list}) 36 | endmacro(parse_arguments) 37 | -------------------------------------------------------------------------------- /gedit_plugin/cmake/ParseArguments.cmake: -------------------------------------------------------------------------------- 1 | ## 2 | # This is a helper Macro to parse optional arguments in Macros/Functions 3 | # It has been taken from the public CMake wiki. 4 | # See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and 5 | # licensing. 6 | ## 7 | macro(parse_arguments prefix arg_names option_names) 8 | set(DEFAULT_ARGS) 9 | foreach(arg_name ${arg_names}) 10 | set(${prefix}_${arg_name}) 11 | endforeach(arg_name) 12 | foreach(option ${option_names}) 13 | set(${prefix}_${option} FALSE) 14 | endforeach(option) 15 | 16 | set(current_arg_name DEFAULT_ARGS) 17 | set(current_arg_list) 18 | foreach(arg ${ARGN}) 19 | set(larg_names ${arg_names}) 20 | list(FIND larg_names "${arg}" is_arg_name) 21 | if(is_arg_name GREATER -1) 22 | set(${prefix}_${current_arg_name} ${current_arg_list}) 23 | set(current_arg_name ${arg}) 24 | set(current_arg_list) 25 | else(is_arg_name GREATER -1) 26 | set(loption_names ${option_names}) 27 | list(FIND loption_names "${arg}" is_option) 28 | if(is_option GREATER -1) 29 | set(${prefix}_${arg} TRUE) 30 | else(is_option GREATER -1) 31 | set(current_arg_list ${current_arg_list} ${arg}) 32 | endif(is_option GREATER -1) 33 | endif(is_arg_name GREATER -1) 34 | endforeach(arg) 35 | set(${prefix}_${current_arg_name} ${current_arg_list}) 36 | endmacro(parse_arguments) 37 | -------------------------------------------------------------------------------- /scratch_plugin/cmake/ParseArguments.cmake: -------------------------------------------------------------------------------- 1 | ## 2 | # This is a helper Macro to parse optional arguments in Macros/Functions 3 | # It has been taken from the public CMake wiki. 4 | # See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and 5 | # licensing. 6 | ## 7 | macro(parse_arguments prefix arg_names option_names) 8 | set(DEFAULT_ARGS) 9 | foreach(arg_name ${arg_names}) 10 | set(${prefix}_${arg_name}) 11 | endforeach(arg_name) 12 | foreach(option ${option_names}) 13 | set(${prefix}_${option} FALSE) 14 | endforeach(option) 15 | 16 | set(current_arg_name DEFAULT_ARGS) 17 | set(current_arg_list) 18 | foreach(arg ${ARGN}) 19 | set(larg_names ${arg_names}) 20 | list(FIND larg_names "${arg}" is_arg_name) 21 | if(is_arg_name GREATER -1) 22 | set(${prefix}_${current_arg_name} ${current_arg_list}) 23 | set(current_arg_name ${arg}) 24 | set(current_arg_list) 25 | else(is_arg_name GREATER -1) 26 | set(loption_names ${option_names}) 27 | list(FIND loption_names "${arg}" is_option) 28 | if(is_option GREATER -1) 29 | set(${prefix}_${arg} TRUE) 30 | else(is_option GREATER -1) 31 | set(current_arg_list ${current_arg_list} ${arg}) 32 | endif(is_option GREATER -1) 33 | endif(is_arg_name GREATER -1) 34 | endforeach(arg) 35 | set(${prefix}_${current_arg_name} ${current_arg_list}) 36 | endmacro(parse_arguments) 37 | -------------------------------------------------------------------------------- /gedit_plugin/PKGBUILD: -------------------------------------------------------------------------------- 1 | pkgname=autovala_gedit 2 | pkgver=0.99.47 3 | pkgrel=1 4 | pkgdesc="This is a plugin for GEdit 3 that integrates the project manager 5 | AutoVala, allowing to use GEdit as a fully-fledged IDE for creating 6 | projects in VALA language. 7 | 8 | The plugin adds a left panel which shows the binaries and libraries 9 | being created by an AutoVala project and its source files, allowing 10 | to choose them just by clicking on each. It also shows all the other 11 | files in the project (doc, po, data...) and the AVPRJ file. 12 | 13 | To open an AutoVala project, just open any of the files belonging to 14 | it, and the plugin will autodetect the project and show all the data. 15 | 16 | Remember that you need Autovala installed in your system. 17 | " 18 | arch=('i686' 'x86_64') 19 | depends=( 'gtksourceview3' 'libpeas' 'gtk3' 'pango' 'atk' 'cairo' 'gdk-pixbuf2' 'glib2' 'gobject-introspection-runtime' 'libgee' 'libx11' 'autovala' ) 20 | makedepends=( 'vala' 'gedit' 'autovala' 'atk' 'cairo' 'gtk3' 'gdk-pixbuf2' 'libgee' 'glib2' 'gobject-introspection' 'gtksourceview3' 'libpeas' 'pango' 'libx11' 'cmake' 'gettext' 'pkg-config' 'gcc' 'make' 'intltool' ) 21 | build() { 22 | rm -rf ${startdir}/install 23 | mkdir ${startdir}/install 24 | cd ${startdir}/install 25 | cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib 26 | make 27 | } 28 | 29 | package() { 30 | cd ${startdir}/install 31 | make DESTDIR="$pkgdir/" install 32 | } 33 | -------------------------------------------------------------------------------- /gedit_plugin/HISTORY.md: -------------------------------------------------------------------------------- 1 | ## History of versions ## 2 | * version 0.99.47 (2016-10-23) 3 | * Updated the plugin to last version 4 | * version 0.99.36 (2015-12-02) 5 | * Now the Gedit plugin can be installed in the right folders both locally and globally 6 | * version 0.99.25 (2015-05-10) 7 | * Added packaging files for the Gedit-Plugin 8 | * version 0.98.0 (2014-05-26) 9 | * Added support for GEdit 3.12 and later in the plugin 10 | * Allows to create new projects from the plugins 11 | * version 0.97.0 (2014-05-12) 12 | * Added support for the new GEdit plugin for Autovala 13 | * Added two GTK3 widgets to allow to easily create plugins for text editors 14 | * Now the GLOBALS object has the vapiList as an static member, allowing to read it once. This speeds up the gedit plugin 15 | * version 0.27.0 (2013-12-01) 16 | * Removed the Gedit plugin (until having spare time to fix it) 17 | * version 0.22.0 (2013-10-14) 18 | * Autovala and gedit plugin are now different projects, allowing to compile only the former 19 | * version 0.19.0 (2013-04-30) 20 | * Now the plugin deletes the content of the *install* folder, but not the folder itself 21 | * version 0.18.0 (2013-04-30) 22 | * Allows to delete the INSTALL folder from Gedit 23 | * Allows to delete the INSTALL folder, update the .avprj file, run cmake and launch make in a single step from Gedit 24 | * version 0.17.0 (2013-04-28) 25 | * Fixed bug in plugin when updating the whole project 26 | * version 0.16.0 (2013-04-28) 27 | * Added plugin for Gedit 28 | -------------------------------------------------------------------------------- /wiki/index.html.md: -------------------------------------------------------------------------------- 1 | # AUTOVALA 2 | 3 | Autovala is a program and a library designed to help in the creation of projects with Vala and CMake. 4 | 5 | The idea is quite simple: CMake is very powerful, but writting the CMakeLists files is boring and repetitive. Why not let the computer create them, by guessing what to do with each file? And if, at the end, there are mistakes, let the user fix them in an easy way, and generate the final CMakeLists files. 6 | 7 | This is what Autovala does. This process is done in three steps: 8 | 9 | * First, Autovala checks all the folders and files, and creates a project with the type of each file 10 | * It also peeks the source files to determine which Vala packages they need, and generate automagically that list 11 | * After that (and after allowing the user to check, if (s)he wishes, the project file), it uses that project file to generate the needed CMakeLists files 12 | 13 | Autovala uses simple rules, like: "png files go to usr/share/pixmaps", and so on. It even takes into account things like the size and type of picture. For a detailed (and, maybe, boring) explanation of the rules followed by Autovala, check [rules page](autovala-rules.7). 14 | 15 | [Using autovala](autovala.1) 16 | [Plugins for text editors](plugins.1) 17 | [Project file format](autovala-fileformat.5): needed for manual editing 18 | [Keeping your changes](autovala-keep-changes.7): needed when you manually edit the .avprj file 19 | [Autovala tricks](autovala-tricks.7) 20 | [Things TO DO](To-Do) 21 | [History of versions](versions) 22 | -------------------------------------------------------------------------------- /gedit_plugin/debian/control: -------------------------------------------------------------------------------- 1 | Source: autovala-gedit 2 | Maintainer: Sergio Costas 3 | Priority: optional 4 | Section: misc 5 | Build-Depends: build-essential, po-debconf, valac, gedit-dev, autovala, libatk1.0-dev, libcairo2-dev, libgtk-3-dev, libgdk-pixbuf2.0-dev, libgee-0.8-dev, libglib2.0-dev, libgirepository1.0-dev, libgtksourceview-3.0-dev, libpeas-dev, libxml2-dev, libpango1.0-dev, libvte-2.91-dev, libx11-dev, cmake, gettext, pkg-config, gcc, g++, make, intltool 6 | 7 | Package: autovala-gedit 8 | Architecture: any 9 | Version: 0.99.47 10 | Depends: libgtksourceview-3.0-1, libpeas-1.0-0, libgtk-3-0, libpangocairo-1.0-0, libpango-1.0-0, libatk1.0-0, libcairo-gobject2, libcairo2, libgdk-pixbuf2.0-0, libglib2.0-0, libgirepository-1.0-1, autovala, libgee-0.8-2, libxml2, libvte-2.91-0, zlib1g, libpcre2-8-0, libgnutls30, libx11-6 11 | Description: This is a plugin for GEdit 3 that integrates the project manager 12 | AutoVala, allowing to use GEdit as a fully-fledged IDE for creating 13 | projects in VALA language. 14 | . 15 | The plugin adds a left panel which shows the binaries and libraries 16 | being created by an AutoVala project and its source files, allowing 17 | to choose them just by clicking on each. It also shows all the other 18 | files in the project (doc, po, data...) and the AVPRJ file. 19 | . 20 | To open an AutoVala project, just open any of the files belonging to 21 | it, and the plugin will autodetect the project and show all the data. 22 | . 23 | Remember that you need Autovala installed in your system. 24 | . 25 | -------------------------------------------------------------------------------- /gedit_plugin/autovala_gedit.avprj: -------------------------------------------------------------------------------- 1 | ### AutoVala Project ### 2 | autovala_version: 24 3 | project_name: autovala_gedit 4 | vala_version: 0.30 5 | 6 | if ATHOME 7 | custom: data/autovala.plugin share/gedit/plugins/autovala 8 | else 9 | custom: data/autovala.plugin lib/gedit/plugins/autovala 10 | end 11 | 12 | *define: OLD_GEDIT 13 | 14 | vala_library: src/gedit_plugin 15 | *namespace: autovalagedit 16 | if ATHOME 17 | vala_destination: share/gedit/plugins/autovala 18 | else 19 | vala_destination: lib/gedit/plugins/autovala 20 | end 21 | if OLD_GEDIT 22 | else 23 | vala_vapi: vapis/gedit.vapi 24 | end 25 | if OLD_GEDIT 26 | else 27 | c_check_package: gedit 28 | end 29 | if OLD_GEDIT 30 | vala_check_package: gedit 31 | end 32 | *vala_check_package: AutoVala 33 | *vala_check_package: AutovalaPlugin 34 | *vala_check_package: atk 35 | *vala_check_package: cairo 36 | *vala_check_package: gdk-3.0 37 | *vala_check_package: gdk-pixbuf-2.0 38 | *vala_check_package: gee-0.8 39 | *vala_check_package: gio-2.0 40 | *vala_check_package: glib-2.0 41 | *vala_check_package: gobject-2.0 42 | *vala_check_package: gobject-introspection-1.0 43 | *vala_check_package: gtk+-3.0 44 | *vala_check_package: gtksourceview-3.0 45 | *vala_check_package: libpeas-1.0 46 | *vala_check_package: libxml-2.0 47 | *vala_check_package: pango 48 | *vala_check_package: pangocairo 49 | *vala_check_package: vte-2.91 50 | *vala_check_package: x11 51 | *vala_source: gedit_plugin.vala 52 | 53 | 54 | *po: po 55 | 56 | *translate: vala src/gedit_plugin.vala 57 | 58 | *data: data/local 59 | 60 | *doc: doc 61 | 62 | -------------------------------------------------------------------------------- /gedit_plugin/AUR/PKGBUILD: -------------------------------------------------------------------------------- 1 | pkgname=gedit_plugin 2 | pkgver=1.0.0 3 | pkgrel=1 4 | pkgdesc="This is a plugin for GEdit 3 that integrates the project manager 5 | AutoVala, allowing to use GEdit as a fully-fledged IDE for creating 6 | projects in VALA language. 7 | 8 | The plugin adds a left panel which shows the binaries and libraries 9 | being created by an AutoVala project and its source files, allowing 10 | to choose them just by clicking on each. It also shows all the other 11 | files in the project (doc, po, data...) and the AVPRJ file. 12 | 13 | To open an AutoVala project, just open any of the files belonging to 14 | it, and the plugin will autodetect the project and show all the data. 15 | 16 | Remember that you need Autovala installed in your system. 17 | " 18 | arch=('i686' 'x86_64') 19 | source=( 'https://github.com/rastersoft/autovala/archive/master.zip' ) 20 | md5sums=( 'bdec2290a79b8e035dfd942fc3ab0d01' ) 21 | depends=( 'gtksourceview3' 'libpeas' 'gtk3' 'pango' 'atk' 'cairo' 'gdk-pixbuf2' 'glib2' 'gobject-introspection-runtime' 'libgee' 'libx11' 'autovala' ) 22 | makedepends=( 'vala' 'gedit' 'autovala' 'atk' 'cairo' 'gtk3' 'gdk-pixbuf2' 'libgee' 'glib2' 'gobject-introspection' 'gtksourceview3' 'libpeas' 'pango' 'libx11' 'cmake' 'gettext' 'pkg-config' 'gcc' 'make' 'intltool' ) 23 | build() { 24 | cd $srcdir 25 | TMP1=`find | grep -F "gedit_plugin.avprj"` 26 | cd `dirname $TMP1` 27 | rm -rf install 28 | mkdir install 29 | cd install 30 | cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib 31 | make 32 | } 33 | 34 | package() { 35 | cd $srcdir 36 | TMP1=`find | grep -F "gedit_plugin.avprj"` 37 | cd `dirname $TMP1` 38 | cd install 39 | make DESTDIR="$pkgdir/" install 40 | } 41 | 42 | -------------------------------------------------------------------------------- /scratch_plugin/README.md: -------------------------------------------------------------------------------- 1 | # AUTOVALA PLUGIN FOR SCRATCH # 2 | 3 | This is a plugin for Scratch Text Editor 2.x that integrates the project manager 4 | AutoVala, allowing to use Scratch as a fully-fledged IDE for creating projects 5 | in VALA language. 6 | 7 | The plugin adds a left panel which shows the binaries and libraries being 8 | created by an AutoVala project and its source files, allowing to choose them 9 | just by clicking on each. It also shows all the other files in the project 10 | (doc, po, data...) and the AVPRJ file. 11 | 12 | To open an AutoVala project, just open any of the files belonging to it, and 13 | the plugin will autodetect the project and show all the data. 14 | 15 | Remember that you need Autovala installed in your system. 16 | 17 | # INSTALLING THE PLUGIN # 18 | 19 | The plugin needs Scratch 2.0 or later. After installing, close all Scratch 20 | windows, open it again, and go to Preferences -> Extensions to enable the 21 | Autovala extension. 22 | 23 | ## System-wide installation ## 24 | 25 | To install this plugin system-wide, allowing to be used by all users in the 26 | system, just type: 27 | 28 | mkdir install 29 | cd install 30 | cmake .. -DCMAKE_INSTALL_PREFIX=/usr 31 | make 32 | sudo make install 33 | 34 | This mode needs root priviledges. The "-DCMAKE_INSTALL_PREFIX=/usr" is needed 35 | only if you installed Scratch from a .DEB or .RPM package system. If you 36 | compiled it from source and installed it in /usr/local, you must change it to 37 | "-DCMAKE_INSTALL_PREFIX=/usr/local" (or the folder where you installed it). This 38 | is because, currently, Scratch only searchs for plugins in the same directory 39 | group where it was installed. 40 | -------------------------------------------------------------------------------- /src/autovalaPlugin/PanedPercentage.vala: -------------------------------------------------------------------------------- 1 | using Gtk; 2 | using Gdk; 3 | 4 | namespace AutovalaPlugin { 5 | /** 6 | * This is a Gtk.Paned that can be set to a percentage value, instead of 7 | * having to use absolute values (which depends on the current size of 8 | * the panel). 9 | */ 10 | 11 | public class PanedPercentage : Gtk.Paned { 12 | private int current_paned_position; 13 | private int current_paned_size; 14 | private double desired_paned_percentage; 15 | private bool changed_paned_size; 16 | 17 | public PanedPercentage(Gtk.Orientation orientation, double percentage) { 18 | this.current_paned_position = -1; 19 | this.current_paned_size = -1; 20 | this.changed_paned_size = false; 21 | 22 | this.orientation = orientation; 23 | this.desired_paned_percentage = percentage; 24 | 25 | /* 26 | * This is a trick to ensure that the paned remains with the same relative 27 | * position, no mater if the user resizes the window 28 | */ 29 | 30 | this.size_allocate.connect_after((allocation) => { 31 | if (this.current_paned_size != allocation.height) { 32 | this.current_paned_size = allocation.height; 33 | this.changed_paned_size = true; 34 | } 35 | }); 36 | 37 | this.draw.connect((cr) => { 38 | if (changed_paned_size) { 39 | this.current_paned_position = (int) (this.current_paned_size * this.desired_paned_percentage); 40 | this.set_position(this.current_paned_position); 41 | this.changed_paned_size = false; 42 | } else { 43 | if (this.position != this.current_paned_position) { 44 | this.current_paned_position = this.position; 45 | this.desired_paned_percentage = ((double) this.current_paned_position) / ((double) this.current_paned_size); 46 | } 47 | } 48 | return false; 49 | }); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /wiki/plugins.1.md: -------------------------------------------------------------------------------- 1 | # AUTOVALA PLUGINS FOR TEXT EDITORS 2 | 3 | Autovala includes several GTK widgets that simplifies creating plugins for text editors, like GEdit or Scratch Text Editor. These widgets are *ProjectView*, *ActionButtons*, *FileView*, *OutputView* and *SearchView*. The mandatory widget is *ProjectView*, which is also the central widget. All the other ones are optional. 4 | 5 | ## Using the plugins 6 | 7 | All the plugins share the same style, since both uses the same widgets provided by Autovala. 8 | 9 | There are two vertical panels, one with all the project targets and its source files, and another with all the files in the project. Doing double-click in a file will open it in the editor. Also, with right-click a context menu with more options will be shown. It allows to open the selected source file, to create a new executable/library target, or, if right-clicking on a target, open the properties dialog, which allows to change the target type (executable or library), change the base folder of the target, or set the compiler and linker option for that target. A target can also be deleted. 10 | 11 | In the file view, a right click allows to create a new file or folder, rename or delete it, or choose to show or hide the hiden files. 12 | 13 | Finally, there is a button and a popup menu that allows, the former, to start a new Autovala project, and the later to update the project (by running *autovala refresh* or *autovala update*), or the translation files (by running *autovala po*). 14 | 15 | There are also two horizontal panels. The first one shows the output of running the autovala commans, after updating the project or the translation files. The second one allows to search strings in all the project's source files, specifying the file and the line for each occurrence. By double-clicking on each message, the file will be shown, and the cursor moved to the specific line. 16 | -------------------------------------------------------------------------------- /src/autovalaLib/elementIgnore.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementIgnore : ElementBase { 23 | public ElementIgnore() { 24 | this._type = ConfigType.IGNORE; 25 | this.command = "ignore"; 26 | } 27 | 28 | public override bool configureLine(string line, bool automatic, string ? condition, bool invertCondition, int lineNumber, string[] ? comments) { 29 | if (false == line.has_prefix("ignore: ")) { 30 | var badCommand = line.split(": ")[0]; 31 | ElementBase.globalData.addError(_("Invalid command %s after command %s (line %d)").printf(badCommand, this.command, lineNumber)); 32 | return true; 33 | } 34 | // The line starts with 'ignore: ' 35 | var data = line.substring(8).strip(); 36 | if ((data.length > 1) && (data.has_suffix(Path.DIR_SEPARATOR_S))) { 37 | data = data.substring(0, data.length - 1); 38 | } 39 | ElementBase.globalData.addExclude(data); 40 | this.comments = comments; 41 | return this.configureElement(data, data, data, automatic, condition, invertCondition); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/autovalaLib/elementBDepend.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementBDepend : ElementBase { 23 | public ElementBDepend() { 24 | this._type = ConfigType.BINARY_DEPENDENCY; 25 | this.command = "binary_dependency"; 26 | } 27 | 28 | public override void add_files() { 29 | this.file_list = {}; 30 | } 31 | 32 | public override bool autoConfigure(string ? path = null) { 33 | return false; 34 | } 35 | 36 | public override bool configureLine(string line, bool automatic, string ? condition, bool invertCondition, int lineNumber, string[] ? comments) { 37 | if (false == line.has_prefix(this.command + ": ")) { 38 | var badCommand = line.split(": ")[0]; 39 | ElementBase.globalData.addError(_("Invalid command %s after command %s (line %d)").printf(badCommand, this.command, lineNumber)); 40 | return true; 41 | } 42 | var data = line.substring(2 + this.command.length).strip(); 43 | this.comments = comments; 44 | return this.configureElement(null, data, data, false, condition, invertCondition); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /wiki/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | execute_process ( COMMAND pandoc ${CMAKE_CURRENT_SOURCE_DIR}/autovala-fileformat.5.md -o ${CMAKE_CURRENT_BINARY_DIR}/autovala-fileformat.5 -f markdown_github -t man -s ) 5 | execute_process ( COMMAND gzip -f ${CMAKE_CURRENT_BINARY_DIR}/autovala-fileformat.5 ) 6 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/autovala-fileformat.5.gz DESTINATION ${CMAKE_INSTALL_MANDIR}/man5/ ) 7 | 8 | execute_process ( COMMAND pandoc ${CMAKE_CURRENT_SOURCE_DIR}/autovala-keep-changes.7.md -o ${CMAKE_CURRENT_BINARY_DIR}/autovala-keep-changes.7 -f markdown_github -t man -s ) 9 | execute_process ( COMMAND gzip -f ${CMAKE_CURRENT_BINARY_DIR}/autovala-keep-changes.7 ) 10 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/autovala-keep-changes.7.gz DESTINATION ${CMAKE_INSTALL_MANDIR}/man7/ ) 11 | 12 | execute_process ( COMMAND pandoc ${CMAKE_CURRENT_SOURCE_DIR}/autovala-rules.7.md -o ${CMAKE_CURRENT_BINARY_DIR}/autovala-rules.7 -f markdown_github -t man -s ) 13 | execute_process ( COMMAND gzip -f ${CMAKE_CURRENT_BINARY_DIR}/autovala-rules.7 ) 14 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/autovala-rules.7.gz DESTINATION ${CMAKE_INSTALL_MANDIR}/man7/ ) 15 | 16 | execute_process ( COMMAND pandoc ${CMAKE_CURRENT_SOURCE_DIR}/autovala-tricks.7.md -o ${CMAKE_CURRENT_BINARY_DIR}/autovala-tricks.7 -f markdown_github -t man -s ) 17 | execute_process ( COMMAND gzip -f ${CMAKE_CURRENT_BINARY_DIR}/autovala-tricks.7 ) 18 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/autovala-tricks.7.gz DESTINATION ${CMAKE_INSTALL_MANDIR}/man7/ ) 19 | 20 | execute_process ( COMMAND pandoc ${CMAKE_CURRENT_SOURCE_DIR}/autovala.1.md -o ${CMAKE_CURRENT_BINARY_DIR}/autovala.1 -f markdown_github -t man -s ) 21 | execute_process ( COMMAND gzip -f ${CMAKE_CURRENT_BINARY_DIR}/autovala.1 ) 22 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/autovala.1.gz DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/ ) 23 | 24 | -------------------------------------------------------------------------------- /doc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |

Home

8 |

AUTOVALA

9 |

Autovala is a program and a library designed to help in the creation of projects with Vala and CMake.

10 |

The idea is quite simple: CMake is very powerful, but writting the CMakeLists files is boring and repetitive. Why not let the computer create them, by guessing what to do with each file? And if, at the end, there are mistakes, let the user fix them in an easy way, and generate the final CMakeLists files.

11 |

This is what Autovala does. This process is done in three steps:

12 |
    13 |
  • First, Autovala checks all the folders and files, and creates a project with the type of each file
  • 14 |
  • It also peeks the source files to determine which Vala packages they need, and generate automagically that list
  • 15 |
  • After that (and after allowing the user to check, if (s)he wishes, the project file), it uses that project file to generate the needed CMakeLists files
  • 16 |
17 |

Autovala uses simple rules, like: "png files go to usr/share/pixmaps", and so on. It even takes into account things like the size and type of picture. For a detailed (and, maybe, boring) explanation of the rules followed by Autovala, check rules page.

18 |

Using autovala
19 | Plugins for text editors
20 | Project file format: needed for manual editing
21 | Keeping your changes: needed when you manually edit the .avprj file
22 | Autovala tricks
23 | Things TO DO
24 | History of versions

25 |

Home

26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /src/autovalaPlugin/outputview.vala: -------------------------------------------------------------------------------- 1 | using Gtk; 2 | using Gdk; 3 | using Gee; 4 | using Vte; 5 | 6 | namespace AutovalaPlugin { 7 | /** 8 | * This is a GTK3 widget that allows to show the warnings and errors when 9 | * building a project. 10 | * This widget needs a ProjectView widget in order to work. 11 | */ 12 | public class OutputView : Gtk.Box { 13 | public bool running; 14 | 15 | private Vte.Terminal view; 16 | private Gtk.ScrolledWindow scroll; 17 | private int current_pid; 18 | 19 | public signal void running_command(int pid); 20 | public signal void ended_command(int pid, int retval); 21 | 22 | public OutputView() { 23 | this.current_pid = -1; 24 | this.view = null; 25 | this.scroll = new Gtk.ScrolledWindow(null, null); 26 | this.pack_start(this.scroll, true, true); 27 | this.clear_buffer(); 28 | this.show_all(); 29 | } 30 | 31 | public void clear_buffer() { 32 | if (this.view != null) { 33 | this.scroll.remove(this.view); 34 | } 35 | this.view = new Vte.Terminal(); 36 | this.view.child_exited.connect((status) => { 37 | this.running = false; 38 | this.ended_command(this.current_pid, status); 39 | }); 40 | this.scroll.add(this.view); 41 | this.view.show_all(); 42 | this.view.set_scrollback_lines(-1); 43 | this.view.set_scroll_on_output(true); 44 | this.view.set_scroll_on_keystroke(false); 45 | this.view.set_input_enabled(false); 46 | } 47 | 48 | public void append_text(string text) { 49 | this.view.feed((uint8[]) text.replace("\n", "\r\n")); 50 | } 51 | 52 | public int run_command(string[] command, string working_path, bool clear = true) { 53 | if (this.running) { 54 | return -1; 55 | } 56 | 57 | this.running = true; 58 | if (clear) { 59 | this.clear_buffer(); 60 | } 61 | 62 | var retval = this.view.spawn_sync(Vte.PtyFlags.DEFAULT, working_path, command, Environ.get(), GLib.SpawnFlags.SEARCH_PATH, null, out this.current_pid); 63 | 64 | if (retval) { 65 | return this.current_pid; 66 | } else { 67 | return -1; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /scratch_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | project (scratch_plugin) 5 | cmake_minimum_required (VERSION 2.6) 6 | cmake_policy (VERSION 2.8) 7 | list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) 8 | enable_testing () 9 | option(ICON_UPDATE "Update the icon cache after installing" ON) 10 | option(BUILD_VALADOC "Build API documentation if Valadoc is available" OFF) 11 | 12 | include(GNUInstallDirs) 13 | if( ( ${CMAKE_INSTALL_PREFIX} MATCHES "^/usr/local" ) ) 14 | # A workaround to ensure that works 'out of the box' in Debian-based systems 15 | set(CMAKE_INSTALL_LIBDIR lib) 16 | endif() 17 | 18 | set(HAVE_VALADOC OFF) 19 | if(BUILD_VALADOC) 20 | find_package(Valadoc) 21 | if(VALADOC_FOUND) 22 | set(HAVE_VALADOC ON) 23 | include(Valadoc) 24 | else() 25 | message("Valadoc not found, will not build documentation") 26 | endif() 27 | endif() 28 | 29 | find_package(PkgConfig) 30 | 31 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} AutoVala) 32 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} AutovalaPlugin) 33 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} atk) 34 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} cairo) 35 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gdk-3.0) 36 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gdk-pixbuf-2.0) 37 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gee-0.8) 38 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gio-2.0) 39 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} glib-2.0) 40 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gobject-2.0) 41 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gobject-introspection-1.0) 42 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gtk+-3.0) 43 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gtksourceview-3.0) 44 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} libpeas-1.0) 45 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} pango) 46 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} pangocairo) 47 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} scratchcore) 48 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} x11) 49 | 50 | pkg_check_modules(DEPS REQUIRED ${MODULES_TO_CHECK}) 51 | 52 | add_subdirectory(src) 53 | add_subdirectory(po) 54 | add_subdirectory(data) 55 | -------------------------------------------------------------------------------- /cmake/GSettings.cmake: -------------------------------------------------------------------------------- 1 | # GSettings.cmake, CMake macros written for Marlin, feel free to re-use them. 2 | 3 | option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" ON) 4 | 5 | option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALINSTALL}) 6 | 7 | if(GSETTINGS_LOCALINSTALL) 8 | message(STATUS "GSettings schemas will be installed locally.") 9 | endif() 10 | 11 | if(GSETTINGS_COMPILE) 12 | message(STATUS "GSettings shemas will be compiled.") 13 | endif() 14 | 15 | macro(add_schema SCHEMA_NAME) 16 | 17 | set(PKG_CONFIG_EXECUTABLE pkg-config) 18 | # Have an option to not install the schema into where GLib is 19 | if (GSETTINGS_LOCALINSTALL) 20 | SET (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/") 21 | else (GSETTINGS_LOCALINSTALL) 22 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE) 23 | SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/") 24 | endif (GSETTINGS_LOCALINSTALL) 25 | 26 | # Run the validator and error if it fails 27 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE) 28 | execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) 29 | 30 | if (_schemas_invalid) 31 | message (SEND_ERROR "Schema validation error: ${_schemas_invalid}") 32 | endif (_schemas_invalid) 33 | 34 | # Actually install and recomple schemas 35 | message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}") 36 | install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL) 37 | 38 | if (GSETTINGS_COMPILE) 39 | install (CODE "message (STATUS \"Compiling GSettings schemas\")") 40 | install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})") 41 | endif () 42 | endmacro() 43 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | src/autovala.vala 2 | src/autovalaLib/autovalaLib.vala 3 | src/autovalaLib/conditionalText.vala 4 | src/autovalaLib/configuration.vala 5 | src/autovalaLib/elementAppData.vala 6 | src/autovalaLib/elementBDepend.vala 7 | src/autovalaLib/elementBase.vala 8 | src/autovalaLib/elementBashCompletion.vala 9 | src/autovalaLib/elementBinary.vala 10 | src/autovalaLib/elementCustom.vala 11 | src/autovalaLib/elementDBus.vala 12 | src/autovalaLib/elementDBusConf.vala 13 | src/autovalaLib/elementData.vala 14 | src/autovalaLib/elementDefine.vala 15 | src/autovalaLib/elementDesktop.vala 16 | src/autovalaLib/elementDoc.vala 17 | src/autovalaLib/elementEosPlug.vala 18 | src/autovalaLib/elementExternal.vala 19 | src/autovalaLib/elementGResource.vala 20 | src/autovalaLib/elementGlade.vala 21 | src/autovalaLib/elementGlobal.vala 22 | src/autovalaLib/elementIcon.vala 23 | src/autovalaLib/elementIgnore.vala 24 | src/autovalaLib/elementInclude.vala 25 | src/autovalaLib/elementManpage.vala 26 | src/autovalaLib/elementMimetype.vala 27 | src/autovalaLib/elementPixmap.vala 28 | src/autovalaLib/elementPo.vala 29 | src/autovalaLib/elementPolkit.vala 30 | src/autovalaLib/elementSDepend.vala 31 | src/autovalaLib/elementScheme.vala 32 | src/autovalaLib/elementTranslation.vala 33 | src/autovalaLib/elementValaBinary.vala 34 | src/autovalaLib/elementVapidir.vala 35 | src/autovalaLib/findVala.vala 36 | src/autovalaLib/genVapis.vala 37 | src/autovalaLib/globals.vala 38 | src/autovalaLib/gresource_xml.vala 39 | src/autovalaLib/mesonCommon.vala 40 | src/autovalaLib/packages.vala 41 | src/autovalaLib/packages_deb.vala 42 | src/autovalaLib/packages_pacman.vala 43 | src/autovalaLib/packages_rpm.vala 44 | src/autovalaLib/readPkgconfig.vala 45 | src/autovalaPlugin/CreateNewProject.vala 46 | src/autovalaPlugin/PanedPercentage.vala 47 | src/autovalaPlugin/ProjectProperties.vala 48 | src/autovalaPlugin/ProjectViewerMenu.vala 49 | src/autovalaPlugin/actionbuttons.vala 50 | src/autovalaPlugin/fileview.vala 51 | src/autovalaPlugin/outputview.vala 52 | src/autovalaPlugin/projectview.vala 53 | src/autovalaPlugin/searchview.vala 54 | data/interface/binary_properties.ui 55 | data/interface/new_project.ui 56 | -------------------------------------------------------------------------------- /data/cmake/GSettings.cmake: -------------------------------------------------------------------------------- 1 | # GSettings.cmake, CMake macros written for Marlin, feel free to re-use them. 2 | 3 | option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" ON) 4 | 5 | option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALINSTALL}) 6 | 7 | if(GSETTINGS_LOCALINSTALL) 8 | message(STATUS "GSettings schemas will be installed locally.") 9 | endif() 10 | 11 | if(GSETTINGS_COMPILE) 12 | message(STATUS "GSettings shemas will be compiled.") 13 | endif() 14 | 15 | macro(add_schema SCHEMA_NAME) 16 | 17 | set(PKG_CONFIG_EXECUTABLE pkg-config) 18 | # Have an option to not install the schema into where GLib is 19 | if (GSETTINGS_LOCALINSTALL) 20 | SET (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/") 21 | else (GSETTINGS_LOCALINSTALL) 22 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE) 23 | SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/") 24 | endif (GSETTINGS_LOCALINSTALL) 25 | 26 | # Run the validator and error if it fails 27 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE) 28 | execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) 29 | 30 | if (_schemas_invalid) 31 | message (SEND_ERROR "Schema validation error: ${_schemas_invalid}") 32 | endif (_schemas_invalid) 33 | 34 | # Actually install and recomple schemas 35 | message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}") 36 | install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL) 37 | 38 | if (GSETTINGS_COMPILE) 39 | install (CODE "message (STATUS \"Compiling GSettings schemas\")") 40 | install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})") 41 | endif () 42 | endmacro() 43 | -------------------------------------------------------------------------------- /gedit_plugin/cmake/GSettings.cmake: -------------------------------------------------------------------------------- 1 | # GSettings.cmake, CMake macros written for Marlin, feel free to re-use them. 2 | 3 | option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" ON) 4 | 5 | option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALINSTALL}) 6 | 7 | if(GSETTINGS_LOCALINSTALL) 8 | message(STATUS "GSettings schemas will be installed locally.") 9 | endif() 10 | 11 | if(GSETTINGS_COMPILE) 12 | message(STATUS "GSettings shemas will be compiled.") 13 | endif() 14 | 15 | macro(add_schema SCHEMA_NAME) 16 | 17 | set(PKG_CONFIG_EXECUTABLE pkg-config) 18 | # Have an option to not install the schema into where GLib is 19 | if (GSETTINGS_LOCALINSTALL) 20 | SET (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/") 21 | else (GSETTINGS_LOCALINSTALL) 22 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE) 23 | SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/") 24 | endif (GSETTINGS_LOCALINSTALL) 25 | 26 | # Run the validator and error if it fails 27 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE) 28 | execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) 29 | 30 | if (_schemas_invalid) 31 | message (SEND_ERROR "Schema validation error: ${_schemas_invalid}") 32 | endif (_schemas_invalid) 33 | 34 | # Actually install and recomple schemas 35 | message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}") 36 | install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL) 37 | 38 | if (GSETTINGS_COMPILE) 39 | install (CODE "message (STATUS \"Compiling GSettings schemas\")") 40 | install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})") 41 | endif () 42 | endmacro() 43 | -------------------------------------------------------------------------------- /scratch_plugin/cmake/GSettings.cmake: -------------------------------------------------------------------------------- 1 | # GSettings.cmake, CMake macros written for Marlin, feel free to re-use them. 2 | 3 | option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" ON) 4 | 5 | option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALINSTALL}) 6 | 7 | if(GSETTINGS_LOCALINSTALL) 8 | message(STATUS "GSettings schemas will be installed locally.") 9 | endif() 10 | 11 | if(GSETTINGS_COMPILE) 12 | message(STATUS "GSettings shemas will be compiled.") 13 | endif() 14 | 15 | macro(add_schema SCHEMA_NAME) 16 | 17 | set(PKG_CONFIG_EXECUTABLE pkg-config) 18 | # Have an option to not install the schema into where GLib is 19 | if (GSETTINGS_LOCALINSTALL) 20 | SET (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/") 21 | else (GSETTINGS_LOCALINSTALL) 22 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE) 23 | SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/") 24 | endif (GSETTINGS_LOCALINSTALL) 25 | 26 | # Run the validator and error if it fails 27 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE) 28 | execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) 29 | 30 | if (_schemas_invalid) 31 | message (SEND_ERROR "Schema validation error: ${_schemas_invalid}") 32 | endif (_schemas_invalid) 33 | 34 | # Actually install and recomple schemas 35 | message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}") 36 | install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL) 37 | 38 | if (GSETTINGS_COMPILE) 39 | install (CODE "message (STATUS \"Compiling GSettings schemas\")") 40 | install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})") 41 | endif () 42 | endmacro() 43 | -------------------------------------------------------------------------------- /src/autovalaLib/elementVapidir.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementVapidir : ElementBase { 23 | public ElementVapidir() { 24 | this._type = ConfigType.VAPIDIR; 25 | this.command = "vapidir"; 26 | } 27 | 28 | public static bool autoGenerate() { 29 | bool error = false; 30 | var filePath = File.new_for_path(Path.build_filename(ElementBase.globalData.projectFolder, "src", "vapidir")); 31 | 32 | if (filePath.query_exists()) { 33 | var element = new ElementVapidir(); 34 | error |= element.autoConfigure("src/vapidir"); 35 | } 36 | return error; 37 | } 38 | 39 | public override bool configureElement(string ? fullPathP, string ? path, string ? name, bool automatic, string ? condition, bool invertCondition, bool accept_nonexisting_paths = false) { 40 | var retval = base.configureElement(fullPathP, path, name, automatic, condition, invertCondition, true); 41 | if (!retval) { 42 | AutoVala.Globals.vapiList.fillNamespaces(fullPathP); 43 | } 44 | return retval; 45 | } 46 | 47 | public override void add_files() { 48 | if (this._fullPath[0] == GLib.Path.DIR_SEPARATOR) { 49 | // don't add VAPI files that aren't inside this project 50 | return; 51 | } 52 | this.file_list = AutoVala.ElementBase.getFilesFromFolder(this._fullPath, { ".vapi" }, false); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /doc/plugins.1: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |

Home

8 |

AUTOVALA PLUGINS FOR TEXT EDITORS

9 |

Autovala includes several GTK widgets that simplifies creating plugins for text editors, like GEdit or Scratch Text Editor. These widgets are ProjectView, ActionButtons, FileView, OutputView and SearchView. The mandatory widget is ProjectView, which is also the central widget. All the other ones are optional.

10 |

Using the plugins

11 |

All the plugins share the same style, since both uses the same widgets provided by Autovala.

12 |

There are two vertical panels, one with all the project targets and its source files, and another with all the files in the project. Doing double-click in a file will open it in the editor. Also, with right-click a context menu with more options will be shown. It allows to open the selected source file, to create a new executable/library target, or, if right-clicking on a target, open the properties dialog, which allows to change the target type (executable or library), change the base folder of the target, or set the compiler and linker option for that target. A target can also be deleted.

13 |

In the file view, a right click allows to create a new file or folder, rename or delete it, or choose to show or hide the hiden files.

14 |

Finally, there is a button and a popup menu that allows, the former, to start a new Autovala project, and the later to update the project (by running autovala refresh or autovala update), or the translation files (by running autovala po).

15 |

There are also two horizontal panels. The first one shows the output of running the autovala commans, after updating the project or the translation files. The second one allows to search strings in all the project's source files, specifying the file and the line for each occurrence. By double-clicking on each message, the file will be shown, and the cursor moved to the specific line.

16 |

Home

17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /data/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | EXECUTE_PROCESS( COMMAND glib-compile-resources --sourcedir=${CMAKE_CURRENT_SOURCE_DIR} --generate-source --target=${CMAKE_CURRENT_BINARY_DIR}/extras.gresource.xml.c ${CMAKE_CURRENT_SOURCE_DIR}/extras.gresource.xml) 5 | EXECUTE_PROCESS( COMMAND glib-compile-resources --sourcedir=${CMAKE_CURRENT_SOURCE_DIR} --generate-header --target=${CMAKE_CURRENT_BINARY_DIR}/extras.gresource.xml.h ${CMAKE_CURRENT_SOURCE_DIR}/extras.gresource.xml) 6 | ADD_CUSTOM_COMMAND ( 7 | OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/extras.gresource.xml.c 8 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/extras.gresource.xml ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/application.svg ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/c.svg ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/h.svg ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/library.svg ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/project.svg ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/test_vala.svg ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/vala.svg ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/vapi.svg ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/build.svg ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/full_build.svg ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/refresh.svg ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/refresh_langs.svg ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/update.svg ${CMAKE_CURRENT_SOURCE_DIR}/interface/binary_properties.ui ${CMAKE_CURRENT_SOURCE_DIR}/interface/new_project.ui 9 | COMMAND glib-compile-resources --sourcedir=${CMAKE_CURRENT_SOURCE_DIR} --generate-source --target=${CMAKE_CURRENT_BINARY_DIR}/extras.gresource.xml.c ${CMAKE_CURRENT_SOURCE_DIR}/extras.gresource.xml 10 | 11 | COMMAND glib-compile-resources --sourcedir=${CMAKE_CURRENT_SOURCE_DIR} --generate-header --target=${CMAKE_CURRENT_BINARY_DIR}/extras.gresource.xml.h ${CMAKE_CURRENT_SOURCE_DIR}/extras.gresource.xml 12 | ) 13 | 14 | add_custom_target(extras_gresource_xml DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/extras.gresource.xml.c) 15 | SET (extras_gresource_xml_C_FILE ${CMAKE_CURRENT_BINARY_DIR}/extras.gresource.xml.c PARENT_SCOPE) 16 | SET (extras_gresource_xml_H_FILE ${CMAKE_CURRENT_BINARY_DIR}/extras.gresource.xml.h PARENT_SCOPE) 17 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/com.rastersoft.autovala.metainfo.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/appdata/ ) 18 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | # HOW TO INSTALL 2 | 3 | To compile and install it, just open a terminal, go 4 | to the directory where you downloaded the git repository 5 | and type: 6 | 7 | mkdir install 8 | cd install 9 | cmake .. 10 | make 11 | sudo make install 12 | sudo ldconfig 13 | 14 | If you are using GTK 3.4 or previous, you must specify it 15 | to avoid the plugins to use newer widgets, not supported 16 | in old GTK versions: 17 | 18 | mkdir install 19 | cd install 20 | cmake .. -DGTK_OLD=on 21 | make 22 | sudo make install 23 | sudo ldconfig 24 | 25 | Also, if you are using ElementaryOS Luna, the pandoc version 26 | available is also too old, so you must install the one from 27 | ubuntu 14.04 at least. The packages needed are pandoc, 28 | pandoc-data and libicu52, which can be downloaded from 29 | 30 | http://packages.ubuntu.com 31 | 32 | The Gedit and Scratch plugins are compiled and installed 33 | separately. Just follow the instructions available in each 34 | folder. 35 | 36 | The main dependencies list is: 37 | 38 | * atk 39 | * glib-2.0 40 | * gee 41 | * gtk-3 42 | * libxml2 43 | * vte-2.91 44 | * readline 45 | * pandoc 46 | * curl 47 | * cmake 48 | * vala 49 | * gettext 50 | * pkgconfig 51 | * intltool 52 | 53 | Remember that you need CMake, Vala 0.20 or later, libgee 54 | and gtk+. The repository includes a version of CMake for 55 | Vala that includes some changes (not mine) to support 56 | Valadoc. These changes still aren't available at the 57 | oficial repository. If you want, you can get the oficial 58 | files with: 59 | 60 | bzr checkout lp:~elementary-apps/+junk/cmake-modules 61 | 62 | This will create a folder called *cmake-modules*. Inside 63 | it will be a folder called *cmake*. Copy the later to the 64 | Autovala project folder, overwriting the files inside. 65 | 66 | Don't forget to keep the files FindValadoc.cmake and 67 | Valadoc.cmake, needed to work with Valadoc. 68 | 69 | If you want to try the Meson builder, just do this: 70 | 71 | mkdir meson 72 | cd meson 73 | meson .. 74 | ninja 75 | sudo ninja install 76 | sudo ldconfig 77 | 78 | And, of course, report all the bugs you find and sugestions 79 | to make the Meson scripts better. 80 | -------------------------------------------------------------------------------- /gedit_plugin/po/valaplugin.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2014-05-22 17:57+0200\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: src/fileview.vala:368 src/projectview.vala:380 21 | msgid "Open" 22 | msgstr "" 23 | 24 | #: src/fileview.vala:369 25 | msgid "Don't show hiden files" 26 | msgstr "" 27 | 28 | #: src/fileview.vala:369 29 | msgid "Show hiden files" 30 | msgstr "" 31 | 32 | #: src/fileview.vala:370 33 | msgid "Rename" 34 | msgstr "" 35 | 36 | #: src/fileview.vala:371 37 | msgid "Delete" 38 | msgstr "" 39 | 40 | #: src/fileview.vala:372 41 | msgid "Create file" 42 | msgstr "" 43 | 44 | #: src/fileview.vala:373 45 | msgid "Create folder" 46 | msgstr "" 47 | 48 | #: src/fileview.vala:407 49 | msgid "Untitled file" 50 | msgstr "" 51 | 52 | #: src/fileview.vala:421 53 | msgid "Untitled folder" 54 | msgstr "" 55 | 56 | #: src/projectview.vala:295 57 | #, c-format 58 | msgid "%s (Project file)" 59 | msgstr "" 60 | 61 | #: src/projectview.vala:307 62 | #, c-format 63 | msgid "%s (executable)" 64 | msgstr "" 65 | 66 | #: src/projectview.vala:314 67 | #, c-format 68 | msgid "%s (library)" 69 | msgstr "" 70 | 71 | #: src/projectview.vala:381 72 | msgid "New executable/library" 73 | msgstr "" 74 | 75 | #: src/projectview.vala:382 76 | msgid "Edit library properties" 77 | msgstr "" 78 | 79 | #: src/projectview.vala:382 80 | msgid "Edit executable properties" 81 | msgstr "" 82 | 83 | #: src/projectview.vala:383 84 | msgid "Remove library" 85 | msgstr "" 86 | 87 | #: src/projectview.vala:383 88 | msgid "Remove executable" 89 | msgstr "" 90 | 91 | #: src/projectview.vala:384 92 | msgid "Update project" 93 | msgstr "" 94 | 95 | #: src/projectview.vala:385 96 | msgid "Update translations" 97 | msgstr "" 98 | 99 | -------------------------------------------------------------------------------- /cmake/GObjectIntrospectionMacros.cmake: -------------------------------------------------------------------------------- 1 | macro(add_target_gir TARGET_NAME GIR_NAME HEADER CFLAGS GRANITE_VERSION) 2 | set(PACKAGES "") 3 | foreach(PKG ${ARGN}) 4 | set(PACKAGES ${PACKAGES} --include=${PKG}) 5 | endforeach() 6 | install(CODE "set(ENV{LD_LIBRARY_PATH} \"${CMAKE_CURRENT_BINARY_DIR}:\$ENV{LD_LIBRARY_PATH}\") 7 | execute_process(COMMAND g-ir-scanner ${CFLAGS} -n ${GIR_NAME} 8 | --quiet 9 | --library ${TARGET_NAME} ${PACKAGES} 10 | -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir 11 | -L${CMAKE_CURRENT_BINARY_DIR} 12 | --nsversion=${GRANITE_VERSION} ${HEADER})") 13 | install(CODE "execute_process(COMMAND g-ir-compiler ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib)") 14 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir DESTINATION share/gir-1.0/) 15 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib DESTINATION lib/girepository-1.0/) 16 | endmacro() 17 | 18 | macro(add_target_gir_with_executable TARGET_NAME EXE_NAME GIR_NAME HEADER EXE_HEADER CFLAGS GRANITE_VERSION) 19 | set(PACKAGES "") 20 | foreach(PKG ${ARGN}) 21 | set(PACKAGES ${PACKAGES} --include=${PKG}) 22 | endforeach() 23 | install(CODE "set(ENV{LD_LIBRARY_PATH} \"${CMAKE_CURRENT_BINARY_DIR}:\$ENV{LD_LIBRARY_PATH}\") 24 | execute_process(COMMAND g-ir-scanner ${CFLAGS} -n ${GIR_NAME} 25 | --quiet 26 | --library ${TARGET_NAME} --program ${EXE_NAME} ${PACKAGES} 27 | -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir 28 | -L${CMAKE_CURRENT_BINARY_DIR} 29 | -I${CMAKE_CURRENT_BINARY_DIR} 30 | --nsversion=${GRANITE_VERSION} ${HEADER} ${EXE_HEADER})") 31 | install(CODE "execute_process(COMMAND g-ir-compiler ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib)") 32 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir DESTINATION share/gir-1.0/) 33 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib DESTINATION lib/girepository-1.0/) 34 | endmacro() 35 | -------------------------------------------------------------------------------- /data/cmake/GObjectIntrospectionMacros.cmake: -------------------------------------------------------------------------------- 1 | macro(add_target_gir TARGET_NAME GIR_NAME HEADER CFLAGS GRANITE_VERSION) 2 | set(PACKAGES "") 3 | foreach(PKG ${ARGN}) 4 | set(PACKAGES ${PACKAGES} --include=${PKG}) 5 | endforeach() 6 | install(CODE "set(ENV{LD_LIBRARY_PATH} \"${CMAKE_CURRENT_BINARY_DIR}:\$ENV{LD_LIBRARY_PATH}\") 7 | execute_process(COMMAND g-ir-scanner ${CFLAGS} -n ${GIR_NAME} 8 | --quiet 9 | --library ${TARGET_NAME} ${PACKAGES} 10 | -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir 11 | -L${CMAKE_CURRENT_BINARY_DIR} 12 | --nsversion=${GRANITE_VERSION} ${HEADER})") 13 | install(CODE "execute_process(COMMAND g-ir-compiler ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib)") 14 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir DESTINATION share/gir-1.0/) 15 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib DESTINATION lib/girepository-1.0/) 16 | endmacro() 17 | 18 | macro(add_target_gir_with_executable TARGET_NAME EXE_NAME GIR_NAME HEADER EXE_HEADER CFLAGS GRANITE_VERSION) 19 | set(PACKAGES "") 20 | foreach(PKG ${ARGN}) 21 | set(PACKAGES ${PACKAGES} --include=${PKG}) 22 | endforeach() 23 | install(CODE "set(ENV{LD_LIBRARY_PATH} \"${CMAKE_CURRENT_BINARY_DIR}:\$ENV{LD_LIBRARY_PATH}\") 24 | execute_process(COMMAND g-ir-scanner ${CFLAGS} -n ${GIR_NAME} 25 | --quiet 26 | --library ${TARGET_NAME} --program ${EXE_NAME} ${PACKAGES} 27 | -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir 28 | -L${CMAKE_CURRENT_BINARY_DIR} 29 | -I${CMAKE_CURRENT_BINARY_DIR} 30 | --nsversion=${GRANITE_VERSION} ${HEADER} ${EXE_HEADER})") 31 | install(CODE "execute_process(COMMAND g-ir-compiler ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib)") 32 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir DESTINATION share/gir-1.0/) 33 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib DESTINATION lib/girepository-1.0/) 34 | endmacro() 35 | -------------------------------------------------------------------------------- /gedit_plugin/cmake/GObjectIntrospectionMacros.cmake: -------------------------------------------------------------------------------- 1 | macro(add_target_gir TARGET_NAME GIR_NAME HEADER CFLAGS GRANITE_VERSION) 2 | set(PACKAGES "") 3 | foreach(PKG ${ARGN}) 4 | set(PACKAGES ${PACKAGES} --include=${PKG}) 5 | endforeach() 6 | install(CODE "set(ENV{LD_LIBRARY_PATH} \"${CMAKE_CURRENT_BINARY_DIR}:\$ENV{LD_LIBRARY_PATH}\") 7 | execute_process(COMMAND g-ir-scanner ${CFLAGS} -n ${GIR_NAME} 8 | --quiet 9 | --library ${TARGET_NAME} ${PACKAGES} 10 | -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir 11 | -L${CMAKE_CURRENT_BINARY_DIR} 12 | --nsversion=${GRANITE_VERSION} ${HEADER})") 13 | install(CODE "execute_process(COMMAND g-ir-compiler ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib)") 14 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir DESTINATION share/gir-1.0/) 15 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib DESTINATION lib/girepository-1.0/) 16 | endmacro() 17 | 18 | macro(add_target_gir_with_executable TARGET_NAME EXE_NAME GIR_NAME HEADER EXE_HEADER CFLAGS GRANITE_VERSION) 19 | set(PACKAGES "") 20 | foreach(PKG ${ARGN}) 21 | set(PACKAGES ${PACKAGES} --include=${PKG}) 22 | endforeach() 23 | install(CODE "set(ENV{LD_LIBRARY_PATH} \"${CMAKE_CURRENT_BINARY_DIR}:\$ENV{LD_LIBRARY_PATH}\") 24 | execute_process(COMMAND g-ir-scanner ${CFLAGS} -n ${GIR_NAME} 25 | --quiet 26 | --library ${TARGET_NAME} --program ${EXE_NAME} ${PACKAGES} 27 | -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir 28 | -L${CMAKE_CURRENT_BINARY_DIR} 29 | -I${CMAKE_CURRENT_BINARY_DIR} 30 | --nsversion=${GRANITE_VERSION} ${HEADER} ${EXE_HEADER})") 31 | install(CODE "execute_process(COMMAND g-ir-compiler ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib)") 32 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir DESTINATION share/gir-1.0/) 33 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib DESTINATION lib/girepository-1.0/) 34 | endmacro() 35 | -------------------------------------------------------------------------------- /scratch_plugin/cmake/GObjectIntrospectionMacros.cmake: -------------------------------------------------------------------------------- 1 | macro(add_target_gir TARGET_NAME GIR_NAME HEADER CFLAGS GRANITE_VERSION) 2 | set(PACKAGES "") 3 | foreach(PKG ${ARGN}) 4 | set(PACKAGES ${PACKAGES} --include=${PKG}) 5 | endforeach() 6 | install(CODE "set(ENV{LD_LIBRARY_PATH} \"${CMAKE_CURRENT_BINARY_DIR}:\$ENV{LD_LIBRARY_PATH}\") 7 | execute_process(COMMAND g-ir-scanner ${CFLAGS} -n ${GIR_NAME} 8 | --quiet 9 | --library ${TARGET_NAME} ${PACKAGES} 10 | -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir 11 | -L${CMAKE_CURRENT_BINARY_DIR} 12 | --nsversion=${GRANITE_VERSION} ${HEADER})") 13 | install(CODE "execute_process(COMMAND g-ir-compiler ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib)") 14 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir DESTINATION share/gir-1.0/) 15 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib DESTINATION lib/girepository-1.0/) 16 | endmacro() 17 | 18 | macro(add_target_gir_with_executable TARGET_NAME EXE_NAME GIR_NAME HEADER EXE_HEADER CFLAGS GRANITE_VERSION) 19 | set(PACKAGES "") 20 | foreach(PKG ${ARGN}) 21 | set(PACKAGES ${PACKAGES} --include=${PKG}) 22 | endforeach() 23 | install(CODE "set(ENV{LD_LIBRARY_PATH} \"${CMAKE_CURRENT_BINARY_DIR}:\$ENV{LD_LIBRARY_PATH}\") 24 | execute_process(COMMAND g-ir-scanner ${CFLAGS} -n ${GIR_NAME} 25 | --quiet 26 | --library ${TARGET_NAME} --program ${EXE_NAME} ${PACKAGES} 27 | -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir 28 | -L${CMAKE_CURRENT_BINARY_DIR} 29 | -I${CMAKE_CURRENT_BINARY_DIR} 30 | --nsversion=${GRANITE_VERSION} ${HEADER} ${EXE_HEADER})") 31 | install(CODE "execute_process(COMMAND g-ir-compiler ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir -o ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib)") 32 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.gir DESTINATION share/gir-1.0/) 33 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_NAME}-${GRANITE_VERSION}.typelib DESTINATION lib/girepository-1.0/) 34 | endmacro() 35 | -------------------------------------------------------------------------------- /gedit_plugin/README.md: -------------------------------------------------------------------------------- 1 | # AUTOVALA PLUGIN FOR GEDIT # 2 | 3 | This is a plugin for GEdit 3 that integrates the project manager AutoVala, 4 | allowing to use GEdit as a fully-fledged IDE for creating projects in VALA 5 | language. 6 | 7 | The plugin adds a left panel which shows the binaries and libraries being 8 | created by an AutoVala project and its source files, allowing to choose them 9 | just by clicking on each. It also shows all the other files in the project 10 | (doc, po, data...) and the AVPRJ file. 11 | 12 | To open an AutoVala project, just open any of the files belonging to it, and 13 | the plugin will autodetect the project and show all the data. 14 | 15 | Remember that you need Autovala installed in your system. 16 | 17 | # INSTALLING THE PLUGIN # 18 | 19 | By default, the plugin is compiled for GEDIT 3.12 or later. If you are using 20 | GEDIT 3.10 or previous, you must add the -DOLD_GTK=on parameter to cmake. After 21 | installation, close all GEdit windows, open it again and go to 22 | Preferences -> Plugins to enable the Autovala plugin. 23 | 24 | 25 | ## Local installation ## 26 | 27 | Local installation is the preferable way for installing this plugin. It makes 28 | the plugin accesible only to the user that installed it, but has the advantage 29 | of not needing root priviledges, and also avoids the problems with library 30 | paths (which, in 64bit systems, are problematic). To install it in this way, 31 | just type: 32 | 33 | mkdir install 34 | cd install 35 | cmake .. -DATHOME=on -DCMAKE_INSTALL_PREFIX=$HOME/.local [-DOLD_GEDIT=on] 36 | make 37 | make install 38 | 39 | Remember that [-DOLD_GEDIT=on] is optional, and needed only to compile for 40 | GEDIT 3.10 or older. 41 | 42 | 43 | ## System-wide installation ## 44 | 45 | To install this plugin system-wide, allowing to be used by all users in the 46 | system, just type: 47 | 48 | mkdir install 49 | cd install 50 | cmake .. -DCMAKE_INSTALL_PREFIX=/usr [-DOLD_GEGIT=on] 51 | make 52 | sudo make install 53 | 54 | This mode needs root priviledges, and in some systems can be installed in the 55 | wrong folder, forcing the user to manually move the files to the right place. 56 | Again, remember that [-DOLD_GEDIT=on] is optional and needed only to compile 57 | for GEDIT 3.10 or older. 58 | -------------------------------------------------------------------------------- /gedit_plugin/rpmbuild/SPECS/gedit_plugin.spec: -------------------------------------------------------------------------------- 1 | Name: autovala_gedit 2 | Version: 0.99.47 3 | Release: 1 4 | License: GPLv3 5 | Summary: This is a plugin for GEdit 3 that integrates the project manager AutoVala, allowing to use GEdit as a fully-fledged IDE for creating projects in VALA language. 6 | 7 | BuildRequires: gcc 8 | BuildRequires: gcc-c++ 9 | BuildRequires: vala 10 | BuildRequires: gedit-devel 11 | BuildRequires: atk-devel 12 | BuildRequires: cairo-devel 13 | BuildRequires: gtk3-devel 14 | BuildRequires: gdk-pixbuf2-devel 15 | BuildRequires: libgee-devel 16 | BuildRequires: glib2-devel 17 | BuildRequires: gobject-introspection-devel 18 | BuildRequires: gtksourceview3-devel 19 | BuildRequires: libpeas-devel 20 | BuildRequires: pango-devel 21 | BuildRequires: libX11-devel 22 | BuildRequires: cmake 23 | BuildRequires: gettext 24 | BuildRequires: pkgconfig 25 | BuildRequires: make 26 | BuildRequires: intltool 27 | BuildRequires: autovala 28 | 29 | Requires: gtksourceview3 30 | Requires: libpeas 31 | Requires: gtk3 32 | Requires: pango 33 | Requires: atk 34 | Requires: cairo-gobject 35 | Requires: cairo 36 | Requires: gdk-pixbuf2 37 | Requires: glib2 38 | Requires: gobject-introspection 39 | Requires: libgee 40 | Requires: libX11 41 | Requires: autovala 42 | 43 | %description 44 | This is a plugin for GEdit 3 that integrates the project manager 45 | AutoVala, allowing to use GEdit as a fully-fledged IDE for creating 46 | projects in VALA language. 47 | . 48 | The plugin adds a left panel which shows the binaries and libraries 49 | being created by an AutoVala project and its source files, allowing 50 | to choose them just by clicking on each. It also shows all the other 51 | files in the project (doc, po, data...) and the AVPRJ file. 52 | . 53 | To open an AutoVala project, just open any of the files belonging to 54 | it, and the plugin will autodetect the project and show all the data. 55 | . 56 | Remember that you need Autovala installed in your system. 57 | . 58 | 59 | %files 60 | * 61 | 62 | %build 63 | mkdir -p ${RPM_BUILD_DIR} 64 | cd ${RPM_BUILD_DIR}; cmake -DCMAKE_INSTALL_PREFIX=/usr -DGSETTINGS_COMPILE=OFF -DICON_UPDATE=OFF ../.. 65 | make -C ${RPM_BUILD_DIR} 66 | 67 | %install 68 | make install -C ${RPM_BUILD_DIR} DESTDIR=%{buildroot} 69 | 70 | %post 71 | ldconfig 72 | 73 | %postun 74 | ldconfig 75 | 76 | %clean 77 | rm -rf %{buildroot} 78 | 79 | -------------------------------------------------------------------------------- /src/autovalaLib/elementPolkit.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementPolkit : ElementBase { 23 | public ElementPolkit() { 24 | this._type = ConfigType.POLKIT; 25 | this.command = "polkit"; 26 | } 27 | 28 | public static bool autoGenerate() { 29 | bool error = false; 30 | 31 | var files = ElementBase.getFilesFromFolder("data", { ".policy" }, true); 32 | foreach (var file in files) { 33 | ElementPolkit element = new ElementPolkit(); 34 | error |= element.autoConfigure(file); 35 | } 36 | return error; 37 | } 38 | 39 | public override bool generateCMake(DataOutputStream dataStream) { 40 | try { 41 | dataStream.put_string("install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/" + this.name + " DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions/)\n"); 42 | } catch (Error e) { 43 | ElementBase.globalData.addError(_("Failed to write the CMakeLists file for %s").printf(this.name)); 44 | return true; 45 | } 46 | 47 | return false; 48 | } 49 | 50 | public override bool generateMeson(ConditionalText dataStream, MesonCommon mesonCommon) { 51 | try { 52 | dataStream.put_string("install_data( '%s',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'polkit-1','actions'))\n".printf(this._fullPath)); 53 | } catch (Error e) { 54 | // TRANSLATOR meson.build is a file needed to use the MESON build system 55 | ElementBase.globalData.addError(_("Failed to write to meson.build at '%s' element, at '%s' path: %s").printf(this.command, this._path, e.message)); 56 | return true; 57 | } 58 | return false; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/autovalaLib/elementDefine.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementDefine : ElementBase { 23 | public ElementDefine() { 24 | this._type = ConfigType.DEFINE; 25 | this.command = "define"; 26 | } 27 | 28 | public override void add_files() { 29 | this.file_list = {}; 30 | } 31 | 32 | public override bool configureLine(string line, bool automatic, string ? condition, bool invertCondition, int lineNumber, string[] ? comments) { 33 | if (false == line.has_prefix("define: ")) { 34 | var badCommand = line.split(": ")[0]; 35 | ElementBase.globalData.addError(_("Invalid command %s after command %s (line %d)").printf(badCommand, this.command, lineNumber)); 36 | return true; 37 | } 38 | // The line starts with 'define: ' 39 | var data = line.substring(8).strip(); 40 | this.comments = comments; 41 | return this.addNewDefine(data, automatic); 42 | } 43 | 44 | public bool addNewDefine(string data, bool automatic = true) { 45 | foreach (var element in ElementBase.globalData.globalElements) { 46 | if (element.name == data) { 47 | // this DEFINE already exists 48 | return false; 49 | } 50 | } 51 | // A define with a value "true", "false", "0" or "1" must not be counted as a configuration parameter 52 | if ((data == "0") || (data == "1") || (data.ascii_casecmp("true") == 0) || (data.ascii_casecmp("false") == 0)) { 53 | return false; 54 | } 55 | 56 | return this.configureElement(null, data, data, automatic, null, false); 57 | } 58 | 59 | public override bool autoConfigure(string ? path = null) { 60 | return false; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /gedit_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | project (autovala_gedit) 5 | cmake_minimum_required (VERSION 2.6) 6 | cmake_policy (VERSION 2.8) 7 | list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) 8 | enable_testing () 9 | option(ICON_UPDATE "Update the icon cache after installing" ON) 10 | option(BUILD_VALADOC "Build API documentation if Valadoc is available" OFF) 11 | option(ATHOME "ATHOME" OFF) 12 | option(OLD_GEDIT "OLD_GEDIT" OFF) 13 | 14 | if( NOT CMAKE_BUILD_TYPE ) 15 | set(CMAKE_BUILD_TYPE Release) 16 | endif() 17 | 18 | include(GNUInstallDirs) 19 | if( ( ${CMAKE_INSTALL_PREFIX} MATCHES "^/usr/local" ) ) 20 | # A workaround to ensure that works 'out of the box' in Debian-based systems 21 | set(CMAKE_INSTALL_LIBDIR lib) 22 | endif() 23 | 24 | set(HAVE_VALADOC OFF) 25 | if(BUILD_VALADOC) 26 | find_package(Valadoc) 27 | if(VALADOC_FOUND) 28 | set(HAVE_VALADOC ON) 29 | include(Valadoc) 30 | else() 31 | message("Valadoc not found, will not build documentation") 32 | endif() 33 | endif() 34 | 35 | find_package(PkgConfig) 36 | 37 | if (OLD_GEDIT) 38 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gedit) 39 | else () 40 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gedit) 41 | endif () 42 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} AutoVala) 43 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} AutovalaPlugin) 44 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} atk) 45 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} cairo) 46 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gdk-3.0) 47 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gdk-pixbuf-2.0) 48 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gee-0.8) 49 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gio-2.0) 50 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} glib-2.0) 51 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gobject-2.0) 52 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gobject-introspection-1.0) 53 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gtk+-3.0) 54 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gtksourceview-3.0) 55 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} libpeas-1.0) 56 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} libxml-2.0) 57 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} pango) 58 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} pangocairo) 59 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} vte-2.91) 60 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} x11) 61 | 62 | pkg_check_modules(DEPS REQUIRED ${MODULES_TO_CHECK}) 63 | 64 | 65 | add_subdirectory(po) 66 | add_subdirectory(data) 67 | add_subdirectory(src) 68 | 69 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: autovala 2 | Maintainer: Sergio Costas 3 | Priority: optional 4 | Section: misc 5 | Standards-Version: 4.0.0 6 | Build-Depends: build-essential, po-debconf, valac (>=0.30), libc6-dev, libgee-0.8-dev, libreadline-dev | libreadline6-dev, libxml2-dev, libvte-2.91-dev, cmake, intltool, pandoc, bash-completion 7 | 8 | Package: autovala 9 | Architecture: any 10 | Version: 1.10.0 11 | Depends: libgee-0.8-2, libreadline7 | libreadline6, libvte-2.91-0, pandoc, curl 12 | Description: Autovala is a program and a library designed to help in the creation 13 | of projects with Vala and CMake. 14 | . 15 | The idea is quite simple: CMake is very powerful, but writting the 16 | CMakeLists files is boring and repetitive. Why not let the computer 17 | create them, by guessing what to do with each file? And if, at the 18 | end, there are mistakes, let the user fix them in an easy way, and 19 | generate the final CMakeLists files. 20 | . 21 | This is what Autovala does. This process is done in three steps: 22 | . 23 | * First, Autovala checks all the folders and files, and writes a 24 | project file with the type of each file 25 | * It also peeks the source files to determine which Vala packages 26 | they need, and generate automagically that list 27 | * After that (and after allowing the user to check, if (s)he wishes, 28 | the project file), it uses that project file to generate the needed 29 | CMakeLists files 30 | . 31 | Autovala greatly simplifies the process of working with Vala because: 32 | . 33 | * Automatically determines the vala packages and libraries needed to 34 | compile and run the project, by inspecting the source code 35 | * Automatically generates the .vapi and pkg-config files for libraries 36 | * Automatically determinates the final destination for an icon, by 37 | checking its type (svg or png) and, in the later case, its size 38 | * Automatically generates manpages from text files in several 39 | possible input format (markdown, html, latex...) 40 | * Greatly simplifies creating libraries in Vala, or a project with a 41 | binary that uses a library defined in the same project 42 | * Automatically generates the metadata files to create .DEB and .RPM packages. 43 | * Easily integrates unitary tests for each binary in the project 44 | * Can generate automatically DBUS bindings by using the DBUS 45 | introspection capabilities 46 | * Automatically generates the list of source files for GETTEXT 47 | * Simplifies mixing C and Vala source files 48 | . 49 | -------------------------------------------------------------------------------- /gedit_plugin/po/es.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # Sergio Costas , 2014. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2014-06-07 23:38+0200\n" 12 | "PO-Revision-Date: 2014-06-07 23:40+0200\n" 13 | "Last-Translator: Sergio Costas \n" 14 | "Language-Team: Español; Castellano <>\n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | "X-Generator: Gtranslator 2.91.6\n" 21 | 22 | #: src/gedit_plugin.vala:87 src/gedit_plugin.vala:94 23 | msgid "Autovala output" 24 | msgstr "Salida de Autovala" 25 | 26 | #: src/gedit_plugin.vala:88 src/gedit_plugin.vala:95 27 | msgid "Autovala search" 28 | msgstr "Búsqueda de Autovala" 29 | 30 | #~ msgid "Project actions" 31 | #~ msgstr "Acciones del proyecto" 32 | 33 | #~ msgid "Open" 34 | #~ msgstr "Abrir" 35 | 36 | #~ msgid "Don't show hiden files" 37 | #~ msgstr "No mostrar archivos ocultos" 38 | 39 | #~ msgid "Show hiden files" 40 | #~ msgstr "Mostrar archivos ocultos" 41 | 42 | #~ msgid "Rename" 43 | #~ msgstr "Renombrar" 44 | 45 | #~ msgid "Delete" 46 | #~ msgstr "Borrar" 47 | 48 | #~ msgid "Create file" 49 | #~ msgstr "Crear fichero" 50 | 51 | #~ msgid "Create folder" 52 | #~ msgstr "Crear carpeta" 53 | 54 | #~ msgid "Untitled file" 55 | #~ msgstr "Fichero sin nombre" 56 | 57 | #~ msgid "Untitled folder" 58 | #~ msgstr "Carpeta sin nombre" 59 | 60 | #~ msgid "%s (Project file)" 61 | #~ msgstr "%s (Fichero de proyecto)" 62 | 63 | #~ msgid "%s (executable)" 64 | #~ msgstr "%s (ejecutable)" 65 | 66 | #~ msgid "%s (library)" 67 | #~ msgstr "%s (biblioteca)" 68 | 69 | #~ msgid "New executable/library" 70 | #~ msgstr "Nuevo ejecutable/biblioteca" 71 | 72 | #~ msgid "Edit library properties" 73 | #~ msgstr "Editar propiedades de la biblioteca" 74 | 75 | #~ msgid "Edit executable properties" 76 | #~ msgstr "Editar propiedades del ejecutable" 77 | 78 | #~ msgid "Remove library" 79 | #~ msgstr "Eliminar biblioteca" 80 | 81 | #~ msgid "Remove executable" 82 | #~ msgstr "Eliminar ejecutable" 83 | 84 | #~ msgid "Update project" 85 | #~ msgstr "Actualizar proyecto" 86 | 87 | #~ msgid "Update translations" 88 | #~ msgstr "Actualizar traducciones" 89 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | set (DATADIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}") 5 | set (PKGDATADIR "${DATADIR}/autovala") 6 | set (GETTEXT_PACKAGE "autovala") 7 | set (RELEASE_NAME "autovala") 8 | set (CMAKE_C_FLAGS "") 9 | set (PREFIX ${CMAKE_INSTALL_PREFIX}) 10 | set (VERSION "1.10.0") 11 | set (TESTSRCDIR "${CMAKE_SOURCE_DIR}") 12 | set (DOLLAR "$") 13 | 14 | configure_file (${CMAKE_SOURCE_DIR}/src/Config.vala.base ${CMAKE_BINARY_DIR}/src/Config.vala) 15 | add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\") 16 | set (VERSION "1.10.0") 17 | add_definitions (${DEPS_CFLAGS}) 18 | include_directories ( ${CMAKE_BINARY_DIR}/src/autovalaLib ) 19 | link_libraries ( ${DEPS_LIBRARIES} -lAutoVala ) 20 | link_directories ( ${DEPS_LIBRARY_DIRS} ${CMAKE_BINARY_DIR}/src/autovalaLib ) 21 | find_package (Vala REQUIRED) 22 | include (ValaVersion) 23 | ensure_vala_version ("0.30" MINIMUM) 24 | include (ValaPrecompile) 25 | 26 | set (VALA_PACKAGES ${VALA_PACKAGES} posix) 27 | set (VALA_PACKAGES ${VALA_PACKAGES} gio-2.0) 28 | set (VALA_PACKAGES ${VALA_PACKAGES} gee-0.8) 29 | set (VALA_PACKAGES ${VALA_PACKAGES} glib-2.0) 30 | 31 | set (APP_SOURCES ${APP_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/Config.vala) 32 | set (APP_SOURCES ${APP_SOURCES} autovala.vala) 33 | 34 | set (CUSTOM_VAPIS_LIST ${CUSTOM_VAPIS_LIST} ${CMAKE_BINARY_DIR}/src/autovalaLib/AutoVala.vapi) 35 | 36 | 37 | if ((${CMAKE_BUILD_TYPE} STREQUAL "Debug") OR (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")) 38 | set(COMPILE_OPTIONS ${COMPILE_OPTIONS} "-g") 39 | endif() 40 | 41 | vala_precompile(VALA_C autovala 42 | ${APP_SOURCES} 43 | PACKAGES 44 | ${VALA_PACKAGES} 45 | CUSTOM_VAPIS 46 | ${CUSTOM_VAPIS_LIST} 47 | ) 48 | 49 | add_executable(autovala ${VALA_C}) 50 | set ( autovala_DEPENDENCIES ${autovala_DEPENDENCIES} AutoVala ) 51 | add_dependencies( autovala ${autovala_DEPENDENCIES} ) 52 | 53 | 54 | install(TARGETS 55 | autovala 56 | RUNTIME DESTINATION 57 | ${CMAKE_INSTALL_BINDIR} 58 | ) 59 | if(HAVE_VALADOC) 60 | valadoc(autovala 61 | ${CMAKE_BINARY_DIR}/valadoc/autovala 62 | ${APP_SOURCES} 63 | PACKAGES 64 | ${VALA_PACKAGES} 65 | CUSTOM_VAPIS 66 | ${CUSTOM_VAPIS_LIST} 67 | ) 68 | install(DIRECTORY 69 | ${CMAKE_BINARY_DIR}/valadoc 70 | DESTINATION 71 | ${CMAKE_INSTALL_DATAROOTDIR}/doc/autovala 72 | ) 73 | endif() 74 | 75 | install(CODE "MESSAGE (\" 76 | ************************************************ 77 | * Run 'sudo ldconfig' to complete installation * 78 | ************************************************ 79 | 80 | \") " ) 81 | 82 | -------------------------------------------------------------------------------- /src/autovalaLib/elementBinary.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementBinary : ElementBase { 23 | public ElementBinary() { 24 | this._type = ConfigType.BINARY; 25 | this.command = "binary"; 26 | } 27 | 28 | public static bool autoGenerate() { 29 | bool error = false; 30 | var filePath = File.new_for_path(Path.build_filename(ElementBase.globalData.projectFolder, "data")); 31 | 32 | if (filePath.query_exists()) { 33 | var files = ElementBase.getFilesFromFolder("data", { ".sh" }, false); 34 | foreach (var file in files) { 35 | var element = new ElementBinary(); 36 | error |= element.autoConfigure(file); 37 | } 38 | } 39 | return error; 40 | } 41 | 42 | public override bool generateCMake(DataOutputStream dataStream) { 43 | try { 44 | dataStream.put_string("install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/" + this.name + " DESTINATION ${CMAKE_INSTALL_BINDIR})\n"); 45 | } catch (Error e) { 46 | ElementBase.globalData.addError(_("Failed to add binary %s").printf(this.name)); 47 | return true; 48 | } 49 | return false; 50 | } 51 | 52 | public override bool generateMeson(ConditionalText dataStream, MesonCommon mesonCommon) { 53 | try { 54 | var counter = Globals.counter; 55 | dataStream.put_string("installfile_%d = files('%s')\n".printf(counter, Path.build_filename(this._path, this._name))); 56 | dataStream.put_string("install_data(installfile_%d, install_dir: get_option('bindir'))\n".printf(counter)); 57 | } catch (GLib.Error e) { 58 | ElementBase.globalData.addError(_("Failed to write to meson.build at '%s' element, at '%s' path: %s").printf(this.command, this._path, e.message)); 59 | return true; 60 | } 61 | return false; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/autovalaPlugin/ProjectViewerMenu.vala: -------------------------------------------------------------------------------- 1 | using Gtk; 2 | using Gdk; 3 | using Gee; 4 | using AutoVala; 5 | 6 | namespace AutovalaPlugin { 7 | /** 8 | * This class manages the popup menu in the project view 9 | */ 10 | private class ProjectViewerMenu : Gtk.Menu { 11 | private string project_path; 12 | private string ? file_path; 13 | private string binary_name; 14 | private ProjectEntryTypes type; 15 | private Gtk.MenuItem action_open; 16 | private Gtk.MenuItem action_new_binary; 17 | private Gtk.MenuItem action_edit_binary; 18 | private Gtk.MenuItem action_delete_binary; 19 | 20 | public signal void open(string file); 21 | public signal void new_binary(); 22 | public signal void edit_binary(string ? binary_name); 23 | public signal void remove_binary(string ? binary_name); 24 | 25 | public ProjectViewerMenu(string ? project_path, string ? file_path, string ? binary_name, ProjectEntryTypes type) { 26 | this.project_path = project_path; 27 | this.file_path = file_path; 28 | this.binary_name = binary_name; 29 | this.type = type; 30 | 31 | this.action_open = new Gtk.MenuItem.with_label(_("Open")); 32 | this.action_new_binary = new Gtk.MenuItem.with_label(_("New executable/library")); 33 | this.action_edit_binary = new Gtk.MenuItem.with_label((type == ProjectEntryTypes.LIBRARY) ? _("Edit library properties") : _("Edit executable properties")); 34 | this.action_delete_binary = new Gtk.MenuItem.with_label((type == ProjectEntryTypes.LIBRARY) ? _("Remove library") : _("Remove executable")); 35 | 36 | switch (type) { 37 | case ProjectEntryTypes.VALA_SOURCE_FILE: 38 | case ProjectEntryTypes.C_SOURCE_FILE: 39 | case ProjectEntryTypes.C_HEADER_FILE: 40 | case ProjectEntryTypes.VAPI_FILE: 41 | case ProjectEntryTypes.PROJECT_FILE: 42 | this.append(this.action_open); 43 | this.append(new Gtk.SeparatorMenuItem()); 44 | break; 45 | } 46 | 47 | this.append(this.action_new_binary); 48 | 49 | if ((type == ProjectEntryTypes.EXECUTABLE) || (type == ProjectEntryTypes.LIBRARY)) { 50 | this.append(this.action_edit_binary); 51 | this.append(this.action_delete_binary); 52 | } 53 | 54 | this.action_open.activate.connect(() => { 55 | this.open(this.file_path); 56 | }); 57 | this.action_new_binary.activate.connect(() => { 58 | this.new_binary(); 59 | }); 60 | this.action_edit_binary.activate.connect(() => { 61 | this.edit_binary(binary_name); 62 | }); 63 | this.action_delete_binary.activate.connect(() => { 64 | this.remove_binary(binary_name); 65 | }); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/autovalaLib/elementDBusConf.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementDBusConfiguration : ElementBase { 23 | public ElementDBusConfiguration() { 24 | this._type = ConfigType.DBUS_CONFIG; 25 | this.command = "dbus_config"; 26 | } 27 | 28 | public static bool autoGenerate() { 29 | var filePath = File.new_for_path(Path.build_filename(ElementBase.globalData.projectFolder, "data", "dbus")); 30 | bool error = false; 31 | 32 | if (filePath.query_exists()) { 33 | var files = ElementBase.getFilesFromFolder(Path.build_filename("data", "dbus"), { ".conf" }, false); 34 | foreach (var file in files) { 35 | ElementDBusConfiguration element = new ElementDBusConfiguration(); 36 | error |= element.autoConfigure(file); 37 | } 38 | } 39 | return error; 40 | } 41 | 42 | public override bool generateCMake(DataOutputStream dataStream) { 43 | try { 44 | dataStream.put_string("install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/" + this.name + " DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/system.d/)\n"); 45 | } catch (Error e) { 46 | ElementBase.globalData.addError(_("Failed to write the CMakeLists file for %s").printf(this.name)); 47 | return true; 48 | } 49 | 50 | return false; 51 | } 52 | 53 | public override bool generateMeson(ConditionalText dataStream, MesonCommon mesonCommon) { 54 | try { 55 | dataStream.put_string("install_data( '%s',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'dbus-1','system.d'))\n".printf(this._fullPath)); 56 | } catch (Error e) { 57 | ElementBase.globalData.addError(_("Failed to write to meson.build at '%s' element, at '%s' path: %s").printf(this.command, this._path, e.message)); 58 | return true; 59 | } 60 | return false; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/autovalaLib/elementPixmap.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementPixmap : ElementBase { 23 | public ElementPixmap() { 24 | this._type = ConfigType.PIXMAP; 25 | this.command = "pixmap"; 26 | } 27 | 28 | public static bool autoGenerate() { 29 | bool error = false; 30 | var filePath = File.new_for_path(Path.build_filename(ElementBase.globalData.projectFolder, "data", "pixmaps")); 31 | 32 | if (filePath.query_exists()) { 33 | var files = ElementBase.getFilesFromFolder("data/pixmaps", { ".png", ".svg", ".jpg" }, true); 34 | foreach (var file in files) { 35 | var element = new ElementPixmap(); 36 | error |= element.autoConfigure(file); 37 | } 38 | } 39 | return error; 40 | } 41 | 42 | public override bool generateCMake(DataOutputStream dataStream) { 43 | try { 44 | dataStream.put_string("install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/" + this.name + " DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/" + ElementBase.globalData.projectName + "/ )\n"); 45 | } catch (Error e) { 46 | ElementBase.globalData.addError(_("Failed to add pixmap %s").printf(this.fullPath)); 47 | return true; 48 | } 49 | return false; 50 | } 51 | 52 | public override bool generateMeson(ConditionalText dataStream, MesonCommon mesonCommon) { 53 | try { 54 | var origin = GLib.Path.build_filename(this._path, this._name); 55 | dataStream.put_string("install_data('%s',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'%s'))\n".printf(origin, ElementBase.globalData.projectName)); 56 | } catch (Error e) { 57 | ElementBase.globalData.addError(_("Failed to write to meson.build at '%s' element, at '%s' path: %s").printf(this.command, this._path, e.message)); 58 | return true; 59 | } 60 | return false; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /PKGBUILD: -------------------------------------------------------------------------------- 1 | pkgname=autovala 2 | pkgver=1.10.0 3 | pkgrel=1 4 | pkgdesc="Autovala is a program and a library designed to help in the creation 5 | of projects with Vala and CMake. 6 | 7 | The idea is quite simple: CMake is very powerful, but writting the 8 | CMakeLists files is boring and repetitive. Why not let the computer 9 | create them, by guessing what to do with each file? And if, at the 10 | end, there are mistakes, let the user fix them in an easy way, and 11 | generate the final CMakeLists files. 12 | 13 | This is what Autovala does. This process is done in three steps: 14 | 15 | * First, Autovala checks all the folders and files, and writes a 16 | project file with the type of each file 17 | * It also peeks the source files to determine which Vala packages 18 | they need, and generate automagically that list 19 | * After that (and after allowing the user to check, if (s)he wishes, 20 | the project file), it uses that project file to generate the needed 21 | CMakeLists files 22 | 23 | Autovala greatly simplifies the process of working with Vala because: 24 | 25 | * Automatically determines the vala packages and libraries needed to 26 | compile and run the project, by inspecting the source code 27 | * Automatically generates the .vapi and pkg-config files for libraries 28 | * Automatically determinates the final destination for an icon, by 29 | checking its type (svg or png) and, in the later case, its size 30 | * Automatically generates manpages from text files in several 31 | possible input format (markdown, html, latex...) 32 | * Greatly simplifies creating libraries in Vala, or a project with a 33 | binary that uses a library defined in the same project 34 | * Automatically generates the metadata files to create .DEB and .RPM packages. 35 | * Easily integrates unitary tests for each binary in the project 36 | * Can generate automatically DBUS bindings by using the DBUS 37 | introspection capabilities 38 | * Automatically generates the list of source files for GETTEXT 39 | * Simplifies mixing C and Vala source files 40 | 41 | " 42 | arch=('i686' 'x86_64') 43 | depends=( 'glib2' 'libgee' 'cairo' 'gtk3' 'pango' 'gdk-pixbuf2' 'libxml2' 'readline' 'atk' 'libx11' 'vte3' 'zlib' 'pcre2' 'gnutls' 'pandoc' 'curl' ) 44 | makedepends=( 'vala' 'glibc' 'glib2' 'libgee' 'readline' 'cairo' 'gtk3' 'gdk-pixbuf2' 'libxml2' 'pango' 'atk' 'libx11' 'vte3' 'cmake' 'gettext' 'pkg-config' 'gcc' 'make' 'intltool' 'pandoc' 'bash-completion' ) 45 | build() { 46 | rm -rf ${startdir}/install 47 | mkdir ${startdir}/install 48 | cd ${startdir}/install 49 | cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib 50 | make -j1 51 | } 52 | 53 | package() { 54 | cd ${startdir}/install 55 | make DESTDIR="$pkgdir/" install 56 | } 57 | -------------------------------------------------------------------------------- /src/autovalaLib/elementExternal.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementExternal : ElementBase { 23 | public string owner; 24 | public string data; 25 | 26 | public ElementExternal() { 27 | this._type = ConfigType.EXTERNAL; 28 | this.command = "external"; 29 | } 30 | 31 | public override bool configureLine(string originalLine, bool automatic, string ? condition, bool invertCondition, int lineNumber, string[] ? comments) { 32 | if (false == originalLine.has_prefix("external: ")) { 33 | var badCommand = originalLine.split(": ")[0]; 34 | ElementBase.globalData.addError(_("Invalid command %s after command %s (line %d)").printf(badCommand, this.command, lineNumber)); 35 | return true; 36 | } 37 | 38 | // The line starts with 'external: ' 39 | var line = originalLine.substring(10).strip(); 40 | var pos = line.index_of_char(' '); 41 | if (pos == -1) { 42 | ElementBase.globalData.addError(_("External command needs two parameters (line %d)").printf(lineNumber)); 43 | return true; 44 | } 45 | 46 | this.owner = line.substring(0, pos).strip(); 47 | this.data = line.substring(pos).strip(); 48 | this.comments = comments; 49 | return this.configureElement(null, null, null, false, condition, invertCondition); 50 | } 51 | 52 | public override bool storeConfig(DataOutputStream dataStream, ConditionalText printConditions) { 53 | if (this.data == "") { 54 | return false; 55 | } 56 | 57 | try { 58 | dataStream.put_string("external: %s %s\n".printf(this.owner, this.data)); 59 | } catch (Error e) { 60 | ElementBase.globalData.addError(_("Failed to store 'external: %s %s' at config").printf(this.owner, this.data)); 61 | return true; 62 | } 63 | return false; 64 | } 65 | 66 | public override string ? getSortId() { 67 | return this.owner + " " + this.data; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /cmake/Translations.cmake: -------------------------------------------------------------------------------- 1 | # Translations.cmake, CMake macros written for Marlin, feel free to re-use them 2 | 3 | macro(add_translations_directory NLS_PACKAGE) 4 | add_custom_target (i18n ALL COMMENT “Building i18n messages.”) 5 | find_program (MSGFMT_EXECUTABLE msgfmt) 6 | file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po) 7 | foreach (PO_INPUT ${PO_FILES}) 8 | get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE) 9 | set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo) 10 | add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT}) 11 | 12 | install (FILES ${MO_OUTPUT} DESTINATION 13 | share/locale/${PO_INPUT_BASE}/LC_MESSAGES 14 | RENAME ${NLS_PACKAGE}.mo) 15 | endforeach (PO_INPUT ${PO_FILES}) 16 | endmacro(add_translations_directory) 17 | 18 | 19 | macro(add_translations_catalog NLS_PACKAGE) 20 | add_custom_target (pot COMMENT “Building translation catalog.”) 21 | find_program (XGETTEXT_EXECUTABLE xgettext) 22 | 23 | set(C_SOURCE "") 24 | set(VALA_SOURCE "") 25 | set(GLADE_SOURCE "") 26 | 27 | foreach(FILES_INPUT ${ARGN}) 28 | set(BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}) 29 | 30 | file (GLOB_RECURSE SOURCE_FILES ${BASE_DIRECTORY}/*.c) 31 | foreach(C_FILE ${SOURCE_FILES}) 32 | set(C_SOURCE ${C_SOURCE} ${C_FILE}) 33 | endforeach() 34 | 35 | file (GLOB_RECURSE SOURCE_FILES ${BASE_DIRECTORY}/*.vala) 36 | foreach(VALA_C_FILE ${SOURCE_FILES}) 37 | set(VALA_SOURCE ${VALA_SOURCE} ${VALA_C_FILE}) 38 | endforeach() 39 | 40 | file (GLOB_RECURSE SOURCE_FILES ${BASE_DIRECTORY}/*.ui) 41 | foreach(GLADE_C_FILE ${SOURCE_FILES}) 42 | set(GLADE_SOURCE ${GLADE_SOURCE} ${GLADE_C_FILE}) 43 | endforeach() 44 | endforeach() 45 | 46 | set(BASE_XGETTEXT_COMMAND 47 | ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} 48 | -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot 49 | --keyword="_" --keyword="N_" --from-code=UTF-8) 50 | 51 | set(CONTINUE_FLAG "") 52 | 53 | IF(NOT "${C_SOURCE}" STREQUAL "") 54 | add_custom_command(TARGET pot COMMAND ${BASE_XGETTEXT_COMMAND} ${C_SOURCE}) 55 | set(CONTINUE_FLAG "-j") 56 | ENDIF() 57 | 58 | IF(NOT "${VALA_SOURCE}" STREQUAL "") 59 | add_custom_command(TARGET pot COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LC\# ${VALA_SOURCE}) 60 | set(CONTINUE_FLAG "-j") 61 | ENDIF() 62 | 63 | IF(NOT "${GLADE_SOURCE}" STREQUAL "") 64 | add_custom_command (TARGET pot COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LGlade ${GLADE_SOURCE}) 65 | ENDIF() 66 | endmacro() 67 | -------------------------------------------------------------------------------- /data/cmake/Translations.cmake: -------------------------------------------------------------------------------- 1 | # Translations.cmake, CMake macros written for Marlin, feel free to re-use them 2 | 3 | macro(add_translations_directory NLS_PACKAGE) 4 | add_custom_target (i18n ALL COMMENT “Building i18n messages.”) 5 | find_program (MSGFMT_EXECUTABLE msgfmt) 6 | file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po) 7 | foreach (PO_INPUT ${PO_FILES}) 8 | get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE) 9 | set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo) 10 | add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT}) 11 | 12 | install (FILES ${MO_OUTPUT} DESTINATION 13 | share/locale/${PO_INPUT_BASE}/LC_MESSAGES 14 | RENAME ${NLS_PACKAGE}.mo) 15 | endforeach (PO_INPUT ${PO_FILES}) 16 | endmacro(add_translations_directory) 17 | 18 | 19 | macro(add_translations_catalog NLS_PACKAGE) 20 | add_custom_target (pot COMMENT “Building translation catalog.”) 21 | find_program (XGETTEXT_EXECUTABLE xgettext) 22 | 23 | set(C_SOURCE "") 24 | set(VALA_SOURCE "") 25 | set(GLADE_SOURCE "") 26 | 27 | foreach(FILES_INPUT ${ARGN}) 28 | set(BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}) 29 | 30 | file (GLOB_RECURSE SOURCE_FILES ${BASE_DIRECTORY}/*.c) 31 | foreach(C_FILE ${SOURCE_FILES}) 32 | set(C_SOURCE ${C_SOURCE} ${C_FILE}) 33 | endforeach() 34 | 35 | file (GLOB_RECURSE SOURCE_FILES ${BASE_DIRECTORY}/*.vala) 36 | foreach(VALA_C_FILE ${SOURCE_FILES}) 37 | set(VALA_SOURCE ${VALA_SOURCE} ${VALA_C_FILE}) 38 | endforeach() 39 | 40 | file (GLOB_RECURSE SOURCE_FILES ${BASE_DIRECTORY}/*.ui) 41 | foreach(GLADE_C_FILE ${SOURCE_FILES}) 42 | set(GLADE_SOURCE ${GLADE_SOURCE} ${GLADE_C_FILE}) 43 | endforeach() 44 | endforeach() 45 | 46 | set(BASE_XGETTEXT_COMMAND 47 | ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} 48 | -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot 49 | --keyword="_" --keyword="N_" --from-code=UTF-8) 50 | 51 | set(CONTINUE_FLAG "") 52 | 53 | IF(NOT "${C_SOURCE}" STREQUAL "") 54 | add_custom_command(TARGET pot COMMAND ${BASE_XGETTEXT_COMMAND} ${C_SOURCE}) 55 | set(CONTINUE_FLAG "-j") 56 | ENDIF() 57 | 58 | IF(NOT "${VALA_SOURCE}" STREQUAL "") 59 | add_custom_command(TARGET pot COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LC\# ${VALA_SOURCE}) 60 | set(CONTINUE_FLAG "-j") 61 | ENDIF() 62 | 63 | IF(NOT "${GLADE_SOURCE}" STREQUAL "") 64 | add_custom_command (TARGET pot COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LGlade ${GLADE_SOURCE}) 65 | ENDIF() 66 | endmacro() 67 | -------------------------------------------------------------------------------- /gedit_plugin/cmake/Translations.cmake: -------------------------------------------------------------------------------- 1 | # Translations.cmake, CMake macros written for Marlin, feel free to re-use them 2 | 3 | macro(add_translations_directory NLS_PACKAGE) 4 | add_custom_target (i18n ALL COMMENT “Building i18n messages.”) 5 | find_program (MSGFMT_EXECUTABLE msgfmt) 6 | file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po) 7 | foreach (PO_INPUT ${PO_FILES}) 8 | get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE) 9 | set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo) 10 | add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT}) 11 | 12 | install (FILES ${MO_OUTPUT} DESTINATION 13 | share/locale/${PO_INPUT_BASE}/LC_MESSAGES 14 | RENAME ${NLS_PACKAGE}.mo) 15 | endforeach (PO_INPUT ${PO_FILES}) 16 | endmacro(add_translations_directory) 17 | 18 | 19 | macro(add_translations_catalog NLS_PACKAGE) 20 | add_custom_target (pot COMMENT “Building translation catalog.”) 21 | find_program (XGETTEXT_EXECUTABLE xgettext) 22 | 23 | set(C_SOURCE "") 24 | set(VALA_SOURCE "") 25 | set(GLADE_SOURCE "") 26 | 27 | foreach(FILES_INPUT ${ARGN}) 28 | set(BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}) 29 | 30 | file (GLOB_RECURSE SOURCE_FILES ${BASE_DIRECTORY}/*.c) 31 | foreach(C_FILE ${SOURCE_FILES}) 32 | set(C_SOURCE ${C_SOURCE} ${C_FILE}) 33 | endforeach() 34 | 35 | file (GLOB_RECURSE SOURCE_FILES ${BASE_DIRECTORY}/*.vala) 36 | foreach(VALA_C_FILE ${SOURCE_FILES}) 37 | set(VALA_SOURCE ${VALA_SOURCE} ${VALA_C_FILE}) 38 | endforeach() 39 | 40 | file (GLOB_RECURSE SOURCE_FILES ${BASE_DIRECTORY}/*.ui) 41 | foreach(GLADE_C_FILE ${SOURCE_FILES}) 42 | set(GLADE_SOURCE ${GLADE_SOURCE} ${GLADE_C_FILE}) 43 | endforeach() 44 | endforeach() 45 | 46 | set(BASE_XGETTEXT_COMMAND 47 | ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} 48 | -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot 49 | --keyword="_" --keyword="N_" --from-code=UTF-8) 50 | 51 | set(CONTINUE_FLAG "") 52 | 53 | IF(NOT "${C_SOURCE}" STREQUAL "") 54 | add_custom_command(TARGET pot COMMAND ${BASE_XGETTEXT_COMMAND} ${C_SOURCE}) 55 | set(CONTINUE_FLAG "-j") 56 | ENDIF() 57 | 58 | IF(NOT "${VALA_SOURCE}" STREQUAL "") 59 | add_custom_command(TARGET pot COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LC\# ${VALA_SOURCE}) 60 | set(CONTINUE_FLAG "-j") 61 | ENDIF() 62 | 63 | IF(NOT "${GLADE_SOURCE}" STREQUAL "") 64 | add_custom_command (TARGET pot COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LGlade ${GLADE_SOURCE}) 65 | ENDIF() 66 | endmacro() 67 | -------------------------------------------------------------------------------- /scratch_plugin/cmake/Translations.cmake: -------------------------------------------------------------------------------- 1 | # Translations.cmake, CMake macros written for Marlin, feel free to re-use them 2 | 3 | macro(add_translations_directory NLS_PACKAGE) 4 | add_custom_target (i18n ALL COMMENT “Building i18n messages.”) 5 | find_program (MSGFMT_EXECUTABLE msgfmt) 6 | file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po) 7 | foreach (PO_INPUT ${PO_FILES}) 8 | get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE) 9 | set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo) 10 | add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT}) 11 | 12 | install (FILES ${MO_OUTPUT} DESTINATION 13 | share/locale/${PO_INPUT_BASE}/LC_MESSAGES 14 | RENAME ${NLS_PACKAGE}.mo) 15 | endforeach (PO_INPUT ${PO_FILES}) 16 | endmacro(add_translations_directory) 17 | 18 | 19 | macro(add_translations_catalog NLS_PACKAGE) 20 | add_custom_target (pot COMMENT “Building translation catalog.”) 21 | find_program (XGETTEXT_EXECUTABLE xgettext) 22 | 23 | set(C_SOURCE "") 24 | set(VALA_SOURCE "") 25 | set(GLADE_SOURCE "") 26 | 27 | foreach(FILES_INPUT ${ARGN}) 28 | set(BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}) 29 | 30 | file (GLOB_RECURSE SOURCE_FILES ${BASE_DIRECTORY}/*.c) 31 | foreach(C_FILE ${SOURCE_FILES}) 32 | set(C_SOURCE ${C_SOURCE} ${C_FILE}) 33 | endforeach() 34 | 35 | file (GLOB_RECURSE SOURCE_FILES ${BASE_DIRECTORY}/*.vala) 36 | foreach(VALA_C_FILE ${SOURCE_FILES}) 37 | set(VALA_SOURCE ${VALA_SOURCE} ${VALA_C_FILE}) 38 | endforeach() 39 | 40 | file (GLOB_RECURSE SOURCE_FILES ${BASE_DIRECTORY}/*.ui) 41 | foreach(GLADE_C_FILE ${SOURCE_FILES}) 42 | set(GLADE_SOURCE ${GLADE_SOURCE} ${GLADE_C_FILE}) 43 | endforeach() 44 | endforeach() 45 | 46 | set(BASE_XGETTEXT_COMMAND 47 | ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} 48 | -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot 49 | --keyword="_" --keyword="N_" --from-code=UTF-8) 50 | 51 | set(CONTINUE_FLAG "") 52 | 53 | IF(NOT "${C_SOURCE}" STREQUAL "") 54 | add_custom_command(TARGET pot COMMAND ${BASE_XGETTEXT_COMMAND} ${C_SOURCE}) 55 | set(CONTINUE_FLAG "-j") 56 | ENDIF() 57 | 58 | IF(NOT "${VALA_SOURCE}" STREQUAL "") 59 | add_custom_command(TARGET pot COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LC\# ${VALA_SOURCE}) 60 | set(CONTINUE_FLAG "-j") 61 | ENDIF() 62 | 63 | IF(NOT "${GLADE_SOURCE}" STREQUAL "") 64 | add_custom_command (TARGET pot COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LGlade ${GLADE_SOURCE}) 65 | ENDIF() 66 | endmacro() 67 | -------------------------------------------------------------------------------- /autovala-atom/spec/autovala-atom-spec.coffee: -------------------------------------------------------------------------------- 1 | AutovalaAtom = require '../lib/autovala-atom' 2 | 3 | # Use the command `window:run-package-specs` (cmd-alt-ctrl-p) to run specs. 4 | # 5 | # To run a specific `it` or `describe` block add an `f` to the front (e.g. `fit` 6 | # or `fdescribe`). Remove the `f` to unfocus the block. 7 | 8 | describe "AutovalaAtom", -> 9 | [workspaceElement, activationPromise] = [] 10 | 11 | beforeEach -> 12 | workspaceElement = atom.views.getView(atom.workspace) 13 | activationPromise = atom.packages.activatePackage('autovala-atom') 14 | 15 | describe "when the autovala-atom:toggle event is triggered", -> 16 | it "hides and shows the modal panel", -> 17 | # Before the activation event the view is not on the DOM, and no panel 18 | # has been created 19 | expect(workspaceElement.querySelector('.autovala-atom')).not.toExist() 20 | 21 | # This is an activation event, triggering it will cause the package to be 22 | # activated. 23 | atom.commands.dispatch workspaceElement, 'autovala-atom:toggle' 24 | 25 | waitsForPromise -> 26 | activationPromise 27 | 28 | runs -> 29 | expect(workspaceElement.querySelector('.autovala-atom')).toExist() 30 | 31 | autovalaAtomElement = workspaceElement.querySelector('.autovala-atom') 32 | expect(autovalaAtomElement).toExist() 33 | 34 | autovalaAtomPanel = atom.workspace.panelForItem(autovalaAtomElement) 35 | expect(autovalaAtomPanel.isVisible()).toBe true 36 | atom.commands.dispatch workspaceElement, 'autovala-atom:toggle' 37 | expect(autovalaAtomPanel.isVisible()).toBe false 38 | 39 | it "hides and shows the view", -> 40 | # This test shows you an integration test testing at the view level. 41 | 42 | # Attaching the workspaceElement to the DOM is required to allow the 43 | # `toBeVisible()` matchers to work. Anything testing visibility or focus 44 | # requires that the workspaceElement is on the DOM. Tests that attach the 45 | # workspaceElement to the DOM are generally slower than those off DOM. 46 | jasmine.attachToDOM(workspaceElement) 47 | 48 | expect(workspaceElement.querySelector('.autovala-atom')).not.toExist() 49 | 50 | # This is an activation event, triggering it causes the package to be 51 | # activated. 52 | atom.commands.dispatch workspaceElement, 'autovala-atom:toggle' 53 | 54 | waitsForPromise -> 55 | activationPromise 56 | 57 | runs -> 58 | # Now we can test for view visibility 59 | autovalaAtomElement = workspaceElement.querySelector('.autovala-atom') 60 | expect(autovalaAtomElement).toBeVisible() 61 | atom.commands.dispatch workspaceElement, 'autovala-atom:toggle' 62 | expect(autovalaAtomElement).not.toBeVisible() 63 | -------------------------------------------------------------------------------- /gedit_plugin/debian/changelog: -------------------------------------------------------------------------------- 1 | autovala-gedit (0.99.47-Debian1) sid; urgency=low 2 | 3 | * Updated the plugin to last version 4 | 5 | -- Sergio Costas Rodriguez Sun, 23 Oct 2016 23:55:00 +0200 6 | 7 | autovala-gedit (0.99.36-Debian1) sid; urgency=low 8 | 9 | * Now the Gedit plugin can be installed in the right folders both locally and globally 10 | 11 | -- Sergio Costas Rodriguez Wed, 02 Dec 2015 23:55:00 +0200 12 | 13 | autovala-gedit (0.99.25-Debian1) sid; urgency=low 14 | 15 | * Added packaging files for the Gedit-Plugin 16 | 17 | -- Sergio Costas Rodriguez Sun, 10 May 2015 23:55:00 +0200 18 | 19 | autovala-gedit (0.98.0-Debian1) sid; urgency=low 20 | 21 | * Added support for GEdit 3.12 and later in the plugin 22 | * Allows to create new projects from the plugins 23 | 24 | -- Sergio Costas Rodriguez Mon, 26 May 2014 23:55:00 +0200 25 | 26 | autovala-gedit (0.97.0-Debian1) sid; urgency=low 27 | 28 | * Added support for the new GEdit plugin for Autovala 29 | * Added two GTK3 widgets to allow to easily create plugins for text editors 30 | * Now the GLOBALS object has the vapiList as an static member, allowing to read it once. This speeds up the gedit plugin 31 | 32 | -- Sergio Costas Rodriguez Mon, 12 May 2014 23:55:00 +0200 33 | 34 | autovala-gedit (0.27.0-Debian1) sid; urgency=low 35 | 36 | * Removed the Gedit plugin (until having spare time to fix it) 37 | 38 | -- Sergio Costas Rodriguez Sun, 01 Dec 2013 23:55:00 +0200 39 | 40 | autovala-gedit (0.22.0-Debian1) sid; urgency=low 41 | 42 | * Autovala and gedit plugin are now different projects, allowing to compile only the former 43 | 44 | -- Sergio Costas Rodriguez Mon, 14 Oct 2013 23:55:00 +0200 45 | 46 | autovala-gedit (0.19.0-Debian1) sid; urgency=low 47 | 48 | * Now the plugin deletes the content of the *install* folder, but not the folder itself 49 | 50 | -- Sergio Costas Rodriguez Tue, 30 Apr 2013 23:55:00 +0200 51 | 52 | autovala-gedit (0.18.0-Debian1) sid; urgency=low 53 | 54 | * Allows to delete the INSTALL folder from Gedit 55 | * Allows to delete the INSTALL folder, update the .avprj file, run cmake and launch make in a single step from Gedit 56 | 57 | -- Sergio Costas Rodriguez Tue, 30 Apr 2013 23:50:00 +0200 58 | 59 | autovala-gedit (0.17.0-Debian1) sid; urgency=low 60 | 61 | * Fixed bug in plugin when updating the whole project 62 | 63 | -- Sergio Costas Rodriguez Sun, 28 Apr 2013 23:55:00 +0200 64 | 65 | autovala-gedit (0.16.0-Debian1) sid; urgency=low 66 | 67 | * Added plugin for Gedit 68 | 69 | -- Sergio Costas Rodriguez Sun, 28 Apr 2013 23:50:00 +0200 70 | 71 | -------------------------------------------------------------------------------- /data/com.rastersoft.autovala.metainfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.rastersoft.autovala.desktop 4 | CC0-1.0 5 | GPL-3.0+ 6 | Autovala 7 | Simplify the creation of Vala projects 8 | Simplifica la creación de proyectos en Vala 9 | 10 |

Autovala is a program and a library designed to help in the creation of 11 | projects with Vala and CMake.

12 |

The idea is quite simple: CMake is very powerful, but writting the CMakeLists 13 | files is boring and repetitive. Why not let the computer create them, by 14 | guessing what to do with each file? And if, at the end, there are mistakes, 15 | let the user fix them in an easy way, and generate the final CMakeLists files.

16 | 17 |

This is what Autovala does. This process is done in three steps:

18 |
    19 |
  • First, Autovala checks all the folders and files, and writes a project 20 | file with the type of each file
  • 21 |
  • It also peeks the source files to determine which Vala packages they need, 22 | and generate automagically that list
  • 23 |
  • After that (and after allowing the user to check, if (s)he wishes, the 24 | project file), it uses that project file to generate the needed CMakeLists 25 | files
  • 26 |
27 |

Autovala greatly simplifies the process of working with Vala because:

28 |
    29 |
  • Automatically determines the vala packages and libraries needed to compile 30 | and run the project, by inspecting the source code
  • 31 |
  • Automatically generates the .vapi and pkg-config files for libraries
  • 32 |
  • Automatically determinates the final destination for an icon, by checking 33 | its type (svg or png) and, in the later case, its size
  • 34 |
  • Automatically generates manpages from text files in several possible input 35 | format (markdown, html, latex...)
  • 36 |
  • Greatly simplifies creating libraries in Vala, or a project with a binary 37 | that uses a library defined in the same project
  • 38 |
  • Automatically generates the metadata files to create .DEB and .RPM packages.
  • 39 |
  • Easily integrates unitary tests for each binary in the project
  • 40 |
  • Can generate automatically DBUS bindings by using the DBUS introspection 41 | capabilities
  • 42 |
  • Automatically generates the list of source files for GETTEXT
  • 43 |
  • Simplifies mixing C and Vala source files
  • 44 |
45 |
46 | http://www.rastersoft.com/programas/autovala.html 47 | Sergio Costas 48 | raster@rastersoft.com 49 |
50 | -------------------------------------------------------------------------------- /src/autovalaLib/elementScheme.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementScheme : ElementBase { 23 | private bool addedSchemePrefix; 24 | 25 | public ElementScheme() { 26 | this._type = ConfigType.SCHEME; 27 | this.command = "scheme"; 28 | this.addedSchemePrefix = false; 29 | } 30 | 31 | public static bool autoGenerate() { 32 | bool error = false; 33 | var filePath = File.new_for_path(Path.build_filename(ElementBase.globalData.projectFolder, "data")); 34 | 35 | if (filePath.query_exists()) { 36 | var files = ElementBase.getFilesFromFolder("data", { ".gschema.xml" }, false); 37 | foreach (var file in files) { 38 | var element = new ElementScheme(); 39 | error |= element.autoConfigure(file); 40 | } 41 | } 42 | return error; 43 | } 44 | 45 | public override bool generateCMake(DataOutputStream dataStream) { 46 | try { 47 | if (addedSchemePrefix == false) { 48 | dataStream.put_string("include(GSettings)\n"); 49 | addedSchemePrefix = true; 50 | } 51 | dataStream.put_string("add_schema(" + this.name + ")\n"); 52 | } catch (Error e) { 53 | ElementBase.globalData.addError(_("Failed to add schema %s").printf(this.name)); 54 | return true; 55 | } 56 | return false; 57 | } 58 | 59 | public override bool generateMeson(ConditionalText dataStream, MesonCommon mesonCommon) { 60 | try { 61 | var origin = GLib.Path.build_filename(this._path, this._name); 62 | dataStream.put_string("install_data('%s', install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'glib-2.0', 'schemas'))\n".printf(origin)); 63 | dataStream.put_string("meson.add_install_script('meson_scripts/install_schemas.py')\n"); 64 | mesonCommon.create_schemas_script(); 65 | } catch (Error e) { 66 | ElementBase.globalData.addError(_("Failed to write to meson.build at '%s' element, at '%s' path: %s").printf(this.command, this._path, e.message)); 67 | return true; 68 | } 69 | return false; 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/autovalaLib/elementInclude.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementInclude : ElementBase { 23 | private string ? post_condition; 24 | private bool post_invertCondition; 25 | 26 | public ElementInclude() { 27 | this._type = ConfigType.INCLUDE; 28 | this.command = "include"; 29 | } 30 | 31 | public override bool configureElement(string ? fullPathP, string ? path, string ? name, bool automatic, string ? condition, bool invertCondition, bool accept_nonexisting_paths = false) { 32 | this.post_condition = condition; 33 | this.post_invertCondition = invertCondition; 34 | 35 | return base.configureElement(fullPathP, path, name, automatic, null, false, accept_nonexisting_paths); 36 | } 37 | 38 | public override bool generateCMakePostData(DataOutputStream dataStream, DataOutputStream dataStreamGlobal) { 39 | try { 40 | var condition = new ConditionalText(dataStream, ConditionalType.CMAKE); 41 | condition.printCondition(this.post_condition, this.post_invertCondition); 42 | dataStream.put_string("\ninclude(${CMAKE_CURRENT_SOURCE_DIR}/" + this.name + ")\n"); 43 | condition.printTail(); 44 | } catch (Error e) { 45 | ElementBase.globalData.addError(_("Failed to write the CMakeLists file for %s").printf(this.name)); 46 | return true; 47 | } 48 | return false; 49 | } 50 | 51 | public override bool generateMeson(ConditionalText dataStream, MesonCommon mesonCommon) { 52 | ElementBase.globalData.addWarning(_("This project has an INCLUDE statement, which is valid only for CMAKE. Maybe it will fail to build.")); 53 | return false; 54 | } 55 | 56 | public override bool storeConfig(DataOutputStream dataStream, ConditionalText printConditions) { 57 | try { 58 | printConditions.printCondition(this.post_condition, this.post_invertCondition); 59 | return base.storeConfig(dataStream, printConditions); 60 | } catch (GLib.Error e) { 61 | ElementBase.globalData.addError(_("Failed to write at '%s' element, at '%s' path: %s").printf(this.command, this._path, e.message)); 62 | return true; 63 | } 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### CMakeLists automatically created with AutoVala 2 | ### Do not edit 3 | 4 | project (autovala) 5 | cmake_minimum_required (VERSION 2.6) 6 | cmake_policy (VERSION 2.8) 7 | list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) 8 | enable_testing () 9 | option(ICON_UPDATE "Update the icon cache after installing" ON) 10 | option(BUILD_VALADOC "Build API documentation if Valadoc is available" OFF) 11 | 12 | if( NOT CMAKE_BUILD_TYPE ) 13 | set(CMAKE_BUILD_TYPE Release) 14 | endif() 15 | 16 | include(GNUInstallDirs) 17 | if( ( ${CMAKE_INSTALL_PREFIX} MATCHES "^/usr/local" ) ) 18 | # A workaround to ensure that works 'out of the box' in Debian-based systems 19 | set(CMAKE_INSTALL_LIBDIR lib) 20 | endif() 21 | 22 | set(HAVE_VALADOC OFF) 23 | if(BUILD_VALADOC) 24 | find_package(Valadoc) 25 | if(VALADOC_FOUND) 26 | set(HAVE_VALADOC ON) 27 | include(Valadoc) 28 | else() 29 | message("Valadoc not found, will not build documentation") 30 | endif() 31 | endif() 32 | 33 | find_package(PkgConfig) 34 | 35 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} atk) 36 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gio-2.0) 37 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gtk+-3.0) 38 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} x11) 39 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} cairo) 40 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gdk-3.0) 41 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gdk-pixbuf-2.0) 42 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gee-0.8) 43 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} glib-2.0) 44 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} gobject-2.0) 45 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} libxml-2.0) 46 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} pango) 47 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} pangocairo) 48 | set(MODULES_TO_CHECK ${MODULES_TO_CHECK} vte-2.91) 49 | 50 | pkg_check_modules(DEPS REQUIRED ${MODULES_TO_CHECK}) 51 | 52 | if ( (NOT EXISTS "/usr/include/readline/readline.h")) 53 | message(FATAL_ERROR "Can't find any of the files /usr/include/readline/readline.h") 54 | endif() 55 | if ( (NOT EXISTS "/usr/bin/pandoc")) 56 | message(FATAL_ERROR "Can't find any of the files /usr/bin/pandoc") 57 | endif() 58 | if ( (NOT EXISTS "/usr/bin/curl")) 59 | message(FATAL_ERROR "Can't find any of the files /usr/bin/curl") 60 | endif() 61 | 62 | find_program ( WHERE_PANDOC pandoc ) 63 | if ( NOT WHERE_PANDOC ) 64 | MESSAGE(FATAL_ERROR "Error! PANDOC is not installed.") 65 | endif() 66 | 67 | find_program ( WHERE_GRESOURCE glib-compile-resources ) 68 | if ( NOT WHERE_GRESOURCE ) 69 | MESSAGE(FATAL_ERROR "Error! GLIB-COMPILE-RESOURCES is not installed.") 70 | endif() 71 | 72 | add_subdirectory(doc) 73 | add_subdirectory(data/debian) 74 | add_subdirectory(po) 75 | add_subdirectory(wiki) 76 | add_subdirectory(data) 77 | add_subdirectory(data/cmake) 78 | add_subdirectory(data/bash_completion) 79 | add_subdirectory(data/interface) 80 | add_subdirectory(src/autovalaLib) 81 | add_subdirectory(src/autovalaPlugin) 82 | add_subdirectory(src) 83 | 84 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AUTOVALA # 2 | 3 | **IMPORTANT: Autovala has been migrated to Gitlab** 4 | 5 | https://gitlab.com/rastersoft/autovala 6 | 7 | Autovala is a program and a library designed to help in the creation of 8 | projects with Vala and CMake. It also has support for Genie. 9 | 10 | Now also has experimental Meson build system support. 11 | 12 | The idea is quite simple: CMake is very powerful, but writting the CMakeLists 13 | files is boring and repetitive. Why not let the computer create them, by 14 | guessing what to do with each file? And if, at the end, there are mistakes, 15 | let the user fix them in an easy way, and generate the final CMakeLists files. 16 | 17 | This is what Autovala does. This process is done in three steps: 18 | 19 | * First, Autovala checks all the folders and files, and writes a project 20 | file with the type of each file 21 | * It also peeks the source files to determine which Vala packages they need, 22 | and generate automagically that list 23 | * After that (and after allowing the user to check, if (s)he wishes, the 24 | project file), it uses that project file to generate the needed CMakeLists 25 | files 26 | 27 | Autovala greatly simplifies the process of working with Vala because: 28 | 29 | * Automatically determines the vala packages and libraries needed to compile 30 | and run the project, by inspecting the source code 31 | * Automatically generates the .vapi and pkg-config files for libraries 32 | * Automatically determinates the final destination for an icon, by checking 33 | its type (svg or png) and, in the later case, its size. 34 | * Automatically generates manpages from text files in several possible input 35 | format (markdown, html, latex...). 36 | * Greatly simplifies creating libraries in Vala, or a project with a binary 37 | that uses a library defined in the same project. 38 | * Automatically generates the metadata files to create .DEB and .RPM packages. 39 | * Easily integrates unitary tests for each binary in the project. 40 | * Can generate automatically DBUS bindings by using the DBUS introspection 41 | capabilities. 42 | * Automatically generates the list of source files for GETTEXT. 43 | * Simplifies mixing C and Vala source files. 44 | 45 | ## COMPILING AUTOVALA ## 46 | 47 | Details about how to compile autovala are available in the INSTALL.md file. 48 | 49 | You also can compile the plugins for Gedit and Scratch Text Editor, which are 50 | in the folders *gedit_plugin* and *scratch_plugin*. You can find inside the 51 | instructions. 52 | 53 | ## USING AUTOVALA ## 54 | 55 | The DOC folder contains the Wiki dumped in HTML format. Just open the 56 | **index.html** file with your browser, or go to the **Wiki section** in GitHub, 57 | and enjoy. 58 | 59 | ## CONTACTING THE AUTHOR ## 60 | 61 | Sergio Costas Rodriguez 62 | rastersoft@gmail.com 63 | http://www.rastersoft.com 64 | https://gitlab.com/rastersoft/autovala 65 | -------------------------------------------------------------------------------- /data/pixmaps/vala.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 42 | 44 | 45 | 47 | image/svg+xml 48 | 50 | 51 | 52 | 53 | 54 | 59 | 63 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/autovalaLib/elementGlade.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementGlade : ElementBase { 23 | public ElementGlade() { 24 | this._type = ConfigType.GLADE; 25 | this.command = "glade"; 26 | } 27 | 28 | public static bool autoGenerate() { 29 | bool error = false; 30 | var filePath = File.new_for_path(Path.build_filename(ElementBase.globalData.projectFolder, "data/interface")); 31 | 32 | if (filePath.query_exists()) { 33 | var files = ElementBase.getFilesFromFolder("data/interface", { ".ui" }, false); 34 | foreach (var file in files) { 35 | var element = new ElementGlade(); 36 | error |= element.autoConfigure(file); 37 | } 38 | } 39 | return error; 40 | } 41 | 42 | public override bool configureElement(string ? fullPathP, string ? path, string ? name, bool automatic, string ? condition, bool invertCondition, bool accept_nonexisting_paths = false) { 43 | bool retval; 44 | 45 | retval = base.configureElement(fullPathP, path, name, automatic, condition, invertCondition, accept_nonexisting_paths); 46 | if (retval == false) { 47 | var translation = new ElementTranslation(); 48 | translation.translate_type = TranslationType.GLADE; 49 | translation.configureElement(this._fullPath, null, null, automatic, condition, invertCondition); 50 | } 51 | return (retval); 52 | } 53 | 54 | public override bool generateCMake(DataOutputStream dataStream) { 55 | try { 56 | dataStream.put_string("install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/" + this.name + " DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/" + ElementBase.globalData.projectName + "/ )\n"); 57 | } catch (Error e) { 58 | ElementBase.globalData.addError(_("Failed to add glade %s").printf(this.fullPath)); 59 | return true; 60 | } 61 | return false; 62 | } 63 | 64 | public override bool generateMeson(ConditionalText dataStream, MesonCommon mesonCommon) { 65 | try { 66 | dataStream.put_string("\tinstall_data('%s', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'%s'))\n".printf(Path.build_filename(this._path, this._name), ElementBase.globalData.projectName)); 67 | } catch (GLib.Error e) { 68 | ElementBase.globalData.addError(_("Failed to write to meson.build at '%s' element, at '%s' path: %s").printf(this.command, this._path, e.message)); 69 | return true; 70 | } 71 | return false; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/autovalaLib/elementMimetype.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementMimetype : ElementBase { 23 | public ElementMimetype() { 24 | this._type = ConfigType.MIMETYPE; 25 | this.command = "mimetype"; 26 | } 27 | 28 | public static bool autoGenerate() { 29 | bool error = false; 30 | 31 | var files = ElementBase.getFilesFromFolder("data", { ".xml" }, true); 32 | foreach (var file in files) { 33 | var handle = File.new_for_path(Path.build_filename(ElementBase.globalData.projectFolder, file)); 34 | 35 | var dis = new DataInputStream(handle.read()); 36 | string line; 37 | // Read lines until end of file (null) is reached 38 | int nline = 0; 39 | bool found = false; 40 | while ((line = dis.read_line(null)) != null) { 41 | line = line.strip(); 42 | if (line == "") { 43 | // empty lines don't count 44 | continue; 45 | } 46 | nline++; 47 | if (nline == 1) { 48 | if (!line.has_prefix(" 2 | 3 | 4 | 18 | 20 | 42 | 44 | 45 | 47 | image/svg+xml 48 | 50 | 51 | 52 | 53 | 54 | 59 | 63 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/autovalaLib/elementEosPlug.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementEosPlug : ElementBase { 23 | public ElementEosPlug() { 24 | this._type = ConfigType.EOS_PLUG; 25 | this.command = "eos_plug"; 26 | } 27 | 28 | public static bool autoGenerate() { 29 | bool error = false; 30 | var filePath = File.new_for_path(Path.build_filename(ElementBase.globalData.projectFolder, "data")); 31 | 32 | if (filePath.query_exists()) { 33 | var files = ElementBase.getFilesFromFolder("data", { ".plug" }, false); 34 | foreach (var file in files) { 35 | var element = new ElementEosPlug(); 36 | error |= element.autoConfigure(file); 37 | } 38 | } 39 | return error; 40 | } 41 | 42 | public override bool generateCMake(DataOutputStream dataStream) { 43 | try { 44 | dataStream.put_string("configure_file(${CMAKE_CURRENT_SOURCE_DIR}/" + this.name + " ${CMAKE_CURRENT_BINARY_DIR}/" + this.name + ")\n"); 45 | dataStream.put_string("install(FILES ${CMAKE_CURRENT_BINARY_DIR}/" + this.name + " DESTINATION lib/plugs/" + ElementBase.globalData.projectName + "/" + ElementBase.globalData.projectName + "/)\n"); 46 | } catch (Error e) { 47 | ElementBase.globalData.addError(_("Failed to add file %s").printf(this.name)); 48 | } 49 | return false; 50 | } 51 | 52 | public override bool generateMesonHeader(ConditionalText dataStream, MesonCommon mesonCommon) { 53 | try { 54 | mesonCommon.add_dbus_config(dataStream); 55 | } catch (Error e) { 56 | ElementBase.globalData.addError(_("Failed to write to meson.build header at '%s' element, at '%s' path: %s").printf(this.command, this._path, e.message)); 57 | return true; 58 | } 59 | return false; 60 | } 61 | 62 | public override bool generateMeson(ConditionalText dataStream, MesonCommon mesonCommon) { 63 | try { 64 | var name = this._name.replace("-", "_").replace(".", "_").replace("+", ""); 65 | dataStream.put_string("eos_plug_cfg_%s = configure_file(input: '%s',output: '%s', configuration: cfg_dbus_data)\n".printf(name 66 | , Path.build_filename(this._path, this._name), this._name)); 67 | dataStream.put_string("install_data(eos_plug_cfg_%s,install_dir: join_paths(get_option('prefix'),'lib','plugs','%s'))\n".printf(name, ElementBase.globalData.projectName)); 68 | } catch (Error e) { 69 | ElementBase.globalData.addError(_("Failed to write to meson.build at '%s' element, at '%s' path: %s").printf(this.command, this._path, e.message)); 70 | return true; 71 | } 72 | return false; 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/autovalaLib/elementSDepend.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementSDepend : ElementBase { 23 | public ElementSDepend() { 24 | this._type = ConfigType.SOURCE_DEPENDENCY; 25 | this.command = "source_dependency"; 26 | } 27 | 28 | public override void add_files() { 29 | this.file_list = {}; 30 | } 31 | 32 | public override bool autoConfigure(string ? path = null) { 33 | return false; 34 | } 35 | 36 | public override bool configureLine(string line, bool automatic, string ? condition, bool invertCondition, int lineNumber, string[] ? comments) { 37 | if (false == line.has_prefix(this.command + ": ")) { 38 | var badCommand = line.split(": ")[0]; 39 | ElementBase.globalData.addError(_("Invalid command %s after command %s (line %d)").printf(badCommand, this.command, lineNumber)); 40 | return true; 41 | } 42 | var data = line.substring(2 + this.command.length).strip(); 43 | this.comments = comments; 44 | return this.configureElement(null, data, data, false, condition, invertCondition); 45 | } 46 | 47 | public override bool generateMeson(ConditionalText dataStream, MesonCommon mesonCommon) { 48 | try { 49 | var elements = this._name.split(" "); 50 | 51 | mesonCommon.create_check_paths_script(); 52 | //dataStream.put_string("check_files_var = 1\n"); 53 | string listfiles = ""; 54 | bool first = true; 55 | foreach (var element in elements) { 56 | listfiles += "\t%s\\n".printf(element); 57 | if (first == false) { 58 | dataStream.put_string("if (check_files_var != 0)\n"); 59 | dataStream.increment_tab(); 60 | } 61 | dataStream.put_string("check_files_retval = run_command(join_paths(meson.current_source_dir(),'meson_scripts','check_path.sh'),'%s')\n".printf(element)); 62 | dataStream.put_string("check_files_var = check_files_retval.returncode()\n"); 63 | if (first == false) { 64 | dataStream.decrement_tab(); 65 | dataStream.put_string("endif\n"); 66 | } 67 | first = false; 68 | } 69 | dataStream.put_string("if (check_files_var != 0)\n"); 70 | dataStream.increment_tab(); 71 | if (elements.length == 1) { 72 | dataStream.put_string("error('The file %s must exist to compile this project.')\n".printf(elements[0])); 73 | } else { 74 | dataStream.put_string("error('At least one of these files must exist to compile this project:\\n%s')\n".printf(listfiles)); 75 | } 76 | dataStream.decrement_tab(); 77 | dataStream.put_string("endif\n"); 78 | } catch (GLib.Error e) { 79 | ElementBase.globalData.addError(_("Failed to write to meson.build at '%s' element, at '%s' path: %s").printf(this.command, this._path, e.message)); 80 | return true; 81 | } 82 | return false; 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /scratch_plugin/cmake/FindVala.cmake~: -------------------------------------------------------------------------------- 1 | ## 2 | # Copyright 2009-2010 Jakob Westhoff, 2014 Raster Software Vigo 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # 8 | # 1. Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # 11 | # 2. Redistributions in binary form must reproduce the above copyright notice, 12 | # this list of conditions and the following disclaimer in the documentation 13 | # and/or other materials provided with the distribution. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR 16 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 18 | # EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 21 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 23 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | # 26 | # The views and conclusions contained in the software and documentation are those 27 | # of the authors and should not be interpreted as representing official policies, 28 | # either expressed or implied, of Jakob Westhoff 29 | ## 30 | 31 | ## 32 | # Find module for the Vala compiler (valac) 33 | # 34 | # This module determines wheter a Vala compiler is installed on the current 35 | # system and where its executable is. 36 | # 37 | # Call the module using "find_package(Vala) from within your CMakeLists.txt. 38 | # 39 | # The following variables will be set after an invocation: 40 | # 41 | # VALA_FOUND Whether the vala compiler has been found or not 42 | # VALA_EXECUTABLE Full path to the valac executable if it has been found 43 | # VALA_VERSION Version number of the available valac 44 | ## 45 | 46 | 47 | # Search for the valac executable in the usual system paths. 48 | find_program(VALA_EXECUTABLE NAMES valac) 49 | 50 | if (VALA_EXECUTABLE STREQUAL "VALA_EXECUTABLE-NOTFOUND") 51 | 52 | # if valac executable is not found, it can be that valac is not installed, or 53 | # that the OS is source-based (like gentoo), and doesn't do a link from 54 | # valac-X.YY to valac. In that case, search for the specific valac binary after 55 | 56 | message (STATUS "VALAC not found. Deferring compiler search") 57 | unset(VALA_EXECUTABLE) 58 | unset(VALA_VERSION) 59 | 60 | else(VALA_EXECUTABLE STREQUAL "VALA_EXECUTABLE-NOTFOUND") 61 | 62 | # Handle the QUIETLY and REQUIRED arguments, which may be given to the find call. 63 | # Furthermore set VALA_FOUND to TRUE if Vala has been found (aka. 64 | # VALA_EXECUTABLE is set) 65 | 66 | include(FindPackageHandleStandardArgs) 67 | find_package_handle_standard_args(Vala DEFAULT_MSG VALA_EXECUTABLE) 68 | 69 | mark_as_advanced(VALA_EXECUTABLE) 70 | 71 | # Determine the valac version 72 | if(VALA_FOUND) 73 | execute_process(COMMAND ${VALA_EXECUTABLE} "--version" OUTPUT_VARIABLE "VALA_VERSION") 74 | string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION}) 75 | string(STRIP ${VALA_VERSION} "VALA_VERSION") 76 | endif(VALA_FOUND) 77 | endif(VALA_EXECUTABLE STREQUAL "VALA_EXECUTABLE-NOTFOUND") 78 | -------------------------------------------------------------------------------- /src/autovalaLib/elementData.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementData : ElementBase { 23 | public ElementData() { 24 | this._type = ConfigType.DATA; 25 | this.command = "data"; 26 | } 27 | 28 | public static bool autoGenerate() { 29 | bool error = false; 30 | var filePath = File.new_for_path(Path.build_filename(ElementBase.globalData.projectFolder, "data/local")); 31 | 32 | if (filePath.query_exists()) { 33 | var element = new ElementData(); 34 | error |= element.autoConfigure("data/local"); 35 | } 36 | return error; 37 | } 38 | 39 | public override void add_files() { 40 | this.file_list = ElementBase.getFilesFromFolder(this._path, null, true); 41 | } 42 | 43 | public override bool generateCMake(DataOutputStream dataStream) { 44 | try { 45 | dataStream.put_string("file(GLOB list_data RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *)\n"); 46 | dataStream.put_string("foreach(file_data ${list_data})\n"); 47 | dataStream.put_string("\tIF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${file_data})\n"); 48 | dataStream.put_string("\t\tinstall(DIRECTORY\n"); 49 | dataStream.put_string("\t\t\t${file_data}\n"); 50 | dataStream.put_string("\t\tDESTINATION\n"); 51 | dataStream.put_string("\t\t\t" + Path.build_filename("${CMAKE_INSTALL_DATAROOTDIR}", ElementBase.globalData.projectName) + "\n"); 52 | dataStream.put_string("\t\t)\n"); 53 | dataStream.put_string("\tELSE()\n"); 54 | dataStream.put_string("\t\tinstall(FILES\n"); 55 | dataStream.put_string("\t\t\t${file_data}\n"); 56 | dataStream.put_string("\t\tDESTINATION\n"); 57 | dataStream.put_string("\t\t\t" + Path.build_filename("${CMAKE_INSTALL_DATAROOTDIR}", ElementBase.globalData.projectName) + "\n"); 58 | dataStream.put_string("\t\t)\n"); 59 | dataStream.put_string("\tENDIF()\n"); 60 | dataStream.put_string("endforeach()\n\n"); 61 | } catch (Error e) { 62 | ElementBase.globalData.addError(_("Failed to install local files at %s").printf(this.fullPath)); 63 | return true; 64 | } 65 | return false; 66 | } 67 | 68 | public override bool generateMeson(ConditionalText dataStream, MesonCommon mesonCommon) { 69 | try { 70 | mesonCommon.create_install_script(); 71 | dataStream.put_string("meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),join_paths(get_option('prefix'),get_option('datadir'),'%s'),join_paths(meson.current_source_dir(),'%s','%s','*'))\n\n".printf(ElementBase.globalData.projectName, this._path, this._name)); 72 | } catch (GLib.Error e) { 73 | ElementBase.globalData.addError(_("Failed to write to meson.build file at '%s' element, at '%s' path: %s").printf(this.command, this._path, e.message)); 74 | return true; 75 | } 76 | return false; 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/autovalaLib/elementDoc.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 (C) Raster Software Vigo (Sergio Costas) 3 | * 4 | * This file is part of AutoVala 5 | * 6 | * AutoVala is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AutoVala is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . */ 18 | 19 | using GLib; 20 | 21 | namespace AutoVala { 22 | private class ElementDoc : ElementBase { 23 | public ElementDoc() { 24 | this._type = ConfigType.DOC; 25 | this.command = "doc"; 26 | } 27 | 28 | public static bool autoGenerate() { 29 | bool error = false; 30 | var filePath = File.new_for_path(Path.build_filename(ElementBase.globalData.projectFolder, "doc")); 31 | 32 | if (filePath.query_exists()) { 33 | var element = new ElementDoc(); 34 | error |= element.autoConfigure("doc"); 35 | } 36 | return error; 37 | } 38 | 39 | public override void add_files() { 40 | this.file_list = ElementBase.getFilesFromFolder(this._path, null, true); 41 | } 42 | 43 | public override bool generateCMake(DataOutputStream dataStream) { 44 | try { 45 | dataStream.put_string("file(GLOB list_data RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *)\n"); 46 | dataStream.put_string("foreach(file_data ${list_data})\n"); 47 | dataStream.put_string("\tIF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${file_data})\n"); 48 | dataStream.put_string("\t\tinstall(DIRECTORY\n"); 49 | dataStream.put_string("\t\t\t${file_data}\n"); 50 | dataStream.put_string("\t\tDESTINATION\n"); 51 | dataStream.put_string("\t\t\t" + Path.build_filename("${CMAKE_INSTALL_DATAROOTDIR}/doc", ElementBase.globalData.projectName) + "\n"); 52 | dataStream.put_string("\t\t)\n"); 53 | dataStream.put_string("\tELSE()\n"); 54 | dataStream.put_string("\t\tinstall(FILES\n"); 55 | dataStream.put_string("\t\t\t${file_data}\n"); 56 | dataStream.put_string("\t\tDESTINATION\n"); 57 | dataStream.put_string("\t\t\t" + Path.build_filename("${CMAKE_INSTALL_DATAROOTDIR}/doc", ElementBase.globalData.projectName) + "\n"); 58 | dataStream.put_string("\t\t)\n"); 59 | dataStream.put_string("\tENDIF()\n"); 60 | dataStream.put_string("endforeach()\n\n"); 61 | } catch (Error e) { 62 | ElementBase.globalData.addError(_("Failed to install document files at %s").printf(this.fullPath)); 63 | return true; 64 | } 65 | return false; 66 | } 67 | 68 | public override bool generateMeson(ConditionalText dataStream, MesonCommon mesonCommon) { 69 | try { 70 | mesonCommon.create_install_script(); 71 | dataStream.put_string("meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),join_paths(get_option('prefix'),get_option('datadir'),'doc','%s'),join_paths(meson.current_source_dir(),'%s','%s','*'))\n\n".printf(ElementBase.globalData.projectName, this._path, this._name)); 72 | } catch (GLib.Error e) { 73 | ElementBase.globalData.addError(_("Failed to write to meson.build file at '%s' element, at '%s' path: %s").printf(this.command, this._path, e.message)); 74 | return true; 75 | } 76 | return false; 77 | } 78 | } 79 | } 80 | --------------------------------------------------------------------------------