diff options
-rw-r--r-- | Documentation/images/Import_CSV2.jpg | bin | 18833 -> 127962 bytes | |||
-rw-r--r-- | Documentation/images/field_options.jpg | bin | 0 -> 67741 bytes | |||
-rw-r--r-- | Documentation/images/save_as_options.jpg | bin | 0 -> 102217 bytes | |||
-rw-r--r-- | Documentation/images/spreadsheetdata.jpg | bin | 0 -> 536094 bytes | |||
-rw-r--r-- | Documentation/user-manual.txt | 50 | ||||
-rw-r--r-- | Documentation/user-manual_es.txt | 119 | ||||
-rw-r--r-- | INSTALL | 197 | ||||
-rw-r--r-- | packaging/ubuntu/debian/compat | 1 | ||||
-rw-r--r-- | packaging/ubuntu/debian/docs | 7 | ||||
-rwxr-xr-x | packaging/ubuntu/debian/rules | 8 | ||||
-rw-r--r-- | packaging/ubuntu/debian/source/format | 1 | ||||
-rw-r--r-- | packaging/ubuntu/make-package.sh | 43 | ||||
-rw-r--r-- | qt-ui/globe.cpp | 6 | ||||
-rw-r--r-- | qt-ui/simplewidgets.cpp | 11 | ||||
-rw-r--r-- | subsurfacestartup.c | 4 | ||||
-rw-r--r-- | xslt/uddf-export.xslt | 38 |
16 files changed, 373 insertions, 112 deletions
diff --git a/Documentation/images/Import_CSV2.jpg b/Documentation/images/Import_CSV2.jpg Binary files differindex f0e95c68d..6e7de5378 100644 --- a/Documentation/images/Import_CSV2.jpg +++ b/Documentation/images/Import_CSV2.jpg diff --git a/Documentation/images/field_options.jpg b/Documentation/images/field_options.jpg Binary files differnew file mode 100644 index 000000000..9827d3ef9 --- /dev/null +++ b/Documentation/images/field_options.jpg diff --git a/Documentation/images/save_as_options.jpg b/Documentation/images/save_as_options.jpg Binary files differnew file mode 100644 index 000000000..81dfd16af --- /dev/null +++ b/Documentation/images/save_as_options.jpg diff --git a/Documentation/images/spreadsheetdata.jpg b/Documentation/images/spreadsheetdata.jpg Binary files differnew file mode 100644 index 000000000..43bd3a3c2 --- /dev/null +++ b/Documentation/images/spreadsheetdata.jpg diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index 4db72c14f..3556a222e 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -2,7 +2,7 @@ // ========================== // :author: Manual authors: Jacco van Koll, Dirk Hohndel, Reinout Hoornweg, // Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, Willem -// Ferguson, Salvador Cuñat +// Ferguson, Salvador Cuñat, Pedro Neves // :revnumber: 4.2 // :revdate: July 2014 :icons: @@ -16,7 +16,7 @@ image::images/Subsurface4Banner.png["Banner",align="center"] [big]#USER MANUAL# *Manual authors*: Willem Ferguson, Jacco van Koll, Dirk Hohndel, Reinout Hoornweg, -Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, Salvador Cuñat +Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, Salvador Cuñat, Pedro Neves [blue]#_Version 4.3, December 2014_# @@ -1080,15 +1080,14 @@ _Subsurface_ *Dive List* panel. image::images/Divelogs1.jpg["FIGURE:Download from Divelogs.de",align="center"] +[[S_ImportingCSVData]] +==== Importing data in CSV format -[[S_ImportingCSV]] -==== Importing dives in CSV format +A comma-separated file (.csv) can be used to import dive information either as dive profiles (as in the case of the APD Inspiration and Evolution closed circuit rebreathers) or as dive metadata (in case the user keeps dive data in a spreadsheet). + +[[S_ImportingCSVDives]] +===== Importing dives in CSV format -Sometimes dive computers export dive information as files with -_comma-separated values_ (.CSV). For example, the APD Inspiration and Evolution -closed circuit rebreather (CCR) systems export dive information in a CSV -formatted file that normally contains information for a single dive only. These -files can easily be imported into _Subsurface_. CSV files are normally organised into a single line that provides the headers (or _field names_) of the data columns, followed by the data, one record per line. CSV files can be opened with a normal text editor. For @@ -3403,4 +3402,35 @@ that your dive is 50 minutes long - because you have fifty minutes worth of samp subsurface will say it's 45 minutes - because you were actually diving for 45 minutes. It's even more noticeable if you do things like divemastering the initial OW dives, when you may stay in the water for a long time, but spend most of it at the surface. And then - you don't want that to count as some kind of long dive”. +you don't want that to count as some kind of long dive”. + +== APPENDIX E: Creating a .CSV file from Libreoffice Calc. + +Many divers keep a diving log in some form of a digital file, commonly a spreadsheet with various fields of information. These logs can be easily imported into _Subsurface_ (xref:S_ImportingManualCSV[Importing dives from_manually kept CSV file]), after the spreadsheet is converted in a .CSV file. +This section explains the procedure to convert a diving logbook stored in a spreadsheet to a .CSV file that will later be imported from _Subsurface_. +Creating a .CSV is a straightforward task, although the procedure will somewhat be different according to which spreadsheet program is used. +In this example, Libreoffice Calc will be used, but the procedure should be the same in OpenOffice. The procedure for Microsoft Excel users should also be similar. + +=== Organize data on the spreadsheet +The first step is to organize the diving data on the spreadsheet, so that the first row contains the names of each field and all each dive is stored on a single row. +_Subsurface_ does not require any particular fields, but supports several (Dive #, Date, Time, Duration, Location, GPS, Max Depth, Mean Depth, Buddy, Notes, Weight and Tags). +The user can organize diving metadata according to a few simple rules: + +1. Date: the users should use one of the following formats: yyyy-mm-dd, dd.mm.yyyy, mm/dd/yyyy +2. Duration: the format should be minutes:seconds. In Libreoffice Calc this should be: [mm]:ss +3. Unit system: only one unit system shold be used (i.e., no mixture between imperial and metric units) +4. Tags and buddies: values should be separated with a “,” +5. GPS position: users must use decimal degrees, e.g. 30.22496 30.821798 + +image::images/spreadsheetdata.jpg["FIGURE: Spreadsheet data",align="center"] + +=== Creating the .CSV file +When the data is organized on the spreadsheet, it's time to export it as .CSV file. In order to do that, user must click _File_ and _Save As_. On the dialogue that comes up, select the “_Text CSV (.csv)_” as the file type and select the option “_Edit filter settings_”. + +image::images/save_as_options.jpg["FIGURE: Save as options",align="center"] + +After clicking _Save_, select the appropriate field delimiter (choose {Tab} to prevent conflicts with the “comma”) and select _OK_. + +image::images/field_options.jpg["FIGURE: Field options",align="center"] + +That should be it. You can double check the .CSV file by opening it with a text editor, and then import you diving data as explained on the section xref:S_ImportingManualCS[Importing dives from_manually kept CSV file]. diff --git a/Documentation/user-manual_es.txt b/Documentation/user-manual_es.txt index 0be4f965a..4ba8b0648 100644 --- a/Documentation/user-manual_es.txt +++ b/Documentation/user-manual_es.txt @@ -2,7 +2,7 @@ // ========================== // :author: Manual authors: Jacco van Koll, Dirk Hohndel, Reinout Hoornweg, // Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, Willem -// Ferguson, Salvador Cuñat +// Ferguson, Salvador Cuñat, Pedro Neves // :revnumber: 4.3 // :revdate: December 2014 :icons: @@ -17,7 +17,8 @@ image::images/Subsurface4Banner.png["Banner",align="center"] [big]#MANUAL DE USUARIO# *Autores*: Willem Ferguson, Jacco van Koll, Dirk Hohndel, Reinout Hoornweg, -Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, Salvador Cuñat +Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, Salvador Cuñat, +Pedro Neves [BLUE]#_Versión 4.3, Diciembre 2014_# @@ -163,22 +164,37 @@ datos no guardados en un diario abierto, al usuario se le preguntará si desea guardar el diario abierto antes de crear uno nuevo. [[S_GetInformation]] -== Como guardar información en el diario de buceo del usuario +== Guardar información en el diario de buceo -Hay varias formas de añadir información a un registro: +Ahora que se ha creado un nuevo diario, el usuario puede empezar a añadirle sus +datos. _Subsurface_ permite al usuario añadir datos a sus registros de varias +maneras distintas, todas las cuales las veremos en detalle en las secciones +siguientes. Si el usuario tiene un diario en papel, una hoja de cálculo u otra +forma de diario manual, se pueden añadir los datos de una de estas formas: -1. Introducir la información de buceo a mano. Esto es útil cuando el buceador no -utilizó un ordenador de buceo y las inmersiones se guardaron en un diario -escrito. +1. Introducir la información de buceo a mano directamente en la pestaña +_Notas de la Inmersión_ seleccionando la opción del menú general _Registro -> +Añadir inmersión_ (xref:S_EnterData[Introducir información de buceo a mano]) -2. Importar información de la inmersión directamente de un ordenador de buceo si +2. Importar datos de archivos CSV que contengan perfiles de inmersión +(xref:S_ImportingCSVDives[Importar inmersiones en formato CSV]) + +3. Importar metadatos de buceo de una hoja de cálculo vía CSV +(xref:S_ImportingManualCSV[Importar buceos de archivos CSV creados a mano] +y xref:_apendice_e_crear_un_archivo_csv_con_libreoffice_calc[APÉNDICE E]). + +Si el usuario ya tiene inmersiones registradas con un ordenador de buceo, estos +buceos pueden importarse de las siguientes formas: + +1. Importar información de la inmersión directamente de un ordenador de buceo si está soportado por _Subsurface_. La lista más actualizada de ordenadores soportados por _Subsurface_ puede encontrarse en: -link:http://subsurface-divelog.org/documentation/supported-dive-computers/[Ordenadores soportados]. +link:http://subsurface-divelog.org/documentation/supported-dive-computers/[Ordenadores soportados] +(xref:S_ImportDiveComputer[Importar nueva información desde un ordenador de buceo]) -3. Importar información de inmersiones de otra base de datos o formato de +2. Importar información de inmersiones de otra base de datos o formato de archivo. Si se tienen diarios guardados con otro software, a menudo podrán -importarse a _Subsurface_.Esto se comentará con detalle más adelante. +importarse a _Subsurface_. (xref:S_ImportingAlienDiveLogs[Importar información de inmersiones de otras fuentes u otros formatos de datos]). [[S_EnterData]] === Introducir información de buceo a mano @@ -1047,19 +1063,21 @@ inmersiones importadas aparecerán en el panel *Lista de Inmersiones*. image::images/Divelogs1.jpg["FIGURE:Descargar desde Divelogs.de",align="center"] +[[S_ImportingCSVData]] +==== Importar datos en formato CSV -[[S_ImportingCSV]] +Se puede utilizar un archivo .csv (valores separados por comas) para importar +información de buceo así como perfiles de inmersión (como en el caso de los +CCRs APD Inspiration o el Evolution) o como metadatos de buceo (en caso de que +el usuario guarde los datos en una hoja de cálculo). + +[[S_ImportingCSVDives]] ==== Importar inmersiones en formato CSV -En ocasiones, los ordenadores de buceo exportan la información en ficheros con -_comma separated values_ (.CSV, valores separados por comas). Por ejemplo, los -sistemas CCR Inspiration y Evolution de APD exportan ficheros en formato CSV que -contienen datos de una sola inmersión. Estos archivos pueden importarse -fácilmente en _Subsurface_. Los archivos CSV están organizados en una única -línea que proporciona los nombres de las columnas de datos, seguida de los datos -a un registro por línea. Los archivos CSV pueden abrirse con cualquier editor de -texto. A continuación un ejemplo muy simplificado y acortado de un archivo CSV -de un rebreather aPD: +Los archivos CSV están organizados en una única línea que proporciona los +nombres de las columnas de datos, seguida de los datos a un registro por línea. +Los archivos CSV pueden abrirse con cualquier editor de texto. A continuación +un ejemplo muy simplificado y acortado de un archivo CSV de un rebreather aPD: Dive Time (s) Depth (m) pO2 - Setpoint (Bar) pO2 - C1 ... 0 0.0 0.70 0.81 13.1 @@ -1125,9 +1143,11 @@ en la *Lista de Inmersiones* de _Subsurface_. Si uno mantiene sus diarios en una hoja de cálculo, también hay una opción para importarlos. Los datos de la hoja de cálculo, exportados a un archivo CSV, -pueden ser importados a _Subsurface_. Al importar registros mantenidos -manualmente, la información necesaria es un poco diferente, ya que estamos -importando metadatos, no muestras del perfil. +pueden ser importados a _Subsurface_. Se proporciona información sobre como +convertir los datos guardados en una hoja de cálculo a un archivo CSV en +xref:_apendice_e_crear_un_archivo_csv_con_libreoffice_calc[APÉNDICE E]). +Al importar registros mantenidos manualmente, la información necesaria es un +poco diferente, ya que estamos importando metadatos, no muestras del perfil. Al igual que al importar buceos en formato CSV, se necesita conocer el formato interno de los datos a importar. @@ -3334,3 +3354,54 @@ realmente has estado buceando 45 minutos). Es mucho más notable si haces cosas como actuar de instructor en inmersiones de curso, donde puedes estar en el agua mucho rato pero pasar la mayor parte del tiempo en superficie. En este caso no querrás que te cuente como algún tipo de inmersión larga. + +== APENDICE E: Crear un archivo CSV con Libreoffice Calc + +Muchos buceadores guardan un diario en algún tipo de archivo digital, habitualmente +una hoja de cálculo con varios campos de información. Estos registros pueden ser +importados con facilidad a _Subsurface_ +(xref:S_ImportingManualCSV[Importar buceos desde archivos CSV mantenidos manualmente]), +después de que la hoja haya sido convertida en archivo CSV. +Esta sección explica la forma de convertir un diario guardado en una hoja de cálculo +en un archivo .CSV que luego se importará a _Subsurface_. +Crear un .CSV es tarea facil, aunque el procedimiento pueda diferir algo en función +de que programa de hoja de cálculo se utilice. +En este ejemplo se utilizará LibreOffice Calc, pero el procedimiento debería ser +el mismo en OpenOffice. El procedimiento para usuarios de Microsoft Excel también +debería ser similar. + +=== Organizar los datos en la hoja de cálculo +El primer paso es organizar los datos de buceo en la hoja de cálculo, de forma +que la primera fila contenga los nombres de cada campo y que cada inmersión se +guarde en una sola fila._Subsurface_ no requiere ningún campo en particular, +pero soporta varios (Nº inmersión, Fecha, Hora, Duración, Ubicación, GPS, Prof. +Máxima, Prof. Media, Compañero, Notas, Lastre y Etiquetas). +El usuario puede organizar los metadatos de acuerdo a unas sencillas reglas: + +1. Fecha: Se debería utilizar uno de los siguientes formatos: aaaa-mm-dd, +dd.mm.aaaa, mm/dd/aaaa. +2. Duración: El formato debería ser minutos:segundos. En Libreffice Calc +esto sería [mm]:ss +3. Sistema de unidades: Solo debe usarse un sistema de unidades (sin mezclar, +por ejemplo, imperial y métrico). +4. Etiquetas y compañeros: Los nombres deben separarse con una ",". +5. Posiciones GPS: El usuario debe usar grados decimales, p.e. 30.22496 30.821798 + +image::images/spreadsheetdata.jpg["FIGURA: Datos de una hoja de cáculo",align="center"] + +=== Crear el archivo .CSV +Cuando los datos estén organizados en la hoja de cálculo, es el momento de +exportarlos a un archivo CSV. Para ello, el usuario debe hacer clic en _Archivo_ +y _Guardar como_. En el diálogo que aparecerá, se selecciona "_Text CSC (.csv)_" +como tipo de archivo y se selecciona "_Editar configuración de filtros_". + +image::images/save_as_options.jpg["FIGURA: Opciones de guardar como ...",align="center"] + +Tras pulsar _Guardar_, se selecciona el delimitador de campos adecuado +(preferible {tab} para prevenir conflictos con las "comas") y se pulsa _OK_. + +image::images/field_options.jpg["FIGURA: Opciones de campos",align="center"] + +Ya debería estar, se puede comprobar el archivo .CSV abriéndolo con un editor +de texto, y luego importarlo como se explica en la sección +xref:S_ImportingManualCSV[Importar inmersiones desde archivos CSV hechos a mano]. @@ -2,10 +2,9 @@ Building Subsurface from Source =============================== Subsurface uses a few open source libraries and frameworks to do its -job. The most important ones include libdivecomputer, Qt4, Marble -(more precisely libmarble; this is what causes the need for Qt4 as -Marble as of the time of this writing hasn't been ported to Qt5, yet), -libxml2, libxslt, libsqlite3, and libzip. +job. The most important ones include libdivecomputer, Qt, Marble +(more precisely libmarblewidget), libxml2, libxslt, libsqlite3, libzip, +and libgit2. Below are instructions for building Subsurface under some popular Linux distributions, for building Subsurface using Homebrew on a Mac, @@ -14,6 +13,23 @@ package management system for Windows makes it really painful to build Subsurface natively under Windows, we have some hints how to do so here as well. +As of Subsurface 4.3 all of the prebuilt binaries that we provide (right +now Windows64, Windows32, Mac, Ubuntu and LinuxMint) are built using our +own custom "flavors" of libdivecomputer and libmarblewidget. You can get +these from + +git://git.subsurface-divelog.org/marble (in the Subsurface-4.3 branch) +git://git.subsurface-divelog.org/libdc (in the Subsurface-4.3 branch) + +Both of these repositories also have a Subsurface-testing branch. That +branch is explicitly marked as NOT STABLE and will receive force pushes. +The rationale for this is that we have no intention of forking either of +these two projects. We simply are adding a few patches on top of their +latest versions and so those testing branches get frequently rebased. + +Also, all of the prebuilt binaries (with the exception of the Windows32 +build) are now Qt5 based and Qt5 is considered the stable and supported +framework to use for building Subsurface. Build options for Subsurface ---------------------------- @@ -25,6 +41,10 @@ The following options are recognized when passed to qmake: The default depends on how Qt was built. V=1 Disable the "silent" build mode LIBDCDEVEL=1 Search for libdivecomputer in ../libdivecomputer + LIBMARBLEDEVEL=path Search for marble library and includes in path + SPECIAL_MARBLE_PREFIX=1 Use libssrfmarblewidget as library name + This is needed when building with our marble branch + LIBGIT2DEVEL=path Search for libgit2 library and includes in path INCLUDEPATH+=xxx Add xxx to the include paths to the compiler (pass the actual path, without -I) LIBS+=xxx Add xxx to the linker flags. -l and -L options are @@ -43,45 +63,99 @@ example: Building Subsurface 4 under Linux --------------------------------- -On Fedora you need qt-devel, marble-devel, libzip-devel, -libxml2-devel, libxslt-devel, libsqlite3x-devel, libudev-devel, qtwebkit-devel. -If you are going to compile libdivecomputer, you need libusb-devel, too. +On Fedora you need + +sudo yum install git gcc-c++ make autoconf automake libtool cmake \ + libzip-devel libxml2-devel libxslt-devel libsqlite3x-devel \ + libgit2-devel libudev-devel libusbx-devel \ + qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtscript-devel \ + qt5-qtwebkit-devel qt5-qtsvg-devel qt5-qttools-devel + +Package names are sadly different on OpenSUSE + +sudo zypper install git gcc-c++ make autoconf automake libtool cmake libzip-devel \ + libxml2-devel libxslt-devel sqlite3-devel libgit2-devel libusb-1_0-devel \ + libqt5-linguist-devel libqt5-qttools-devel libQt5WebKitWidgets-devel \ + libqt5-qtbase-devel libQt5WebKit5-devel libqt5-qtsvg-devel \ + libqt5-qtscript-devel libqt5-qtdeclarative-devel + +On Debian Jessie this seems to work + +sudo apt-get install git g++ make autoconf libtool cmake pkg-config \ + libxml2-dev libxslt1-dev libzip-dev libsqlite3-dev \ + libusb-1.0-0-dev libgit2-dev \ + qt5-default qtchooser qttools5-dev-tools libqt5svg5-dev libqt5webkit5-dev \ + libqt5qml5 libqt5quick5 libqt5declarative5 qtscript5-dev On Debian style distributions you can install the required development packages by running (once Qt version of subsurface is available in your distribution) $ sudo apt-get build-dep subsurface +but on many of them this will give you the build dependencies for the +official package (which is often way out of date). So be careful that this +doesn't get you a Qt4 based environment -If you want to install the required packages individually instead you -need libqt4-dev, qt4-qmake, libxml2-dev, libxslt1-dev, zlib1g-dev, -libzip-dev, libmarble-dev, libsqlite3-dev, libqtwebkit-dev -(and libusb-1.0-0-dev if you're going to compile libdivecomputer). -Unfortunately the marble version in Debian stable (and possibly -Ubuntu) appears to be missing essential header files used in -Subsurface. We hack around this right now by including this header -file but that of course causes potential version conflicts. +First you need to compile our version of libdivecomputer: + +$ mkdir ~/src # unless you have this already +$ cd ~/src +$ git clone -b Subsurface-4.3 git://subsurface-divelog.org/libdc libdivecomputer + # or -b Subsurface-testing to get the testing version - careful, + # careful - this gets rebased and may be broken -To compile libdivecomputer: -$ git clone git://git.libdivecomputer.org/libdivecomputer $ cd libdivecomputer -$ git checkout release-0.4 $ autoreconf --install $ ./configure --disable-shared $ make $ sudo make install -To compile Subsurface: +Then you compile our custom branch of libmarblewidget + +$ cd ~/src +$ git clone -b Subsurface-4.3 git://subsurface-divelog.org/marble marble-source + # or -b Subsurface-testing to get the testing version - careful, + # careful - this gets rebased and may be broken + +$ mkdir marble-build +$ cd marble-build +$ cmake -DQTONLY=ON -DQT5BUILD=ON \ + -DBUILD_MARBLE_APPS=OFF -DBUILD_MARBLE_EXAMPLES=OFF \ + -DBUILD_MARBLE_TESTS=OFF -DBUILD_MARBLE_TOOLS=OFF \ + -DBUILD_TESTING=OFF -DWITH_DESIGNER_PLUGIN=OFF \ + -DBUILD_WITH_DBUS=OFF ../marble-source +$ make # <- this step will take quite a while... if you have more cores + # try make -j8 or something like that +$ sudo make install + +Finally you can compile Subsurface: + +$ cd ~/src $ git clone git://subsurface-divelog.org/subsurface.git $ cd subsurface -$ qmake # qmake-qt4 on some flavors of Linux +$ cd git checkout v4.3 # this get's you the last release + # skip this step to build the latest development + # version +$ qmake SPECIAL_MARBLE_PREFIX=1 # on Fedora/OpenSUSE you need qmake-qt5 $ make -$ sudo make install [optionally, add: prefix=/usr/local] +$ sudo make install # [optionally, add: prefix=/usr/local] -Note: on Fedora qmake will appear as qmake-qt4 +At least on Fedora and OpenSUSE you need to make sure that /usr/local/lib +is searched for shared libraries (this is where the steps above installed +libdivecomputer and libmarblewidget in order not to conflict with system +pacakges). So you need to do the following: -Building the Qt version under MacOSX (using Homebrew) ------------------------------------------------------ +$ sudo echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf +$ sudo ldconfig + +Now you should be able to start the Subsurface binary you just created +with + +$ ./subsurface + + +Building Subsurface under MacOSX (using Homebrew) +------------------------------------------------- 0) You need to have XCode installed. The first time (and possibly after updating OSX) you need to run @@ -190,58 +264,89 @@ Cross-building Subsurface on Linux for Windows ---------------------------------------------- Subsurface builds nicely with MinGW - the official builds are done as -cross builds under Linux (currently on Fedora 19). A shell script to do +cross builds under Linux (currently on Fedora 20). A shell script to do that (plus the .nsi file to create the installer with makensis) are included in the packaging/windows directory. +Everywhere below the mingw64- prefix is used for the cross tools. If you +really need a 32bit binary you need to use mingw32- as prefix and you may +also run into issues creating an installable binary with Qt5 (i.e., you +may have to go back to Qt4). + The best way to get libdivecomputer to build appears to be $ mkdir -p ~/src -$ git clone git://git.libdivecomputer.org/libdivecomputer ~/src/libdivecomputer -$ cd ~/src/libdivecomputer -$ git checkout release-0.4 -$ mingw32-configure --disable-shared -$ mingw32-make -$ sudo mingw32-make install +$ cd ~/src +$ git clone -b Subsurface-4.3 git://subsurface-divelog.org/libdc libdivecomputer + # or -b Subsurface-testing to get the testing version - careful, + # careful - this gets rebased and may be broken + +$ cd libdivecomputer +$ autoreconf --install +$ mingw64-configure --disable-shared +$ mingw64-make +$ sudo mingw64-make install To compile Marble, use: -$ mkdir -p ~/src/marble/build -$ git clone -b KDE/4.11 git://anongit.kde.org/marble ~/src/marble/sources -$ cd ~/src/marble/build -$ mingw32-cmake -DCMAKE_BUILD_TYPE=Debug -DQTONLY=TRUE ../sources - - or - -$ mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE ../sources -$ mingw32-make -j4 -$ mingw32-make install +$ cd ~/src +$ git clone -b Subsurface-4.3 git://subsurface-divelog.org/marble marble-source + # or -b Subsurface-testing to get the testing version - careful, + # careful - this gets rebased and may be broken + +$ mkdir marble-build +$ cd marble-build +$ mingg64-cmake -DQTONLY=ON -DQT5BUILD=ON \ + -DBUILD_MARBLE_APPS=OFF -DBUILD_MARBLE_EXAMPLES=OFF \ + -DBUILD_MARBLE_TESTS=OFF -DBUILD_MARBLE_TOOLS=OFF \ + -DBUILD_TESTING=OFF -DWITH_DESIGNER_PLUGIN=OFF \ + -DBUILD_WITH_DBUS=OFF ../marble-source +$ mingw64-make # <- this step will take quite a while... if you have more cores + # try ming64-make -j8 or something like that +$ sudo mingw64-make install + To compile libgit2, use: $ mkdir -p ~/src/libgit2/build $ git clone git://github.com/libgit2/libgit2 ~/src/libgit2 $ cd ~/src/libgit2/build -$ mingw32-cmake .. -$ mingw32-cmake --build . +$ mingw64-cmake .. +$ mingw64-make +$ sudo mingw64-make install To compile Subsurface, use: -$ mkdir -p ~/src/subsurface -$ git clone git://subsurface-divelog.org/subsurface.git ~/src/subsurface -$ cd ~/src/subsurface -$ packaging/windows/mingw-make.sh +$ cd ~/src +$ git clone git://subsurface-divelog.org/subsurface.git +$ cd subsurface +$ cd git checkout v4.3 # this get's you the last release + # skip this step to build the latest development + # version +$ packagin/windows/mingw-make.sh Qt5 SPECIAL_MARBLE_PREFIX=1 # on Fedora/OpenSUSE you need qmake-qt5 $ packaging/windows/mingw-make.sh install $ packaging/windows/mingw-make.sh installer The last step assumes that you have a link from packaging/windows/dll to the correct directory in your MinGW installation. On my machine that is -/usr/i686-w64-mingw32/sys-root/mingw/bin +/usr/i686-w64-mingw64/sys-root/mingw/bin Similarly, the paths used in packaging/windows/mingw-make.sh may need to be adjusted according to your distributions layout +Also, at least one version of Qt DLLs shipping with Fedora was +self-inconsistent at caused random crashes at startup. Unless you have +good reasons to build your own binaries, on Windows you may be better off +with the pre-compiled binaries we provide. + Building Subsurface on Windows ------------------------------ +This is NOT RECOMMENDED. To the best of our knowledge there is one single +person who regularly does this (and he provided these instructions). The +Subsurface team does not provide support for Windows binary build from +sources... + 1) Install msys-git: http://msysgit.github.io diff --git a/packaging/ubuntu/debian/compat b/packaging/ubuntu/debian/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/packaging/ubuntu/debian/compat @@ -0,0 +1 @@ +9 diff --git a/packaging/ubuntu/debian/docs b/packaging/ubuntu/debian/docs new file mode 100644 index 000000000..40dc76e3f --- /dev/null +++ b/packaging/ubuntu/debian/docs @@ -0,0 +1,7 @@ +gpl-2.0.txt +README +Readme.testing +Readme.ubuntu +ReleaseNotes.txt +SupportedDivecomputers.txt +TODO.CCR diff --git a/packaging/ubuntu/debian/rules b/packaging/ubuntu/debian/rules index a4c51d912..61799c31b 100755 --- a/packaging/ubuntu/debian/rules +++ b/packaging/ubuntu/debian/rules @@ -18,8 +18,10 @@ override_dh_auto_clean: rm -f Makefile override_dh_auto_configure: - (cd libdivecomputer ; autoreconf --install ; ./configure ; make -j8 ) - (mkdir libgit2/build ; cd libgit2/build ; cmake -DBUILD_SHARED_LIBS=OFF .. ; sed -i 's/.so$/.a/' CMakeCache.txt ; make -j8 ) + (cd libdivecomputer ; autoreconf --install ; ./configure --disable-shared ; make -j8 ) + (mkdir libgit2/build ; cd libgit2/build ; \ + cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_CLAR=OFF -DBUILD_EXAMPLES=OFF .. ; \ + sed -i 's/.so$/.a/' CMakeCache.txt ; make -j8 ) (mkdir marble-build ; cd marble-build ; \ cmake -DQTONLY=ON -DQT5BUILD=ON \ -DBUILD_MARBLE_APPS=OFF -DBUILD_MARBLE_EXAMPLES=OFF \ @@ -27,7 +29,7 @@ override_dh_auto_configure: -DBUILD_TESTING=OFF -DWITH_DESIGNER_PLUGIN=OFF \ -DBUILD_WITH_DBUS=OFF ../marble-source ; \ make -j8 ; \ - mkdir include ; cd include ; for i in `find ../../marble-source -name \*.h` ; do ln -s $$i . ; echo ln -s $$i . ; done ; \ + mkdir include ; cd include ; for i in `find ../../marble-source -name \*.h` ; do ln -s $$i . ; done ; \ ln -s . marble ) qmake LIBDCDEVEL=./libdivecomputer LIBGIT2DEVEL=./libgit2 LIBGIT2STATIC=1 LIBMARBLEDEVEL=./marble-build SPECIAL_MARBLE_PREFIX=1 subsurface.pro diff --git a/packaging/ubuntu/debian/source/format b/packaging/ubuntu/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/packaging/ubuntu/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/packaging/ubuntu/make-package.sh b/packaging/ubuntu/make-package.sh index 726c9cb74..30de8bb9c 100644 --- a/packaging/ubuntu/make-package.sh +++ b/packaging/ubuntu/make-package.sh @@ -9,31 +9,50 @@ fi GITVERSION=$(cd subsurface ; git describe | sed -e 's/-g.*$// ; s/^v//') VERSION=$(echo $GITVERSION | sed -e 's/-/./') LIBDCREVISION=$(cd subsurface/libdivecomputer ; git rev-parse --verify HEAD) +# +# echo "building Subsurface" $VERSION "with libdivecomputer" $LIBDCREVISION +# if [[ -d subsurface_$VERSION ]]; then rm -rf subsurface_$VERSION.bak.prev mv subsurface_$VERSION.bak subsurface_$VERSION.bak.prev mv subsurface_$VERSION subsurface_$VERSION.bak fi mkdir subsurface_$VERSION +# +# +echo "copying sources" +# (cd subsurface ; tar cf - . ) | (cd subsurface_$VERSION ; tar xf - ) cd subsurface_$VERSION rm -rf .git libdivecomputer/.git libgit2/.git marble-source/.git echo $GITVERSION > .gitversion echo $LIBDCREVISION > libdivecomputer/revision - -dh_make --email dirk@hohndel.org -c gpl2 --createorig --single --yes -p subsurface_$VERSION -rm debian/*.ex debian/*.EX debian/README.* -cp ../subsurface/packaging/ubuntu/debian/control debian/control -cp ../subsurface/packaging/ubuntu/debian/copyright debian/copyright -cp ../subsurface/packaging/ubuntu/debian/rules debian/rules -cp ../subsurface/packaging/ubuntu/debian/source.lintian-overrides debian/source.lintian-overrides +# dh_make --email dirk@hohndel.org -c gpl2 --createorig --single --yes -p subsurface_$VERSION +# rm debian/*.ex debian/*.EX debian/README.* +# +# +echo "creating source tar file" +# +tar cf - . | xz > ../subsurface_$VERSION.orig.tar.xz +# +# +echo "preparint the debian directory" +# +export DEBEMAIL=dirk@hohndel.org +mkdir -p debian +cp -a packaging/ubuntu/debian . +cp ../debian.changelog debian/changelog # do something clever with changelog -mv debian/changelog debian/autocl -head -1 debian/autocl | sed -e 's/)/~trusty)/' -e 's/unstable/trusty/' > debian/changelog -cat ../subsurface/packaging/ubuntu/debian/changelog >> debian/changelog -tail -1 debian/autocl >> debian/changelog -rm -f debian/autocl +#mv debian/changelog debian/autocl +#head -1 debian/autocl | sed -e 's/)/~trusty)/' -e 's/unstable/trusty/' > debian/changelog +#cat ../subsurface/packaging/ubuntu/debian/changelog >> debian/changelog +#tail -1 debian/autocl >> debian/changelog +#rm -f debian/autocl + +dch -v $VERSION-1~trusty -D trusty -M +mv ~/src/debian.changelog ~/src/debian.changelog.previous +cp debian/changelog ~/src/debian.changelog debuild -S diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index fb549cdd4..0f17f32fa 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -41,6 +41,11 @@ GlobeGPS::GlobeGPS(QWidget *parent) : MarbleWidget(parent), needResetZoom(false), editingDiveLocation(false) { +#ifdef MARBLE_SUBSURFACE_BRANCH + // we need to make sure this gets called after the command line arguments have + // been processed but before we initialize the rest of Marble + Marble::MarbleDebug::setEnabled(verbose); +#endif // check if Google Sat Maps are installed // if not, check if they are in a known location MapThemeManager mtm; @@ -85,7 +90,6 @@ GlobeGPS::GlobeGPS(QWidget *parent) : MarbleWidget(parent), connect(fixZoomTimer, SIGNAL(timeout()), this, SLOT(fixZoom())); fixZoomTimer->setSingleShot(true); installEventFilter(this); - Marble::MarbleDebug::setEnabled(verbose); } bool GlobeGPS::eventFilter(QObject *obj, QEvent *ev) diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index 192de3a80..0ec03b44b 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -146,10 +146,8 @@ void RenumberDialog::renumberOnlySelected(bool selected) void RenumberDialog::buttonClicked(QAbstractButton *button) { - if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole) { - qDebug() << "Renumbering."; + if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole) renumber_dives(ui.spinBox->value(), selectedOnly); - } } RenumberDialog::RenumberDialog(QWidget *parent) : QDialog(parent), selectedOnly(false) @@ -171,16 +169,13 @@ SetpointDialog *SetpointDialog::instance() void SetpointDialog::setpointData(struct divecomputer *divecomputer, int second) { dc = divecomputer; - time = second; - qDebug() << second << time; + time = second < 0 ? 0 : second; } void SetpointDialog::buttonClicked(QAbstractButton *button) { - if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole) { - qDebug() << time << (int)(1000.0 * ui.spinbox->value()); + if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole) add_event(dc, time, SAMPLE_EVENT_PO2, 0, (int)(1000.0 * ui.spinbox->value()), "SP change"); - } mark_divelist_changed(true); MainWindow::instance()->graphics()->replot(); diff --git a/subsurfacestartup.c b/subsurfacestartup.c index 22a41e4a6..8847ab36a 100644 --- a/subsurfacestartup.c +++ b/subsurfacestartup.c @@ -18,8 +18,8 @@ struct preferences default_prefs = { .mod = false, .modpO2 = 1.6, .ead = false, - .hrgraph = true, - .percentagegraph = true, + .hrgraph = false, + .percentagegraph = false, .dcceiling = true, .redceiling = false, .calcceiling = false, diff --git a/xslt/uddf-export.xslt b/xslt/uddf-export.xslt index 89bf6c137..d1d46a9b9 100644 --- a/xslt/uddf-export.xslt +++ b/xslt/uddf-export.xslt @@ -18,6 +18,24 @@ </xsl:for-each> </xsl:variable> + <xsl:variable name="eventmap"> + <!--entry key="safety stop (mandatory)"></entry--> + <!--entry key="deco"></entry--> + <entry key="ascent">ascent</entry><!--Not sure of definitions in our file. Ascent too fast??--> + <entry key="violation">deco</entry><!--Assume this is missed deco--> + <!--entry key="below floor">error</entry--> + <entry key="divetime">rbt</entry> + <!--entry key="maxdepth"></entry--> + <!--entry key="OLF"></entry--> + <!--entry key="PO2"></entry--> + <!--entry key="airtime"></entry--> + <entry key="ceiling">error</entry> + <!--entry key="heading"></entry--> + <entry key="surface">surface</entry> + <!--entry key="bookmark"></entry--> + <entry key="unknown">error</entry> + </xsl:variable> + <xsl:template match="/divelog/settings"/> @@ -348,9 +366,12 @@ <xsl:if test="$timesecond != $time"> <waypoint> - <xsl:if test="not(@name = 'heading') and not(@name = 'gaschange')"> + <xsl:variable name="name"> + <xsl:value-of select="@name"/> + </xsl:variable> + <xsl:if test="xt:node-set($eventmap)/entry[@key = $name]"> <alarm> - <xsl:value-of select="@name"/> + <xsl:value-of select="xt:node-set($eventmap)/entry[@key = $name]"/> </alarm> </xsl:if> @@ -406,10 +427,15 @@ <xsl:value-of select="@time"/> </xsl:variable> - <xsl:for-each select="preceding-sibling::event[@time = $time and not(@name='heading' or @name='gaschange')]/@name"> - <alarm> - <xsl:value-of select="."/> - </alarm> + <xsl:for-each select="preceding-sibling::event[@time = $time]"> + <xsl:variable name="name"> + <xsl:value-of select="@name"/> + </xsl:variable> + <xsl:if test="xt:node-set($eventmap)/entry[@key = $name]"> + <alarm> + <xsl:value-of select="xt:node-set($eventmap)/entry[@key = $name]"/> + </alarm> + </xsl:if> </xsl:for-each> <depth> |