Browse files

Installation scripts fixed

  • Loading branch information...
1 parent 74384b9 commit 042210faa1dca8eb3644d0c30607b4b4ad9ccb63 @Kakadu committed Nov 6, 2013
Showing with 31 additions and 399 deletions.
  1. +10 −0 CHANGELOG
  2. +11 −7 Makefile.install
  3. 0 {qml/lib → lablqml}/.gitignore
  4. 0 {qml/lib → lablqml}/META
  5. 0 {qml/lib → lablqml}/Makefile
  6. 0 {qml/lib → lablqml}/QmlContext.ml
  7. 0 {qml/lib → lablqml}/QmlContext.mli
  8. 0 {qml/lib → lablqml}/_oasis
  9. 0 {qml/lib → lablqml}/_tags
  10. 0 {qml/lib → lablqml}/configure
  11. 0 {qml/lib → lablqml}/kamlo.h
  12. 0 {qml/lib → lablqml}/lablqml.mllib
  13. 0 {qml/lib → lablqml}/liblablqml_stubs.clib
  14. 0 {qml/lib → lablqml}/modelindex.c
  15. 0 {qml/lib → lablqml}/myocamlbuild.ml
  16. 0 {qml/lib → lablqml}/setup.ml
  17. 0 {qml/lib → lablqml}/startup_stubs.c
  18. 0 {qml/lib → lablqml}/stubs.c
  19. 0 {qml/lib → lablqml}/stubs.h
  20. +0 −4 makeqml
  21. +0 −2 qml/old/test1/.gitignore
  22. +0 −30 qml/old/test1/Makefile
  23. +0 −19 qml/old/test1/gamemap.cpp
  24. +0 −35 qml/old/test1/gamemap.h
  25. +0 −11 qml/old/test1/kamlo.h
  26. +0 −16 qml/old/test1/main.cpp
  27. +0 −7 qml/old/test1/ocaml/Makefile
  28. +0 −5 qml/old/test1/ocaml/code.ml
  29. +0 −10 qml/old/test1/qml/main.qml
  30. +0 −1 qml/old/test1/test1.config
  31. +0 −1 qml/old/test1/test1.creator
  32. +0 −6 qml/old/test1/test1.files
  33. +0 −8 qml/old/test1/test1.includes
  34. +0 −2 qml/old/test2/.gitignore
  35. +0 −43 qml/old/test2/Gamemap.cpp
  36. +0 −27 qml/old/test2/Gamemap.h
  37. +0 −35 qml/old/test2/Makefile
  38. +0 −20 qml/old/test2/input_yaml
  39. +0 −32 qml/old/test2/kamlo.h
  40. +0 −16 qml/old/test2/main.cpp
  41. +0 −2 qml/old/test2/ocaml/.gitignore
  42. +0 −7 qml/old/test2/ocaml/Makefile
  43. +0 −17 qml/old/test2/ocaml/code.ml
  44. +0 −10 qml/old/test2/qml/main.qml
  45. +0 −1 qml/old/test2/test2.config
  46. +0 −1 qml/old/test2/test2.creator
  47. +0 −8 qml/old/test2/test2.files
  48. +0 −8 qml/old/test2/test2.includes
  49. +3 −0 qml/test/.gitignore
  50. +6 −4 qml/test/Makefile
  51. +1 −4 src/README.md
View
10 CHANGELOG
@@ -1,3 +1,13 @@
+0.1.8
+Clearing, reorganizing repository. Removing QtGUI outdated features.
+Preparing for Qt 5.2 release.
+
+0.1.7
+Now we can statup with Rectangle {} and ApplicationWindow {} both.
+
+0.1.6
+Now we can startup from OCaml
+
0.1.5
Added signal argnames specification
View
18 Makefile.install
@@ -1,10 +1,14 @@
-.PHONY: install uninstall
-all: install
-install:
- cp src/_build/mocml/mocml.native $(PREFIX)/bin/mocml
- cp doc/man/mocml.1 $(MAN)/man1/mocml.1
+install.mocml:
+ cp src/_build/mocml/mocml.native $(PREFIX)/bin/mocml
+ cp doc/man/mocml.1 $(MAN)/man1/mocml.1
+
+install.lablqml:
+ $(MAKE) -C lablqml install
+
+install: install.mocml install.lablqml
+
+opam.install:
+ $(MAKE) install PREFIX=`opam config var prefix` MAN=`opam config var man`
-uninstall:
- rm -fr $(PREFIX)/bin/mocml $(MAN)/man1/mocml.1
View
0 qml/lib/.gitignore → lablqml/.gitignore
File renamed without changes.
View
0 qml/lib/META → lablqml/META
File renamed without changes.
View
0 qml/lib/Makefile → lablqml/Makefile
File renamed without changes.
View
0 qml/lib/QmlContext.ml → lablqml/QmlContext.ml
File renamed without changes.
View
0 qml/lib/QmlContext.mli → lablqml/QmlContext.mli
File renamed without changes.
View
0 qml/lib/_oasis → lablqml/_oasis
File renamed without changes.
View
0 qml/lib/_tags → lablqml/_tags
File renamed without changes.
View
0 qml/lib/configure → lablqml/configure
File renamed without changes.
View
0 qml/lib/kamlo.h → lablqml/kamlo.h
File renamed without changes.
View
0 qml/lib/lablqml.mllib → lablqml/lablqml.mllib
File renamed without changes.
View
0 qml/lib/liblablqml_stubs.clib → lablqml/liblablqml_stubs.clib
File renamed without changes.
View
0 qml/lib/modelindex.c → lablqml/modelindex.c
File renamed without changes.
View
0 qml/lib/myocamlbuild.ml → lablqml/myocamlbuild.ml
File renamed without changes.
View
0 qml/lib/setup.ml → lablqml/setup.ml
File renamed without changes.
View
0 qml/lib/startup_stubs.c → lablqml/startup_stubs.c
File renamed without changes.
View
0 qml/lib/stubs.c → lablqml/stubs.c
File renamed without changes.
View
0 qml/lib/stubs.h → lablqml/stubs.h
File renamed without changes.
View
4 makeqml
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-cd qml
-./configure && make generator
-
View
2 qml/old/test1/.gitignore
@@ -1,2 +0,0 @@
-main
-test1.creator.user
View
30 qml/old/test1/Makefile
@@ -1,30 +0,0 @@
-qtgcc=g++ -g `pkg-config --cflags QtDeclarative` -I`ocamlfind c -where`
-asdf=-c -m64 -pipe -g -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_DECLARATIVE_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtDeclarative -I/usr/include/qt4 -I.
-mocs=moc_gamemap.cpp
-cppobjs=gamemap.o moc_gamemap.o main.o
-mlobjs=stubs.o
-ocamlobjs=ocaml/camlcode.o
-out=main
--include $(shell ocamlc -where)/Makefile.config
-
-.SUFFIXES: .cpp .h .o
-
-.PHONY: all kamlo
-
-all: $(mocs) $(cppobjs) kamlo
- $(qtgcc) $(cppobjs) $(ocamlobjs) `pkg-config --libs QtDeclarative` \
- -L"`ocamlfind c -where`" $(NATIVECCLIBS) -lasmrun \
- -o $(out)
-
-kamlo:
- $(MAKE) -C ocaml
-
-moc_%.cpp: %.h
- moc $< > $@
-
-.cpp.o:
- $(qtgcc) -c $<
-
-clean:
- rm moc_* *.o $(out) -f
- $(MAKE) -s --no-print-directory -C ocaml clean
View
19 qml/old/test1/gamemap.cpp
@@ -1,19 +0,0 @@
-#include "gamemap.h"
-
-GameMap::GameMap(QObject *parent) :
- QObject(parent)
-{
- _title = "Some title";
-}
-
-int GameMap::sizex() {
- CAMLparam0();
- CAMLlocal1(ans);
- static value* closure_f = NULL;
- if (closure_f == NULL)
- closure_f = caml_named_value("getwidth");
- Q_ASSERT(closure_f!=NULL);
- ans = caml_callback(*closure_f, Val_unit);
- int _ans = Int_val(ans);
- return _ans;
-}
View
35 qml/old/test1/gamemap.h
@@ -1,35 +0,0 @@
-#ifndef GAMEMAP_H
-#define GAMEMAP_H
-
-#include <QObject>
-#include <QDebug>
-#include "kamlo.h"
-
-class GameMap : public QObject
-{
- Q_OBJECT
- QString _title;
-
-public:
- explicit GameMap(QObject *parent = 0);
-
- Q_INVOKABLE int sizex();
-
- Q_INVOKABLE int sizey() { return 600; }
- Q_PROPERTY(QString title WRITE setTitle READ title NOTIFY titleChanged)
-
- QString title() {
- return _title;
- }
- void setTitle(QString& s) {
- _title = s;
- }
-
-signals:
- void titleChanged ();
-
-public slots:
-
-};
-
-#endif // GAMEMAP_H
View
11 qml/old/test1/kamlo.h
@@ -1,11 +0,0 @@
-#ifndef KAMLO_H
-#define KAMLO_H
-
-extern "C" {
-#include <caml/mlvalues.h>
-#include <caml/alloc.h>
-#include <caml/memory.h>
-#include <caml/callback.h>
-}
-
-#endif
View
16 qml/old/test1/main.cpp
@@ -1,16 +0,0 @@
-#include <QtGui/QApplication>
-#include <QDeclarativeContext>
-#include "gamemap.h"
-#include <QtDeclarative/QDeclarativeView>
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- caml_main(argv);
- QDeclarativeView viewer;
- GameMap map;
- viewer.rootContext() -> setContextProperty("gameMap",&map);
- viewer.setSource(QUrl("qml/main.qml"));
- viewer.show();
- return app.exec();
-}
View
7 qml/old/test1/ocaml/Makefile
@@ -1,7 +0,0 @@
-all:
- ocamlfind opt -c code.ml
- ocamlfind opt -output-obj -o camlcode.o code.cmx
-
-clean:
- rm *.o *.cmx -f
-
View
5 qml/old/test1/ocaml/code.ml
@@ -1,5 +0,0 @@
-let getwidth () = 400
-let () =
- Callback.register "getwidth" getwidth
-
-
View
10 qml/old/test1/qml/main.qml
@@ -1,10 +0,0 @@
-import QtQuick 1.0
-
-Rectangle {
- width: gameMap.sizex();
- height: 600;
- Text {
- text: gameMap.title;
- anchors.centerIn: parent
- }
-}
View
1 qml/old/test1/test1.config
@@ -1 +0,0 @@
-// ADD PREDEFINED MACROS HERE!
View
1 qml/old/test1/test1.creator
@@ -1 +0,0 @@
-[General]
View
6 qml/old/test1/test1.files
@@ -1,6 +0,0 @@
-gamemap.cpp
-gamemap.h
-main.cpp
-moc_gamemap.cpp
-kamlo.h
-Makefile
View
8 qml/old/test1/test1.includes
@@ -1,8 +0,0 @@
-ocaml
-qml
-/usr/include/qt4
-/usr/include/
-/usr/include/qt4/QtCore
-/usr/include/qt4/Qt
-/usr/include/qt4/QtDeclarative
-/usr/lib/ocaml/caml
View
2 qml/old/test2/.gitignore
@@ -1,2 +0,0 @@
-main
-*.creator.user
View
43 qml/old/test2/Gamemap.cpp
@@ -1,43 +0,0 @@
-#include "Gamemap.h"
-QString Gamemap::title() {
- CAMLparam0();
- CAMLlocal1(_ans);
- value *closure = caml_named_value("prop_Gamemap_title_get_string");
- Q_ASSERT_X(closure!=NULL, "Gamemap::title",
- "ocaml's closure `prop_Gamemap_title_get_string` not found");
- _ans = caml_callback(*closure, Val_unit);
- return QString(String_val(_ans));
-}
-void Gamemap::setTitle(QString x0) {
- CAMLparam0();
- CAMLlocal1(_ans);
- value *closure = caml_named_value("prop_Gamemap_title_set_string");
- Q_ASSERT_X(closure!=NULL, "Gamemap::setTitle",
- "ocaml's closure `prop_Gamemap_title_set_string` not found");
- value *args = new value[1];
- args[0] = caml_copy_string(x0.toLocal8Bit().data() );
- // delete args or not?
- caml_callbackN(*closure, 1, args);
- CAMLreturn0;
-}
-int Gamemap::width() {
- CAMLparam0();
- CAMLlocal1(_ans);
- value *closure = caml_named_value("prop_Gamemap_width_get_int");
- Q_ASSERT_X(closure!=NULL, "Gamemap::width",
- "ocaml's closure `prop_Gamemap_width_get_int` not found");
- _ans = caml_callback(*closure, Val_unit);
- return Int_val(_ans);
-}
-void Gamemap::setWidth(int x0) {
- CAMLparam0();
- CAMLlocal1(_ans);
- value *closure = caml_named_value("prop_Gamemap_width_set_int");
- Q_ASSERT_X(closure!=NULL, "Gamemap::setWidth",
- "ocaml's closure `prop_Gamemap_width_set_int` not found");
- value *args = new value[1];
- args[0] = Val_int (x0);
- // delete args or not?
- caml_callbackN(*closure, 1, args);
- CAMLreturn0;
-}
View
27 qml/old/test2/Gamemap.h
@@ -1,27 +0,0 @@
-#ifndef Gamemap_H
-#define Gamemap_H
-
-#include <QObject>
-#include <QDebug>
-#include <kamlo.h>
-
-class Gamemap : public QObject {
- Q_OBJECT
-public:
-public:
- Q_PROPERTY(QString title WRITE setTitle READ title NOTIFY titleChanged)
- QString title();
- void setTitle(QString x0);
-signals:
- void titleChanged();
-public:
- Q_PROPERTY(int width WRITE setWidth READ width NOTIFY widthChanged)
- int width();
- void setWidth(int x0);
-signals:
- void widthChanged();
-public:
- explicit Gamemap(QObject *parent = 0) : QObject(parent) {}
-};
-#endif
-
View
35 qml/old/test2/Makefile
@@ -1,35 +0,0 @@
-qtgcc=g++ -g `pkg-config --cflags QtDeclarative` -I`ocamlfind c -where`
-asdf=-c -m64 -pipe -g -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_DECLARATIVE_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtDeclarative -I/usr/include/qt4 -I.
-
-mocs=moc_Gamemap.cpp
-cppobjs=Gamemap.o moc_Gamemap.o main.o
-mlobjs=stubs.o
-ocamlobjs=ocaml/camlcode.o
-out=main
--include $(shell ocamlc -where)/Makefile.config
-
-.SUFFIXES: .cpp .h .o
-
-.PHONY: all kamlo
-
-all: gencode $(mocs) $(cppobjs) kamlo
- $(qtgcc) $(cppobjs) $(ocamlobjs) `pkg-config --libs QtDeclarative` \
- -L"`ocamlfind c -where`" $(NATIVECCLIBS) -lasmrun \
- -o $(out)
-
-gencode:
- ./mocml
- echo "=)"
-
-kamlo:
- $(MAKE) -C ocaml
-
-moc_%.cpp: %.h
- moc $< > $@
-
-.cpp.o:
- $(qtgcc) -c $< -I.
-
-clean:
- rm moc_* *.o $(out) -f
- $(MAKE) -s --no-print-directory -C ocaml clean
View
20 qml/old/test2/input_yaml
@@ -1,20 +0,0 @@
----
-A:
- methods: # arg1, arg2, ...., return value
- sizey: [unit, int]
- meth1: [int list, int]
- #meth2: [unit, unit]
- #getValues: [int list, (string list*int) list * int]
- properties:
-# readOnlyProp:
-# type: int list
-# get: tableCount
-# notify: tablesChanged
- count:
- type: int
- get: count
- set: setCount
- notify: countChanged
- slots:
- clicked: [unit, unit]
-
View
32 qml/old/test2/kamlo.h
@@ -1,32 +0,0 @@
-#ifndef KAMLO_H
-#define KAMLO_H
-
-extern "C" {
-#include <caml/mlvalues.h>
-#include <caml/alloc.h>
-#include <caml/callback.h>
-#include <caml/memory.h>
-}
-
-#define Val_none Val_int(0)
-static inline value
-Some_val(value v) {
- CAMLparam1(v);
- CAMLlocal1(ans);
- ans = caml_alloc_small(1,0);
- Field(ans,0)=v;
- CAMLreturn(ans);
-}
-/*
-#define Kamlolist_of_QList(conv,lst,ans_name) \
-{\
- if (lst.length()==0) \
- ans_name = Val_emptylist;\
- else {\
- auto i = lst.end() --;\
- for (;;) {\
-
- }\
-}
-*/
-#endif
View
16 qml/old/test2/main.cpp
@@ -1,16 +0,0 @@
-#include <QtGui/QApplication>
-#include <QDeclarativeContext>
-#include "Gamemap.h"
-#include <QtDeclarative/QDeclarativeView>
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- caml_main(argv);
- QDeclarativeView viewer;
- Gamemap map;
- viewer.rootContext() -> setContextProperty("gameMap",&map);
- viewer.setSource(QUrl("qml/main.qml"));
- viewer.show();
- return app.exec();
-}
View
2 qml/old/test2/ocaml/.gitignore
@@ -1,2 +0,0 @@
-*.cm[ioax]
-
View
7 qml/old/test2/ocaml/Makefile
@@ -1,7 +0,0 @@
-all:
- ocamlfind opt -c code.ml
- ocamlfind opt -output-obj -o camlcode.o code.cmx
-
-clean:
- rm *.o *.cmx -f
-
View
17 qml/old/test2/ocaml/code.ml
@@ -1,17 +0,0 @@
-let gamemap = object
- val mutable title = "mytitle"
- method title () = title
- method setTitle s = title <- s
- val mutable width = 640
- method width () = width
- method setWidth s = width <- s
-
-end
-
-let () = Callback.register "prop_Gamemap_title_get_string" gamemap#title
-let () = Callback.register "prop_Gamemap_title_set_string" gamemap#setTitle
-
-let () = Callback.register "prop_Gamemap_width_get_int" gamemap#width
-let () = Callback.register "prop_Gamemap_width_set_int" gamemap#setWidth
-
-
View
10 qml/old/test2/qml/main.qml
@@ -1,10 +0,0 @@
-import QtQuick 1.0
-
-Rectangle {
- width: gameMap.width;
- height: 600;
- Text {
- text: gameMap.title;
- anchors.centerIn: parent
- }
-}
View
1 qml/old/test2/test2.config
@@ -1 +0,0 @@
-// ADD PREDEFINED MACROS HERE!
View
1 qml/old/test2/test2.creator
@@ -1 +0,0 @@
-[General]
View
8 qml/old/test2/test2.files
@@ -1,8 +0,0 @@
-Gamemap.cpp
-Gamemap.h
-main.cpp
-kamlo.h
-Makefile
-ocaml/code.ml
-qml/main.qml
-Makefile
View
8 qml/old/test2/test2.includes
@@ -1,8 +0,0 @@
-ocaml
-qml
-/usr/include/qt4
-/usr/include/
-/usr/include/qt4/QtCore
-/usr/include/qt4/Qt
-/usr/include/qt4/QtDeclarative
-/usr/lib/ocaml/caml
View
3 qml/test/.gitignore
@@ -11,3 +11,6 @@ Qt/
folderlistmodel/libqmlfolderlistmodelplugin.prl
folderlistmodel/libqmlfolderlistmodelplugin.so*
+AbstractModel*
+Controller*
+DataItem*
View
10 qml/test/Makefile
@@ -1,5 +1,6 @@
MOC=`qmake -query QT_INSTALL_BINS`/moc
-CC=g++ -g -fPIC -std=c++0x `pkg-config --cflags Qt5Core` -I../lib/_build -I`ocamlc -where` \
+LABLQML=../../lablqml
+CC=g++ -g -fPIC -std=c++0x `pkg-config --cflags Qt5Core` -I$(LABLQML)/_build -I`ocamlc -where` \
-Dprotected=public -Dprivate=public
CLINK=g++ -g
CLINKLIBS=-cclib -lstdc++ -ccopt -L$(shell qmake -query QT_INSTALL_LIBS) -cclib -lQt5Quick \
@@ -20,13 +21,13 @@ CMX_TEST=Test.cmx
all: $(GEN_CMX) $(CMX) $(GEN_MOC) $(GEN_CPP)
$(OCAMLOPT) -package str -linkpkg \
$(GEN_CPP) $(CLINKLIBS) \
- -ccopt -L../lib/_build/ ../lib/_build/lablqml.cmxa $(GEN_CMX) $(CMX) -o $(OUT)
+ -ccopt -L$(LABLQML)/_build/ $(LABLQML)/_build/lablqml.cmxa $(GEN_CMX) $(CMX) -o $(OUT)
depend:
ocamlfind dep *.ml *.ml > .depend
library_code:
- $(OCAMLOPT) -output-obj -dstartup -I ../lib/_build ../lib/_build/lablqml.cmxa str.cmxa \
+ $(OCAMLOPT) -output-obj -dstartup -I $(LABLQML)/_build $(LABLQML)/_build/lablqml.cmxa str.cmxa \
$(GEN_CMX) $(CMX) -linkall -o camlcode.o #-verbose
moc_%.cpp: %.h
@@ -36,10 +37,11 @@ moc_%.cpp: %.h
$(CC) -c $< -I.
.ml.cmx:
- $(OCAMLOPT) -I ../lib/_build -c $<
+ $(OCAMLOPT) -I $(LABLQML)/_build -c $<
clean:
rm *.o *.cm[oiax] *.cmxa *.o.startup.s $(MOC_CPP) -f
-include $(shell ocamlc -where)/Makefile.config
include .depend
+
View
5 src/README.md
@@ -1,7 +1,4 @@
-In this folder you can find code which performs code generation for Qt?+OCaml projects. It contains 1 library and 3 executables.
- * Library `lablqt` declares basic API and types for representing inforamtion about C++ classes. All executables depend on it.
- * Executable `generator` is used to generate binding code for QtGui+OCaml. Its implementation sucks but works somehow.
- * Executable `xmltool` is used to filter input XML files for `generator`.
+There `mocml` tool for code generation is located.
* Executable `mocml` is a generator for OCaml+QML project. You don't need to other executables for hacking QML-related ocaml code. `mocml` reads input file in JSON format, and using this information about C++ API generates wrappers to call OCaml from C++/ECMAscript. For some examples see `../qml` directory

0 comments on commit 042210f

Please sign in to comment.