Coder Social home page Coder Social logo

rastersoft / autovala Goto Github PK

View Code? Open in Web Editor NEW
104.0 104.0 15.0 2.57 MB

A program that automatically generates CMake and Meson configuration files for your Vala project

License: GNU General Public License v3.0

CMake 19.49% Makefile 4.54% Vala 71.93% Shell 0.83% HTML 0.03% CoffeeScript 1.44% CSS 0.14% Meson 1.61%

autovala's People

Contributors

andrewbenton avatar mic92 avatar squall77it avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autovala's Issues

private cmake directory

Right now autovala checks for both global /usr/local/share/autovala/cmake for vala cmake files and user-specific values in $HOME/.config/autovala

Most of the software which uses both global and local configuration allows local config to override global one. Would be nice if autovala would look first into $HOME/.config/autovala/cmake before checking global location.

This would also allow per-user adjustments on multi-user systems: for example using more bleeding-edge version of cmake files for one user while keeping stable globally-installed version for others.

compilation autovalalib fails

[ 95%] Generating /home/steven/linux/autovala/autovala/install/src/Config.c;autovala.c
/home/steven/linux/autovala/autovala/src/autovala.vala:32.22-32.30: error: The name Constants' does not exist in the context ofmain'
Intl.bindtextdomain(Constants.GETTEXT_PACKAGE, Path.build_filename(Constants.DATADIR,"locale"));
^^^^^^^^^

any package needed? working on Archlinux

autovala cannot resolve any library except for gee0.8

autovala update
Updating project file
Warning: Can't resolve Using GLib
Warning: Can't resolve Using Gtk
Warning: Can't resolve Using Gdk
Warning: Can't resolve Using GObject
Warning: Can't resolve Using GIO
Storing configuration in file /home/steven/projecten/elektrosimautovala/ElektroSim.avprj
Updating CMake files
Done

how to debug?

Vala version overwritten even without asterisk

The default autogenerated .avprj file has Vala version specified without an asterisk. However, even if it is manually edited without an asterisk, it is overwritten to the current installed valac version by autovala refresh/update.

Fails to build (Config.vala.cmake not found)

The CMake build for autovala itself failed to find src/Config.vala.cmake.

I had to delete this file from src/CMakeLists.txt to build:

configure_file (${CMAKE_SOURCE_DIR}/src/Config.vala.cmake ${CMAKE_BINARY_DIR}/src/Config.vala)

Also, it seems that the generated Config.vala is not picked anyway: it is not in vala_precompile in the generated src/CMakeLists.txt.

Package incorrectly determined as dependency if a sub-namespace of the target namespace is imported

It appears to happen when importing a sub-namespace of the current project. For example, try pointing autovala at these three files:

// lib/a.vala
public class libtest.A : GLib.Object{
    public A(){}        

    public void say_hi(){
        GLib.info("Hi!");
    }
}
// lib/b.vala
using libtest;

namespace libtest.b{
    public class B : GLib.Object{
        public B(){

        }

        public void invoke_a(libtest.A a){
            a.say_hi();
        }
    }
}
// lib/c.vala
using libtest.b;

namespace libtest.b.c{

    public class C : GLib.Object{}

    public void invoke_b(libtest.b.B b){
        b.inboke_a();
    }

}

Running autovala update yields:

# libtest.avprj
### AutoVala Project ###
autovala_version: 12
project_name: libtest
vala_version: 0.26


vala_library: lib/libtest
namespace: libtest
*vala_check_package: glib-2.0
*vala_check_package: gobject-2.0
*vala_check_package: libtest
*vala_source: a.vala
*vala_source: b.vala
*vala_source: c.vala

If I comment out the contents of lib/c.vala, then the line *vala_check_package: libtest does not get generated.

Parallel valac / gcc defines

I'm unsure of how difficult this would be, but it might be advantageous to carry cmake defines into both vala and C, so that it you have a "define: DEBUG" statement, and it is set to true in the CMake, then it flags as true for the vala and c source.

package metadata deneration

Autovala already have all the data necessary to create package metadata - would be handy to get into proper package format. For instance I'm especially interested in generating ./debian/ directory using autovala. This feature would make pushing autovala itself into distributions easier as well.

autogenerated cmake fails

with following error message:

cmake .. day 042, Вторник #0 [1]
CMake Error at src/CMakeLists.txt:19 (find_package):
By not providing "FindVala.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Vala", but
CMake did not find one.

Could not find a package configuration file provided by "Vala" with any of
the following names:

ValaConfig.cmake
vala-config.cmake

Add the installation prefix of "Vala" to CMAKE_PREFIX_PATH or set
"Vala_DIR" to a directory containing one of the above files. If "Vala"
provides a separate development package or SDK, be sure it has been
installed.

-- Configuring incomplete, errors occurred!

Doing bzr checkout lp:~elementary-apps/+junk/cmake-modules in cmake folder does not have any effects.

Support Valadoc

First of all, this is a very interesting project for me, as I have some CMake-based vala projects I'd like to switch to Autovala once it matures.

I suggest adding support for Valadoc generation to Autovala. For libraries, it may even be automatically enabled.

For an example CMake Vala project with Valadoc, see https://github.com/Sikon/valagl .

Icon installation in hicolor uses wrong directory names

Autovala installs hicolor icons using wrong directory names like 16, 22, 24, 32 while the hicolor theme only looks for icons in directories with names like 16x16, 22x22, 24x24, 32x32 instead (see the index.theme file in /usr/share/icons/hicolor). This issue effectively renders the installed icons useless because they will never be found.

Additionally, I think it would be handy to have some control over icon destinations. Besides the mentioned subdirectory names (which can differ between themes) also being able to install icons in other themes than hicolor. For example, I need to ship icons for ubuntu-mono-dark and ubuntu-mono-light.

Wiki Update Request

Based upon the code it would appear that the Using Autovala wiki page is out of date. Mainly it talks about downloading the cmake files from ElementaryOS project.

Unit Tests

Would it be possible to somehow include a "standard" way to include and run unit tests as part of autovala?

So, for example, if the user includes a /tests directory, and the code is compatible with whatever autovala uses to run the tests, autovala could then automatically include CMake logic to run the tests after compilation with a flag. ie --run-tests

pedantic autovala build

Add "compile_options: --fatal-warnings" to autovala.avprj
This will help to eliminate all the messy warnings and prevent new ones from appearing :)

Allow subdirectories to be in the same project

Please allow vala files in different namespaces to be kept in different subdirectories.

For example:

  • project dir
    • src
      • Namespace1
      • Namespace2

This will prevent cluttering a single directory with all project files.

We can, for example, consider directories beginning with a capital letter to be namespace subdirectories by default, unless the user explicitly adds a project with that name to .avproj.

In any case there should at least be a command to explicitly mark a subdirectory as belonging to the same project.

Auto generate .gitignore file

Git is now widely use on many opensource projects, it's nice to add an option or directly generate .gitignore file for vala and cmake.

remove explicit bash dependency

In src/autovalaLib/elementValaBinary.vala bash is called explicitly to execute external command which introduces additional hardcoded dependency. Autovala should work regardless if bash is installed in particular system or not.

copy cmake/* during update

Since autovala uses cmake/* files would be handy if they would be installed (/usr/share/autovala or whatever) during autovala installation and used by autovala (symlink or copy) in project directory during "autovala update" command.

This will remove code duplication and makes autovala usage much easier.

Compilation terminated: fatal error: readline/readline.h: No such file or directory

Autovala itself seems unable to compile. I'm running Ubuntu-GNOME 14.10 with Gnome 3.14 via gnome3-staging PPA.

stephen@ubuntu:$ git clone https://github.com/rastersoft/autovala.git
Cloning into 'autovala'...
remote: Counting objects: 3933, done.
remote: Total 3933 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3933/3933), 1.31 MiB | 580.00 KiB/s, done.
Resolving deltas: 100% (2728/2728), done.
Checking connectivity... done.
stephen@ubuntu:
$ cd /home/stephen/autovala
stephen@ubuntu:/autovala$ mkdir install
stephen@ubuntu:
/autovala$ cd install
stephen@ubuntu:/autovala/install$ cmake ..
-- Found Vala: /usr/bin/valac
-- checking for Vala version of valac-0.20
-- checking for a minimum Vala version of 0.20
-- found Vala, version 0.26
-- checking for Vala version of valac-0.20
-- checking for a minimum Vala version of 0.20
-- found Vala, version 0.26
-- checking for Vala version of valac-0.20
-- checking for a minimum Vala version of 0.20
-- found Vala, version 0.26
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stephen/autovala/install
stephen@ubuntu:
/autovala/install$ make
Scanning dependencies of target i18n
[ 2%] messages.”
[ 2%] Built target i18n
[ 4%] Generating /home/stephen/autovala/install/src/autovalaLib/Config.c;autovalaLib.c;conditionalText.c;configuration.c;elementBDepend.c;elementBase.c;elementBashCompletion.c;elementBinary.c;elementCustom.c;elementDBus.c;elementData.c;elementDefine.c;elementDesktop.c;elementDoc.c;elementEosPlug.c;elementGlade.c;elementGlobal.c;elementIcon.c;elementIgnore.c;elementInclude.c;elementManpage.c;elementPixmap.c;elementPo.c;elementSDepend.c;elementScheme.c;elementValaBinary.c;findVala.c;genVapis.c;globals.c;packages.c;packages_deb.c;packages_rpm.c;readPkgconfig.c;AutoVala.vapi;AutoVala.h
/home/stephen/autovala/src/autovalaLib/packages.vala:553.5-553.38: warning: unhandled error GLib.Error' file.make_directory_with_parents(); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /home/stephen/autovala/src/autovalaLib/packages.vala:557.5-557.17: warning: unhandled errorGLib.Error'
file.delete();
^^^^^^^^^^^^^
/home/stephen/autovala/src/autovalaLib/packages_deb.vala:278.6-278.21: warning: unhandled error GLib.Error' f_rules.delete(); ^^^^^^^^^^^^^^^^ /home/stephen/autovala/src/autovalaLib/packages_deb.vala:315.5-315.20: warning: unhandled errorGLib.Error'
f_rules.delete();
^^^^^^^^^^^^^^^^
/home/stephen/autovala/src/autovalaLib/packages_deb.vala:350.5-350.20: warning: unhandled error GLib.Error' f_rules.delete(); ^^^^^^^^^^^^^^^^ /home/stephen/autovala/src/autovalaLib/packages_deb.vala:385.5-385.20: warning: unhandled errorGLib.Error'
f_rules.delete();
^^^^^^^^^^^^^^^^
/home/stephen/autovala/src/autovalaLib/packages_deb.vala:420.5-420.20: warning: unhandled error GLib.Error' f_rules.delete(); ^^^^^^^^^^^^^^^^ /home/stephen/autovala/src/autovalaLib/packages_deb.vala:441.36-441.54: warning: unhandled errorGLib.Error'
var dis = new DataInputStream (f_changelog.read ());
^^^^^^^^^^^^^^^^^^^
/home/stephen/autovala/src/autovalaLib/packages_deb.vala:443.20-443.39: warning: unhandled error GLib.IOError' while ((line = dis.read_line (null)) != null) { ^^^^^^^^^^^^^^^^^^^^ /home/stephen/autovala/src/autovalaLib/packages_deb.vala:471.5-471.15: warning: unhandled errorGLib.IOError'
dis.close();
^^^^^^^^^^^
/home/stephen/autovala/src/autovalaLib/packages_deb.vala:472.5-472.24: warning: unhandled error GLib.Error' f_changelog.delete(); ^^^^^^^^^^^^^^^^^^^^ /home/stephen/autovala/src/autovalaLib/packages_deb.vala:567.5-567.24: warning: unhandled errorGLib.Error'
f_changelog.delete();
^^^^^^^^^^^^^^^^^^^^
/home/stephen/autovala/src/autovalaLib/packages.vala:70.3-70.25: warning: method AutoVala.packages.show_errors' never used public void show_errors() { ^^^^^^^^^^^^^^^^^^^^^^^ /home/stephen/autovala/src/autovalaLib/packages.vala:371.21-371.59: warning: local variablenot_found' declared but never used
Gee.List not_found = new Gee.ArrayList();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/stephen/autovala/src/autovalaLib/packages.vala:590.8-590.11: warning: local variable pos2' declared but never used int pos2; ^^^^ /home/stephen/autovala/src/autovalaLib/packages.vala:687.10-687.28: warning: local variablewith_spaces' declared but never used
bool with_spaces = false;
^^^^^^^^^^^^^^^^^^^
/home/stephen/autovala/src/autovalaLib/packages_deb.vala:127.13-127.25: warning: local variable last_key' declared but never used string last_key = ""; ^^^^^^^^^^^^^ /home/stephen/autovala/src/autovalaLib/packages_rpm.vala:110.11-110.23: warning: local variablesource' declared but never used
bool source = true;
^^^^^^^^^^^^^
/home/stephen/autovala/src/autovalaLib/packages_rpm.vala:166.10-166.18: warning: local variable `not_first' declared but never used
bool not_first;
^^^^^^^^^
Compilation succeeded - 19 warning(s)
Scanning dependencies of target AutoVala
[ 6%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/Config.c.o
[ 8%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/autovalaLib.c.o
[ 10%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/conditionalText.c.o
[ 13%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/configuration.c.o
In file included from /usr/include/glib-2.0/glib.h:79:0,
from /home/stephen/autovala/install/src/autovalaLib/configuration.c:22:
/home/stephen/autovala/install/src/autovalaLib/configuration.c: In function ‘string_strip’:
/home/stephen/autovala/install/src/autovalaLib/configuration.c:1056:14: warning: passing argument 1 of ‘g_strchug’ discards ‘const’ qualifier from pointer target type
g_strstrip (tmp1);
^
/usr/include/glib-2.0/glib/gstrfuncs.h:180:53: note: in definition of macro ‘g_strstrip’
#define g_strstrip( string ) g_strchomp (g_strchug (string))
^
/usr/include/glib-2.0/glib/gstrfuncs.h:175:23: note: expected ‘gchar ’ but argument is of type ‘const gchar *’
gchar
g_strchug (gchar string);
^
[ 15%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementBDepend.c.o
In file included from /usr/include/glib-2.0/glib.h:79:0,
from /home/stephen/autovala/install/src/autovalaLib/elementBDepend.c:22:
/home/stephen/autovala/install/src/autovalaLib/elementBDepend.c: In function ‘string_strip’:
/home/stephen/autovala/install/src/autovalaLib/elementBDepend.c:316:14: warning: passing argument 1 of ‘g_strchug’ discards ‘const’ qualifier from pointer target type
g_strstrip (tmp1);
^
/usr/include/glib-2.0/glib/gstrfuncs.h:180:53: note: in definition of macro ‘g_strstrip’
#define g_strstrip( string ) g_strchomp (g_strchug (string))
^
/usr/include/glib-2.0/glib/gstrfuncs.h:175:23: note: expected ‘gchar *’ but argument is of type ‘const gchar *’
gchar
g_strchug (gchar string);
^
[ 17%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementBase.c.o
In file included from /usr/include/glib-2.0/glib.h:79:0,
from /home/stephen/autovala/install/src/autovalaLib/elementBase.c:22:
/home/stephen/autovala/install/src/autovalaLib/elementBase.c: In function ‘string_strip’:
/home/stephen/autovala/install/src/autovalaLib/elementBase.c:1053:14: warning: passing argument 1 of ‘g_strchug’ discards ‘const’ qualifier from pointer target type
g_strstrip (tmp1);
^
/usr/include/glib-2.0/glib/gstrfuncs.h:180:53: note: in definition of macro ‘g_strstrip’
#define g_strstrip( string ) g_strchomp (g_strchug (string))
^
/usr/include/glib-2.0/glib/gstrfuncs.h:175:23: note: expected ‘gchar *’ but argument is of type ‘const gchar *’
gchar
g_strchug (gchar string);
^
[ 19%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementBashCompletion.c.o
[ 21%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementBinary.c.o
[ 23%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementCustom.c.o
In file included from /usr/include/glib-2.0/glib.h:79:0,
from /home/stephen/autovala/install/src/autovalaLib/elementCustom.c:22:
/home/stephen/autovala/install/src/autovalaLib/elementCustom.c: In function ‘string_strip’:
/home/stephen/autovala/install/src/autovalaLib/elementCustom.c:400:14: warning: passing argument 1 of ‘g_strchug’ discards ‘const’ qualifier from pointer target type
g_strstrip (tmp1);
^
/usr/include/glib-2.0/glib/gstrfuncs.h:180:53: note: in definition of macro ‘g_strstrip’
#define g_strstrip( string ) g_strchomp (g_strchug (string))
^
/usr/include/glib-2.0/glib/gstrfuncs.h:175:23: note: expected ‘gchar *’ but argument is of type ‘const gchar *’
gchar
g_strchug (gchar string);
^
[ 26%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementDBus.c.o
[ 28%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementData.c.o
[ 30%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementDefine.c.o
In file included from /usr/include/glib-2.0/glib.h:79:0,
from /home/stephen/autovala/install/src/autovalaLib/elementDefine.c:22:
/home/stephen/autovala/install/src/autovalaLib/elementDefine.c: In function ‘string_strip’:
/home/stephen/autovala/install/src/autovalaLib/elementDefine.c:337:14: warning: passing argument 1 of ‘g_strchug’ discards ‘const’ qualifier from pointer target type
g_strstrip (tmp1);
^
/usr/include/glib-2.0/glib/gstrfuncs.h:180:53: note: in definition of macro ‘g_strstrip’
#define g_strstrip( string ) g_strchomp (g_strchug (string))
^
/usr/include/glib-2.0/glib/gstrfuncs.h:175:23: note: expected ‘gchar *’ but argument is of type ‘const gchar *’
gchar
g_strchug (gchar string);
^
[ 32%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementDesktop.c.o
In file included from /usr/include/glib-2.0/glib.h:79:0,
from /home/stephen/autovala/install/src/autovalaLib/elementDesktop.c:22:
/home/stephen/autovala/install/src/autovalaLib/elementDesktop.c: In function ‘string_strip’:
/home/stephen/autovala/install/src/autovalaLib/elementDesktop.c:414:14: warning: passing argument 1 of ‘g_strchug’ discards ‘const’ qualifier from pointer target type
g_strstrip (tmp1);
^
/usr/include/glib-2.0/glib/gstrfuncs.h:180:53: note: in definition of macro ‘g_strstrip’
#define g_strstrip( string ) g_strchomp (g_strchug (string))
^
/usr/include/glib-2.0/glib/gstrfuncs.h:175:23: note: expected ‘gchar *’ but argument is of type ‘const gchar *’
gchar
g_strchug (gchar string);
^
[ 34%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementDoc.c.o
[ 36%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementEosPlug.c.o
[ 39%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementGlade.c.o
[ 41%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementGlobal.c.o
/home/stephen/autovala/install/src/autovalaLib/elementGlobal.c: In function ‘auto_vala_element_global_generateMainCMakeHeader’:
/home/stephen/autovala/install/src/autovalaLib/elementGlobal.c:1608:43: warning: passing argument 1 of ‘gee_abstract_map_get_keys’ from incompatible pointer type
tmp295 = gee_abstract_map_get_keys ((GeeMap
) tmp294);
^
In file included from /home/stephen/autovala/install/src/autovalaLib/elementGlobal.c:27:0:
/usr/include/gee-0.8/gee.h:1456:9: note: expected ‘struct GeeAbstractMap ’ but argument is of type ‘struct GeeMap *’
GeeSet
gee_abstract_map_get_keys (GeeAbstractMap* self);
^
/home/stephen/autovala/install/src/autovalaLib/elementGlobal.c:1868:44: warning: passing argument 1 of ‘gee_abstract_map_get_keys’ from incompatible pointer type
tmp373 = gee_abstract_map_get_keys ((GeeMap_) tmp372);
^
In file included from /home/stephen/autovala/install/src/autovalaLib/elementGlobal.c:27:0:
/usr/include/gee-0.8/gee.h:1456:9: note: expected ‘struct GeeAbstractMap *’ but argument is of type ‘struct GeeMap *’
GeeSet_ gee_abstract_map_get_keys (GeeAbstractMap* self);
^
[ 43%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementIcon.c.o
In file included from /usr/include/glib-2.0/glib.h:79:0,
from /home/stephen/autovala/install/src/autovalaLib/elementIcon.c:22:
/home/stephen/autovala/install/src/autovalaLib/elementIcon.c: In function ‘string_strip’:
/home/stephen/autovala/install/src/autovalaLib/elementIcon.c:448:14: warning: passing argument 1 of ‘g_strchug’ discards ‘const’ qualifier from pointer target type
g_strstrip (tmp1);
^
/usr/include/glib-2.0/glib/gstrfuncs.h:180:53: note: in definition of macro ‘g_strstrip’
#define g_strstrip( string ) g_strchomp (g_strchug (string))
^
/usr/include/glib-2.0/glib/gstrfuncs.h:175:23: note: expected ‘gchar ’ but argument is of type ‘const gchar *’
gchar
g_strchug (gchar string);
^
[ 45%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementIgnore.c.o
In file included from /usr/include/glib-2.0/glib.h:79:0,
from /home/stephen/autovala/install/src/autovalaLib/elementIgnore.c:22:
/home/stephen/autovala/install/src/autovalaLib/elementIgnore.c: In function ‘string_strip’:
/home/stephen/autovala/install/src/autovalaLib/elementIgnore.c:294:14: warning: passing argument 1 of ‘g_strchug’ discards ‘const’ qualifier from pointer target type
g_strstrip (tmp1);
^
/usr/include/glib-2.0/glib/gstrfuncs.h:180:53: note: in definition of macro ‘g_strstrip’
#define g_strstrip( string ) g_strchomp (g_strchug (string))
^
/usr/include/glib-2.0/glib/gstrfuncs.h:175:23: note: expected ‘gchar *’ but argument is of type ‘const gchar *’
gchar
g_strchug (gchar string);
^
[ 47%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementInclude.c.o
[ 50%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementManpage.c.o
In file included from /usr/include/glib-2.0/glib.h:79:0,
from /home/stephen/autovala/install/src/autovalaLib/elementManpage.c:22:
/home/stephen/autovala/install/src/autovalaLib/elementManpage.c: In function ‘string_strip’:
/home/stephen/autovala/install/src/autovalaLib/elementManpage.c:532:14: warning: passing argument 1 of ‘g_strchug’ discards ‘const’ qualifier from pointer target type
g_strstrip (tmp1);
^
/usr/include/glib-2.0/glib/gstrfuncs.h:180:53: note: in definition of macro ‘g_strstrip’
#define g_strstrip( string ) g_strchomp (g_strchug (string))
^
/usr/include/glib-2.0/glib/gstrfuncs.h:175:23: note: expected ‘gchar *’ but argument is of type ‘const gchar *’
gchar
g_strchug (gchar string);
^
[ 52%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementPixmap.c.o
[ 54%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementPo.c.o
[ 56%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementSDepend.c.o
In file included from /usr/include/glib-2.0/glib.h:79:0,
from /home/stephen/autovala/install/src/autovalaLib/elementSDepend.c:22:
/home/stephen/autovala/install/src/autovalaLib/elementSDepend.c: In function ‘string_strip’:
/home/stephen/autovala/install/src/autovalaLib/elementSDepend.c:316:14: warning: passing argument 1 of ‘g_strchug’ discards ‘const’ qualifier from pointer target type
g_strstrip (tmp1);
^
/usr/include/glib-2.0/glib/gstrfuncs.h:180:53: note: in definition of macro ‘g_strstrip’
#define g_strstrip( string ) g_strchomp (g_strchug (string))
^
/usr/include/glib-2.0/glib/gstrfuncs.h:175:23: note: expected ‘gchar *’ but argument is of type ‘const gchar *’
gchar
g_strchug (gchar string);
^
[ 58%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementScheme.c.o
[ 60%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/elementValaBinary.c.o
In file included from /usr/include/glib-2.0/glib.h:79:0,
from /home/stephen/autovala/install/src/autovalaLib/elementValaBinary.c:22:
/home/stephen/autovala/install/src/autovalaLib/elementValaBinary.c: In function ‘string_strip’:
/home/stephen/autovala/install/src/autovalaLib/elementValaBinary.c:2822:14: warning: passing argument 1 of ‘g_strchug’ discards ‘const’ qualifier from pointer target type
g_strstrip (tmp1);
^
/usr/include/glib-2.0/glib/gstrfuncs.h:180:53: note: in definition of macro ‘g_strstrip’
#define g_strstrip( string ) g_strchomp (g_strchug (string))
^
/usr/include/glib-2.0/glib/gstrfuncs.h:175:23: note: expected ‘gchar *’ but argument is of type ‘const gchar *’
gchar
g_strchug (gchar string);
^
[ 63%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/findVala.c.o
[ 65%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/genVapis.c.o
In file included from /usr/include/glib-2.0/glib.h:79:0,
from /home/stephen/autovala/install/src/autovalaLib/genVapis.c:22:
/home/stephen/autovala/install/src/autovalaLib/genVapis.c: In function ‘string_strip’:
/home/stephen/autovala/install/src/autovalaLib/genVapis.c:1215:14: warning: passing argument 1 of ‘g_strchug’ discards ‘const’ qualifier from pointer target type
g_strstrip (tmp1);
^
/usr/include/glib-2.0/glib/gstrfuncs.h:180:53: note: in definition of macro ‘g_strstrip’
#define g_strstrip( string ) g_strchomp (g_strchug (string))
^
/usr/include/glib-2.0/glib/gstrfuncs.h:175:23: note: expected ‘gchar *’ but argument is of type ‘const gchar *’
gchar
g_strchug (gchar string);
^
[ 67%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/globals.c.o
[ 69%] Building C object src/autovalaLib/CMakeFiles/AutoVala.dir/packages.c.o
/home/stephen/autovala/install/src/autovalaLib/packages.c:30:31: fatal error: readline/readline.h: No such file or directory
#include <readline/readline.h>
^
compilation terminated.
src/autovalaLib/CMakeFiles/AutoVala.dir/build.make:829: recipe for target 'src/autovalaLib/CMakeFiles/AutoVala.dir/packages.c.o' failed
make[2]: *
* [src/autovalaLib/CMakeFiles/AutoVala.dir/packages.c.o] Error 1
CMakeFiles/Makefile2:202: recipe for target 'src/autovalaLib/CMakeFiles/AutoVala.dir/all' failed
make[1]: *** [src/autovalaLib/CMakeFiles/AutoVala.dir/all] Error 2
Makefile:123: recipe for target 'all' failed
make: *** [all] Error 2

libAutoVala.so.0 not found

I compiled autovala without problems like described in the INSTALL.txt file and ran

sudo make install

which ended with

-- Installing: /usr/local/bin/autovala
-- Removed runtime path from "/usr/local/bin/autovala"

Now I want to start a new project with autovala init PROJECT_NAME but I get the error

autovala: error while loading shared libraries: libAutoVala.so.0: cannot open shared object file: No such file or directory

What am I missing?

vala dbus bindings autogeneration

In my project I have client which uses 3rd party dbus service from vala. Right now I obtain corresponding .vala code through d-bus introspection:

call to "dbus-send --session --type=method_call --print-reply=literal --dest=... org.freedesktop.DBus.Introspectable.Introspect"
and then calling to "vala-dbus-binding-tool --api-path="

Is there a way to automate this with autovala?

Compilation failed : unknow type name 'GtkMenuButton'

Hi, I'm really noob in Vala; and Autovala really interested me.

But, when I want to compile it, I have an error at the command make :

mbiamont@PC-mbiamont:~/tmp/autovala/install$ make
[ 75%] messages.”
[ 75%] Built target i18n
[ 75%] Built target AutoVala
[ 75%] Building C object src/autovalaPlugin/CMakeFiles/AutovalaPlugin.dir/actionbuttons.c.o
/home/mbiamont/tmp/autovala/install/src/autovalaPlugin/actionbuttons.c:51:2: erreur: unknown type name ‘GtkMenuButton’
/home/mbiamont/tmp/autovala/install/src/autovalaPlugin/actionbuttons.c: In function ‘autovala_plugin_action_buttons_construct’:
/home/mbiamont/tmp/autovala/install/src/autovalaPlugin/actionbuttons.c:466:2: erreur: unknown type name ‘GtkMenuButton’
/home/mbiamont/tmp/autovala/install/src/autovalaPlugin/actionbuttons.c:467:2: erreur: unknown type name ‘GtkMenuButton’
/home/mbiamont/tmp/autovala/install/src/autovalaPlugin/actionbuttons.c:484:2: erreur: unknown type name ‘GtkMenuButton’
/home/mbiamont/tmp/autovala/install/src/autovalaPlugin/actionbuttons.c:500:12: erreur: ‘GtkMenuButton’ undeclared (first use in this function)
/home/mbiamont/tmp/autovala/install/src/autovalaPlugin/actionbuttons.c:500:12: note: each undeclared identifier is reported only once for each function it appears in
/home/mbiamont/tmp/autovala/install/src/autovalaPlugin/actionbuttons.c:500:26: erreur: expected expression before ‘)’ token
make[2]: *** [src/autovalaPlugin/CMakeFiles/AutovalaPlugin.dir/actionbuttons.c.o] Erreur 1
make[1]: *** [src/autovalaPlugin/CMakeFiles/AutovalaPlugin.dir/all] Erreur 2
make: *** [all] Erreur 2

The command "cmake .." seems to work fine :

mbiamont@PC-mbiamont:~/tmp/autovala/install$ cmake ..
-- checking for Vala version of valac-0.24
-- checking for a minimum Vala version of 0.24
--   found Vala, version 0.26
pandoc: Unknown reader: markdown_github
gzip: /home/mbiamont/tmp/autovala/install/wiki/autovala-fileformat.5: No such file or directory
pandoc: Unknown reader: markdown_github
gzip: /home/mbiamont/tmp/autovala/install/wiki/autovala-keep-changes.7: No such file or directory
pandoc: Unknown reader: markdown_github
gzip: /home/mbiamont/tmp/autovala/install/wiki/autovala-rules.7: No such file or directory
pandoc: Unknown reader: markdown_github
gzip: /home/mbiamont/tmp/autovala/install/wiki/autovala-tricks.7: No such file or directory
pandoc: Unknown reader: markdown_github
gzip: /home/mbiamont/tmp/autovala/install/wiki/autovala.1: No such file or directory
-- checking for Vala version of valac-0.24
-- checking for a minimum Vala version of 0.24
--   found Vala, version 0.26
-- checking for Vala version of valac-0.24
-- checking for a minimum Vala version of 0.24
--   found Vala, version 0.26
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mbiamont/tmp/autovala/install

Can you help me please ?

explicitly passing C linker flags

There are 2 use-cases for that:

I'm using .vapi from vala-extra-vapis which doesn't seem to be very well maintained. When I use gcrypt.vapi for example the linking will fail due to missing -lgcrypt linker flag.

I'd like to make static binary without external dependencies.

Both those use-cases would be solved if there would be ability to explicitly add extra flags to ld.

Can't understand AUTOVALA_INSTALL_PREFIX

AUTOVALA_INSTALL_PREFIX always is /usr/local or /usr,

but when i just to test my program, i set the CMAKE_INSTALL_PREFIX=/home/my_home/**

then i use Constants.DATADIR for ui files etc, it different with CMAKE_INSTALL_PREFIX

so, i modify the source file cmake.vala, just let AUTOVALA_INSTALL_PREFIX == CMAKE_INSTALL_PREFIX, does it have any adverse effects??

separate binaries overwritten

I've got a project with bunch of .vala sources and 2 binaries as expected outcome.
after autovala init I edit .avprj from following:
...
*vala_binary: src/lol
*vala_source: two.vala
*vala_source: lol.vala
*vala_source: one.vala

to following:
...
vala_binary: src/lol2
vala_source: two.vala

vala_binary: src/lol
*vala_source: lol.vala
*vala_source: one.vala

but when I run "autovala update" my changes got overwritten and I end-up with single binary entry again.

So either I'm doing it wrong (and in this case documentation for such use case might require some clarification) or it's a bug.

add help2man support

Use help2man and package name/version data to automatically generate man pages if possible.

Enable recognition of c header files

I ran into the issue of trying to package libgee under cmake where autovala doesn't pull over c header files, though they can be listed in a .vapi file. I checked out the wiki, but couldn't find any support for this.

Support custom VAPI directories

A common idiom for Vala projects is to have a vapi directory bundling custom VAPI files for libraries that do not provide VAPI bindings of their own.

Autovala should scan .vapi files in this directory and add them to the CUSTOM_VAPIS section of vala_precompile. For Valadoc support, whenever it gets implemented, it should also add them as packages to the valadoc command (consult the ValaGL project as an example).

POT file creation fails when using non-ASCII text while running "autovala po"

Recently I added unicode characters to some translatable strings (to feature nicer quotation characters, ellipses, etc).

I just noticed this apparently is causing POT file creation to fail, because by default the input files are assumed to be in ASCII:

Launching command xgettext -d appname -o appname.pot -p po --keyword='_' -f po/POTFILES.in
Warning: Failed to run 'xgettext' to generate the base POT file

Command output: 
Error output: xgettext: Non-ASCII string at (null):0.
          Please specify the source encoding through --from-code.

I've worked around the issue by manually running said xgettext command with the option "--from-code=UTF-8" added. This seemed to work. I suppose it would be usefull for autovala to always add this option, or be able to specify po(t) encoding in the avprj file.

Gedit plugin make fails

The CMake of the gedit plugin passes without any problems, but the Make fails with

[ 75%] Building C object src/CMakeFiles/AutovalaGeditPlugin.dir/valaplugin.c.o
/home/philipp/Programme/autovala/gedit_plugin/install/src/valaplugin.c:16:31: fatal error: gedit/gedit-panel.h: Datei oder Verzeichnis nicht gefunden
 #include <gedit/gedit-panel.h>
                               ^
compilation terminated.
make[2]: *** [src/CMakeFiles/AutovalaGeditPlugin.dir/valaplugin.c.o] Fehler 1
make[1]: *** [src/CMakeFiles/AutovalaGeditPlugin.dir/all] Fehler 2
make: *** [all] Fehler 2

Maybe there is some dependency missing in the CMake files?
I'm running Ubuntu GNOME with programs from ppa:gnome3-team/gnome3, ppa:gnome3-team/gnome3-staging and ppa:ricotz/testing, so they should be fairly up to date.

gedit plugin isn't in gedit

I installed the gedit_plugin (which I would recommend renaming to autovala_gedit_plugin) through pacman, but it's not showing up in gedit. Arch 64 bit.

compilation fails

While building autovala itself it fails at /usr/include/gtk-3.0/gtk/gtkwidget.h due to missing atk/atk.h

Seems like some dependency check missing.

make fails on dbus include

while trying to use "make" which is the result of cmake produced by autovala compilation fails with fatal error: dbus/dbus-glib-lowlevel.h: no such file or directory.

although file /usr/include/dbus-1.0/dbus/dbus-glib-lowlevel.h exist (corresponding -dev packages installed).

vala project used act as a dbus client, not server.

add xgettext support

Would be great if autovala could automatically run xgettext to generate .pot files for translation for all the source files.

clarify Constants usage

wiki briefly mention creation of Constants but there are no examples on how to actually use it from my vala code

Man pages

What about that? It would be awesome to type "man autovala" and get all the parameters and some help and explanation just typing that command :D

removal of user defined if...end statements

When placing if...end statements into the .avprj file, they will be removed after re-running 'autovala update'. This seems to occur regardless of where the if...end statment is placed.

update-icon-cache for all themes called after installing icons in one location

Hi,

Yesterday I ran the autovale-generated CMake for my app within a prestine Fedora 22 vm install and noticed the icons not showing up. An simple update-icon-cache command was able to solve that. Apparently the install script did not run the command at the right time.

So after investigating when exacltly when the update command was called, I found the calls for all themes in one specific (seemingly random) location: /data/icons/hicolor/22x22/CMakeLists.txt (see contents below this message)

I suppose this is the cause of the problem, the update command seems to be called after having installed just a few icons of one theme, while other icons have yet to be installed...

If you need to do some deeper analysis I can e-mail you the full project source.

### CMakeLists automatically created with AutoVala
### Do not edit

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/myapp-connected.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/22x22/status/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/myapp-connecting-1.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/22x22/status/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/myapp-connecting-2.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/22x22/status/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/myapp-connecting-3.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/22x22/status/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/myapp-disconnected.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/22x22/status/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/myapp.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/22x22/apps/)
IF( NOT (${ICON_UPDATE} STREQUAL "OFF" ))
    install (CODE "execute_process ( COMMAND /usr/bin/gtk-update-icon-cache-3.0 -t ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/icons/gnome )" )
    install (CODE "execute_process ( COMMAND /usr/bin/gtk-update-icon-cache-3.0 -t ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor )" )
    install (CODE "execute_process ( COMMAND /usr/bin/gtk-update-icon-cache-3.0 -t ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/icons/ubuntu-mono-dark )" )
    install (CODE "execute_process ( COMMAND /usr/bin/gtk-update-icon-cache-3.0 -t ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/icons/ubuntu-mono-light )" )
ENDIF()

Fails to build (doc and data/local not found)

CMake Error at CMakeLists.txt:23 (add_subdirectory):
  add_subdirectory given source "doc" which is not an existing directory.


-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
-- checking for modules 'gee-1.0;glib-2.0;gtk+-3.0'
--   found gee-1.0, version 0.6.8
--   found glib-2.0, version 2.34.1
--   found gtk+-3.0, version 3.6.0
-- Found Vala: /usr/bin/valac  
-- checking for a minimum Vala version of 0.16
--   found Vala, version 0.20.0
CMake Error at CMakeLists.txt:26 (add_subdirectory):
  add_subdirectory given source "data/local" which is not an existing
  directory.

Please be more patient when pushing your changes to github, make sure to commit everything first.

Start using the Wiki

This might be sort of silly, but Github allows for you to create wikis for you projects. The README file for this project has already reached the point where one might say TL;DR.

I suggest you enable the wiki feature to make the documentation more accessible, easier to search, and easier to keep current.

This is only a suggestion; your project.

Always include gio-2.0

Maybe it's a good idea to include gio-2.0 via vala_check_package always, because otherwise a strange problem appears. I have the following code:

int main (string[] args) {
    stdout.printf ("Hello");
    return 0;
}

Then it goes:

autovala update
cd install
cmake ..
make

and it fails. The output is:

src/Config.c;vds.c
Scanning dependencies of target vds
[ 66%] Building C object src/CMakeFiles/vds.dir/Config.c.o
[100%] Building C object src/CMakeFiles/vds.dir/vds.c.o
/home/philipp/Dropbox/Programmierung/VDesktopStreamer/install/src/vds.c: In function ‘main’:
/home/philipp/Dropbox/Programmierung/VDesktopStreamer/install/src/vds.c:47:2: warning: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
  g_type_init ();
  ^
Linking C executable vds
CMakeFiles/vds.dir/vds.c.o: In Funktion `main':
vds.c:(.text+0x55): Nicht definierter Verweis auf `g_type_init'
collect2: error: ld returned 1 exit status
make[2]: *** [src/vds] Fehler 1
make[1]: *** [src/CMakeFiles/vds.dir/all] Fehler 2
make: *** [all] Fehler 2

If I include vala_check_package: gio-2.0 in the .avprj file it makes without any problems. So if gio is even necessary in such a minimalistic example, I guess it's always necessary so it can be included automatically.

Integrate with IDEs

It seems only logical that if you plan to integrate with gEdit or the gEdit plugin Valencia, that you should also integrate it with IDEs that support Vala as well.

I know Anjuta supports it fairly well. I also know that at one point there was an Eclipse plugin for it but I don't know how well that was maintained.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.