Compare commits
24 Commits
v1.4
...
6.0_alpha2
| Author | SHA1 | Date | |
|---|---|---|---|
| 141bff5dd3 | |||
| ae8f851b06 | |||
| 65d3f78a14 | |||
| f2fbc7463b | |||
| 91626a9c87 | |||
| 858a70fe82 | |||
| 3200be221c | |||
| 452059cb18 | |||
| c84d96043e | |||
| 3179f447ce | |||
| 9c0c6480e3 | |||
| f0ec035c02 | |||
| dd04b72a67 | |||
| 9d0ee5010b | |||
| 919dbe2a0f | |||
| 8c44bbd89b | |||
| a899084e37 | |||
| 8b3dac7ce6 | |||
| 47cc8f14fa | |||
| ca041a4e14 | |||
| 5165abf494 | |||
| 80c63a8d5b | |||
| 41192641d3 | |||
| f76ea1c06e |
-27
@@ -1,27 +0,0 @@
|
||||
acinclude.m4
|
||||
aclocal.m4
|
||||
autom4te*.cache
|
||||
build-debug
|
||||
build-default
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
configure.files
|
||||
configure.in
|
||||
conftest
|
||||
inst-apps
|
||||
kmess.kdevelop.pcs
|
||||
kmess.kdevses
|
||||
libtool
|
||||
Makefile
|
||||
Makefile.am
|
||||
Makefile.in
|
||||
Makefile.rules.in
|
||||
MakeVars.in
|
||||
stamp-h
|
||||
stamp-h1
|
||||
stamp-h1.in
|
||||
stamp-h.in
|
||||
subdirs
|
||||
@@ -1,44 +1,191 @@
|
||||
Developers:
|
||||
-- Developers --
|
||||
|
||||
Mike K. Bennett <mkb137@users.sourceforge.net>
|
||||
Michael Curtis <mdcurtis@users.sourceforge.net>
|
||||
Jan Toenjes <jan.toenjes@web.de>
|
||||
Lin Haoxiang <linhaoxiang@hotmail.com>
|
||||
Jan Toenjes <jan.toenjes@web.de>
|
||||
Diederik van der Boor <vdboor@codingdomain.com>
|
||||
Richard Conway <richardconway@users.sourceforge.net>
|
||||
Valerio Pilo <amroth@coldshock.net>
|
||||
Antonio Nastasi <sifcenter@gmail.com>
|
||||
Ruben Vandamme <vandammeru@gmail.com>
|
||||
Sjors Gielen <dazjorz@dazjorz.com>
|
||||
Adam Goossens <fontknocker@gmail.com>
|
||||
|
||||
Translations:
|
||||
Arabic - Mohamed Aser <mohasr@link.net>
|
||||
Brazilian Portuguese - Mauricio Rother <mauricio@digicomm.com.br>
|
||||
Catalan - Jaume Cornadó <jaumec@lleida.net>
|
||||
Danish - Lars Sommer <admin@lasg.dk>
|
||||
Dutch - Arend van Beelen Jr. <arend@auton.nl>
|
||||
Estonian - Jyri Toomessoo <nuubik@hotmail.com>
|
||||
German - Jan Tönjes <jan.toenjes@web.de>
|
||||
French - Choplair <pachilor@yahoo.co.jp>
|
||||
Vincent Fretin <fretinvincent@hotmail.com>
|
||||
Italian - David Vignoni <dvgn@libero.it>
|
||||
Korean - Park Dong Cheon <pdc@kaist.ac.kr>
|
||||
Norsk Bokmal - Øyvind Sæther <oyvind@sather.tk>
|
||||
Simplified Chinese - Lin Haoxiang <linhaoxiang@hotmail.com>
|
||||
Spanish - Johanna Gersch
|
||||
J.C.A. Javi <yovoya30ks@hotmail.com>
|
||||
Thai - Rachan Hongpairote <rachanh@yahoo.com>
|
||||
Turkish - Gorkem Cetin <gorkem@gelecek.com.tr>
|
||||
Barbaros Ulutas <tebarul@yahoo.com>
|
||||
|
||||
-- Translations --
|
||||
|
||||
Translations Maintainer:
|
||||
|
||||
Panagiotis Papadopoulos <pano_90@gmx.net>
|
||||
|
||||
Arabic:
|
||||
|
||||
Mohamed Aser <mohasr@link.net>
|
||||
Youssef Chahibi <chahibi@gmail.com>
|
||||
Ma'moun Diraneyya <mamoun.diraneyya@gmail.com>
|
||||
|
||||
Brazilian Portuguese:
|
||||
|
||||
Mauricio Rother <mauricio@digicomm.com.br>
|
||||
Leonel Freire <leonelfreire@gmail.com>
|
||||
Sergio Rafael Lemke <bedi.com@gmail.com>
|
||||
Morris Arozi Moraes
|
||||
|
||||
Catalan:
|
||||
|
||||
Jaume Cornadó <jaumec@lleida.net>
|
||||
Adrià Arrufat <swiftscythe@gmail.com>
|
||||
|
||||
Chinese (Simplified):
|
||||
|
||||
Lin Haoxiang <linhaoxiang@hotmail.com>
|
||||
Liu Sizhuang <chinatslsz@hotmail.com>
|
||||
Cheng Yang <yangzju@gmail.com>
|
||||
|
||||
Chinese (Traditional):
|
||||
|
||||
Yen-chou Chen <yenchou.mse90@nctu.edu.tw>
|
||||
Tryneeds-Chinese Translation Platform <http://tryneeds.westart.tw/tryneeds>
|
||||
|
||||
Danish:
|
||||
|
||||
Lars Sommer <admin@lasg.dk>
|
||||
Pascal d'Hermilly <pascal@tipisoft.dk>
|
||||
|
||||
Dutch:
|
||||
|
||||
Arend van Beelen Jr. <arend@auton.nl>
|
||||
Diederik van der Boor <vdboor@codingdomain.com>
|
||||
Jaap Woldringh <jjh.woldringh@planet.nl>
|
||||
Elve <elve@savage-elve.net>
|
||||
Sander Pientka <cumulus0007@gmail.com>
|
||||
Heimen Stoffels <vistausss@gmail.com>
|
||||
|
||||
Estonian:
|
||||
|
||||
Jyri Toomessoo <nuubik@hotmail.com>
|
||||
Lauri Võsandi <v6sa@hotmail.com>
|
||||
Mihkel Tõnnov <mihhkel@gmail.com>
|
||||
Rivo Laks <rivolaks@hot.ee>
|
||||
Timo Tambet <ttambet@gmail.com>
|
||||
|
||||
Finnish:
|
||||
|
||||
Markus Vuori <markus@vuoret.net>
|
||||
Joonas Niilola <juippis@roskakori.org>
|
||||
Jussi Timperi <jussi.timperi@gmail.com>
|
||||
Antony Hussi <antony.hussi@tranciend.com>
|
||||
Marko Mäkilä <maruchan86@gmail.com>
|
||||
|
||||
French:
|
||||
|
||||
Choplair <pachilor@yahoo.co.jp>
|
||||
Vincent Fretin <fretinvincent@hotmail.com>
|
||||
Andrea Blankenstijn <darkan9el@gmail.com>
|
||||
Barthe Guillaume <gu_barthe@yahoo.fr>
|
||||
Scias <shining.scias@gmail.com>
|
||||
Grégory Bellier <gregory.bellier@gmail.com>
|
||||
Anthony Rey <gnuk@mailoo.org>
|
||||
|
||||
Galician:
|
||||
|
||||
Indalecio Freiría Santos <ifreiria@gmail.com>
|
||||
|
||||
German:
|
||||
|
||||
Jan Tönjes <jan.toenjes@web.de>
|
||||
Panagiotis Papadopoulos <pano_90@gmx.net>
|
||||
|
||||
Greek:
|
||||
|
||||
Panagiotis Papadopoulos <pano_90@gmx.net>
|
||||
Dimitrios Glentadakis <dglent@gmail.com>
|
||||
George Kiagiadakis <kiagiadakis.george@gmail.com>
|
||||
|
||||
Hungarian:
|
||||
|
||||
Páder Rezső <rezso@rezso.net>
|
||||
Pauli Henrik <henrik.pauli@drangolin.net>
|
||||
|
||||
Italian:
|
||||
|
||||
David Vignoni <dvgn@libero.it>
|
||||
Valerio Pilo <amroth@coldshock.net>
|
||||
Vincenzo Reale <smart2128@baslug.org>
|
||||
Andrea Decorte <adecorte@gmail.com>
|
||||
|
||||
Japanese:
|
||||
|
||||
Daniel E. Moctezuma <dmoctezuma@kmess.org>
|
||||
|
||||
Korean:
|
||||
|
||||
Park Dong Cheon <pdc@kaist.ac.kr>
|
||||
|
||||
Norsk Bokmal:
|
||||
|
||||
Øyvind Sæther <oyvind@sather.tk>
|
||||
|
||||
Portuguese:
|
||||
|
||||
Bruno Almeida <bruno.r.almeida@gmail.com>
|
||||
|
||||
Russian:
|
||||
|
||||
Dmitriy Simbiriatin <slpiv@mail.ru>
|
||||
|
||||
Serbian:
|
||||
|
||||
Zoran Milovanović <provalisam@gmail.com>
|
||||
|
||||
Slovak:
|
||||
|
||||
Rastislav Krupanský <ra100@atlas.sk>
|
||||
|
||||
Slovenian:
|
||||
|
||||
Matjaž Kaše <kase@g-kabel.si>
|
||||
|
||||
Spanish:
|
||||
|
||||
Johanna Gersch
|
||||
J.C.A. Javi <yovoya30ks@hotmail.com>
|
||||
Alejandro Araiza Alvarado <mebrelith@gmail.com>
|
||||
Jaume Corbí <jaume4@gmail.com>
|
||||
Christian Kaiser <k39@users.sourceforge.net>
|
||||
Juan Pablo González Tognarelli <jotapesan@gmail.com>
|
||||
Alexis Daniel Medina Medina <alexismedina@gmail.com>
|
||||
Manuel Ramírez <elpreto@kde.org.ar>
|
||||
Mauricio Muñoz Lucero <real.mml@gmail.com>
|
||||
|
||||
Swedish:
|
||||
|
||||
Christian Lundgren <zeflunk@gmail.com>
|
||||
Mattias Newzella <newzella@gmail.com>
|
||||
|
||||
Thai:
|
||||
|
||||
Rachan Hongpairote <rachanh@yahoo.com>
|
||||
|
||||
Turkish:
|
||||
|
||||
Gorkem Cetin <gorkem@gelecek.com.tr>
|
||||
Barbaros Ulutas <tebarul@yahoo.com>
|
||||
Uğur Çetin <ugur.jnmbk@gmail.com>
|
||||
|
||||
-- Thanks to --
|
||||
|
||||
Also tranks to:
|
||||
Jan Tönjes <jan.toenjes@web.de>
|
||||
- testing, documentation, web master, project management, etc
|
||||
|
||||
Dane Harnett <dynamitedane@hotmail.com>
|
||||
- web design
|
||||
|
||||
|
||||
David Vignoni <dvgn@libero.it>
|
||||
- the main yellow/blue/violet emoticon sets
|
||||
|
||||
Laurence Anderson <l.d.anderson@warwick.ac.uk>
|
||||
- original file receive code
|
||||
|
||||
|
||||
Scott Morgan <blumf@blumf.freeserve.co.uk>
|
||||
- Xinerama fixes
|
||||
|
||||
@@ -50,12 +197,12 @@ Also tranks to:
|
||||
|
||||
Choe Hwanjin <hjchoe@hancom.com>
|
||||
- Various internationalization fixes.
|
||||
|
||||
|
||||
Vincent Fretin <fretinvincent@hotmail.com>
|
||||
- MSN6 emoticon definitions
|
||||
|
||||
Lin Haoxiang <linhaoxiang@hotmail.com>
|
||||
- Send file bugfix
|
||||
- Send file bugfix, proxy code
|
||||
|
||||
Tobias Tönjes
|
||||
- Guy with a bag over his head
|
||||
@@ -63,12 +210,68 @@ Also tranks to:
|
||||
Damien Sandras <dsandras@seconix.com>
|
||||
- GnomeMeeting developer
|
||||
|
||||
Liu Sizhuang <chinatslsz@hotmail.com>
|
||||
- P4-Context field support
|
||||
|
||||
Guido Solinas <whereismwhite@gmail.com>
|
||||
- Pictures in contact list code
|
||||
- Contact client info
|
||||
- Chat font zoom
|
||||
|
||||
Pedro Ferreira <pedro.ferreira@fe.up.pt>
|
||||
- File transfer thumbnails
|
||||
|
||||
Matteo Nardi <91.matteo@gmail.com>
|
||||
- KWallet support
|
||||
|
||||
Andrea Decorte <adecorte@gmail.com>
|
||||
- Group selection in 'contact added user' dialog
|
||||
|
||||
Dario Freddi <drf_av@users.sourceforge.net>
|
||||
- Chat history dialog
|
||||
|
||||
Camille Begue <prsieux@gmail.com>
|
||||
- Chat History functionality when disconnected from MSN
|
||||
- Automatic login checkbox on initialview
|
||||
|
||||
David López <grannost@gmail.com>
|
||||
- Nudge button in chat
|
||||
|
||||
Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com>
|
||||
- Roaming Service support
|
||||
|
||||
Anastasios Bourazanis <a.brzns@gmail.com>
|
||||
- Emoticon preview in settings page
|
||||
- Clickable contact properties dialog text
|
||||
|
||||
Marco Mentasti <marcomentasti@gmail.com>
|
||||
- Internationalization fixes
|
||||
- Drag'n'drop of images into display pictures
|
||||
|
||||
Francesco Nwokeka
|
||||
- Now Listening toggle button above the contact list.
|
||||
|
||||
Timo Tambet <ttambet@gmail.com>
|
||||
- Contact Changed and Group Changed notifications.
|
||||
- Contact added user dialog tabbing
|
||||
|
||||
KMerlin <http://kmerlin.olsd.de/>
|
||||
- Inspiration and assorted code
|
||||
|
||||
Kopete <http://kopete.kde.org/>
|
||||
- Popup Balloon code, initial p2p code
|
||||
- Old Popup Balloon code
|
||||
- Initial p2p code
|
||||
- MSN Challenge handler
|
||||
|
||||
KScreensaver
|
||||
- Idle timer code
|
||||
|
||||
|
||||
BasKet
|
||||
- Close-to-tray icon screenshot code
|
||||
|
||||
Amarok
|
||||
- Custom crash handler implementation
|
||||
- System tray icon overlay implementation
|
||||
|
||||
Quassel
|
||||
- KNotify not giving focus bug fix and KWin focus stealing prevention workaround
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(kmess VERSION 6.0.0 LANGUAGES C CXX)
|
||||
|
||||
find_package(ECM REQUIRED NO_MODULE)
|
||||
set(CMAKE_MODULE_PATH
|
||||
${CMAKE_MODULE_PATH}
|
||||
${ECM_MODULE_PATH}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
set(BUILD_WITH_QT6 ON CACHE BOOL "Build against Qt 6" FORCE)
|
||||
set(QT_DEFAULT_MAJOR_VERSION 6)
|
||||
|
||||
include(KDEInstallDirs)
|
||||
include(KDECMakeSettings)
|
||||
include(KDECompilerSettings NO_POLICY_SCOPE)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Core5Compat DBus Gui Multimedia Network Test WebEngineWidgets Widgets Xml)
|
||||
find_package(KF6 REQUIRED COMPONENTS
|
||||
Codecs
|
||||
Completion
|
||||
Config
|
||||
ConfigWidgets
|
||||
CoreAddons
|
||||
Crash
|
||||
IdleTime
|
||||
I18n
|
||||
IconThemes
|
||||
KIO
|
||||
Notifications
|
||||
NotifyConfig
|
||||
Parts
|
||||
Service
|
||||
Solid
|
||||
StatusNotifierItem
|
||||
TextWidgets
|
||||
WidgetsAddons
|
||||
WindowSystem
|
||||
Wallet
|
||||
XmlGui
|
||||
)
|
||||
|
||||
find_package(LibXml2 REQUIRED)
|
||||
find_package(LibXslt REQUIRED)
|
||||
find_package(GCrypt REQUIRED)
|
||||
|
||||
set(ISFQT_IS_BUNDLED TRUE)
|
||||
set(USE_BUNDLED_LIBRARIES ISFQT)
|
||||
set(WANT_GIF OFF CACHE BOOL "Disable ISF fortified GIF while porting to Qt6" FORCE)
|
||||
add_subdirectory(contrib/isf-qt)
|
||||
|
||||
option(KMESS_DISABLE_LIKEBACK "Disable the old LikeBack feedback UI" ON)
|
||||
if(KMESS_DISABLE_LIKEBACK)
|
||||
set(KMESS_DISABLE_LIKEBACK 1)
|
||||
else()
|
||||
set(KMESS_DISABLE_LIKEBACK 0)
|
||||
endif()
|
||||
|
||||
set(KMESS_VERSION "6.0_alpha2")
|
||||
set(KMESS_ENABLE_DEBUG_OUTPUT 0)
|
||||
set(KMESS_BUILT_DEBUGFULL FALSE)
|
||||
set(HAVE_LIBISFQT 1)
|
||||
set(HAVE_NEW_TRAY 1)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050F00 -DQT_NO_URL_CAST_FROM_STRING)
|
||||
|
||||
# Compatibility variables kept for old subdirectory install rules while the
|
||||
# source tree is being ported away from KDE4-era CMake.
|
||||
set(BIN_INSTALL_DIR ${KDE_INSTALL_BINDIR})
|
||||
set(CONFIG_INSTALL_DIR ${KDE_INSTALL_CONFDIR})
|
||||
set(DATA_INSTALL_DIR ${KDE_INSTALL_DATADIR})
|
||||
set(HTML_INSTALL_DIR ${KDE_INSTALL_DOCBUNDLEDIR})
|
||||
set(ICON_INSTALL_DIR ${KDE_INSTALL_ICONDIR})
|
||||
set(LOCALE_INSTALL_DIR ${KDE_INSTALL_LOCALEDIR})
|
||||
set(PLUGIN_INSTALL_DIR ${KDE_INSTALL_PLUGINDIR})
|
||||
set(SERVICES_INSTALL_DIR ${KDE_INSTALL_KSERVICESDIR})
|
||||
set(SHARE_INSTALL_PREFIX ${KDE_INSTALL_DATADIR})
|
||||
set(SOUND_INSTALL_DIR ${KDE_INSTALL_SOUNDDIR})
|
||||
set(XDG_APPS_INSTALL_DIR ${KDE_INSTALL_APPDIR})
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/config-kmess.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config-kmess.h)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${LIBXML2_INCLUDE_DIR}
|
||||
${LIBXSLT_INCLUDE_DIR}
|
||||
${GCRYPT_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
add_subdirectory(po)
|
||||
add_subdirectory(data)
|
||||
add_subdirectory(src)
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
@@ -0,0 +1,260 @@
|
||||
# Doxyfile 1.5.5-KDevelop
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = KMess
|
||||
PROJECT_NUMBER = 2.0.6.2
|
||||
OUTPUT_DIRECTORY = ./apidocs
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF = "The $name class" \
|
||||
"The $name widget" \
|
||||
"The $name file" \
|
||||
is \
|
||||
provides \
|
||||
specifies \
|
||||
contains \
|
||||
represents \
|
||||
a \
|
||||
an \
|
||||
the
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 2
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
CPP_CLI_SUPPORT = NO
|
||||
SIP_SUPPORT = NO
|
||||
IDL_PROPERTY_SUPPORT = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = YES
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = YES
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = YES
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = YES
|
||||
SORT_GROUP_NAMES = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = NO
|
||||
SHOW_DIRECTORIES = NO
|
||||
SHOW_FILES = YES
|
||||
SHOW_NAMESPACES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = YES
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ./src
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS = *.cpp \
|
||||
*.h \
|
||||
*.dox
|
||||
RECURSIVE = YES
|
||||
EXCLUDE = *.moc \
|
||||
*.moc.cpp \
|
||||
*.moc.h
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS = */build*/*
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS = *
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
REFERENCES_LINK_SOURCE = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 4
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER = doc/apidocs_header.html
|
||||
HTML_FOOTER = doc/apidocs_footer.html
|
||||
HTML_STYLESHEET = doc/doxygen.css
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
GENERATE_DOCSET = NO
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||
HTML_DYNAMIC_SECTIONS = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = YES
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NONE
|
||||
TREEVIEW_WIDTH = 250
|
||||
FORMULA_FONTSIZE = 10
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = KMESSTEST \
|
||||
KMESS_NETWORK_WINDOW
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE = kmess.tag
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = NO
|
||||
MSCGEN_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = YES
|
||||
DOT_FONTNAME = FreeSans
|
||||
DOT_FONTPATH =
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = NO
|
||||
CALL_GRAPH = NO
|
||||
CALLER_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = NO
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_DEPTH = 1000
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = YES
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
||||
@@ -1,5 +1,71 @@
|
||||
KMess Feature list
|
||||
========================
|
||||
- 2.0.3 -
|
||||
Setting your friendly name and personal message by clicking on their labels in the contact list.
|
||||
A display of the unread email count in the system tray tooltip.
|
||||
Ability to change personal message using DBus.
|
||||
|
||||
- 2.0.2 -
|
||||
Enabled drag-and-drop of images into display picture frames.
|
||||
|
||||
- 2.0.1 -
|
||||
Synchronization of friendly names, personal messages and display pictures with Messenger.
|
||||
Support to send screenshots by dragging and dropping them to a chat.
|
||||
Custom emoticon preview in the settings.
|
||||
Chat window buttons to change message font and color.
|
||||
|
||||
- 2.0 -
|
||||
Support to receive and send Ink (hand-written) messages.
|
||||
Support to send huge messages.
|
||||
Options to copy a contact's email, name, message, listened music and links present in the name/message
|
||||
List of contact events, such as logins and logouts.
|
||||
Chat Windows can be used again when reconnecting.
|
||||
Quick retype of previous sent messages, using Ctrl+Up/Ctrl+Down.
|
||||
MSN connections over HTTP, to deal with corporate firewalls which only allow connections to browse the web.
|
||||
Support to chat with offline and invisible contacts.
|
||||
Support to search in the contact list.
|
||||
Support to send bigger chat messages.
|
||||
Option to choose the browser used to open web sites, Live Mail, and MSN support sites.
|
||||
Option to manually send commands to the server in developer builds.
|
||||
Support to group all chats in the same chat window (tabbed chatting).
|
||||
Option to select a directory where all received files will be put.
|
||||
Option to choose the interval of ports used for fast file transfers.
|
||||
Option to keep short notes for each contact.
|
||||
Support to MSN Plus text formatting.
|
||||
Support for DBus remote application control.
|
||||
Option to choose a previously chosen display picture.
|
||||
Support for dark KDE color schemes.
|
||||
More options to improve customization of the Contact List.
|
||||
Support for KDE's KWallet, to store in a secure way the accounts passwords.
|
||||
Automatic detection of network connection and disconnection.
|
||||
Option to block notifications when the status is set to Busy.
|
||||
Option to disable displaying of received winks.
|
||||
Automatic reconnection to MSN after unwanted disconnections.
|
||||
|
||||
- 1.5.1 -
|
||||
Contact's MSN client detection.
|
||||
Option to view contacts' Display Pictures in the contact list.
|
||||
Option to enable spell checking in the chat windows.
|
||||
Disable notification popups when there's a screen saver or a full screen application.
|
||||
Added option to manually set your own MSN status to Idle.
|
||||
When closing KMess to tray for the first time, a little screenshot of the notification area will help finding KMess' tray icon.
|
||||
|
||||
- 1.5 -
|
||||
Support to exchange (send and receive) custom emoticons and nudges.
|
||||
Receive-only support for winks and offline-im messages.
|
||||
Fast file transfers, supporting MSN6+ direct connections.
|
||||
MSN7 personal status messages are supported.
|
||||
The appearance of chat message and emoticons can be changed on the fly.
|
||||
Users with a temporary "guest" account can upgrade to a regular "stored" account.
|
||||
Messages from the same contact can be grouped.
|
||||
New default chat style, 'Fresh', making chats more colorful and friendly.
|
||||
Now listening information can be exchanged.
|
||||
New KDE style balloon notification popups.
|
||||
Right-click options for links in the chat window.
|
||||
Improved and more compact visual style for the chat windows.
|
||||
Automatically download the display pictures of your contacts.
|
||||
Option to select an image to use as display picture and to then crop unneeded parts away.
|
||||
|
||||
- 1.4 -
|
||||
MSN6 display picture transfers are supported
|
||||
MSN6 file transfer is supported (receiving only)
|
||||
@@ -45,4 +111,4 @@ Chats can be configured to show timestamps when contacts send messages.
|
||||
A "compact" chat format can be used to remove extraneous line breaks and reduce the size of the chat.
|
||||
The chat window caption in the taskbar alternates between lower and upper case to inform the user of a received message when the window is not on top.
|
||||
Internationalization support, with translations in: English, Dutch, German, Italian, Portuguese, Spanish, Turkish, Chinese, French, Catalan, Arabic, Korean, Norsk, Thai, Danish, and Estonian
|
||||
There is now a method, though not absolute, to tell if a contact is blocking you. If a chat is started with a contact that appears offline, you will be informed if the contact is offline or online and blocking you.
|
||||
There is now a method, though not absolute, to tell if a contact is blocking you. If a chat is started with a contact that appears offline, you will be informed if the contact is offline or online and blocking you.
|
||||
|
||||
@@ -1,209 +1,61 @@
|
||||
|
||||
Installation Tip:
|
||||
=================
|
||||
Installation Hints:
|
||||
===================
|
||||
|
||||
In order for KMess to work properly, it must be configured first.
|
||||
Run the configure script like this:
|
||||
NOTE: This package is used to build KMess from source code.
|
||||
If you're looking for a simple way to install KMess,
|
||||
take a look at http://www.kmess.org/download/.
|
||||
|
||||
NOTE: These instructions are meant for UNIX-like systems. If they don't
|
||||
work for you, please tell us at http://www.kmess.org/board/.
|
||||
For building on Windows, see this Wiki page:
|
||||
http://trac.kmess.org/wiki/Compiling%20KMess%20for%20Windows
|
||||
|
||||
To install KMess from this source package you need to create a separate
|
||||
build directory first. It must be created outside the source folder. After
|
||||
that, you must configure your build using cmake.
|
||||
|
||||
To ease the building process, KMess comes with a 'configure' script that
|
||||
creates the directory and runs CMake for you. To build this package, simply
|
||||
run:
|
||||
|
||||
cd kmess
|
||||
./configure
|
||||
|
||||
If the ./configure script completed with success, then type
|
||||
|
||||
make
|
||||
|
||||
and then, as root, type
|
||||
To install on most systems, you can run:
|
||||
|
||||
make install
|
||||
sudo make install
|
||||
|
||||
That's it.
|
||||
If your system doesn't come with sudo, you can use:
|
||||
|
||||
su -c 'make install'
|
||||
|
||||
That's it!
|
||||
Of course, building without the configure script is also possible:
|
||||
|
||||
Important:
|
||||
==========
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
sudo make install
|
||||
|
||||
The configure script tries to detect your KDE3 directory automatically.
|
||||
If configure fails to detect KDE, you should tell KMess which directory
|
||||
to use. Basically, we're talking about the parent directory
|
||||
of /share/apps/k~bunch of kapps~
|
||||
|
||||
Not doing this will result in emoticons being displayed
|
||||
as text, and icons being displayed incorrectly as well.
|
||||
|
||||
If configure tells you you're missing something that you think you
|
||||
have installed on your system, you probably need to install the
|
||||
"devel" version of that thing. i.e. If it tells you you're missing
|
||||
libfam, install the libfam-devel rpm.
|
||||
|
||||
More information can be found in the README file.
|
||||
The following paragraphs below provide generic installation instructions:
|
||||
|
||||
|
||||
|
||||
Basic Installation
|
||||
Useful parameters:
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
The configure script automatically makes the right build for you. For a release (non-alpha or beta)
|
||||
package, the configure script builds KMess in release mode; for an alpha or beta package, KMess will
|
||||
run in debug mode. When something goes wrong, debug mode will help us find the cause, and fix it. :-)
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
If you want to modify your build, you can try the following options to the configure script:
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
--prefix=/usr
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
Install in the /usr directory instead.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
--build-type=(one of debug,debugfull,release,relwithdebuginfo,minsizerel)
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes a while. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
4. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made.
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
Tell CMake to build this specific build type.
|
||||
|
||||
Also consider running "ccmake" for an curses-interface to cmake.
|
||||
ccmake only works after the build directory has been configured with cmake before.
|
||||
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
####### kdevelop will overwrite this part!!! (begin)##########
|
||||
|
||||
SUBDIRS = kmess po doc
|
||||
|
||||
EXTRA_DIST = kmess.kdevelop admin AUTHORS COPYING ChangeLog INSTALL README TODO kmess.lsm FEATURES
|
||||
|
||||
$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
|
||||
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
|
||||
|
||||
$(top_srcdir)/subdirs:
|
||||
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
|
||||
|
||||
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
|
||||
@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
|
||||
|
||||
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
|
||||
|
||||
package-messages:
|
||||
$(MAKE) -f admin/Makefile.common package-messages
|
||||
$(MAKE) -C po merge
|
||||
|
||||
dist-hook:
|
||||
cd $(top_distdir) && perl admin/am_edit -padmin
|
||||
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
|
||||
@@ -1,14 +0,0 @@
|
||||
all:
|
||||
@echo "This Makefile is only for the CVS repository"
|
||||
@echo "This will be deleted before making the distribution"
|
||||
@echo ""
|
||||
@if test ! -d admin; then \
|
||||
echo "Please recheckout this module!" ;\
|
||||
echo "for cvs: use checkout once and after that update again" ;\
|
||||
echo "for cvsup: checkout kde-common from cvsup and" ;\
|
||||
echo " link kde-common/admin to ./admin" ;\
|
||||
exit 1 ;\
|
||||
fi
|
||||
$(MAKE) -f admin/Makefile.common cvs
|
||||
|
||||
.SILENT:
|
||||
@@ -1,3 +1,735 @@
|
||||
Changes between KMess Git and 2.0.6.2:
|
||||
--------------------------------------
|
||||
|
||||
- None yet
|
||||
|
||||
Changes between KMess 2.0.6.2 and 2.0.6.1:
|
||||
------------------------------------------
|
||||
|
||||
- Follow redirects, fixing connection issue. Thanks to Lekensteyn.
|
||||
- Moved file transfer settings into own tab.
|
||||
- updated Japanese translation by Daniel E. Moctezuma.
|
||||
|
||||
Changes between KMess 2.0.6.1 and 2.0.6:
|
||||
----------------------------------------
|
||||
|
||||
- fix bug where KMess couldn't login due to missing language preference information.
|
||||
|
||||
Changes between KMess 2.0.6 and 2.0.5:
|
||||
--------------------------------------
|
||||
|
||||
- fix bug where KMess couldn't login due to badly formed URL commands.
|
||||
- fixed crash when taking any action in the Contact Added User dialog.
|
||||
- fixed a possible crash when using the Contact Added User dialog.
|
||||
- Added a fading effect when switching between the initial view and the contact list.
|
||||
- fixed retrieval of display pictures from online MSN storage.
|
||||
- fixed a problem where roaming service profile data was invalid.
|
||||
- fixed "Visit Link" context-menu icon in chat. Thanks to IRC's agostino.
|
||||
- improved Contact Added User dialog with tabs. Thanks ti Timo Tambet.
|
||||
- updated Japanese translation by Daniel E. Moctezuma.
|
||||
- updated Spanish translation by Daniel E. Moctezuma.
|
||||
- updated German translation.
|
||||
|
||||
|
||||
Changes between KMess 2.0.5 and 2.0.4:
|
||||
--------------------------------------
|
||||
|
||||
- added Chat History integration with the Chat Window, with a menu item, toolbar
|
||||
action, and a context menu item.
|
||||
- added KDE notifications for contact and group changes (Patch by Timo Tambet).
|
||||
- fixed a crash due to changes by Microsoft in how Offline Messages are sent.
|
||||
- fixed a possible crash during login.
|
||||
- fixed a crash when closing a chat window.
|
||||
- fixed logging in with long passwords (17+ characters). MSN cuts them to 16, hehehe.
|
||||
- removed all HTML from KDE notifications to fix weird text cutting problems.
|
||||
- updated French translation by Anthony Rey.
|
||||
- updated Estonian translation by Timo Tambet.
|
||||
- updated Hungarian translation by József Makay.
|
||||
- updated Traditional Chinese translation by Yen-chou Chen.
|
||||
|
||||
Changes between KMess 2.0.4 and 2.0.3:
|
||||
--------------------------------------
|
||||
|
||||
- added a tip text on the contact list's search bar (Patch by Timo Tambet).
|
||||
- added support for a new ISF-Qt feature, PNG fortification, allowing to drag
|
||||
and drop handwriting drawings into the message editor to be edited.
|
||||
- added support for notifications on the Mac.
|
||||
- added a toggle button for Now Listening to the contact list (Patch by Francesco Nwokeka).
|
||||
- added Galician translation by Indalecio Freiría Santos.
|
||||
- fixed invalid characters in contact frame tooltips.
|
||||
- fixed "Contact Added User" dialog pop-ups, appearing for already added contacts.
|
||||
- fixed the application icon resolution.
|
||||
- fixed log in failure, due to a mismanaged remote display picture reception.
|
||||
- fixed URL when retrieving display pictures from MSN.
|
||||
- fixed saving account properties.
|
||||
- fixed removal and blocking of contacts.
|
||||
- fixed saving the automatic login option.
|
||||
- fixed status changing bugs when disconnecting or waking up from sleep.
|
||||
- improved compatibility with KDE 4.5.
|
||||
- improved the Chat History dialog, now using a calendar to list dates with available chat logs.
|
||||
- improved contact list sorting, now done by status, then alphabetically (Patch by dah_ at the boards).
|
||||
- improved management of unknown contacts.
|
||||
- improved widget sizes and behavior on the contact list.
|
||||
- updated the system tray widget to the new KDE 4.3+ one.
|
||||
- updated Japanese translation by Daniel E. Moctezuma.
|
||||
- updated Dutch translation by Heimen Stoffels.
|
||||
- updated German translation by Panagiotis Papadopoulos.
|
||||
- updated Catalan translation by Adrià Arrufat.
|
||||
- updated Traditional Chinese translation by the Tryneeds-Chinese Translation Platform.
|
||||
- updated French translation by Grégory Bellier.
|
||||
- updated Brazilian Portuguese translation by Morris Arozi Moraes.
|
||||
- updated Traditional Chinese translation by Yen-chou Chen.
|
||||
|
||||
Changes between KMess 2.0.3 and 2.0.2:
|
||||
--------------------------------------
|
||||
- added ability to drag-and-drop images into display picture frames.
|
||||
- added setting friendly name and personal message by clicking on their labels in the contact list.
|
||||
- added Russian translation by Dmitriy Simbiriatin.
|
||||
- added Portuguese translation by Bruno Almeida.
|
||||
- added showing unread email count in the system tray tooltip.
|
||||
- added setting personal message using DBus.
|
||||
- fixed crash when logging in with the wrong password.
|
||||
- fixed bug causing the "Contact Added User" dialog to appear after deleting contacts.
|
||||
- fixed bug causing the chat window size to not be saved under KDE 4.4.
|
||||
- improved performance when drawing complex ink messages.
|
||||
- improved proxy support.
|
||||
- updated French translation by Grégory Bellier.
|
||||
- updated Catalan translation by Adrià Arrufat.
|
||||
- updated German translation by Panagiotis Papadopoulos.
|
||||
- updated Greek translation by Dimitrios Glentadakis.
|
||||
- updated Brazilian Portuguese translation by Morris Arozi Moraes.
|
||||
- updated Traditional Chinese translation by Yen-chou Chen.
|
||||
- updated Dutch translation by Sjors Gielen.
|
||||
- updated Dutch translation by Heimen Stoffels.
|
||||
- updated Hungarian translation by Pauli Henrik.
|
||||
- updated Spanish translation by Mauricio Muñoz Lucero.
|
||||
- updated Turkish translation by Uğur Çetin.
|
||||
- updated Estonian translation by Rivo Laks.
|
||||
- updated Traditional Chinese translation by Yen-chou Chen.
|
||||
- updated Japanese translation by Daniel E. Moctezuma.
|
||||
- updated Slovak translation by Rastislav Krupanský.
|
||||
|
||||
Changes between KMess 2.0.2 and 2.0.1:
|
||||
--------------------------------------
|
||||
- fixed a bug that was introduced just before the release of KMess 2.0.1,
|
||||
making it impossible to login twice in the same KMess session.
|
||||
- updated Japanese translation by Daniel E. Moctezuma.
|
||||
- updated Brazilian Portuguese translation by Maurício Arozi Moraes.
|
||||
|
||||
Changes between KMess 2.0.1 and 2.0:
|
||||
--------------------------------------
|
||||
- added a "Log in automatically" checkbox to the initial view (patch by Camille Begue).
|
||||
- added ability to open the chat history dialog when not connected (patch by Camille Begue).
|
||||
- added Test Server support.
|
||||
- added shortcut checking of added/edited emoticons for invalid characters.
|
||||
- added usage of smooth pixmap scaling for display pictures in the contact list.
|
||||
- added caching of scaled display pictures when painting the contact list.
|
||||
Mitigates performance hit caused by using smooth pixmap scaling.
|
||||
- added full Handwriting support, thanks to the ISF-Qt external library.
|
||||
- added Roaming content support: display picture, friendly name and personal
|
||||
message are now synchronized with those used in Messenger.
|
||||
- added chat window buttons to quickly change message font and color.
|
||||
- added ability to drag-and-drop an image from KSnapshot (or any drag'n'drop-enabled
|
||||
image application) to a chat, to send it.
|
||||
- added preview of emoticons in emoticon settings page.
|
||||
- fixed improper scaling of the display picture in the chat window and contact list.
|
||||
- fixed maximum emoticon shortcut length.
|
||||
- fixed "close all tabs" dialog: Don't show it when the KDE session is closing.
|
||||
- fixed a crash in NetworkWindow when receiving P2P messages shorter than
|
||||
the usual.
|
||||
- fixed an overzealousness of the IRC-like commands parser.
|
||||
- fixed redrawing of emoticons in the contact list and friendly name label,
|
||||
when emoticon theme is changed.
|
||||
- fixed display picture cache clearing, when pictures is changed.
|
||||
- fixed minimum size of the message editor to one line of text.
|
||||
- fixed appearance of the transfers window: it now appears in the background
|
||||
instead of minimized.
|
||||
- fixed occasional crash when canceling a drag and drop operation on the chat window.
|
||||
- fixed contact notifications, which were not shown for contacts going online.
|
||||
- fixed contact notification spam on login.
|
||||
- fixed a crash when connecting with the fallback HTTP connection (used behind
|
||||
firewalls, proxies et cetera).
|
||||
- fixed KDE 4.3.2 bug causing a crash when closing account settings.
|
||||
- fixed losing the friendly name on login.
|
||||
- removed small delay when auto-connecting on startup.
|
||||
- removed in-place editing of emoticons, now it's only done by AddEmoticonDialog.
|
||||
- removed giflib dependency, as it is now required by ISF-Qt.
|
||||
- updated Brazilian Portuguese translation by Maurício Arozi Moraes.
|
||||
- updated Catalan translation by Adrià Arrufat.
|
||||
- updated Dutch translation by Sjors Gielen.
|
||||
- updated Estonian translation by Lauri Võsandi, Mihkel Tõnnov and Rivo Laks.
|
||||
- updated Finnish translation by Marko Mäkilä.
|
||||
- updated French translation by Émeric Dupont.
|
||||
- updated German translation by Panagiotis Papadopoulos.
|
||||
- updated Greek translation by George Kiagiadakis.
|
||||
- updated Hungarian translation by Pauli Henrik.
|
||||
- updated Japanese translation by Daniel E. Moctezuma.
|
||||
- updated Simplified Chinese translation by Cheng Yang.
|
||||
- updated Spanish translation by Guillermo Arana.
|
||||
- updated Turkish translation by Uğur Çetin.
|
||||
|
||||
Changes between KMess 2.0 and 2.0-rc1:
|
||||
--------------------------------------
|
||||
- added back meaningful error messages for unsupported applications.
|
||||
- fixed crashing when transferring display pictures.
|
||||
- fixed a small bug in group sorting.
|
||||
- improved further the RTL languages support.
|
||||
- updated Arabic translation by Ma'moun Diraneyya.
|
||||
- updated German translation by Panagiotis Papadopoulos.
|
||||
- updated Simplified Chinese translation by Cheng Yang.
|
||||
|
||||
Changes between KMess 2.0-rc1 and 2.0-beta2:
|
||||
--------------------------------------
|
||||
- added Japanese translation by Daniel E. Moctezuma.
|
||||
- added display of emoticons in presence messages.
|
||||
- added status restoring on reconnection.
|
||||
- added fading effect for long text labels and the contact list.
|
||||
- changed the image used for unknown display pictures.
|
||||
- changed the application windows icons.
|
||||
- changed the system tray icon with one showing both the bird and the current
|
||||
status.
|
||||
- fixed a crash triggered by clients aborting while we're sending data.
|
||||
- fixed appearance when using right-to-Left languages, like Arabic.
|
||||
- fixed bug preventing temporary accounts to be correctly cleaned up.
|
||||
- fixed file selection errors in chat logging.
|
||||
- fixed newly added contacts appearing as not having added the user in their
|
||||
list.
|
||||
- improved appearance of the contact list when antialiasing is enabled.
|
||||
- removed all experimental features which could not be finished in time.
|
||||
- updated Arabic translation by Ma'moun Diraneyya.
|
||||
- updated Brazilian Portuguese translation by Maurício Arozi Moraes and Sergio
|
||||
Rafael Lemke.
|
||||
- updated Catalan translation by Adrià Arrufat.
|
||||
- updated Finnish translation by Antony Hussi.
|
||||
- updated Dutch translation by Sander Pientka and Sjors Gielen.
|
||||
- updated French translation by Scias.
|
||||
- updated German translation by Panagiotis Papadopoulos.
|
||||
- updated Greek translation by Dimitrios Glentadakis.
|
||||
- updated Hungarian translation by Pauli Henrik.
|
||||
- updated Italian translation by Valerio Pilo.
|
||||
- updated Slovak translation by Rastislav Krupanský.
|
||||
- updated Spanish translation by Mauricio Muñoz Lucero.
|
||||
- updated Simplified Chinese translation by Cheng Yang.
|
||||
- updated Traditional Chinese translation by Yen-chou Chen.
|
||||
|
||||
Changes between KMess 2.0-beta2 and 2.0-beta1:
|
||||
--------------------------------------
|
||||
- completed drag&drop support.
|
||||
- fixed quick retype.
|
||||
- fixed winks playing and naming support.
|
||||
- fixed disconnections after many hours of use.
|
||||
- fixed losing KDE Wallet passwords.
|
||||
- fixed typing notifications not appearing in WLM 2009.
|
||||
- fixed long words breaking was breaking copy-pastes.
|
||||
- fixed weird characters which were breaking the chat styles.
|
||||
- fixed resending messages already sent as offline messages.
|
||||
- fixed searching for offline contacts.
|
||||
- fixed time of arrival of offline messages.
|
||||
- fixed new chat windows or tabs opened by contacts sometimes stole focus.
|
||||
- fixed contact list group sorting.
|
||||
- fixed many memory leaks.
|
||||
- fixed overflowing contact list background picture and color.
|
||||
- improved the Chat History dialog and its integration with KMess.
|
||||
- improved drag and drop support in contact list.
|
||||
- improved the color of the less important contact status messages in chat.
|
||||
- improved client detection support.
|
||||
- improved handwriting message sending.
|
||||
- improved the file transfers window's behavior.
|
||||
- improved chat session management.
|
||||
- improved the LikeBack buttons bar.
|
||||
- updated English handbook.
|
||||
- updated Arabic translation by Ma'moun Diraneyya.
|
||||
- updated Brazilian Portuguese translation by Sergio Rafael Lemke.
|
||||
- updated Brazilian Portuguese translation by Maurício Arozi Moraes.
|
||||
- updated Catalan translation by Adrià Arrufat.
|
||||
- updated Dutch translation by Heimen Stoffels.
|
||||
- updated Dutch translation by Sander Pientka.
|
||||
- updated Finnish translation by Antony Hussi.
|
||||
- updated French translation by Barthe Guillaume.
|
||||
- updated French translation by Scias.
|
||||
- updated German translation by Panagiotis Papadopoulos.
|
||||
- updated Greek translation by Dimitrios Glentadakis.
|
||||
- updated Italian translation by Andrea Decorte.
|
||||
- updated Spanish translation by Manuel Ramírez.
|
||||
- updated Spanish translation by Mauricio Muñoz Lucero.
|
||||
- updated Traditional Chinese translation by Yen-chou Chen.
|
||||
- updated Traditional Chinese translation by the Tryneeds-Chinese Translation Platform.
|
||||
|
||||
Changes between KMess 2.0-beta1 and 2.0-alpha2:
|
||||
--------------------------------------
|
||||
- added support to start chats while you're invisible.
|
||||
- added automatic reconnection after unwanted disconnections.
|
||||
- added IRC like command handling in the chat window (/away, etc..)
|
||||
- added 'Send with KMess' menu item to Konqueror context menu's.
|
||||
- added verbose status message when KMess fallbacks to the HTTP connection.
|
||||
- added contact emoticon blacklist, to block annoying custom emoticons from contacts.
|
||||
- added Likeback support to collect user feedback, ported from Basket of KDE 3.
|
||||
- added support to configure the toolbars and menus in the chat window.
|
||||
- added contact list export dialog.
|
||||
- added context menu to the contact list, to open the contact menu with the left mouse too.
|
||||
- added confirmation dialogs when the menu gets hidden with Ctrl+M.
|
||||
- added confirmation dialogs when deleting custom emoticons.
|
||||
- added confirmation dialogs when deleting old display pictures.
|
||||
- added filtering options to the file transfer window, to show downloads/uploads only.
|
||||
- added Greek translation by Panagiotis Papadopoulos.
|
||||
- added Serbian translation by Zoran Milovanović.
|
||||
- added Slovak translation by Rastislav Krupanský.
|
||||
- improved protocol support, upgraded the server core protocol to MSNP15.
|
||||
- improved user interface of the main login dialog, added links.
|
||||
- improved overall user interface with further fine tuning.
|
||||
- improved KDE session restoring; KMess will reconnect if you were connected at logout.
|
||||
- improved chat notifications to be compatible with the new Plasma notifications of KDE 4.2.
|
||||
- improved emoticon panels; users can choose between message editors or permanent sidebar panels.
|
||||
- improved painting controls for the Ink handwriting.
|
||||
- improved chat logging support (support XML, TXT output) in preparation of a chat logging browser.
|
||||
- improved chat autoscroll feature.
|
||||
- improved chat window status bar.
|
||||
- improved several English messages in the user interface.
|
||||
- improved reporting of error messages, using notifications for warnings.
|
||||
- improved cmake detection of libqca2-plugin-ossl package for Ubuntu.
|
||||
- changed contact sidebar, clicking the contact always shows the context menu.
|
||||
- fixed multiple bugs with automatic reconnecting.
|
||||
- fixed blocked login view when there is no network connection.
|
||||
- fixed saving passwords when the 'save password' account option is off.
|
||||
- fixed saving passwords when KWallet is not supported, or the user refused to use it.
|
||||
- fixed contact list group expanding/collapsing with incremental search.
|
||||
- fixed contact list sorting and grouping.
|
||||
- fixed context menu to chat with a blocked/offline/allowed contact.
|
||||
- fixed double error box when adding a non-existing contact to the list.
|
||||
- fixed chat window focus issues.
|
||||
- fixed chat tabs for contacts with HTML characters in their name.
|
||||
- fixed chat tabs for contacts with long names.
|
||||
- fixed chat tabs being displayed when tabbed chatting is disabled.
|
||||
- fixed chat messages displayed in the wrong tab.
|
||||
- fixed chat message wordwrapping for long unbreakable words.
|
||||
- fixed chat spell checker setting, the setting was not remembered correctly.
|
||||
- fixed typing messages for tabbed chats.
|
||||
- fixed adding custom emoticons from the chat window sidebar.
|
||||
- fixed and improved shortcut keys to switch between chat tabs, start a chat, etc...
|
||||
- fixed layouting issue in the Classic Compact chat style.
|
||||
- fixed displaying a 'contact left chat' message twice if there was no conversation in between.
|
||||
- fixed unclickable display picture in the chat if the contact is offline.
|
||||
- fixed invalid dates being displayed for contact properties.
|
||||
- fixed updating the chat windows after an emoticon theme is changed.
|
||||
- fixed updating the chat style preview when "Group follow up messages" is toggled.
|
||||
- fixed start folder of the file browser for account pictures.
|
||||
- fixed displaying the filename for files transferred with the old MSNFTP protocol.
|
||||
- fixed cancel link not being removed when a file transfer invitation hit the timeout
|
||||
- fixed notification default settings.
|
||||
- fixed missing nudge event in the notification settings.
|
||||
- fixed missing detection of "Windows Media Center" in the list of known MSN clients.
|
||||
- fixed now listening icon, using a common icon now.
|
||||
- fixed now listening support, added support for all MPris-compatible players.
|
||||
- fixed inconsistent order of the artist and track title in now Listening information.
|
||||
- fixed position of the red circle in the system tray screenshot.
|
||||
- fixed protocol support of group chats.
|
||||
- fixed protocol support of the MSN-HTTP fallback.
|
||||
- fixed protocol support of MSNP2P by Windows Live Messenger 2009, should fix picture/emoticon transfers.
|
||||
- fixed protocol support of MSN Plus! markup, displaying contact names incorrectly at various places.
|
||||
- fixed protocol support for resetting your Personal Message, was not recognized by Windows Live Messenger 2009.
|
||||
- fixed displaying of Offline-IM messages, wrong sender was displayed when receiving many messages.
|
||||
- fixed error handling for SOAP protocol errors.
|
||||
- fixed "view profile" pages with updated MSN website.
|
||||
- fixed crashes in the contact list model code.
|
||||
- fixed a crash when receiving MSN Plus! predefined messages.
|
||||
- fixed a crash with receiving files with the old MSNFTP protocol.
|
||||
- fixed an assertion crashing KMess caused by read-only configuration files with a KDE 4 debug build.
|
||||
- fixed compiling issues with KDE 4.0, 'KDE on Windows' and MinGW32.
|
||||
- fixed compiler warnings.
|
||||
- fixed adblock icons showing up by the embedded KHTMLPart component in the chat window.
|
||||
- fixed network code to use QNetworkAccessManager, this should give us proper Proxy support.
|
||||
- fixed browser invocation code, using KToolInvocation to have instant invocation.
|
||||
- fixed issues with network detection if Solid/NetworkManager is not available.
|
||||
- fixed removed translator name entries in the .po files; some languages appear to have translated names.
|
||||
- removed custom notification settings in favour of KNotify settings in the global settings panel.
|
||||
- updated English handbook by Heimen Stoffels.
|
||||
- updated Brazilian Portuguese translation by Leonel Freire.
|
||||
- updated Brazilian Portuguese translation by Sergio Rafael Lemke.
|
||||
- updated Dutch translation by Elve and Sander Pientka.
|
||||
- updated French translation by Barthe Guillaume.
|
||||
- updated German translation by Panagiotis Papadopoulos.
|
||||
- updated Greek translation by Panagiotis Papadopoulos, Dimitrios Glentadakis.
|
||||
- updated Hungarian translation by Pauli Henrik.
|
||||
- updated Italian translation.
|
||||
- updated Norsk Bokmal translation by Øyvind Sæther.
|
||||
- updated Simplified Chinese translation by Cheng Yang.
|
||||
- updated Spanish translation by Alexis Daniel Medina Medina, Juan Pablo González Tognarelli.
|
||||
- updated Swedish translation by Mattias Newzella.
|
||||
- updated Traditional Chinese translation by Yen-chou Chen, the Tryneeds-Chinese Translation Platform.
|
||||
|
||||
|
||||
Changes between KMess 2.0-alpha2 and 2.0-alpha:
|
||||
--------------------------------------
|
||||
- added connecting over HTTP, to deal with corporate firewalls which only allow connections to browse the web.
|
||||
- added tabbed chatting support!
|
||||
- added offline messaging functionality.
|
||||
- added the support to send ink messages.
|
||||
- added the support to send huge messages.
|
||||
- added full MSN Plus text-formatting support in chat and in the contact list.
|
||||
- added application-wide settings dialog, which includes an account manager.
|
||||
- added option to choose the interval of ports used for fast file transfers.
|
||||
- added option to change the groups of a contact from the contact's properties dialog.
|
||||
- added option to choose a previously set display picture for the account.
|
||||
- added option to choose the dimensions of the pictures in the contact list.
|
||||
- added option to specify where received files will be downloaded to.
|
||||
- added option to display all offline contacts in a single group ("mixed" group mode).
|
||||
- added option to hide currently empty groups.
|
||||
- added option to block notifications when the status is set to Busy.
|
||||
- added option to disable displaying of received winks.
|
||||
- added option to choose a default directory where to put all received files.
|
||||
- added option to choose the browser and e-mail client used to open Web links.
|
||||
- added copy menu entry for the music a contact is listening.
|
||||
- added a dark chat style suitable for use with dark KDE color themes.
|
||||
- added ability to keep short notes for each contact.
|
||||
- added a search box in the contact list.
|
||||
- added an history box in the contact list, which displays recent contact events.
|
||||
- added a close button on the notification popups (for people who don't know about right-click to close).
|
||||
- added a DBus remote control interface, to enable interaction with KMess from other applications.
|
||||
- added KWallet support to store in a secure way the passwords of the saved accounts.
|
||||
- added detection of network connection availability, using Solid.
|
||||
- added tracking of the 'last seen' and 'last chat message' dates for a contact.
|
||||
- improved reporting of error messages.
|
||||
- improved the user interface of many dialogs.
|
||||
- improved the Now Playing support with Amarok 2 support. Amarok 1.4 is still supported.
|
||||
- improved the file transfer messages within the chat.
|
||||
- improved the auto-message feature, displays the automessage more often.
|
||||
- fixed displaying old contact names and no personal messages after login.
|
||||
- fixed loading emoticon themes containing non-PNG picture files.
|
||||
- fixed compatibility and styling issues with dark KDE color schemes.
|
||||
|
||||
|
||||
Changes between KMess 2.0-alpha and 1.5.1:
|
||||
--------------------------------------
|
||||
- ported to KDE 4.
|
||||
- added support to receive ink messages.
|
||||
- added ability to re-use previously opened chat windows after reconnecting.
|
||||
- added a log for contact logins and logouts at the bottom of the contact list
|
||||
- added copy options for name, email, personal message, and links to right-click menu of contacts.
|
||||
- added fast-retype of previous sentences using Ctrl+Up.
|
||||
- added group selection box to the "add contact" dialog.
|
||||
- improved overall user interface.
|
||||
- improved client name detection of contacts.
|
||||
- improved contact properties dialog
|
||||
- fixed font color chooser in the chat window, settings could be lost.
|
||||
- fixed contact re-invites (chat resumes) to the chat when the first attempt failed.
|
||||
|
||||
|
||||
Changes between KMess 1.5.2 and 1.5.1:
|
||||
--------------------------------------
|
||||
- added a warning message if a file transfer is started when a non-P2P capable client.
|
||||
- fixed displaying passwords in the debug window, make it easier to share debug logs.
|
||||
- fixed displaying old contact names after login.
|
||||
- fixed enabled auto-away settings if the XScreenSaver extension was not found.
|
||||
- fixed a bug which caused a disconnection when setting an extremely long nickname.
|
||||
- fixed a bug which discarded saved settings for an account when quitting and when just disconnecting.
|
||||
- fixed a bug which prevented non-PNG emoticon themes from loading.
|
||||
- fixed a crash in debug builds for unknown contacts.
|
||||
- fixed a possible crash in the passive popups.
|
||||
- fixed a potential crash in background picture transfers (unlikely to occur).
|
||||
- fixed a potential passport login problem, not seen yet unfortunately.
|
||||
- fixed compiler warning on newer GCC.
|
||||
- updated Brazilian Portuguese translation, made by Darlan Campos.
|
||||
- updated Simplified Chinese translation by Liu Sizhuang.
|
||||
|
||||
|
||||
Changes between KMess 1.5.1 and 1.5:
|
||||
--------------------------------------
|
||||
- added checking if a screensaver or fullscreen app is running, and disable notification popups.
|
||||
- added option to show contact display pictures in the contact list.
|
||||
- added spell checker to the chat window, its option is in the Settings menu.
|
||||
- added a contact list popup text showing which MSN client your contacts use.
|
||||
- added a little screenshot of the tray icon area when closing KMess to tray for the first time, to help finding where it is.
|
||||
- added ability to manually select the Idle MSN status.
|
||||
- added a warning message for broken SOCKS implementations which could cause KMess to freeze.
|
||||
- fixed selecting a picture in the Autopackage version, and KDE 3.2 / KDE 3.3 installations.
|
||||
- fixed a possible freeze, could only happen in developer builds (--enable-debug-output).
|
||||
- fixed focus of typing area when reactivating the chat window.
|
||||
- fixed the chat window title, which could continue blinking after its window had been given focus.
|
||||
- updated Danish translation by Pascal d'Hermilly
|
||||
- updated Traditional Chinese translation by Yen-chou Chen.
|
||||
|
||||
|
||||
Changes between KMess 1.5 and 1.5pre2:
|
||||
--------------------------------------
|
||||
- added support to send custom emoticons.
|
||||
- added support for P4-Context field, used for by plugins of the official client for contact aliases (i.e. Xiaoi's Qun). Patch by LiuSizhuang.
|
||||
- added initial status chooser at login, and in the account settings.
|
||||
- added drag&drop for files in the chat window to send files.
|
||||
- added internationalization support to the service status URL.
|
||||
- added automatic download of new display pictures in the background.
|
||||
- added option to crop a picture before using it as display picture.
|
||||
- added zoom buttons to scale the chat window text.
|
||||
- added context menu to open and copy links in chat window.
|
||||
- added "remove and block" option in the contact remove dialog.
|
||||
- added dialog to confirm overwrite when saving a chat to file.
|
||||
- added dialog to confirm overwrite when renaming custom emoticons.
|
||||
- added auto clean up of the configuration files for outdated info.
|
||||
- added keepalive support to see when a contact really closed the chat window, or the chat went idle.
|
||||
- added a tooltip to the system tray, showing current name and status.
|
||||
- added warning message when chatlogs can't be saved (e.g. wrong permissions).
|
||||
- added status message upon server shutdown for maintenance notification.
|
||||
- added notification balloons for contact typing and contact status changes.
|
||||
- added a workaround for NAT timeouts when behind a "black hole" router.
|
||||
- changed default chat style to "Fresh", old style is renamed to "Classic".
|
||||
- improved notification balloons, completely new implementation using more standard KDE functionality.
|
||||
- improved notifications with correct balloons when transferring files and receiving winks and nudges.
|
||||
- improved taskbar notification of new messages, added asterisk in front.
|
||||
- improved "Remember this profile" checkbox, it's consistent with the selected account.
|
||||
- improved error messages for adding invalid MSN accounts.
|
||||
- improved memory usage by reducing dependencies on QWidget.
|
||||
- improved memory usage when a chat is started to download a display picture in the background.
|
||||
- improved tests for invalid e-mail addresses when adding a new contacts.
|
||||
- improved account settings dialog behavior when adding invalid email addresses.
|
||||
- improved chat window appearance, with a new right-click menu for the listed contacts, and a resizable message box.
|
||||
- improved file transfer speed over high speed links.
|
||||
- improved saving of settings; save directly, not only when KMess quits.
|
||||
- improved login handling to Passport 3.0 webservices.
|
||||
- improved the user manual, reorganized completely.
|
||||
- improved developer API documentation, especially the networking classes.
|
||||
- improved transfer window's reliability.
|
||||
- prepared preliminary support for tabbed chats.
|
||||
- fixed multiple problems with broken file/picture transfers, especially over slow links or slow systems.
|
||||
- fixed replacing of custom emoticon placeholders which contain <, > or & characters, or quotes.
|
||||
- fixed support for default messages from MSN Plus!.
|
||||
- fixed keyboard shortcut to insert new lines in the chat messages.
|
||||
- fixed keyboard shortcut to copy text in the chat window.
|
||||
- fixed background rendering in the contact list.
|
||||
- fixed now playing icon, previous one was SUSE-specific.
|
||||
- fixed Hotmail folders opening in wrong browser.
|
||||
- fixed login selectbox, display last selected account at logout.
|
||||
- fixed opening the main window when KMess is started with KDE.
|
||||
- fixed missing emoticon example pictures next to the emoticons checkbox.
|
||||
- fixed settings dialog height, was too big for 800x600 displays.
|
||||
- fixed settings of notification balloons, balloons can be disabled again.
|
||||
- fixed emoticon theme settings previews, some themes lacked a preview image.
|
||||
- fixed links to account registration and verification in the settings dialog.
|
||||
- fixed maximum length of displayed messages in the message balloons.
|
||||
- fixed notification balloons text with special messages, like nudges or file transfers.
|
||||
- fixed resuming chats when there was no connection to switchboard (gray display pictures in the chat).
|
||||
- fixed raising existing chats when trying to open one from the contact list.
|
||||
- fixed duplicate chat windows when clicking repeatedly on a contact in the list.
|
||||
- fixed reuse of chat windows to use expected behavour.
|
||||
- fixed subtle GUI flashing in the chat window for the contact picture.
|
||||
- fixed changing an accounts email, it did not get reflected in the initial login UI and the menu's.
|
||||
- fixed personal message being sent when the main window lost focus, not only when we confirm its change.
|
||||
- fixed non working 'open inbox/send mail' links for non-Hotmail accounts, which now open the mail account specified in the settings.
|
||||
- fixed broken contact images which don't get updated; added data hash check.
|
||||
- fixed connection timeout error with downloading offline-im messages.
|
||||
- fixed connection timeout issues during login for slow connections.
|
||||
- fixed incorrect "transfer failed" message when sending files to Mercury Messenger.
|
||||
- fixed internal protocol message to withdraw a started file transfer (not visible with WLM).
|
||||
- fixed internal protocol encoding with commands which update groups in the contact list.
|
||||
- fixed internal protocol handling to allow MSNSLP ACK messages.
|
||||
- fixed invalid image when contacts don't have a display picture or it's not valid anymore.
|
||||
- fixed unwanted destroying of the direct connection if a switchboard connection restarts.
|
||||
- fixed handling of direct connection write errors, revering to the switchboard.
|
||||
- fixed unwanted "session is cancelled" messages after completing a file transfer.
|
||||
- fixed issues with aborting invitations when a chat window closes.
|
||||
- fixed blocking KMess user interface with account settings dialog.
|
||||
- fixed blocking user interface when the network is down or slow during the login.
|
||||
- fixed 'eventsrc' file not being found by KMess.
|
||||
- fixed 'eventsrc' warning, path should be 'kmess/eventsrc'.
|
||||
- fixed compiling in Mac OS X (fink environment with KDE3/X11).
|
||||
- fixed a series of potential crashes with closing the chat window.
|
||||
- fixed a crash when closing the application.
|
||||
- fixed a crash when downloading offline-im messages.
|
||||
- fixed a crash when the contact was removed with it's chat window open.
|
||||
- fixed a crash when the contact cancels a file transfer and the user is still choosing a destination folder.
|
||||
- fixed a crash when the direct connection could not be initialized correctly.
|
||||
- fixed a crash when a contact changes status but its chatwindow is not yet loaded.
|
||||
- fixed a freeze when receiving custom emoticons from Kopete.
|
||||
- fixed a freeze when starting/resuming multiple chats at the same time.
|
||||
- fixed a freeze when there are too many unacked P2P messages in a chat.
|
||||
- fixed a freeze when starting a file transfer with direct connections.
|
||||
- fixed a possible freeze when inserting emoticons into the messages.
|
||||
- fixed memory leaks in the chat window using Valgrind.
|
||||
- fixed many compiler warnings.
|
||||
- fixed word puzzles in translations with notification balloons.
|
||||
- fixed translations for the Transfer Window messages.
|
||||
- removed custom proxy support in favor of the global KDE settings.
|
||||
- reduced the time KMess waits before detecting a connection error.
|
||||
- updated Arabic translation by Youssef Chahibi.
|
||||
- updated Danish translation by Pascal d'Hermilly.
|
||||
- updated Dutch translation by Jaap Woldringh.
|
||||
- updated Finnish translation by Jussi Timperi.
|
||||
- updated French translation by Andrea Blankenstijn and Choplair.
|
||||
- updated German translation.
|
||||
- updated Hungarian translation by Páder Rezsõ.
|
||||
- updated Italian translation by Vincento Reale.
|
||||
- updated Spanish translation by Christian Kaiser.
|
||||
- updated Swedish translation by Christian Lundgren.
|
||||
- updated Thai translation by Rachan Hongpairote.
|
||||
- updated Turkish translation by Uğur Çetin.
|
||||
- updated Simplified Chinese translation by Liu Sizhuang.
|
||||
- updated Traditional Chinese translation by Yen-chou Chen.
|
||||
|
||||
|
||||
Changes between KMess 1.5pre2 and 1.5pre1:
|
||||
--------------------------------------
|
||||
- added "now playing" support, both sending and receiving.
|
||||
- added file transfer preview support, both sending and receiving.
|
||||
- added x-clientcaps message for third party client exchange.
|
||||
- added option to disable the nudge shaking effect, completing the nudge support.
|
||||
- added proper error message for webcam invitations, which are currently not supported yet.
|
||||
- added support for an second incoming file transfer invitation to become client instead of server.
|
||||
- added translation support for chat styles, fixed untranslated "says:" message in the chat window.
|
||||
- added emoticon image conversion to the the personal status message.
|
||||
- added warning message when KMess is installed in a folder where it can't find it's resources.
|
||||
- added warning dialog when KMess can't find it's eventsrc file to handle notifications.
|
||||
- improved visual *bold*, /italic/ and _underline_ effects, they don't hide the ASCII codes anymore.
|
||||
- improved account menu's, display account handle instead of long friendly name.
|
||||
- improved compatibility with Windows Live Messenger's protocol for client-to-client invitations.
|
||||
- restored context menu in the chat window.
|
||||
- fixed file transfers, a timer was not stopped to detect a direct connection timeout.
|
||||
- fixed crash when a timeout occurs during a direct file transfer.
|
||||
- fixed login problems with "restricted passport accounts".
|
||||
- fixed image width/height of received custom emoticons.
|
||||
- fixed link parsing, adding http:// before www. URL's, and fixed geek-style links (links without www. or http://).
|
||||
- fixed unwanted resizing of the chat window when the statusbar text didn't fit.
|
||||
- fixed unwanted resizing of the chat window sidebar.
|
||||
- fixed contact window alignment, right-to-left names aligned randomly.
|
||||
- fixed contact window updating when a group was succesfuly renamed.
|
||||
- fixed lost personal status message when moving contacts.
|
||||
- fixed own personal status message, it could literally become "<Enter your personal message here>".
|
||||
- fixed missing right-to-left flag in sent chat messages.
|
||||
- fixed message "<handle> has left the chat", displays contact name now.
|
||||
- fixed missing contact name when adding new contacts.
|
||||
- fixed missing "overwrite file" question when saving sent files.
|
||||
- fixed tab order of the 'chatting' options panel.
|
||||
- fixed revoking of sent invitations when a timeout occurred.
|
||||
- fixed typing notification, these were not sent instantly when the user continues to type after sending a message.
|
||||
- fixed emoticons support for KDE 3.3 and below.
|
||||
- fixed emoticons installation with the installer.
|
||||
- fixed compiling with automake 2.10.
|
||||
- fixed compiling of the RPM with patch level KDE versions (e.g. 3.1-10).
|
||||
- fixed character encoding problem in the desktop file.
|
||||
- fixed filename of Estonian translation.
|
||||
- updated website address, moved to www.kmess.org.
|
||||
- updated Dutch translation by Jaap Woldringh.
|
||||
- updated Danish translation by Pascal d'Hermilly.
|
||||
- updated German translation.
|
||||
- updated Finnish translation by Joonas Niilola.
|
||||
- updated Hungarian translation by Páder Rezsõ.
|
||||
- updated Italian translation by Valerio Pilo.
|
||||
- updated Spanish translation by Jaume Corbí.
|
||||
- updated Turkish translation by Uğur Çetin.
|
||||
- updated Traditional Chinese translation, by Yen-chou Chen.
|
||||
- added Hungarian translation by Páder Rezsõ.
|
||||
- Removed ASL and unhappy icon because these are no longer used in Windows Live Messenger.
|
||||
|
||||
|
||||
|
||||
Changes between KMess 1.5pre1 and 1.4.3:
|
||||
----------------------------------------
|
||||
- added direct connection support, faster file transfers.
|
||||
- added chat message styles. Styles can use all CSS2 features supported by KHTML.
|
||||
- added emoticon themes to the chat window. They can be switched on-the-fly.
|
||||
- added offline-im support (receiving only).
|
||||
- added custom emoticon support (receiving only).
|
||||
- added winks support (receiving only).
|
||||
- added nudge support.
|
||||
- added personal status message support.
|
||||
- added grouping of chat messages from the same contact.
|
||||
- added alt tags to all emoticons, for easy copy-pasting.
|
||||
- added a link to "register.passport.net" for creating a new account.
|
||||
- added support for file transfers between hosts of the same LAN.
|
||||
- added support for parallel transfers over the same direct connection.
|
||||
- added support for relaying invitations to another swichboard connection.
|
||||
- added option to upgrade a temporary/guest account permanently (when "Remember this profile" was left unchecked).
|
||||
- added detection of unverified passport e-mail adresses.
|
||||
- added translation for Finnish.
|
||||
- added Doxygen configuration to generate API docs.
|
||||
- upgraded client-server protocol to MSNP12 (MSN Messenger 7.5).
|
||||
- upgraded client-to-client protocol to MSNC5 (MSN Messenger 7.5).
|
||||
- improved login dialog, replacing the confusing profile box.
|
||||
- improved main window interface, added contact picture to main window.
|
||||
- improved chat window interface, added sidebar for contacts and emoticons.
|
||||
- improved settings dialog, added widgets of the "display pic" tab to the "accounts" tab.
|
||||
- improved detection of login errors for problems with the MSN servers.
|
||||
- improved chat message link detection with support for e-mail addresses and sftp:// links
|
||||
and "geek-style" urls (urls without a http:// or www prefix, like "slashdot.org").
|
||||
- improved performance for accounts with large contact lists.
|
||||
- improved "connection timeout" message, with suggestions to "check the Internet connection and MSN service status".
|
||||
- improved support for temporary/guest accounts (e.g. for internet cafe usage or friends visiting).
|
||||
- improved right-to-left language support, chat messages are reversed in the same way 'kmess --reverse' changes the GUI.
|
||||
- changed chat window title, displaying the contact name before the "KMess" part.
|
||||
- changed emoticon size, emoticons are displayed at their real size instead of being scaled.
|
||||
- fixed annoying error messages with picture transfers, only displayed in the console now.
|
||||
- fixed repeatedly displaying "this contact is offline" warnings while typing a message.
|
||||
- fixed unwanted saving of the contact list for "guest accounts", this was overlooked by a bugfix of 1.4.
|
||||
- fixed minor issues that occurred when the chat connection is established but the invited contacts have not entered the chat yet.
|
||||
- fixed handling of unexpected disconnections by the server, contactlist was not saved and reset, invitations were not aborted.
|
||||
- fixed unwanted "Connection timed out" message when it took more then one minute to authenticate and download the contact list.
|
||||
- fixed handling of connection errors, no error message was displayed except for connection timeouts.
|
||||
- fixed closing the connection when 3 pings are missed.
|
||||
- fixed detection of cancelled file transfers.
|
||||
- fixed cancelling of file transfer invitations before the contact accepted.
|
||||
- fixed cancelling of file transfer sessions by the one who didn't start the transfer.
|
||||
- fixed display problems with dark color schemes.
|
||||
- fixed parsing of chat messages containing both emoticons and hyperlinks.
|
||||
- fixed login from main window, no longer creates a new account by default.
|
||||
- fixed hanging user interface during file transfers invitations.
|
||||
- fixed small memory leak, chat invitation was not removed.
|
||||
- fixed title of the "save" menu item in the chat window.
|
||||
- fixed error message for third-party "text/x-keepalive" message.
|
||||
- fixed "&Verdana" font setting in chat messages. This was addressed in KMess 1.4,
|
||||
but it could still appear if you never changed font settings.
|
||||
- fixed font size of font selection buttons, as the font size is not used by the msn protocol.
|
||||
- fixed race condition that could make KMess crash when a chat window was closed while a contact was leaving or typing.
|
||||
- fixed overwriting chat logs when the conversation is restarted within the same minute.
|
||||
- fixed saving settings of the main window menu when disconnecting/switching accounts.
|
||||
- fixed e-mail notification settings, gray out options if user is not logged in with a Hotmail account.
|
||||
- fixed file chooser path for display pictures, in SUSE it opened /etc/opt/kde instead of /opt/kde3
|
||||
- fixed translation of Danish, renamed from "dk.po" to "da.po".
|
||||
- fixed right-to-left support for translated notification/event/error messages in the chat window.
|
||||
- updated Turkish translation, by Uğur Çetin.
|
||||
- removed support for Qt 3.1 due the use of the QToolbox widget in the chat windows.
|
||||
|
||||
|
||||
|
||||
Changes between KMess 1.4.3 and 1.4.2:
|
||||
--------------------------------------
|
||||
- fixed a crash occuring when resuming a chat.
|
||||
- fixed a crash at quit, caused in ContactAction disconnect code.
|
||||
- fixed compilation error for KDE 3.5.1 (KURLLabel::setSizePolicy() API changed).
|
||||
- fixed receiving files from Mercury Messenger, KMess responsed with an incorrect Content-Type field.
|
||||
- fixed .Net messenger service status URL (was changed again).
|
||||
- fixed two issues with certain unexpected MSNP2P packets:
|
||||
- Bot2K3 4.1 sends the first ACK without flags.
|
||||
- Encarta Instant Answers sends the data preparation message with the data flag set.
|
||||
- fixed missing MSNP2P ack packets, accidently emulated a bug of MSN 7.0.
|
||||
- fixed chat messages with links and emoticons (this is only a temporary fix)
|
||||
- This fix disables emoticons in a chat message when there are links in the message too.
|
||||
- As of 1.5 we can include a better the message parser/formatter which handles emoticons+links the right way.
|
||||
- removed /debian folder as requested by Debian packagers (KMess is in Debian unstable now).
|
||||
- removed --enable-phone, option is still not fully operational (needs to be replaced with libkcall).
|
||||
- changed chat window statusbar to show by default, so it's more obvious why the contact picture lights up.
|
||||
- added detection of https:// links
|
||||
- added the (0) symbol for the clock emoticon.
|
||||
- added contact status and picture to contact list tooltip.
|
||||
|
||||
|
||||
|
||||
Changes between KMess 1.4.2 and 1.4.1:
|
||||
--------------------------------------
|
||||
- correctly merged the patches of KMess 1.4.1 this time (sorry!)
|
||||
- fixed the font selection buttons in the settings panel.
|
||||
- fixed a problem with new contacts adding you while you're online.
|
||||
- fixed a problem with rpm building as root in SuSE (KDE not in $PATH).
|
||||
- fixed a problem and crash with display pictures when the contact has none.
|
||||
- fixed a crash during KMess quit, contacts were unloaded incorrectly.
|
||||
- fixed a crash after disabling the display picture.
|
||||
- fixed a crash after closing the chat session with active invitations.
|
||||
- added translation for Slovenian.
|
||||
|
||||
|
||||
|
||||
Changes between KMess 1.4.1 and 1.4:
|
||||
------------------------------------
|
||||
- fixed a crash during chat with MSN Messenger 7.5 (also fixes picture transfer).
|
||||
- fixed a crash during chat with contacts that are not on your list.
|
||||
|
||||
|
||||
|
||||
Changes between KMess 1.4 and 1.4pre1:
|
||||
--------------------------------------
|
||||
|
||||
@@ -2,171 +2,23 @@
|
||||
About KMess:
|
||||
============
|
||||
|
||||
KMess is a MSN Messenger clone for Linux. It enables Linux users
|
||||
to chat with friends online who are using MSN Messenger in
|
||||
Windows or Mac OS. The strength of KMess is it's integration
|
||||
with the KDE desktop environment, focus on MSN Messenger
|
||||
specific features and an easy-to-use interface.
|
||||
KMess is a Windows Live Messenger client for Linux. It enables
|
||||
Linux, Mac and even Windows users to chat with friends online
|
||||
who are using the official Messenger client for Windows. The
|
||||
strengths of KMess are its integration with the KDE desktop
|
||||
environment, its focus on Live Messenger specific features
|
||||
and an easy-to-use interface.
|
||||
|
||||
Like many Linux and KDE applications, KMess is free software.
|
||||
The licensing terms are the GNU General Public License.
|
||||
|
||||
|
||||
|
||||
Installation Tip:
|
||||
Installing KMess:
|
||||
=================
|
||||
|
||||
In order for KMess to work properly, it must be configured first.
|
||||
Run the configure script like this:
|
||||
|
||||
./configure
|
||||
|
||||
If the ./configure script completed with success, then type
|
||||
|
||||
make
|
||||
|
||||
and then, as root, type
|
||||
|
||||
make install
|
||||
|
||||
That's it.
|
||||
|
||||
|
||||
|
||||
Important:
|
||||
==========
|
||||
|
||||
The configure script tries to detect your KDE3 directory automatically.
|
||||
If configure fails to detect KDE, you should tell KMess which directory
|
||||
to use. Basically, we're talking about the parent directory
|
||||
of /share/apps/k~bunch of kapps~
|
||||
|
||||
Not doing this will result in emoticons being displayed
|
||||
as text, and icons being displayed incorrectly as well.
|
||||
|
||||
|
||||
|
||||
Troubleshooting
|
||||
===============
|
||||
|
||||
The following packages are required to install KMess:
|
||||
- make
|
||||
- gcc
|
||||
- gcc-c++ (if available)
|
||||
- qt
|
||||
- kdelibs
|
||||
|
||||
|
||||
If your distribution uses separate "devel" or "dev" packages,
|
||||
make sure you have these packages installed also:
|
||||
- qt-devel (or qt3-devel)
|
||||
- kdelibs-devel (or kdelibs3-devel)
|
||||
- x-devel (or xfree-devel/xorg-x11-devel)
|
||||
- libstdc++-devel
|
||||
|
||||
|
||||
Likely the dependencies of these "devel" packages will
|
||||
be installed automatically. Some worth mentioning are:
|
||||
- fontconfig-devel
|
||||
- freetype2-devel
|
||||
- libfam-devel (or fam-devel)
|
||||
- libjpeg-devel
|
||||
- libpng-devel
|
||||
- zlib-devel
|
||||
- libart_lgpl-devel
|
||||
|
||||
|
||||
If configure tells you you're missing something that you think you
|
||||
have installed on your system, you probably need to install the
|
||||
"devel" package of that thing.
|
||||
|
||||
i.e. If it tells you you're missing libfam, install the libfam-devel rpm.
|
||||
|
||||
|
||||
If you get this error:
|
||||
''configure: error: no acceptable C compiler found in $PATH''
|
||||
you need to install the packages "gcc" and "make".
|
||||
|
||||
|
||||
If you get this error:
|
||||
''Your Installation isn't able to compile simple C++ programs.''
|
||||
you need to install "libstdc++-devel" and some distributions
|
||||
also require a "gcc-c++" package for C++ support.
|
||||
|
||||
|
||||
If you get this error:
|
||||
''error: Can't find X includes. Please check your installation [...]''
|
||||
you need to install the x developer packages. Depending on your distribution,
|
||||
this can be something like "x-devel", "xfree-devel", "xorg-devel".
|
||||
|
||||
|
||||
If you get this eror:
|
||||
''checking for libz... configure: error: not found.''
|
||||
you need to install the "zlib-devel" package.
|
||||
|
||||
|
||||
If you get this error:
|
||||
''configure: WARNING: libjpeg not found. disable JPEG support.''
|
||||
you need to install the "libjpeg-devel" package.
|
||||
|
||||
|
||||
If you get this error:
|
||||
''checking for Qt... configure: error:
|
||||
Qt (>= Qt 3.1 (20021021)) (headers and libraries) not found.
|
||||
Please check your installation!''
|
||||
you need to install the "qt-devel" (or "qt3-devel") package.
|
||||
|
||||
|
||||
If you get this error:
|
||||
''checking for KDE... configure: error:
|
||||
in the prefix, you've chosen, are no KDE headers installed. This will fail.
|
||||
So, check this please and use another prefix!''
|
||||
you need to make sure "kdelibs-devel" (or "kdelibs3-devel") is installed!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Installing from CVS:
|
||||
====================
|
||||
|
||||
If there is any need to install the CVS version, read on.
|
||||
|
||||
The KMess CVS contains the latest changes made to KMess.
|
||||
Each new feature or bugfix will be stored into CVS by developers.
|
||||
The code in CVS will eventually become the new KMess release.
|
||||
|
||||
Note that the CVS version is the equivalent
|
||||
of an "alpha" or "beta" release!
|
||||
|
||||
The changes made to CVS could take a few days to reach
|
||||
the public servers. To install KMess from CVS you need to
|
||||
have the packages "autoconf" and "automake" installed.
|
||||
|
||||
|
||||
To download the CVS version, run these commands:
|
||||
|
||||
cvs -d :pserver:anonymous@cvs.sf.net/cvsroot/kmess login
|
||||
(hit enter when prompted for a password)
|
||||
cvs -d :pserver:anonymous@cvs.sf.net/cvsroot/kmess -z3 checkout kmess
|
||||
|
||||
If the download succeeds, run this command:
|
||||
|
||||
make -f Makefile.dist
|
||||
|
||||
This will generate the ./configure script and Makefile templates.
|
||||
Then you can proceed with the normal installation.
|
||||
|
||||
|
||||
Each time the CVS version is updated, you can run
|
||||
|
||||
cvs update
|
||||
make -f Makefile.dist
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
and you'll have the latest KMess version installed.
|
||||
Please see the INSTALL file for help with compiling and installing
|
||||
KMess from source.
|
||||
|
||||
|
||||
|
||||
@@ -177,22 +29,20 @@ You can help translating KMess!
|
||||
|
||||
This is what you need to do:
|
||||
- Get the latest version of KMess
|
||||
- Install "kbabel" (supplied with "kdesdk")
|
||||
- Install "lokalize" (supplied with "kdesdk")
|
||||
- To create a new translation file, copy "kmess.pot"
|
||||
to a new file named "<your language>.po".
|
||||
- Open the language "po" file, and start translating!
|
||||
Also watch for translations marked as "fuzzy",
|
||||
they often need updating.
|
||||
- The the following commands in the "po" folder:
|
||||
make
|
||||
make install
|
||||
(if this doesn't work, run configure first)
|
||||
- Update the translations.
|
||||
- Test the new translation.
|
||||
(to test other languages, run 'KDE_LANG=<code> kmess')
|
||||
- Contact the KMess developers.
|
||||
- Contact the KMess developers to send your changes!
|
||||
|
||||
A more detailed tutorial can be found online
|
||||
at http://kmess.sourceforge.net/translating/
|
||||
at http://trac.kmess.org/wiki/Translating%20KMess
|
||||
|
||||
|
||||
|
||||
Building RPM Packages
|
||||
@@ -207,20 +57,20 @@ To build a RPM package for your distribution, run:
|
||||
Building Slackware Packages
|
||||
===========================
|
||||
|
||||
To build a TGZ package for Slackware, also run:
|
||||
To build a TGZ package for Slackware, run:
|
||||
|
||||
rpmbuild -tb kmess-1.4.tar.gz
|
||||
rpmbuild -tb kmess-2.0.tar.gz
|
||||
|
||||
|
||||
|
||||
Building Debian Packages
|
||||
===========================
|
||||
Licensing
|
||||
=========
|
||||
|
||||
To build a DEB package for Debian, run:
|
||||
We provide along with KMess some Oxygen icons which are usually bundled with Kopete.
|
||||
They are released under LGPL 3.0 (see http://www.oxygen-icons.org/).
|
||||
See COPYING_ICONS for full license text.
|
||||
|
||||
tar zxf kmess-1.4.tar.gz
|
||||
cd kmess-1.4/
|
||||
dpkg-buildpackage
|
||||
The remainder of KMess is released under the GPL2+ . See COPYING for full license text.
|
||||
|
||||
|
||||
|
||||
@@ -228,5 +78,5 @@ More Information
|
||||
================
|
||||
|
||||
For more information about KMess, help forums, and the latest
|
||||
releases, visit the homepage at http://kmess.sourceforge.net/
|
||||
releases, visit the homepage at http://www.kmess.org/
|
||||
|
||||
|
||||
@@ -1,120 +1,9 @@
|
||||
Before release:
|
||||
===============
|
||||
___ Set <UI version="3.1" ..> in *.ui files
|
||||
___ Verify if it compiles with KDE 3.1 (using Slackware 9.0 for example)
|
||||
___ Tag version in CVS
|
||||
___ Run includemocs
|
||||
|
||||
|
||||
To do:
|
||||
======
|
||||
_Y_ Fix lost switchboard connection (contact types but KMess doesn't receive it..!)
|
||||
_Y_ Fix contact moving to other groups (MSN6 incompatiblity?)
|
||||
_Y_ New contacts are not visible in contact list (added from "x has added you to his contact list.."-dialog)
|
||||
_Y_ Get MSN6 file transers operation again.
|
||||
_Y_ KMess does not yet convert your MSN picture to a 96x96 PNG.
|
||||
_Y_ MSN6 pictures not updated yet if the contact changes it's picture.
|
||||
_Y_ MSN6 doesn't download your picture again if you changed it.
|
||||
_Y_ Contactlist changes (custom name) are not saved if kmess closes during kde-logout.
|
||||
___ The classic File transfer receiving blocks gui-events until a connection is made or fails.
|
||||
_Y_ Login fails if you never signed on with the official MSN6 client.
|
||||
___ Login blocks all gui-events.
|
||||
_Y_ Fix contact picture if file can't be found.
|
||||
_Y_ Fix the auto-away configure check.
|
||||
_Y_ Hide the e-mail status line if "show notifications" is unchecked (or the account is not a hotmail/msn passport?)
|
||||
_Y_ Fix KMess-to-KMess P2P transfers (something fails with the flag of the BYE message)
|
||||
_Y_ Fix "write to disconnected socket" errors for MsnSwitchboardConnection (I guess my NAT router kills the idle connection)
|
||||
For bugs, future ideas, et cetera, please check our developer site
|
||||
powered by trac at http://trac.kmess.org/.
|
||||
|
||||
___ Fix contactlist background picture scrolling
|
||||
___ Fix problem when cancelling a connection during a connection attempt.
|
||||
_Y_ Fix a crash in ~ChatMaster at quit (connect to an idle contact, type something, close window, quit kmess).
|
||||
_X_ configure check for rand(), in p2papplication.cpp
|
||||
_Y_ get rid of the ip dialog (sending files), serious.
|
||||
___ ..either support msn6 file sending, or support classic msn5 transfers
|
||||
If you're looking for junior jobs, you may also contact us at the
|
||||
KMess help forums: http://kmess.org/board/
|
||||
|
||||
___ Remove the dependency on QWidget for data-classes.
|
||||
_Y_ Fix entry height of file transfer dialog item, it also changes when cancel is pressed.
|
||||
___ Use kdWarning() for warning messages instead of kdDebug() << "WARNING".
|
||||
_Y_ Really close the chatwindow after it's being hidden? (or after a certain time?)
|
||||
___ Create an Apt repository online
|
||||
___ Make sure KMess can send two files at once
|
||||
_Y_ Fix P2P transfers is chats with multiple contacts.
|
||||
___ Make sure ChatInfo gets deleted somewhere.
|
||||
|
||||
___ Restore the documentation
|
||||
___ Restore the translations
|
||||
___ Balloon size fix (2 contacts on baloon).
|
||||
_Y_ Add 22x22 icons
|
||||
|
||||
_Y_ Strange effect in contactlist toolbar? (a fault of KDE 3? I don't see how it can be fixed)
|
||||
_Y_ Contact logs being saved in the wrong place... (odd configuration problem where trailing slash for directory wasn't present)
|
||||
_X_ Do you want to delete this *account*? Needs to be fixed. (Nope. Using "Account" now)
|
||||
_X_ Specify the ping interval? (just a flag at compile time)
|
||||
|
||||
|
||||
Post 1.4:
|
||||
=========
|
||||
|
||||
These features require changes to the language files,
|
||||
and are therefore not included yet. Let's wait until 1.4 is final,
|
||||
so most translations can be up-to-date again.
|
||||
|
||||
___ Add a link to "register.passport.net" somewhere
|
||||
___ Include a tooltip in the contact sidebar.
|
||||
___ Include a contact menu in the contact sidebar (see https://www.lab.fi.uva.es/~albgonz/kmesss.jpg)
|
||||
___ Improve the contact list tooltip
|
||||
___ Improve the contact list contact menu
|
||||
___ Include the display icon above the contact list (too bad msn7 already implemented the same idea, makes it look like copying)
|
||||
___ Compact sidebar list as described in http://kmess.sourceforge.net/board/viewtopic.php?t=460
|
||||
(make it optional, let the user choose between "no", "compact", "full")
|
||||
___ Maybe: improve chat window layout like http://kde-apps.org/content/show.php?content=24461
|
||||
(looks more clean, though it's a bit kmerlin like though, and the current pictures list is not that bad for multi-chat)
|
||||
___ Chat window XML/XSLT support, like http://kde-look.org/content/show.php?content=22640
|
||||
___ Add detection for empty switchboard sessions before sending file transfer invitations.
|
||||
___ Add detection for NAK responses to file transfer invitations
|
||||
___ Add a baloon if the contact start the chat with an invitataion.
|
||||
|
||||
|
||||
|
||||
Future ideas:
|
||||
=============
|
||||
|
||||
* MSN Protocol support:
|
||||
___ Improve old file transfer code, multiple connections like MSN5 does.
|
||||
_Y_ Implement UPnP support
|
||||
___ Implement a settings open ("File transfers") where the user can at least choose:
|
||||
- "[x] Allow KMess to control my internet router programmatically [learn more]"
|
||||
- "Use the following port to receive UPnP broadcast responses: [default 1900]"
|
||||
___ Add voice (SIP) support
|
||||
___ Add webcam (RTP) support, see http://www.hypothetic.org/docs/msn/phorum/read.php?f=1&i=9837&t=9837
|
||||
___ Add nudge support (easy, and make the kmess-version less annoying, highlight of contact picture for example)
|
||||
___ Add winks support
|
||||
___ Add emoticon transfer support
|
||||
___ Add Ink support?
|
||||
___ Previews in msn6 image transfers
|
||||
___ Implement MSN6 direct connection filetransfers
|
||||
___ Fix msn remote desktop invitation support (context field with user/pass)
|
||||
___ Upgrade to MSNP10 support (new LST commands for contact list, etc..)
|
||||
|
||||
* Invitation support:
|
||||
___ Check whether gnomemeeting, krdc exists before starting/acceping a session
|
||||
___ Support Konference for netmeeting invitations as well.
|
||||
___ Detect whether gnomemeeting or konference exists before starting a netmeeting session.
|
||||
|
||||
* Interface features:
|
||||
___ Drag and drop of files in the chat window.
|
||||
___ Update contact edit dialog, icon button for contact icon.
|
||||
___ Browse/view the contact picture cache (include meta data, like contact handle and date/time)
|
||||
_Y_ Fix contact list selection bar (look how Kopete does it?)
|
||||
___ Show an icon overlay for contact connected with webmessenger.msn.com / MSN Mobile
|
||||
___ Add contact icon (purple?) for unknown contacts added by others in a multi-chat session.
|
||||
___ Emoticon themes (instead of overwriting existing emoticons)
|
||||
___ Chat style themes (XSL files)
|
||||
_X_ "Who has me in his/hers contact list?" dialog (allowed/removed groups already reveal this)
|
||||
___ Include the network-window as "--with-network-window" if the network-window-code displays traffic nicer.
|
||||
|
||||
|
||||
* KDE Integration:
|
||||
___ KDE-IM bridge (http://developer.kde.org/documentation/library/cvs-api/interfaces/html/classKIMIface.html)
|
||||
___ GetHotNewStuff (as of KDE 3.4, either support it through a KPart, or wait for KDE 4 conversion)
|
||||
___ Add "now playing" support, using dcop to query the common kde multimedia applications.
|
||||
- The KMess team
|
||||
|
||||
@@ -1,179 +0,0 @@
|
||||
## generate API documentation with doxygen
|
||||
apidox-am-yes:
|
||||
@if test "$(subdir)" != "."; then \
|
||||
$(mkinstalldirs) $(top_builddir)/apidocs/$(subdir) ;\
|
||||
if test ! -x $(top_builddir)/apidocs/common; then \
|
||||
if test -d $(top_srcdir)/doc/common; then \
|
||||
common_dir=`cd $(top_srcdir)/doc/common && pwd` ;\
|
||||
else \
|
||||
common_dir=$(kde_libs_htmldir)/en/common ;\
|
||||
fi ;\
|
||||
$(LN_S) $$common_dir $(top_builddir)/apidocs/common; \
|
||||
fi ;\
|
||||
cp $(top_srcdir)/admin/Doxyfile.global Doxyfile; \
|
||||
echo "PROJECT_NAME = \"$(subdir) Library\"" >> Doxyfile; \
|
||||
echo "PROJECT_NUMBER = \"Version $(VERSION)\"" >> Doxyfile; \
|
||||
echo "INPUT = $(srcdir)" >> Doxyfile; \
|
||||
echo "IMAGE_PATH = $(top_srcdir)/doc/api" >> Doxyfile ;\
|
||||
echo "OUTPUT_DIRECTORY = $(top_builddir)/apidocs" >> Doxyfile; \
|
||||
echo "HTML_OUTPUT = $(subdir)/html" >> Doxyfile; \
|
||||
echo "HTML_HEADER = $(top_builddir)/apidocs/common/header.html" >> Doxyfile;\
|
||||
echo "HTML_FOOTER = $(top_builddir)/apidocs/common/footer.html" >> Doxyfile;\
|
||||
echo "HTML_STYLESHEET = $(top_builddir)/apidocs/common/doxygen.css" >> Doxyfile;\
|
||||
echo "LATEX_OUTPUT = $(subdir)/latex" >> Doxyfile; \
|
||||
echo "RTF_OUTPUT = $(subdir)/rtf" >> Doxyfile; \
|
||||
echo "MAN_OUTPUT = $(subdir)/man" >> Doxyfile; \
|
||||
echo "GENERATE_HTML = $(GENERATE_FLAG)" >> Doxyfile ;\
|
||||
echo "GENERATE_MAN = $(GENERATE_FLAG)" >> Doxyfile ;\
|
||||
echo "GENERATE_LATEX = $(GENERATE_FLAG)" >> Doxyfile ;\
|
||||
if test -n "$(DOXYGEN_EXCLUDE)"; then \
|
||||
patterns= ;\
|
||||
dirs= ;\
|
||||
for item in `echo "$(DOXYGEN_EXCLUDE)"`; do \
|
||||
if test -d "$(srcdir)/$$item"; then \
|
||||
dirs="$$dirs $(srcdir)/$$item/" ;\
|
||||
else \
|
||||
patterns="$$patterns $$item" ;\
|
||||
fi ;\
|
||||
done ;\
|
||||
echo "EXCLUDE_PATTERNS += $$patterns" >> Doxyfile; \
|
||||
echo "EXCLUDE += $$dirs" >> Doxyfile ;\
|
||||
fi ;\
|
||||
echo "TAGFILES = \\" >> Doxyfile; \
|
||||
tags='$(DOXYGEN_REFERENCES) qt'; for tag in $$tags; do \
|
||||
tagpath= ;\
|
||||
path="../../$$tag" ;\
|
||||
if test -f $(top_builddir)/apidocs/$$tag/$$tag.tag; then \
|
||||
tagpath="$(top_builddir)/apidocs/$$tag/$$tag.tag" ;\
|
||||
else \
|
||||
tagpath=`ls -1 $(kde_htmldir)/en/*-apidocs/$$tag/$$tag.tag 2> /dev/null` ;\
|
||||
if test -n "$$tagpath"; then \
|
||||
path=`echo $$tagpath | sed -e "s,.*/\([^/]*-apidocs\)/$$tag/$$tag.tag,../../../\1/$$tag,"` ;\
|
||||
fi ;\
|
||||
fi ;\
|
||||
if test "$$tag" = qt; then \
|
||||
echo $$tagpath=$(QTDOCDIR) >> Doxyfile ;\
|
||||
else if test -n "$$tagpath"; then \
|
||||
echo "$$tagpath=$$path/html \\" >> Doxyfile ;\
|
||||
fi ;\
|
||||
fi ;\
|
||||
done ;\
|
||||
echo "GENERATE_TAGFILE = $(top_builddir)/apidocs/$(subdir)/`basename $(subdir)`.tag" >> Doxyfile ;\
|
||||
echo "IGNORE_PREFIX = K" >> Doxyfile ;\
|
||||
echo "HAVE_DOT = $(KDE_HAVE_DOT)" >> Doxyfile ;\
|
||||
$(DOXYGEN) Doxyfile ;\
|
||||
fi
|
||||
|
||||
apidox-am-no:
|
||||
|
||||
install-data-local: install-apidox
|
||||
|
||||
## install API documentation
|
||||
install-apidox:
|
||||
@if test "$(subdir)" != "."; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html ; \
|
||||
if test -f $(top_builddir)/apidocs/$(subdir)/$(subdir).tag; then \
|
||||
echo $(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/$(subdir).tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
|
||||
$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/$(subdir).tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
|
||||
fi; \
|
||||
if test -d $(top_builddir)/apidocs/$(subdir)/html; then \
|
||||
list=`ls $(top_builddir)/apidocs/$(subdir)/html`; \
|
||||
echo "installing $(top_builddir)/apidocs/$(subdir)/html" ;\
|
||||
for file in $$list; do \
|
||||
$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/html/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html; \
|
||||
done; \
|
||||
fi; \
|
||||
rm -f $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/common; \
|
||||
$(LN_S) $(kde_libs_htmldir)/en/common $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/common; \
|
||||
else\
|
||||
if test -d $(top_builddir)/apidocs; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs ;\
|
||||
list=`cd $(top_builddir)/apidocs && ls -1`; \
|
||||
echo "installing $(top_builddir)/apidocs/$$file" ;\
|
||||
for file in $$list; do \
|
||||
if test -f $(top_builddir)/apidocs/$$file; then \
|
||||
$(INSTALL_DATA) $(top_builddir)/apidocs/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
|
||||
fi; \
|
||||
done ; fi; \
|
||||
fi
|
||||
|
||||
uninstall-local: uninstall-apidox
|
||||
|
||||
## uninstall API documentation
|
||||
uninstall-apidox:
|
||||
@if test "$(subdir)" != "."; then \
|
||||
if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); then \
|
||||
rm -rfv $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
|
||||
fi\
|
||||
else\
|
||||
if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; then \
|
||||
rm -rfv $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
|
||||
fi\
|
||||
fi
|
||||
|
||||
apidox:
|
||||
@if test "$(subdir)" != "."; then \
|
||||
$(MAKE) apidox-am-@KDE_HAS_DOXYGEN@ ;\
|
||||
else \
|
||||
$(MAKE) apidox-am-toplevel-@KDE_HAS_DOXYGEN@ ;\
|
||||
fi
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; if test -n '$(SUBDIRS)'; then \
|
||||
list='$(SUBDIRS)'; \
|
||||
for subdir in $$list; do \
|
||||
if grep '^include .*Doxyfile.am' $(srcdir)/$$subdir/Makefile.am; then \
|
||||
echo "Making apidox in $$subdir"; \
|
||||
if test "$$subdir" != "."; then \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=no apidox) || exit 1; \
|
||||
fi ; fi ;\
|
||||
done; \
|
||||
for subdir in $$list; do \
|
||||
if grep '^include .*Doxyfile.am' $(srcdir)/$$subdir/Makefile.am; then \
|
||||
echo "Making apidox in $$subdir"; \
|
||||
if test "$$subdir" != "."; then \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=yes apidox) || exit 1; \
|
||||
fi ; fi ;\
|
||||
done; \
|
||||
fi
|
||||
|
||||
apidox-am-toplevel-no:
|
||||
apidox-am-toplevel-yes:
|
||||
@echo "*** Creating API documentation main page"; \
|
||||
cp $(top_srcdir)/admin/Doxyfile.global Doxyfile; \
|
||||
echo "PROJECT_NAME = \"$(DOXYGEN_PROJECT_NAME)\"" >> Doxyfile ; \
|
||||
echo "PROJECT_NUMBER = \"$(DOXYGEN_PROJECT_NUMBER)\"" >> Doxyfile ; \
|
||||
echo "INPUT = $(top_srcdir)" >> Doxyfile ; \
|
||||
echo "OUTPUT_DIRECTORY = $(top_builddir)/apidocs" >> Doxyfile ; \
|
||||
echo "FILE_PATTERNS = *.dox" >> Doxyfile ; \
|
||||
echo "RECURSIVE = NO" >> Doxyfile ; \
|
||||
echo "SOURCE_BROWSER = NO" >> Doxyfile ; \
|
||||
echo "ALPHABETICAL_INDEX = NO" >> Doxyfile ; \
|
||||
echo "HTML_OUTPUT = ." >> Doxyfile ; \
|
||||
echo "HTML_HEADER = apidocs/common/mainheader.html" >> Doxyfile ; \
|
||||
echo "HTML_FOOTER = apidocs/common/mainfooter.html" >> Doxyfile ; \
|
||||
echo "HTML_STYLESHEET = apidocs/common/doxygen.css" >> Doxyfile ; \
|
||||
echo "GENERATE_LATEX = NO" >> Doxyfile ; \
|
||||
echo "GENERATE_RTF = NO" >> Doxyfile ; \
|
||||
echo "GENERATE_MAN = NO" >> Doxyfile ; \
|
||||
echo "GENERATE_XML = NO" >> Doxyfile ; \
|
||||
echo "GENERATE_AUTOGEN_DEF = NO" >> Doxyfile ; \
|
||||
echo "ENABLE_PREPROCESSING = NO" >> Doxyfile ; \
|
||||
echo "CLASS_DIAGRAMS = NO" >> Doxyfile ; \
|
||||
echo "HAVE_DOT = NO" >> Doxyfile ; \
|
||||
echo "GENERATE_HTML = YES" >> Doxyfile ;\
|
||||
$(mkinstalldirs) $(top_builddir)/apidocs ; \
|
||||
rm -f $(top_builddir)/apidocs/common ; \
|
||||
if test -d $(top_srcdir)/doc/common; then \
|
||||
common_dir=`cd $(top_srcdir)/doc/common && pwd` ;\
|
||||
else \
|
||||
common_dir=$(kde_libs_htmldir)/en/common ;\
|
||||
fi ;\
|
||||
$(LN_S) $$common_dir $(top_builddir)/apidocs/common ;\
|
||||
doxygen Doxyfile; \
|
||||
rm -f Doxyfile
|
||||
|
||||
.PHONY: apidox-am-yes apidox-am-no install-data-local install-apidox install-apidox uninstall-local uninstall-apidox uninstall-apidox apidox apidox-am-toplevel-no apidox-am-toplevel-yes
|
||||
|
||||
|
||||
# Local Variables:
|
||||
# mode: makefile
|
||||
# End:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,35 +0,0 @@
|
||||
### Makefile.common
|
||||
###
|
||||
### Copyright (C) 2002 by the KDE developers
|
||||
|
||||
### All the real work is done by the shellscript cvs.sh
|
||||
|
||||
SHELL=/bin/sh
|
||||
|
||||
cvs dist cvs-clean configure configure.in configure.files subdirs package-messages package-merge Makefile.am acinclude.m4:
|
||||
@admindir=$(admindir); \
|
||||
if test "x$$admindir" = x; then \
|
||||
admindir=.; until test -f $$admindir/admin/cvs.sh; do \
|
||||
admindir=$$admindir/..; \
|
||||
if test `cd $$admindir && pwd` = / ; then break; fi; \
|
||||
done; \
|
||||
admindir=$$admindir/admin; \
|
||||
if test -f $$admindir/cvs.sh; then :; else \
|
||||
echo "Can't find the admin/ directory in any parent of the"; \
|
||||
echo "current directory. Please set it with admindir=..."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
if test "$@" = "package-merge"; then \
|
||||
MAKE="$(MAKE)" POFILES="$(POFILES)" PACKAGE="$(PACKAGE)" \
|
||||
$(SHELL) $$admindir/cvs.sh package-merge ;\
|
||||
else \
|
||||
MAKE="$(MAKE)" $(SHELL) $$admindir/cvs.sh $@ ;\
|
||||
fi
|
||||
|
||||
configure.in: configure.files subdirs
|
||||
configure.files: subdirs
|
||||
|
||||
.SILENT:
|
||||
|
||||
.PHONY: cvs dist cvs-clean package-merge package-messages
|
||||
File diff suppressed because it is too large
Load Diff
-2442
File diff suppressed because it is too large
Load Diff
-156
@@ -1,156 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use DB_File;
|
||||
use Fcntl ':flock';
|
||||
|
||||
if (!defined($ARGV[0])) {
|
||||
print "usage: requires .class dump as parameter!\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
sub bailout
|
||||
{
|
||||
untie %bcheckdb if(defined(%bcheckdb));
|
||||
|
||||
if(defined(MYLOCK)) {
|
||||
flock MYLOCK, LOCK_UN;
|
||||
close(MYLOCK);
|
||||
}
|
||||
|
||||
print @_;
|
||||
exit 5;
|
||||
}
|
||||
|
||||
sub ask_user
|
||||
{
|
||||
my ($dbkey, $dbchunk) = @_;
|
||||
|
||||
if (defined($ENV{"BCHECK_UPDATE"})) {
|
||||
$bcheckdb{$dbkey} = $dbchunk;
|
||||
return;
|
||||
}
|
||||
|
||||
&bailout("BC problem detected") if (! -t STDIN);
|
||||
|
||||
print "(I)gnore / (Q)uit / (U)pdate: ";
|
||||
|
||||
my $key;
|
||||
while(defined(read STDIN, $key, 1)) {
|
||||
$key = lc($key);
|
||||
|
||||
print "got: >$key<\n";
|
||||
|
||||
return if ($key eq 'i');
|
||||
|
||||
&bailout("BC problem. aborted") if ($key eq 'q');
|
||||
|
||||
if ($key eq 'u') {
|
||||
$bcheckdb{$dbkey} = $dbchunk;
|
||||
return;
|
||||
}
|
||||
print "\n(I)gnore / (Q)uit / (U)pdate: ";
|
||||
}
|
||||
}
|
||||
|
||||
sub diff_chunk($$)
|
||||
{
|
||||
my ($oldl, $newl) = @_;
|
||||
my @old = split /^/m, $oldl;
|
||||
my @new = split /^/m, $newl;
|
||||
my $haschanges = 0;
|
||||
my $max = $#old > $#new ? $#old : $#new;
|
||||
|
||||
die "whoops. key different" if ($old[0] ne $new[0]);
|
||||
|
||||
if ($#old != $#new) {
|
||||
warn ("Structural difference.\n");
|
||||
print @old;
|
||||
print "-----------------------------------------------\n";
|
||||
print @new;
|
||||
$haschanges = 1;
|
||||
return $haschanges;
|
||||
}
|
||||
|
||||
print $old[0];
|
||||
|
||||
my ($class) = ($old[0] =~ /^(?:Class |Vtable for )(\S+)/);
|
||||
|
||||
my $c = 1;
|
||||
while ($c < $max) {
|
||||
my ($o, $n) = ($old[$c], $new[$c]);
|
||||
chomp $o;
|
||||
chomp $n;
|
||||
$c++;
|
||||
next if ($o eq $n);
|
||||
|
||||
if(defined($class) and $n =~ /^(\d+\s+)\w+(::\S+\s*.*)$/) {
|
||||
next if ($n eq "$1$class$2");
|
||||
}
|
||||
|
||||
$haschanges = 1;
|
||||
|
||||
print "-$o\n+$n\n\n";
|
||||
}
|
||||
|
||||
return $haschanges;
|
||||
}
|
||||
|
||||
local $dblock = $ENV{"HOME"} . "/bcheck.lock";
|
||||
my $dbfile = $ENV{"HOME"} . "/bcheck.db";
|
||||
my $cdump = $ARGV[0];
|
||||
|
||||
die "file $cdump is not readable: $!" if (! -f $cdump);
|
||||
|
||||
# make sure the advisory lock exists
|
||||
open(MYLOCK, ">$dblock");
|
||||
print MYLOCK "";
|
||||
|
||||
flock MYLOCK, LOCK_EX;
|
||||
|
||||
tie %bcheckdb, 'DB_File', $dbfile;
|
||||
|
||||
my $chunk = "";
|
||||
|
||||
open (IN, "<$cdump") or die "cannot open $cdump: $!";
|
||||
while (<IN>) {
|
||||
|
||||
chop;
|
||||
|
||||
s/0x[0-9a-fA-F]+/0x......../g;
|
||||
s/base size=/size=/g;
|
||||
s/base align=/align=/g;
|
||||
|
||||
$chunk .= $_ . "\n";
|
||||
|
||||
if(/^\s*$/) {
|
||||
my @lines = split /^/m, $chunk;
|
||||
my $key = $lines[0];
|
||||
chomp $key;
|
||||
|
||||
if($key !~ /<anonymous struct>/ &&
|
||||
$key !~ /<anonymous union>/) {
|
||||
if(defined($bcheckdb{$key})) {
|
||||
my $dbversion = $bcheckdb{$key};
|
||||
|
||||
if($dbversion ne $chunk) {
|
||||
&ask_user($key, $chunk) if(&diff_chunk($dbversion, $chunk));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$bcheckdb{$key} = $chunk;
|
||||
print "NEW: $key\n";
|
||||
}
|
||||
}
|
||||
|
||||
$chunk = "";
|
||||
next;
|
||||
}
|
||||
|
||||
}
|
||||
close(IN);
|
||||
|
||||
untie %bcheckdb;
|
||||
flock MYLOCK, LOCK_UN;
|
||||
close(MYLOCK);
|
||||
|
||||
exit 0;
|
||||
@@ -1,99 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Usage:
|
||||
# compile PROGRAM [ARGS]...
|
||||
# `-o FOO.o' is removed from the args passed to the actual compile.
|
||||
|
||||
prog=$1
|
||||
shift
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
args=
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we do something ugly here.
|
||||
ofile=$2
|
||||
shift
|
||||
case "$ofile" in
|
||||
*.o | *.obj)
|
||||
;;
|
||||
*)
|
||||
args="$args -o $ofile"
|
||||
ofile=
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
args="$args $1"
|
||||
;;
|
||||
*)
|
||||
args="$args $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$prog" $args
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir $lockdir > /dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir $lockdir; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$prog" $args
|
||||
status=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir $lockdir
|
||||
exit $status
|
||||
@@ -1,191 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# this script patches a config.status file, to use our own perl script
|
||||
# in the main loop
|
||||
# we do it this way to circumvent hacking (and thereby including)
|
||||
# autoconf function (which are GPL) into our LGPL acinclude.m4.in
|
||||
# written by Michael Matz <matz@kde.org>
|
||||
# adapted by Dirk Mueller <mueller@kde.org>
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2 of the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public License
|
||||
# along with this library; see the file COPYING.LIB. If not, write to
|
||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# we have to change two places
|
||||
# 1. the splitting of the substitutions into chunks of 90 (or even 48 in
|
||||
# later autoconf's
|
||||
# 2. the big main loop which patches all Makefile.in's
|
||||
|
||||
use strict;
|
||||
use File::Basename;
|
||||
|
||||
my $ac_aux_dir = dirname($0);
|
||||
my ($flag);
|
||||
my $ac_version = 0;
|
||||
my $vpath_seen = 0;
|
||||
$flag = 0;
|
||||
|
||||
while (<>) {
|
||||
# usage of $flag: 0 -- we have seen nothing yet
|
||||
# 1 -- we are in (1)
|
||||
# 2 -- we have ended (1)
|
||||
# 3 -- we are in (2)
|
||||
# 4 -- we ended (2)
|
||||
|
||||
if ($flag == 4) {
|
||||
print;
|
||||
} elsif ($flag == 0) {
|
||||
# 1. begins with (including): "ac_max_sed_\S+\s*=\s*[0-9]+..."
|
||||
# ends with (excluding) "CONFIG_FILE=..."
|
||||
# in later autoconf (2.14.1) there is no CONFIG_FILES= line,
|
||||
# but instead the (2) directly follow (1)
|
||||
if (/^\s*ac_max_sed_([a-z]+).*=\s*([0-9]+)/ ) {
|
||||
$flag = 1;
|
||||
if ($1 eq 'lines') {
|
||||
# lets hope its different with 2141,
|
||||
# wasn't able to verify that
|
||||
if ($2 eq '48') {
|
||||
$ac_version = 250;
|
||||
}
|
||||
else {
|
||||
$ac_version = 2141;
|
||||
}
|
||||
} elsif ($1 eq 'cmds') {
|
||||
$ac_version = 213;
|
||||
}
|
||||
# hmm, we don't know the autoconf version, but we try anyway
|
||||
} else {
|
||||
print;
|
||||
}
|
||||
} elsif ($flag == 1) {
|
||||
if (/^\s*CONFIG_FILES=/ && ($ac_version != 250)) {
|
||||
print;
|
||||
$flag = 2;
|
||||
} elsif (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
|
||||
$flag = 3;
|
||||
}
|
||||
} elsif ($flag == 2) {
|
||||
# 2. begins with: "for ac_file in.*CONFIG_FILES" (the next 'for' after (1))
|
||||
# end with: "rm -f conftest.s\*"
|
||||
# on autoconf 250, it ends with '# CONFIG_HEADER section'
|
||||
#
|
||||
# gg: if a post-processing commands section is found first,
|
||||
# stop there and insert a new loop to honour the case/esac.
|
||||
# (pattern: /^\s+#\sRun the commands associated with the file./)
|
||||
|
||||
if (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
|
||||
$flag = 3;
|
||||
} else {
|
||||
print;
|
||||
}
|
||||
} elsif ($flag == 3) {
|
||||
if (/^\s*rm\s+-f\s+conftest/ ) {
|
||||
$flag = 4;
|
||||
&insert_main_loop();
|
||||
} elsif (/^\s*rm\s+-f\s+.*ac_cs_root/ ) {
|
||||
$flag = 4;
|
||||
&insert_main_loop();
|
||||
#die "hhhhhhh";
|
||||
if ($ac_version != 2141) {
|
||||
print STDERR "hmm, don't know autoconf version\n";
|
||||
}
|
||||
} elsif (/^\#\s*CONFIG_(HEADER|COMMANDS) section.*|^\s+#\s(Run) the commands associated/) {
|
||||
$flag = 4;
|
||||
my $commands = defined $2;
|
||||
&insert_main_loop();
|
||||
$commands && insert_command_loop();
|
||||
if($ac_version != 250) {
|
||||
print STDERR "hmm, something went wrong :-(\n";
|
||||
}
|
||||
} elsif (/VPATH/ ) {
|
||||
$vpath_seen = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
die "wrong input (flag != 4)" unless $flag == 4;
|
||||
print STDERR "hmm, don't know autoconf version\n" unless $ac_version;
|
||||
|
||||
sub insert_main_loop {
|
||||
|
||||
if ($ac_version == 250) {
|
||||
&insert_main_loop_250();
|
||||
}
|
||||
else {
|
||||
&insert_main_loop_213();
|
||||
}
|
||||
}
|
||||
|
||||
sub insert_main_loop_250 {
|
||||
|
||||
print <<EOF;
|
||||
#echo Doing the fast build of Makefiles -- autoconf $ac_version
|
||||
EOF
|
||||
if ($vpath_seen) {
|
||||
print <<EOF;
|
||||
# VPATH subst was seen in original config.status main loop
|
||||
echo '/^[ ]*VPATH[ ]*=[^:]*\$/d' >>\$tmp/subs.sed
|
||||
EOF
|
||||
}
|
||||
print <<EOF;
|
||||
rm -f \$tmp/subs.files
|
||||
for ac_file in .. \$CONFIG_FILES ; do
|
||||
if test "x\$ac_file" != x..; then
|
||||
echo \$ac_file >> \$tmp/subs.files
|
||||
fi
|
||||
done
|
||||
if test -f \$tmp/subs.files ; then
|
||||
perl $ac_aux_dir/config.pl "\$tmp/subs.sed" "\$tmp/subs.files" "\$srcdir" "\$INSTALL"
|
||||
fi
|
||||
rm -f \$tmp/subs.files
|
||||
|
||||
fi
|
||||
EOF
|
||||
return;
|
||||
}
|
||||
|
||||
sub insert_main_loop_213 {
|
||||
print <<EOF;
|
||||
#echo Doing the fast build of Makefiles -- autoconf $ac_version
|
||||
if test "x\$ac_cs_root" = "x" ; then
|
||||
ac_cs_root=conftest
|
||||
fi
|
||||
EOF
|
||||
if ($vpath_seen) {
|
||||
print <<EOF;
|
||||
# VPATH subst was seen in original config.status main loop
|
||||
echo '/^[ ]*VPATH[ ]*=[^:]*\$/d' >> \$ac_cs_root.subs
|
||||
EOF
|
||||
}
|
||||
print <<EOF;
|
||||
rm -f \$ac_cs_root.sacfiles
|
||||
for ac_file in .. \$CONFIG_FILES ; do
|
||||
if test "x\$ac_file" != x..; then
|
||||
echo \$ac_file >> \$ac_cs_root.sacfiles
|
||||
fi
|
||||
done
|
||||
if test -f \$ac_cs_root.sacfiles ; then
|
||||
perl $ac_aux_dir/config.pl "\$ac_cs_root.subs" "\$ac_cs_root.sacfiles" "\$ac_given_srcdir" "\$ac_given_INSTALL"
|
||||
fi
|
||||
rm -f \$ac_cs_root.s*
|
||||
|
||||
EOF
|
||||
return;
|
||||
}
|
||||
|
||||
sub insert_command_loop {
|
||||
print <<EOF;
|
||||
for ac_file in .. \$CONFIG_FILES ; do
|
||||
EOF
|
||||
}
|
||||
Vendored
-1449
File diff suppressed because it is too large
Load Diff
-236
@@ -1,236 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
# a script for use by autoconf to make the Makefiles
|
||||
# from the Makefile.in's
|
||||
#
|
||||
# the original autoconf mechanism first splits all substitutions into groups
|
||||
# of ca. 90, and than invokes sed for _every_ Makefile.in and every group
|
||||
# (so around 2-3 times per Makefile.in). So this takes forever, as sed
|
||||
# has to recompile the regexps every time.
|
||||
#
|
||||
# this script does better. It changes all Makefile.ins in one process.
|
||||
# in kdelibs the time for building Makefile went down from 2:59 min to 13 sec!
|
||||
#
|
||||
# written by Michael Matz <matz@kde.org>
|
||||
# adapted by Dirk Mueller <mueller@kde.org>
|
||||
|
||||
# This file is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2 of the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public License
|
||||
# along with this library; see the file COPYING.LIB. If not, write to
|
||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
use strict;
|
||||
|
||||
use File::Path;
|
||||
|
||||
my $ac_subs=$ARGV[0];
|
||||
my $ac_sacfiles = $ARGV[1];
|
||||
my $ac_given_srcdir=$ARGV[2];
|
||||
my $ac_given_INSTALL=$ARGV[3];
|
||||
|
||||
my @comp_match;
|
||||
my @comp_subs;
|
||||
|
||||
#print "ac_subs=$ac_subs\n";
|
||||
#print "ac_sacfiles=$ac_sacfiles\n";
|
||||
#print "ac_given_srcdir=$ac_given_srcdir\n";
|
||||
#print "ac_given_INSTALL=$ac_given_INSTALL\n";
|
||||
|
||||
my $configure_input;
|
||||
my ($srcdir, $top_srcdir);
|
||||
my $INSTALL;
|
||||
my $bad_perl = ($] < 5.005);
|
||||
my $created_file_count = 0;
|
||||
|
||||
open(CF, "< $ac_subs") || die "can't open $ac_subs: $!";
|
||||
my @subs = <CF>;
|
||||
close(CF);
|
||||
chomp @subs;
|
||||
@comp_match=();
|
||||
@comp_subs=();
|
||||
|
||||
if ($bad_perl) {
|
||||
print "Using perl older than version 5.005\n";
|
||||
foreach my $pat (@subs) {
|
||||
if ( ($pat =~ m/s%([^%]*)%([^%]*)%g/ )
|
||||
|| ($pat =~ m/s%([^%]*)%([^%]*)%;t/ )
|
||||
|| ($pat =~ m/s,([^,]*),(.*),;t/)
|
||||
|| ($pat =~ m%s/([^/]*)/([^/]*)/g% )
|
||||
|| ($pat =~ m%s/([^/]*)/([^/]*)/;t% )
|
||||
) {
|
||||
# form : s%bla%blubb%g
|
||||
# or s%bla%blubb%;t t (autoconf > 2.13 and < 2.52 ?)
|
||||
# or s,bla,blubb,;t t (autoconf 2.52)
|
||||
my $srch = $1;
|
||||
my $repl = $2;
|
||||
$repl =~ s/\\(.)/$1/g;
|
||||
push @comp_subs, make_closure($srch, $repl);
|
||||
|
||||
} elsif ( ($pat =~ /%([^%]*)%d/ )
|
||||
|| ($pat =~ m%/([^/]*)/d% )
|
||||
) {
|
||||
push @comp_subs, make_closure($1, "");
|
||||
} else {
|
||||
die "Uhh. Malformed pattern in $ac_subs ($pat)"
|
||||
unless ( $pat =~ /^\s*$/ ); # ignore white lines
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach my $pat (@subs) {
|
||||
if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ ) ||
|
||||
($pat =~ /s%([^%]*)%([^%]*)%;t/ ) ||
|
||||
($pat =~ /s,([^,]*),(.*),;t/) ) {
|
||||
# form : s%bla%blubb%g
|
||||
# or s%bla%blubb%;t t (autoconf > 2.13 and < 2.52 ?)
|
||||
# or s,bla,blubb,;t t (autoconf 2.52)
|
||||
my $srch = $1;
|
||||
my $repl = $2;
|
||||
push @comp_match, eval "qr/\Q$srch\E/"; # compile match pattern
|
||||
$repl =~ s/\\(.)/$1/g;
|
||||
push @comp_subs, $repl;
|
||||
} elsif ( ($pat =~ /%([^%]*)%d/ )
|
||||
|| ($pat =~ m%/([^/]*)/d% )
|
||||
) {
|
||||
push @comp_match, eval "qr/\Q$1\E/";
|
||||
push @comp_subs, "";
|
||||
} else {
|
||||
die "Uhh. Malformed pattern in $ac_subs ($pat)"
|
||||
unless ( $pat =~ /^\s*$/ ); # ignore white lines
|
||||
}
|
||||
}
|
||||
}
|
||||
undef @subs;
|
||||
|
||||
# read the list of files to be patched, form:
|
||||
# ./Makefile arts/Makefile arts/examples/Makefile arts/flow/Makefile
|
||||
|
||||
open(CF, "< $ac_sacfiles") || die "can't open $ac_sacfiles: $!";
|
||||
my @ac_files = <CF>;
|
||||
close(CF);
|
||||
chomp @ac_files;
|
||||
|
||||
|
||||
my $ac_file;
|
||||
foreach $ac_file (@ac_files) {
|
||||
next if $ac_file =~ /\.\./;
|
||||
next if $ac_file =~ /^\s*$/;
|
||||
my $ac_file_in;
|
||||
my ($ac_dir, $ac_dots, $ac_dir_suffix);
|
||||
|
||||
if ($ac_file =~ /.*:.*/ ) {
|
||||
($ac_file_in = $ac_file) =~ s%[^:]*:%%;
|
||||
$ac_file =~ s%:.*%%;
|
||||
} else {
|
||||
$ac_file_in = $ac_file.".in";
|
||||
}
|
||||
|
||||
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
|
||||
|
||||
# Remove last slash and all that follows it. Not all systems have dirname.
|
||||
($ac_dir = $ac_file) =~ s%/[^/][^/]*$%%;
|
||||
if ( ($ac_dir ne $ac_file) && ($ac_dir ne ".")) {
|
||||
# The file is in a subdirectory.
|
||||
if (! -d "$ac_dir") { mkpath "$ac_dir", 0, 0777; }
|
||||
($ac_dir_suffix = $ac_dir) =~ s%^./%%;
|
||||
$ac_dir_suffix="/".$ac_dir_suffix;
|
||||
# A "../" for each directory in $ac_dir_suffix.
|
||||
($ac_dots = $ac_dir_suffix) =~ s%/[^/]*%../%g;
|
||||
} else {
|
||||
$ac_dir_suffix="";
|
||||
$ac_dots="";
|
||||
}
|
||||
|
||||
if ($ac_given_srcdir eq ".") {
|
||||
$srcdir=".";
|
||||
if ($ac_dots) {
|
||||
( $top_srcdir = $ac_dots) =~ s%/$%%;
|
||||
} else { $top_srcdir="."; }
|
||||
} elsif ($ac_given_srcdir =~ m%^/%) {
|
||||
$srcdir=$ac_given_srcdir.$ac_dir_suffix;
|
||||
$top_srcdir = $ac_given_srcdir;
|
||||
} else {
|
||||
$srcdir = $ac_dots.$ac_given_srcdir.$ac_dir_suffix;
|
||||
$top_srcdir = $ac_dots.$ac_given_srcdir;
|
||||
}
|
||||
|
||||
if ($ac_given_INSTALL) {
|
||||
if ($ac_given_INSTALL =~ m%^/% ) {
|
||||
$INSTALL = $ac_given_INSTALL;
|
||||
} else {
|
||||
$INSTALL = $ac_dots.$ac_given_INSTALL;
|
||||
}
|
||||
}
|
||||
|
||||
print "fast creating $ac_file\n";
|
||||
unlink $ac_file;
|
||||
my $ac_comsub="";
|
||||
my $fname=$ac_file_in;
|
||||
$fname =~ s%.*/%%;
|
||||
$configure_input="$ac_file. Generated from $fname by config.pl.";
|
||||
|
||||
my $ac_file_inputs;
|
||||
($ac_file_inputs = $ac_file_in) =~ s%^%$ac_given_srcdir/%;
|
||||
$ac_file_inputs =~ s%:% $ac_given_srcdir/%g;
|
||||
|
||||
patch_file($ac_file, $ac_file_inputs);
|
||||
++$created_file_count;
|
||||
}
|
||||
|
||||
print "config.pl: fast created $created_file_count file(s).\n";
|
||||
|
||||
sub patch_file {
|
||||
my ($outf, $infiles) = @_;
|
||||
my $filedata;
|
||||
my @infiles=split(' ', $infiles);
|
||||
my $i=0;
|
||||
|
||||
foreach my $name (@infiles) {
|
||||
if (open(CF, "< $name")) {
|
||||
while (<CF>) {
|
||||
$filedata .= $_;
|
||||
}
|
||||
close(CF);
|
||||
} else {
|
||||
print STDERR "can't open $name: $!"."\n";
|
||||
}
|
||||
}
|
||||
|
||||
$filedata =~ s%\@configure_input\@%$configure_input%g;
|
||||
$filedata =~ s%\@srcdir\@%$srcdir%g;
|
||||
$filedata =~ s%\@top_srcdir\@%$top_srcdir%g;
|
||||
$filedata =~ s%\@INSTALL\@%$INSTALL%g;
|
||||
|
||||
if ($bad_perl) {
|
||||
while ($i <= $#comp_subs) {
|
||||
my $ref = $comp_subs[$i];
|
||||
&$ref(\$filedata);
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
while ($i <= $#comp_match) {
|
||||
$filedata =~ s/$comp_match[$i]/$comp_subs[$i]/g;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
open(CF, "> $outf") || die "can't create $outf: $!";
|
||||
print CF $filedata;
|
||||
close(CF);
|
||||
}
|
||||
|
||||
sub make_closure {
|
||||
my ($pat, $sub) = @_;
|
||||
my $ret = eval "return sub { my \$ref=shift; \$\$ref =~ s%\Q$pat\E%\Q$sub\E%g; }";
|
||||
if ($@) {
|
||||
print "can't create CODE: $@\n";
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
Vendored
-1552
File diff suppressed because it is too large
Load Diff
@@ -1,30 +0,0 @@
|
||||
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
|
||||
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
|
||||
# And if so, warn when they don't match
|
||||
if test "$kde_libs_prefix" != "$given_prefix"; then
|
||||
# And if kde doesn't know about the prefix yet
|
||||
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
|
||||
if test $? -ne 0; then
|
||||
echo ""
|
||||
echo "Warning: you chose to install this package in $given_prefix,"
|
||||
echo "but KDE was found in $kde_libs_prefix."
|
||||
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
|
||||
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
|
||||
echo "Then restart KDE."
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$all_tests" = "bad"; then
|
||||
if test ! "$cache_file" = "/dev/null"; then
|
||||
echo ""
|
||||
echo "Please remove the file $cache_file after changing your setup"
|
||||
echo "so that configure will find the changes next time."
|
||||
echo ""
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
echo "Good - your configure finished. Start make now"
|
||||
echo ""
|
||||
fi
|
||||
@@ -1,57 +0,0 @@
|
||||
dnl This file is part of the KDE libraries/packages
|
||||
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
|
||||
|
||||
dnl This file is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Library General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2 of the License, or (at your option) any later version.
|
||||
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Library General Public License for more details.
|
||||
|
||||
dnl You should have received a copy of the GNU Library General Public License
|
||||
dnl along with this library; see the file COPYING.LIB. If not, write to
|
||||
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
dnl Boston, MA 02111-1307, USA.
|
||||
|
||||
# Original Author was Kalle@kde.org
|
||||
# I lifted it in some mater. (Stephan Kulow)
|
||||
# I used much code from Janos Farkas
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(acinclude.m4) dnl a source file from your sub dir
|
||||
|
||||
dnl This is so we can use kde-common
|
||||
AC_CONFIG_AUX_DIR(admin)
|
||||
|
||||
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
|
||||
unset CDPATH
|
||||
|
||||
dnl Checking host/target/build systems, for make, install etc.
|
||||
AC_CANONICAL_SYSTEM
|
||||
dnl Perform program name transformation
|
||||
AC_ARG_PROGRAM
|
||||
|
||||
dnl Automake doc recommends to do this only here. (Janos)
|
||||
AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@) dnl searches for some needed programs
|
||||
|
||||
KDE_SET_PREFIX
|
||||
|
||||
dnl generate the config header
|
||||
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_CHECK_COMPILERS
|
||||
AC_ENABLE_SHARED(yes)
|
||||
AC_ENABLE_STATIC(no)
|
||||
KDE_PROG_LIBTOOL
|
||||
|
||||
dnl for NLS support. Call them in this order!
|
||||
dnl WITH_NLS is for the po files
|
||||
AM_KDE_WITH_NLS
|
||||
|
||||
dnl KDE_USE_QT
|
||||
AC_PATH_KDE
|
||||
@@ -1,87 +0,0 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
#
|
||||
# This script recursively (beginning with the current directory)
|
||||
# wipes out everything not registered in CVS.
|
||||
#
|
||||
# written by Oswald Buddenhagen <ossi@kde.org>
|
||||
# inspired by the "old" cvs-clean target from Makefile.common
|
||||
#
|
||||
# This file is free software in terms of the BSD license. That means
|
||||
# that you can do anything with it except removing this license or
|
||||
# the above copyright notice. There is NO WARRANTY of any kind.
|
||||
#
|
||||
|
||||
sub rmrf()
|
||||
{
|
||||
my $fn = shift;
|
||||
lstat ($fn);
|
||||
if (-d _) {
|
||||
if (opendir (DIR, $fn)) {
|
||||
for my $efn (grep (!/^\.\.?$/, readdir (DIR))) {
|
||||
&rmrf ($fn."/".$efn);
|
||||
}
|
||||
closedir (DIR);
|
||||
rmdir ($fn);
|
||||
}
|
||||
} else {
|
||||
unlink ($fn);
|
||||
}
|
||||
}
|
||||
|
||||
sub newfiles()
|
||||
{
|
||||
my ($indir, $incvs) = @_;
|
||||
for my $n (keys (%$incvs)) { delete $$indir{$n} }
|
||||
return sort (keys (%$indir));
|
||||
}
|
||||
|
||||
sub cvsclean()
|
||||
{
|
||||
my $dir = shift;
|
||||
my (%dirsdir, %filesdir, %dirscvs, %filescvs);
|
||||
my $dnam = $dir ? $dir : ".";
|
||||
if (!opendir (DIR, $dnam)) {
|
||||
print STDERR "Cannot enter \"".$dnam."\".\n";
|
||||
return;
|
||||
}
|
||||
for my $fn (grep (!/^\.\.?$/, readdir (DIR))) {
|
||||
if (-d $dir.$fn) {
|
||||
$fn eq "CVS" or $dirsdir{$fn} = 1;
|
||||
} else {
|
||||
$filesdir{$fn} = 1;
|
||||
}
|
||||
}
|
||||
closedir (DIR);
|
||||
if (!open (FILE, "<".$dir."CVS/Entries")) {
|
||||
print STDERR "No CVS information in \"".$dnam."\".\n";
|
||||
return;
|
||||
}
|
||||
while (<FILE>) {
|
||||
m%^D/([^/]+)/.*$% and $dirscvs{$1} = 1;
|
||||
m%^/([^/]+)/.*$% and $filescvs{$1} = 1;
|
||||
}
|
||||
close (FILE);
|
||||
if (open (FILE, "<".$dir."CVS/Entries.Log")) {
|
||||
while (<FILE>) {
|
||||
m%^A D/([^/]+)/.*$% and $dirscvs{$1} = 1;
|
||||
m%^A /([^/]+)/.*$% and $filescvs{$1} = 1;
|
||||
m%^R D/([^/]+)/.*$% and delete $dirscvs{$1};
|
||||
m%^R /([^/]+)/.*$% and delete $filescvs{$1};
|
||||
}
|
||||
close (FILE);
|
||||
}
|
||||
for my $fn (&newfiles (\%filesdir, \%filescvs)) {
|
||||
print ("F ".$dir.$fn."\n");
|
||||
&rmrf ($dir.$fn);
|
||||
}
|
||||
for my $fn (&newfiles (\%dirsdir, \%dirscvs)) {
|
||||
print ("D ".$dir.$fn."\n");
|
||||
&rmrf ($dir.$fn);
|
||||
}
|
||||
for my $fn (sort (keys (%dirscvs))) {
|
||||
&cvsclean ($dir.$fn."/");
|
||||
}
|
||||
}
|
||||
|
||||
&cvsclean ("");
|
||||
-669
@@ -1,669 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# cvs.sh
|
||||
#
|
||||
# This file contains support code from Makefile.common
|
||||
# It defines a shell function for each known target
|
||||
# and then does a case to call the correct function.
|
||||
|
||||
call_and_fix_autoconf()
|
||||
{
|
||||
$AUTOCONF || exit 1
|
||||
if test -r configure.in.in ; then
|
||||
perl -pi -e "print \"if test \\\"x\\\$with_fast_perl\\\" = \\\"xyes\\\"; then\
|
||||
\\n perl -i.bak \\\$ac_aux_dir/conf.change.pl \\\$CONFIG_STATUS\
|
||||
\\\\\\n || mv \\\$CONFIG_STATUS.bak \\\$CONFIG_STATUS\
|
||||
\\n rm -f \\\$CONFIG_STATUS.bak\\nfi\
|
||||
\\n\" if /^\\s*chmod\\s+.*\\+x\\s+.*CONFIG_STATUS/; s,^#line.*LINENO.*\$,/* \$& */, ;" configure
|
||||
fi
|
||||
}
|
||||
|
||||
strip_makefile()
|
||||
{
|
||||
if test ! -f $makefile_wo; then
|
||||
perl -e '$in=0; while ( <> ) { $in = 1 if ($_ =~ m/^if / ); print $_ unless ($in || $_ =~ m/^include /); $in = 0 if ($_ =~ m/^endif/); }' < $makefile_am > $makefile_wo
|
||||
fi
|
||||
}
|
||||
|
||||
check_autotool_versions()
|
||||
{
|
||||
required_autoconf_version="2.53 or newer"
|
||||
AUTOCONF_VERSION=`$AUTOCONF --version | head -n 1`
|
||||
case $AUTOCONF_VERSION in
|
||||
Autoconf*2.5* | autoconf*2.5* ) : ;;
|
||||
"" )
|
||||
echo "*** AUTOCONF NOT FOUND!."
|
||||
echo "*** KDE requires autoconf $required_autoconf_version"
|
||||
exit 1
|
||||
;;
|
||||
* )
|
||||
echo "*** YOU'RE USING $AUTOCONF_VERSION."
|
||||
echo "*** KDE requires autoconf $required_autoconf_version"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
AUTOHEADER_VERSION=`$AUTOHEADER --version | head -n 1`
|
||||
case $AUTOHEADER_VERSION in
|
||||
Autoconf*2.5* | autoheader*2.5* ) : ;;
|
||||
"" )
|
||||
echo "*** AUTOHEADER NOT FOUND!."
|
||||
echo "*** KDE requires autoheader $required_autoconf_version"
|
||||
exit 1
|
||||
;;
|
||||
* )
|
||||
echo "*** YOU'RE USING $AUTOHEADER_VERSION."
|
||||
echo "*** KDE requires autoheader $required_autoconf_version"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
AUTOMAKE_STRING=`$AUTOMAKE --version | head -n 1`
|
||||
required_automake_version="1.6.1 or newer"
|
||||
case $AUTOMAKE_STRING in
|
||||
automake*1.5d* | automake*1.5* | automake*1.5-* )
|
||||
echo "*** YOU'RE USING $AUTOMAKE_STRING."
|
||||
echo "*** KDE requires automake $required_automake_version"
|
||||
exit 1
|
||||
;;
|
||||
automake*1.6.* | automake*1.7* | automake*1.8* | automake*1.9*) : ;;
|
||||
"" )
|
||||
echo "*** AUTOMAKE NOT FOUND!."
|
||||
echo "*** KDE requires automake $required_automake_version"
|
||||
exit 1
|
||||
;;
|
||||
unsermake* ) :
|
||||
echo "*** YOU'RE USING UNSERMAKE."
|
||||
echo "*** GOOD LUCK!! :)"
|
||||
;;
|
||||
* )
|
||||
echo "*** YOU'RE USING $AUTOMAKE_STRING."
|
||||
echo "*** KDE requires automake $required_automake_version"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
unset required_automake_version
|
||||
}
|
||||
|
||||
cvs()
|
||||
{
|
||||
check_autotool_versions
|
||||
acinclude_m4
|
||||
|
||||
### Make new subdirs and configure.in.
|
||||
### The make calls could be optimized away here,
|
||||
### with a little thought.
|
||||
if test -r configure.in.in; then
|
||||
rm -f configure.in
|
||||
echo "*** Creating list of subdirectories"
|
||||
create_subdirs
|
||||
|
||||
if test -r Makefile.am.in; then
|
||||
echo "*** Creating Makefile.am"
|
||||
if grep '\$(top_srcdir)/Makefile.am:' $makefile_am >/dev/null; then
|
||||
strip_makefile
|
||||
$MAKE -f $makefile_wo top_srcdir=. ./Makefile.am || exit 1
|
||||
else
|
||||
Makefile_am
|
||||
fi
|
||||
fi
|
||||
configure_files
|
||||
echo "*** Creating configure.in"
|
||||
if grep '\$(top_srcdir)/configure.in:' $makefile_am >/dev/null; then
|
||||
strip_makefile
|
||||
$MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
|
||||
else
|
||||
configure_in
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "*** Creating aclocal.m4"
|
||||
$ACLOCAL $ACLOCALFLAGS || exit 1
|
||||
echo "*** Creating configure"
|
||||
call_and_fix_autoconf
|
||||
|
||||
if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then
|
||||
echo "*** Creating config.h template"
|
||||
$AUTOHEADER || exit 1
|
||||
fi
|
||||
|
||||
echo "*** Creating Makefile templates"
|
||||
$AUTOMAKE || exit 1
|
||||
if test -z "$UNSERMAKE"; then
|
||||
echo "*** Postprocessing Makefile templates"
|
||||
perl -w admin/am_edit || exit 1
|
||||
fi
|
||||
|
||||
if egrep "^cvs-local:" $makefile_am >/dev/null; then \
|
||||
strip_makefile
|
||||
$MAKE -f $makefile_wo cvs-local top_srcdir=. || exit 1
|
||||
fi
|
||||
|
||||
echo "*** Creating date/time stamp"
|
||||
touch stamp-h.in
|
||||
|
||||
echo "*** Finished"
|
||||
echo " Don't forget to run ./configure"
|
||||
echo " If you haven't done so in a while, run ./configure --help"
|
||||
}
|
||||
|
||||
dist()
|
||||
{
|
||||
check_autotool_versions
|
||||
|
||||
###
|
||||
### First build all of the files necessary to do just "make"
|
||||
###
|
||||
acinclude_m4
|
||||
if test -r configure.in.in; then
|
||||
rm -f configure.in
|
||||
create_subdirs
|
||||
|
||||
if test -r Makefile.am.in; then
|
||||
if grep '\$(top_srcdir)/Makefile.am:' $makefile_am >/dev/null; then
|
||||
strip_makefile
|
||||
$MAKE -f $makefile_wo top_srcdir=. ./Makefile.am || exit 1
|
||||
else
|
||||
Makefile_am
|
||||
fi
|
||||
fi
|
||||
configure_files
|
||||
if grep '\$(top_srcdir)/configure.in:' $makefile_am >/dev/null; then
|
||||
strip_makefile
|
||||
$MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
|
||||
else
|
||||
configure_in
|
||||
fi
|
||||
fi
|
||||
$ACLOCAL $ACLOCALFLAGS
|
||||
if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then
|
||||
echo "*** Creating config.h template"
|
||||
$AUTOHEADER || exit 1
|
||||
fi
|
||||
$AUTOMAKE --foreign
|
||||
perl -w admin/am_edit
|
||||
call_and_fix_autoconf
|
||||
touch stamp-h.in
|
||||
if grep "^cvs-local:" $makefile_am >/dev/null; then
|
||||
strip_makefile
|
||||
$MAKE -f $makefile_wo cvs-local top_srcdir=.
|
||||
fi
|
||||
|
||||
###
|
||||
### Then make messages
|
||||
###
|
||||
if test -d po; then
|
||||
LIST=`find ./po -name "*.po"`
|
||||
for i in $LIST; do
|
||||
file2=`echo $i | sed -e "s#\.po#\.gmo#"`
|
||||
msgfmt -o $file2 $i || touch $file2
|
||||
done
|
||||
fi
|
||||
if grep "^cvs-dist-local:" $makefile_am >/dev/null; then
|
||||
strip_makefile
|
||||
$MAKE -f $makefile_wo cvs-dist-local top_srcdir=.
|
||||
fi
|
||||
}
|
||||
|
||||
subdir_dist()
|
||||
{
|
||||
$ACLOCAL $ACLOCALFLAGS
|
||||
$AUTOHEADER
|
||||
$AUTOMAKE
|
||||
perl -w ../admin/am_edit --path=../admin
|
||||
call_and_fix_autoconf
|
||||
touch stamp-h.in
|
||||
}
|
||||
|
||||
configure_in()
|
||||
{
|
||||
rm -f configure.in configure.in.new
|
||||
kde_use_qt_param=
|
||||
test -f configure.files || { echo "need configure.files for configure.in"; exit 1; }
|
||||
list=`fgrep -v "configure.in.bot" < configure.files | fgrep -v "configure.in.mid"`
|
||||
: > configure.in.new
|
||||
for file in $list; do
|
||||
echo "dnl =======================================================" >> configure.in.new
|
||||
echo "dnl FILE: $file" >> configure.in.new
|
||||
echo "dnl =======================================================" >> configure.in.new
|
||||
echo "" >> configure.in.new
|
||||
cat $file >> configure.in.new
|
||||
done
|
||||
echo "KDE_CREATE_SUBDIRSLIST" >> configure.in.new
|
||||
if test -f Makefile.am.in; then
|
||||
subdirs=`cat subdirs`
|
||||
for dir in $subdirs; do
|
||||
vdir=`echo $dir | sed -e 's,[-+.@],_,g'`
|
||||
echo "AM_CONDITIONAL($vdir""_SUBDIR_included, test \"x\$$vdir""_SUBDIR_included\" = xyes)" >> configure.in.new
|
||||
if test -f "$dir/configure.in"; then
|
||||
echo "if test \"x\$$vdir""_SUBDIR_included\" = xyes; then " >> configure.in.new
|
||||
echo " AC_CONFIG_SUBDIRS($dir)" >> configure.in.new
|
||||
echo "fi" >> configure.in.new
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo "AC_CONFIG_FILES([ Makefile ])" >> configure.in.new
|
||||
if test -n "$UNSERMAKE"; then
|
||||
echo "AC_CONFIG_FILES([ Makefile.rules ])" >> configure.in.new
|
||||
echo "AC_CONFIG_FILES([ Makefile.calls ])" >> configure.in.new
|
||||
fi
|
||||
|
||||
if test -f inst-apps; then
|
||||
topleveldirs=`cat inst-apps`
|
||||
else
|
||||
topleveldirs=
|
||||
for dir in `ls -1d * | sort`; do
|
||||
if test "$dir" != "debian" && test -d $dir; then
|
||||
topleveldirs="$topleveldirs $dir"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
for topleveldir in $topleveldirs; do
|
||||
if test -f $topleveldir/configure.in; then
|
||||
continue
|
||||
fi
|
||||
if test -f $topleveldir/Makefile.am; then :; else
|
||||
continue
|
||||
fi
|
||||
|
||||
mfs=`find $topleveldir -name Makefile.am -print | fgrep -v "/." | \
|
||||
sed -e 's#\./##; s#/Makefile.am$##' | sort | sed -e 's#$#/Makefile#'`
|
||||
for i in $mfs; do
|
||||
echo "AC_CONFIG_FILES([ $i ])" >> configure.in.new
|
||||
if test -n "$UNSERMAKE"; then
|
||||
echo "AC_CONFIG_FILES([ $i.rules ])" >> configure.in.new
|
||||
echo "AC_CONFIG_FILES([ $i.calls ])" >> configure.in.new
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
files=`cat configure.files`
|
||||
list=`egrep '^dnl AC_OUTPUT\(.*\)' $files | sed -e "s#^.*dnl AC_OUTPUT(\(.*\))#\1#"`
|
||||
for file in $list; do
|
||||
echo "AC_CONFIG_FILES([ $file ])" >> configure.in.new
|
||||
done
|
||||
|
||||
if test -n "$UNSERMAKE"; then
|
||||
echo "AC_CONFIG_FILES([ MakeVars ])" >> configure.in.new
|
||||
fi
|
||||
|
||||
midfiles=`cat configure.files | fgrep "configure.in.mid"`
|
||||
test -n "$midfiles" && cat $midfiles >> configure.in.new
|
||||
|
||||
echo "AC_OUTPUT" >> configure.in.new
|
||||
modulename=
|
||||
if test -f configure.in.in; then
|
||||
if head -n 2 configure.in.in | egrep "^#MIN_CONFIG\(.*\)$" > /dev/null; then
|
||||
kde_use_qt_param=`cat configure.in.in | sed -n -e "s/#MIN_CONFIG(\(.*\))/\1/p"`
|
||||
fi
|
||||
if head -n 2 configure.in.in | egrep "^#MIN_CONFIG" > /dev/null; then
|
||||
line=`grep "^AM_INIT_AUTOMAKE(" configure.in.in`
|
||||
if test -n "$line"; then
|
||||
modulename=`echo $line | sed -e "s#AM_INIT_AUTOMAKE(\([^,]*\),.*#\1#"`
|
||||
VERSION=`echo $line | sed -e "s#AM_INIT_AUTOMAKE([^,]*, *\([^)]*\)).*#\1#"`
|
||||
fi
|
||||
sed -e "s#AM_INIT_AUTOMAKE([^@].*#dnl PACKAGE set before#" \
|
||||
configure.in.new > configure.in && mv configure.in configure.in.new
|
||||
fi
|
||||
fi
|
||||
if test -z "$VERSION" || test "$VERSION" = "@VERSION@"; then
|
||||
VERSION="\"3.3.0\""
|
||||
fi
|
||||
if test -z "$modulename" || test "$modulename" = "@MODULENAME@"; then
|
||||
modulename=`pwd`;
|
||||
modulename=`basename $modulename`
|
||||
esc_VERSION=`echo $VERSION | sed -e "s#[^.0-9a-zA-Z]##g"`
|
||||
modulename=`echo $modulename | sed -e "s#-$esc_VERSION##"`
|
||||
|
||||
fi
|
||||
if test -n "$kde_use_qt_param"; then
|
||||
sed -e "s#^dnl KDE_USE_QT#KDE_USE_QT($kde_use_qt_param)#" \
|
||||
configure.in.new > configure.in && mv configure.in configure.in.new
|
||||
fi
|
||||
sed -e "s#@MODULENAME@#$modulename#" configure.in.new |
|
||||
sed -e "s#@VERSION@#$VERSION#" > configure.in
|
||||
botfiles=`cat configure.files | egrep "configure.in.bot"`
|
||||
test -n "$botfiles" && cat $botfiles >> configure.in
|
||||
cat $admindir/configure.in.bot.end >> configure.in
|
||||
rm -f configure.in.new
|
||||
}
|
||||
|
||||
configure_files()
|
||||
{
|
||||
echo "*** Creating configure.files"
|
||||
admindir=NO
|
||||
for i in . .. ../.. ../../..; do
|
||||
if test -x $i/admin; then admindir=$i/admin; break; fi
|
||||
done
|
||||
rm -f configure.files
|
||||
touch configure.files
|
||||
if test -f configure.in.in && head -n 2 configure.in.in | grep "^#MIN_CONFIG" > /dev/null; then
|
||||
echo $admindir/configure.in.min >> configure.files
|
||||
fi
|
||||
test -f configure.in.in && echo configure.in.in >> configure.files
|
||||
# we collect files in the subdirs and do some sorting tricks, so subsubdirs come after subdirs
|
||||
if test -f inst-apps; then
|
||||
inst=`cat inst-apps`
|
||||
list=""
|
||||
for i in $inst; do
|
||||
list="$list `find $i/ -name "configure.in.in" -o -name "configure.in.bot" -o -name "configure.in.mid" | \
|
||||
sed -e "s,/configure,/aaaconfigure," | sort | sed -e "s,/aaaconfigure,/configure,"`"
|
||||
done
|
||||
else
|
||||
list=`find . -name "configure.in.in" -o -name "configure.in.bot" -o -name "configure.in.mid" | \
|
||||
sed -e "s,/configure,/aaaconfigure," | sort | sed -e "s,/aaaconfigure,/configure,"`
|
||||
fi
|
||||
for i in $list; do if test -f $i && test `dirname $i` != "." ; then
|
||||
echo $i >> configure.files
|
||||
fi; done
|
||||
test -f configure.in.mid && echo configure.in.mid >> configure.files
|
||||
test -f configure.in.bot && echo configure.in.bot >> configure.files
|
||||
if test ! -s configure.files; then
|
||||
echo "There are no files to build a configure. Please check your checkout."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
create_subdirs()
|
||||
{
|
||||
if grep '\$(top_srcdir)/subdirs:' $makefile_am >/dev/null; then
|
||||
# as many modules contain rules to create subdirs without any
|
||||
# dependencies make won't create it unless there is no file.
|
||||
# so we check if that's a dummy rule or one that works
|
||||
rm -f subdirs.cvs.sh.$$
|
||||
if test -f subdirs; then
|
||||
mv subdirs subdirs.cvs.sh.$$
|
||||
fi
|
||||
strip_makefile
|
||||
$MAKE -f $makefile_wo top_srcdir=. ./subdirs || exit 1
|
||||
if test -f subdirs.cvs.sh.$$; then
|
||||
if test -s subdirs; then
|
||||
rm subdirs.cvs.sh.$$
|
||||
else
|
||||
mv subdirs.cvs.sh.$$ subdirs
|
||||
fi
|
||||
fi
|
||||
else
|
||||
subdirs
|
||||
fi
|
||||
}
|
||||
|
||||
subdirs()
|
||||
{
|
||||
dirs=
|
||||
idirs=
|
||||
if test -f inst-apps; then
|
||||
idirs=`cat inst-apps`
|
||||
else
|
||||
idirs=`ls -1 | sort`
|
||||
fi
|
||||
|
||||
compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -n 1`
|
||||
compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -n 1`
|
||||
for i in $idirs; do
|
||||
if test -f $i/Makefile.am; then
|
||||
case " $compilefirst $compilelast " in
|
||||
*" $i "*) ;;
|
||||
*) dirs="$dirs $i"
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
: > ./_SUBDIRS
|
||||
|
||||
for d in $compilefirst; do
|
||||
echo $d >> ./_SUBDIRS
|
||||
done
|
||||
|
||||
(for d in $dirs; do
|
||||
list=`sed -ne "s#^COMPILE_BEFORE_$d""[ ]*=[ ]*##p" $makefile_am | head -n 1`
|
||||
for s in $list; do
|
||||
echo $s $d
|
||||
done
|
||||
list=`sed -ne "s#^COMPILE_AFTER_$d""[ ]*=[ ]*##p" $makefile_am | head -n 1`
|
||||
for s in $list; do
|
||||
echo $d $s
|
||||
done
|
||||
echo $d $d
|
||||
done ) | tsort >> ./_SUBDIRS
|
||||
|
||||
for d in $compilelast; do
|
||||
echo $d >> ./_SUBDIRS
|
||||
done
|
||||
|
||||
if test -r subdirs && cmp -s subdirs _SUBDIRS; then
|
||||
rm -f _SUBDIRS
|
||||
fi
|
||||
test -r _SUBDIRS && mv _SUBDIRS subdirs || true
|
||||
}
|
||||
|
||||
Makefile_am()
|
||||
{
|
||||
if test -f Makefile.am.in; then
|
||||
compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -n 1`
|
||||
compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -n 1`
|
||||
|
||||
idirs=
|
||||
dirs=
|
||||
if test -f inst-apps; then
|
||||
idirs=`cat inst-apps`
|
||||
else
|
||||
idirs=`cat subdirs`
|
||||
fi
|
||||
for i in $idirs; do
|
||||
case " $compilefirst $compilelast " in
|
||||
*" $i "*) ;;
|
||||
*) dirs="$dirs $i"
|
||||
esac
|
||||
done
|
||||
|
||||
adds=`fgrep '$(top_srcdir)/acinclude.m4:' Makefile.am.in | sed -e 's,^[^:]*: *,,; s,\$(top_srcdir)/,,g'`
|
||||
if echo "$adds" | fgrep "*" >/dev/null ; then
|
||||
adds=`ls -d -1 $adds 2>/dev/null`
|
||||
fgrep -v '$(top_srcdir)/acinclude.m4:' Makefile.am.in > Makefile.am.in.adds
|
||||
str='$(top_srcdir)/acinclude.m4:'
|
||||
for add in $adds; do
|
||||
str="$str \$(top_srcdir)/$add"
|
||||
done
|
||||
echo $str >> Makefile.am.in.adds
|
||||
else
|
||||
cat Makefile.am.in > Makefile.am.in.adds
|
||||
fi
|
||||
|
||||
if test -n "$UNSERMAKE"; then
|
||||
cat Makefile.am.in.adds > Makefile.am
|
||||
topsubdirs=
|
||||
for i in $compilefirst $dirs $compilelast; do
|
||||
vari=`echo $i | sed -e "s,[-+],_,g"`
|
||||
echo "if $vari""_SUBDIR_included" >> Makefile.am
|
||||
echo "$vari""_SUBDIR=$i" >> Makefile.am
|
||||
echo "endif" >> Makefile.am
|
||||
topsubdirs="$topsubdirs \$($vari""_SUBDIR)"
|
||||
done
|
||||
echo "SUBDIRS=$topsubdirs" >> Makefile.am
|
||||
else
|
||||
cat Makefile.am.in.adds | \
|
||||
sed -e 's,^\s*\(COMPILE_BEFORE.*\),# \1,' | \
|
||||
sed -e 's,^\s*\(COMPILE_AFTER.*\),# \1,' > Makefile.am
|
||||
echo "SUBDIRS="'$(TOPSUBDIRS)' >> Makefile.am
|
||||
fi
|
||||
rm Makefile.am.in.adds
|
||||
fi
|
||||
}
|
||||
|
||||
acinclude_m4()
|
||||
{
|
||||
echo "*** Creating acinclude.m4"
|
||||
adds=
|
||||
if grep '\$(top_srcdir)/acinclude.m4:' $makefile_am >/dev/null; then
|
||||
strip_makefile
|
||||
rm -f acinclude.m4
|
||||
adds=`grep '\$(top_srcdir)/acinclude.m4:' $makefile_wo | sed -e 's,^[^:]*: *,,; s,\$(top_srcdir),.,g'`
|
||||
if echo $adds | fgrep "*" >/dev/null ; then
|
||||
adds=`ls -d -1 $adds 2>/dev/null`
|
||||
else
|
||||
$MAKE -f $makefile_wo top_srcdir=. ./acinclude.m4 || exit 1
|
||||
fi
|
||||
else
|
||||
rm -f acinclude.m4
|
||||
fi
|
||||
# if it wasn't created up to now, then we do it better
|
||||
if test ! -f acinclude.m4; then
|
||||
cat admin/acinclude.m4.in admin/libtool.m4.in $adds > acinclude.m4
|
||||
fi
|
||||
}
|
||||
|
||||
cvs_clean()
|
||||
{
|
||||
if test -d CVS; then :; else
|
||||
echo "You don't have a toplevel CVS directory."
|
||||
echo "You most certainly didn't use cvs to get these sources."
|
||||
echo "But this function depends on cvs's information."
|
||||
exit 1
|
||||
fi
|
||||
perl $admindir/cvs-clean.pl
|
||||
}
|
||||
|
||||
package_merge()
|
||||
{
|
||||
catalogs=$POFILES
|
||||
for cat in $catalogs; do
|
||||
msgmerge -o $cat.new $cat $PACKAGE.pot
|
||||
if test -s $cat.new; then
|
||||
grep -v "\"POT-Creation" $cat.new > $cat.new.2
|
||||
grep -v "\"POT-Creation" $cat >> $cat.new.1
|
||||
if diff $cat.new.1 $cat.new.2; then
|
||||
rm $cat.new
|
||||
else
|
||||
mv $cat.new $cat
|
||||
fi
|
||||
rm -f $cat.new.1 $cat.new.2
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
package_messages()
|
||||
{
|
||||
rm -rf po.backup
|
||||
mkdir po.backup
|
||||
|
||||
for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do
|
||||
egrep -v '^#([^:]|$)' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > po.backup/$i
|
||||
cat po/$i > po.backup/backup_$i
|
||||
touch -r po/$i po.backup/backup_$i
|
||||
rm po/$i
|
||||
done
|
||||
|
||||
podir=${podir:-$PWD/po}
|
||||
files=`find . -name Makefile.am | xargs egrep -l '^messages:' `
|
||||
dirs=`for i in $files; do echo \`dirname $i\`; done`
|
||||
tmpname="$PWD/messages.log"
|
||||
if test -z "$EXTRACTRC"; then EXTRACTRC=extractrc ; fi
|
||||
if test -z "$PREPARETIPS"; then PREPARETIPS=preparetips ; fi
|
||||
export EXTRACTRC PREPARETIPS
|
||||
|
||||
for subdir in $dirs; do
|
||||
test -z "$VERBOSE" || echo "Making messages in $subdir"
|
||||
(cd $subdir
|
||||
if test -n "`grep -e '^messages:.*rc.cpp' Makefile.am`"; then
|
||||
$EXTRACTRC *.rc *.ui *.kcfg > rc.cpp
|
||||
else
|
||||
candidates=`ls -1 *.rc *.ui *.kcfg 2>/dev/null`
|
||||
if test -n "$candidates"; then
|
||||
echo "$subdir has *.rc, *.ui or *.kcfg files, but not correct messages line"
|
||||
fi
|
||||
fi
|
||||
if test -n "`grep -r KAboutData *.c* *.C* 2>/dev/null`"; then
|
||||
echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > _translatorinfo.cpp
|
||||
else echo " " > _translatorinfo.cpp
|
||||
fi
|
||||
perl -e '$mes=0; while (<STDIN>) { next if (/^(if\s|else\s|endif)/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am | egrep -v '^include ' > _transMakefile
|
||||
|
||||
kdepotpath=${includedir:-${KDEDIR:-`kde-config --prefix`}/include}/kde.pot
|
||||
|
||||
$MAKE -s -f _transMakefile podir=$podir EXTRACTRC="$EXTRACTRC" PREPARETIPS="$PREPARETIPS" \
|
||||
XGETTEXT="${XGETTEXT:-xgettext} -C -ki18n -ktr2i18n -kI18N_NOOP -kaliasLocale -x $kdepotpath" messages
|
||||
exit_code=$?
|
||||
if test "$exit_code" != 0; then
|
||||
echo "make exit code: $exit_code"
|
||||
fi
|
||||
) 2>&1 | grep -v '^make\[1\]' > $tmpname
|
||||
test -s $tmpname && { echo $subdir ; cat "$tmpname"; }
|
||||
test -f $subdir/rc.cpp && rm -f $subdir/rc.cpp
|
||||
rm -f $subdir/_translatorinfo.cpp
|
||||
rm -f $subdir/_transMakefile
|
||||
done
|
||||
rm -f $tmpname
|
||||
for i in `ls -1 po.backup/*.pot 2>/dev/null | sed -e "s#po.backup/##" | egrep -v '^backup_'`; do
|
||||
test -f po/$i || echo "disappeared: $i"
|
||||
done
|
||||
for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do
|
||||
sed -e 's,^"Content-Type: text/plain; charset=CHARSET\\n"$,"Content-Type: text/plain; charset=UTF-8\\n",' po/$i > po/$i.new && mv po/$i.new po/$i
|
||||
msgmerge -q -o po/$i po/$i po/$i
|
||||
egrep -v '^#([^:]|$)' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > temp.pot
|
||||
if test -f po.backup/$i && test -n "`diff temp.pot po.backup/$i`"; then
|
||||
echo "will update $i"
|
||||
sed -e 's,^"Content-Type: text/plain; charset=CHARSET\\n"$,"Content-Type: text/plain; charset=UTF-8\\n",' po.backup/$backup_$i > po/$i.new && mv po/$i.new po.backup/backup_$i
|
||||
msgmerge -q po.backup/backup_$i po/$i > temp.pot
|
||||
mv temp.pot po/$i
|
||||
else
|
||||
if test -f po.backup/backup_$i; then
|
||||
test -z "$VERBOSE" || echo "I'm restoring $i"
|
||||
mv po.backup/backup_$i po/$i
|
||||
rm po.backup/$i
|
||||
else
|
||||
echo "will add $i"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
rm -f temp.pot
|
||||
rm -rf po.backup
|
||||
}
|
||||
|
||||
unset LC_ALL || :
|
||||
unset LANG || :
|
||||
unset LC_CTYPE || :
|
||||
unset LANGUAGE || :
|
||||
|
||||
unset CDPATH || :
|
||||
admindir=`echo "$0" | sed 's%[\\/][^\\/][^\\/]*$%%'`
|
||||
test "x$admindir" = "x$0" && admindir=.
|
||||
|
||||
test "x$MAKE" = x && MAKE=make
|
||||
makefile_am=Makefile.am
|
||||
makefile_wo=Makefile.am.wo
|
||||
if test -f Makefile.am.in; then
|
||||
makefile_am=Makefile.am.in
|
||||
makefile_wo=Makefile.am.in.wo
|
||||
rm -f $makefile_wo
|
||||
fi
|
||||
|
||||
# Suck in the AUTOCONF detection code
|
||||
. $admindir/detect-autoconf.sh
|
||||
|
||||
###
|
||||
### Main
|
||||
###
|
||||
|
||||
arg=`echo $1 | tr '\-.' __`
|
||||
case $arg in
|
||||
cvs | dist | subdir_dist | configure_in | configure_files | subdirs | \
|
||||
cvs_clean | package_merge | package_messages | Makefile_am | acinclude_m4 ) $arg ;;
|
||||
configure ) call_and_fix_autoconf ;;
|
||||
* ) echo "Usage: cvs.sh <target>"
|
||||
echo "Target can be one of:"
|
||||
echo " cvs cvs-clean dist"
|
||||
echo " configure.in configure.files"
|
||||
echo " package-merge package-messages"
|
||||
echo ""
|
||||
echo "Usage: anything but $1"
|
||||
exit 1 ;;
|
||||
esac
|
||||
|
||||
if test -f $makefile_wo; then
|
||||
rm $makefile_wo
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use Shell qw(mv cp mkdir rm) ;
|
||||
use File::Find;
|
||||
use Cwd;
|
||||
|
||||
$origPwd = `pwd`;
|
||||
chomp $origPwd;
|
||||
|
||||
$kde_prefix = "/usr";
|
||||
$sysconfdir = "/etc";
|
||||
$kde_includedir = "$kde_prefix/include/kde";
|
||||
$infodir = "$kde_prefix/share/info";
|
||||
$mandir = "$kde_prefix/share/man";
|
||||
$qtdir = "/usr/share/qt3";
|
||||
|
||||
$kde_cgidir = "$kde_prefix/lib/cgi-bin";
|
||||
$kde_confdir = "$sysconfdir/kde3";
|
||||
$kde_htmldir = "$kde_prefix/share/doc/kde/HTML";
|
||||
|
||||
if (defined $ENV{DEB_BUILD_OPTIONS} &&
|
||||
$ENV{DEB_BUILD_OPTIONS} =~ /\bnostrip\b/) {
|
||||
$enable_debug="--enable-debug=full";
|
||||
} else {
|
||||
$enable_debug="--disable-debug";
|
||||
}
|
||||
|
||||
if (@ARGV && $ARGV[0] eq 'echodirs') {
|
||||
print STDOUT "export kde_prefix=$kde_prefix\n";
|
||||
print STDOUT "export sysconfdir=$sysconfdir\n";
|
||||
print STDOUT "export kde_includedir=$kde_includedir\n";
|
||||
print STDOUT "export infodir=$infodir\n";
|
||||
print STDOUT "export mandir=$mandir\n";
|
||||
print STDOUT "export qtdir=$qtdir\n";
|
||||
|
||||
print STDOUT "export kde_cgidir=$kde_cgidir\n";
|
||||
print STDOUT "export kde_confdir=$kde_confdir\n";
|
||||
print STDOUT "export kde_htmldir=$kde_htmldir\n";
|
||||
|
||||
print STDOUT "configkde=$enable_debug --disable-rpath --prefix=\$(kde_prefix) --sysconfdir=\$(sysconfdir) --includedir=\$(kde_includedir) --infodir=\$(infodir) --mandir=\$(mandir) --with-qt-dir=\$(qtdir)\n";
|
||||
|
||||
exit
|
||||
}
|
||||
-441
@@ -1,441 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. This file always lives in the current directory.
|
||||
# Also, the AIX compiler puts `$object:' at the start of each line;
|
||||
# $object doesn't have directory information.
|
||||
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
outname="$stripped.o"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Must come before tru64.
|
||||
|
||||
# Intel's C compiler understands `-MD -MF file'. However
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 AIX compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
|
||||
tmpdepfile1="$object.d"
|
||||
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a space and a tab in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*) # this is libtool, let us make it quiet
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case "$arg" in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
# X makedepend
|
||||
(
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in no)
|
||||
set ""; shift
|
||||
cleared=yes
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift;;
|
||||
-*)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tail +3 "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*)
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case $arg in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*)
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case $arg in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -1,19 +0,0 @@
|
||||
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in $(top_srcdir)/admin/cvs.sh
|
||||
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh acinclude_m4
|
||||
|
||||
$(top_srcdir)/configure.in: $(top_srcdir)/subdirs $(top_srcdir)/configure.files $(top_srcdir)/admin/cvs.sh
|
||||
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh configure_in
|
||||
|
||||
$(top_srcdir)/configure.files: $(top_srcdir)/subdirs $(CONF_FILES)
|
||||
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh configure.files $(top_srcdir)/admin/cvs.sh
|
||||
|
||||
$(top_srcdir)/Makefile.am: $(top_srcdir)/Makefile.am.in $(top_srcdir)/subdirs $(top_srcdir)/admin/cvs.sh
|
||||
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh Makefile_am
|
||||
|
||||
$(top_srcdir)/subdirs: $(top_srcdir)/Makefile.am.in $(top_srcdir)/admin/cvs.sh
|
||||
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh subdirs
|
||||
|
||||
# defining default rules for files that may not be present
|
||||
$(top_srcdir)/Makefile.am.in:
|
||||
$(CONF_FILES):
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Global variables...
|
||||
AUTOCONF="autoconf"
|
||||
AUTOHEADER="autoheader"
|
||||
AUTOM4TE="autom4te"
|
||||
AUTOMAKE="automake"
|
||||
ACLOCAL="aclocal"
|
||||
|
||||
# Please add higher versions first. The last version number is the minimum
|
||||
# needed to compile KDE. Do not forget to include the name/version #
|
||||
# separator if one is present, e.g. -1.2 where - is the separator.
|
||||
KDE_AUTOCONF_VERS="-2.58 -2.57 257 -2.54 -2.53a -2.53 -2.52 -2.5x"
|
||||
KDE_AUTOMAKE_VERS="-1.7 17 -1.6"
|
||||
|
||||
# We don't use variable here for remembering the type ... strings. Local
|
||||
# variables are not that portable, but we fear namespace issues with our
|
||||
# includer.
|
||||
checkAutoconf()
|
||||
{
|
||||
for kde_autoconf_version in $KDE_AUTOCONF_VERS; do
|
||||
if test -x "`$WHICH $AUTOCONF$kde_autoconf_version 2>/dev/null`"; then
|
||||
AUTOCONF="`$WHICH $AUTOCONF$kde_autoconf_version`"
|
||||
AUTOHEADER="`$WHICH $AUTOHEADER$kde_autoconf_version`"
|
||||
AUTOM4TE="`$WHICH $AUTOM4TE$kde_autoconf_version`"
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
checkAutomake ()
|
||||
{
|
||||
for kde_automake_version in $KDE_AUTOMAKE_VERS; do
|
||||
if test -x "`$WHICH $AUTOMAKE$kde_automake_version 2>/dev/null`"; then
|
||||
AUTOMAKE="`$WHICH $AUTOMAKE$kde_automake_version`"
|
||||
ACLOCAL="`$WHICH $ACLOCAL$kde_automake_version`"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "$UNSERMAKE"; then
|
||||
AUTOMAKE="$UNSERMAKE"
|
||||
fi
|
||||
}
|
||||
|
||||
checkWhich ()
|
||||
{
|
||||
WHICH=""
|
||||
for i in "type -p" "which" "type" ; do
|
||||
T=`$i sh 2> /dev/null`
|
||||
test -x "$T" && WHICH="$i" && break
|
||||
done
|
||||
}
|
||||
|
||||
checkWhich
|
||||
checkAutoconf
|
||||
checkAutomake
|
||||
|
||||
export WHICH AUTOHEADER AUTOCONF AUTOM4TE AUTOMAKE ACLOCAL
|
||||
@@ -1,276 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd=$cpprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "$0: no input file specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d "$dst" ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f "$src" ] || [ -d "$src" ]
|
||||
then
|
||||
:
|
||||
else
|
||||
echo "$0: $src does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "$0: no destination specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d "$dst" ]
|
||||
then
|
||||
dst=$dst/`basename "$src"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
|
||||
if [ ! -d "$pathcomp" ] ;
|
||||
then
|
||||
$mkdirprog "$pathcomp"
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd "$dst" &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
dstfile=`basename "$dst" $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
rmtmp=$dstdir/#rm.$$#
|
||||
|
||||
# Trap to clean up temp files at exit.
|
||||
|
||||
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
|
||||
|
||||
# Now remove or move aside any old file at destination location. We try this
|
||||
# two ways since rm can't unlink itself on some systems and the destination
|
||||
# file might be busy for other reasons. In this case, the final cleanup
|
||||
# might fail but the new file should still install successfully.
|
||||
|
||||
{
|
||||
if [ -f "$dstdir/$dstfile" ]
|
||||
then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
|
||||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
|
||||
{
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
|
||||
fi &&
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
|
||||
{
|
||||
(exit 0); exit
|
||||
}
|
||||
Vendored
-5858
File diff suppressed because it is too large
Load Diff
-6350
File diff suppressed because it is too large
Load Diff
-336
@@ -1,336 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequirements for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -1,111 +0,0 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage" 1>&2
|
||||
exit 0
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
||||
-371
@@ -1,371 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Check namespace cleanness of a library.
|
||||
# Allowed symbols are passed as arguments.
|
||||
# They may have trailing * = wildcard.
|
||||
# Wildcards may be also specified as *::* (e.g. K*::* for all KDE classes)
|
||||
# Symbols are listed as full function unmangled names without arguments,
|
||||
# e.g. 'foo bar* nspace::*' allows foo(), foo(int), bar(), barbar()
|
||||
# and all symbols in namespace/class nspace.
|
||||
# If an argument has comma in it, it's a filename of a file containing
|
||||
# allowed symbols, one per line.
|
||||
|
||||
|
||||
$thisProg = "$0"; # This programs name
|
||||
|
||||
$library = "";
|
||||
$allowed_symbols = "";
|
||||
$debug = 0;
|
||||
$allowed_weak = "";
|
||||
$weak_specified = 0;
|
||||
|
||||
while( defined( $ARGV[ 0 ] ))
|
||||
{
|
||||
$_ = shift;
|
||||
if( /^--verbose$|^-v$/ )
|
||||
{
|
||||
$debug = 1;
|
||||
}
|
||||
elsif( /^--help$|^-h$/ )
|
||||
{
|
||||
print STDOUT "Usage $thisProg [OPTION] ... library [allowed symbols] ...\n",
|
||||
"\n",
|
||||
"Check if the given library has only allowed public symbols.\n",
|
||||
"\n",
|
||||
" --allowweak=[symbol] allow only these weak symbols\n",
|
||||
" -v, --verbose verbosely list files processed\n",
|
||||
" -h, --help print this help, then exit\n";
|
||||
exit 0;
|
||||
}
|
||||
elsif( /^--allowweak=(.*)$/ )
|
||||
{
|
||||
$allowed_weak .= " " . $1;
|
||||
$weak_specified = 1;
|
||||
}
|
||||
elsif( /^--allowweak$/ ) # simply list all weak
|
||||
{
|
||||
$allowed_weak .= " ";
|
||||
$weak_specified = 1;
|
||||
}
|
||||
elsif( /^--*/ )
|
||||
{
|
||||
die "Invalid argument!\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ! $library )
|
||||
{
|
||||
$library = $_;
|
||||
}
|
||||
else
|
||||
{
|
||||
$allowed_symbols .= " " . $_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( ! $weak_specified )
|
||||
{
|
||||
$allowed_weak = "*";
|
||||
# allow all weak symbols by default
|
||||
# instances of templates and similar stuff - unfortunately includes also things from other libraries,
|
||||
# so it cannot be on by default
|
||||
}
|
||||
|
||||
print STDERR "library:" . $library . "\n" if $debug;
|
||||
print STDERR "allowed_symbols:" . $allowed_symbols . "\n" if $debug;
|
||||
print STDERR "allowed_weak:" . $allowed_weak . "\n" if $debug;
|
||||
|
||||
$default_symbols = "_fini _init"; # system symbols
|
||||
# on my system, every .so has :
|
||||
# A _DYNAMIC
|
||||
# A _GLOBAL_OFFSET_TABLE_
|
||||
# A __bss_start
|
||||
# A _edata
|
||||
# A _end
|
||||
# T _fini
|
||||
# T _init
|
||||
# no need to list A symbols in $default_symbols
|
||||
|
||||
print STDERR "default_symbols: " . $default_symbols . "\n" if $debug;
|
||||
|
||||
print STDOUT "Namespace cleanness check for " . $library . " :\n";
|
||||
|
||||
$lib_file = "";
|
||||
if( $library =~ /\.la$/ )
|
||||
{
|
||||
# get the real library file from .la
|
||||
open( FILEIN, $library ) || die "Couldn't open $! !\n";
|
||||
while( $line = <FILEIN> )
|
||||
{
|
||||
if( $line =~ /library_names=\'([^ ]*).*/o )
|
||||
{
|
||||
$lib_file = $1;
|
||||
}
|
||||
}
|
||||
close( FILEIN );
|
||||
if( ! $lib_file )
|
||||
{
|
||||
print STDERR "Library file not found in .la file!\n";
|
||||
exit 1;
|
||||
}
|
||||
my $libpath = $library;
|
||||
$libpath =~ s%[^/]*$%%;
|
||||
if( -e $libpath . ".libs/" . $lib_file )
|
||||
{
|
||||
$lib_file = $libpath . ".libs/" . $lib_file;
|
||||
}
|
||||
else
|
||||
{
|
||||
$lib_file = $libpath . $lib_file;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$lib_file = $library;
|
||||
}
|
||||
|
||||
print STDERR "libfile: ". $lib_file . "\n" if $debug;
|
||||
|
||||
$allowed_symbols .= " " . $default_symbols;
|
||||
|
||||
sub process_symbols($\@\%\@);
|
||||
|
||||
@wildcards = ();
|
||||
%exacts = ();
|
||||
@regwildcards = ();
|
||||
process_symbols( $allowed_symbols, @wildcards, %exacts, @regwildcards );
|
||||
@weak_wildcards = ();
|
||||
%weak_exacts = ();
|
||||
@weak_regwildcards = ();
|
||||
process_symbols( $allowed_weak, @weak_wildcards, %weak_exacts, @weak_regwildcards );
|
||||
|
||||
# grep is for stripping not exported symbols, which don't have address (=first column)
|
||||
$nm_command = "nm -BDCg " . $lib_file . " | grep -v '^ ' |";
|
||||
|
||||
# TODO how portable is this nmcheck stuff?
|
||||
|
||||
print STDERR "nm command:" . $nm_command . "\n" if $debug;
|
||||
|
||||
open( FILEIN, $nm_command ) || die "nm command failed\n";
|
||||
|
||||
my $exit_code = 0;
|
||||
|
||||
while( $line = <FILEIN> )
|
||||
{
|
||||
my $type;
|
||||
my $symbol;
|
||||
if( $line =~ /^[^ ]* (.) (.*)$/o )
|
||||
{
|
||||
$type = $1;
|
||||
$symbol = $2;
|
||||
}
|
||||
else
|
||||
{
|
||||
die "Invalid line: " . $line . "\n";
|
||||
}
|
||||
|
||||
print STDERR "Type: " . $type . " , symbol: " . $symbol . "\n" if $debug;
|
||||
if( $type eq "A" )
|
||||
{ # these should be system symbols, so ignore them
|
||||
next;
|
||||
}
|
||||
|
||||
my $orig_symbol = $symbol;
|
||||
|
||||
if( $symbol =~ /\(anonymous namespace\)/o )
|
||||
{ # TODO tell to prefer named namespaces? (shorter symbols)
|
||||
next;
|
||||
}
|
||||
|
||||
# strip prefixes
|
||||
# the :: appending is to make "CLASS::*" work also for "vtable for CLASS"
|
||||
$symbol =~ s/^typeinfo for (.*)$/$1::/o;
|
||||
$symbol =~ s/^typeinfo fn for (.*)$/$1::/o;
|
||||
$symbol =~ s/^typeinfo name for (.*)$/$1::/o;
|
||||
$symbol =~ s/^vtable for (.*)$/$1::/o;
|
||||
$symbol =~ s/^guard variable for (.*)$/$1::/o;
|
||||
$symbol =~ s/^reference temporary for (.*)$/$1::/o;
|
||||
$symbol =~ s/^VTT for (.*)$/$1::/o;
|
||||
$symbol =~ s/^virtual thunk \[[^\]]*\] to (.*)$/$1::/o;
|
||||
$symbol =~ s/^non-virtual thunk \[[^\]]*\] to (.*)$/$1::/o;
|
||||
$symbol =~ s/^covariant return thunk \[[^\]]*\] to (.*)$/$1::/o;
|
||||
$symbol =~ s/^construction vtable thunk for (.*)$/$1::/o;
|
||||
$symbol =~ s/^construction vtable for .*-in-(.*) [0-9]*$/$1::/o;
|
||||
|
||||
# templates seem to have also return types mangled in their name, and nm prints it too
|
||||
# they have also template arguments in the symbol
|
||||
# get rid of both of those
|
||||
while( $symbol =~ /<.*>/o )
|
||||
{
|
||||
$symbol =~ s/<[^<>]*>//o; # strip innermost <>
|
||||
}
|
||||
if( $symbol !~ /operator\(\)/o )
|
||||
{
|
||||
$symbol =~ s/ ?\(.*\).*$//o; # strip () and all after it
|
||||
}
|
||||
else
|
||||
{
|
||||
$symbol =~ s/(^|:| )operator\(\) ?\(.*\).*$//o; # strip () and all after it
|
||||
}
|
||||
$symbol =~ s/\[.*\] *$//o; # strip [in-charge] etc.
|
||||
if( $symbol =~ /(^|:| )operator /o )
|
||||
{
|
||||
$symbol =~ s/.* ([^\s]*)operator /$1/o; # strip everything before 'X::operator blah'
|
||||
}
|
||||
else
|
||||
{
|
||||
$symbol =~ s/.* ([^\s]+) *$/$1/o; # get last word (strip return type)
|
||||
}
|
||||
|
||||
# print STDERR "Processed symbol: " . $symbol . "\n" if $debug;
|
||||
|
||||
my $found = 0;
|
||||
if( $exacts{ $symbol } )
|
||||
{
|
||||
$found = 1;
|
||||
}
|
||||
if( ! $found )
|
||||
{
|
||||
for my $wild ( @wildcards )
|
||||
{
|
||||
if( index( $symbol, $wild ) == 0 )
|
||||
{
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( ! $found )
|
||||
{
|
||||
for my $wild ( @regwildcards )
|
||||
{
|
||||
if( $symbol =~ /^$wild$/ )
|
||||
{
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( ( ! $found ) && ( $type eq "W" || $type eq "V" ))
|
||||
{
|
||||
if( $weak_exacts{ $symbol } )
|
||||
{
|
||||
$found = 1;
|
||||
}
|
||||
if( ! $found )
|
||||
{
|
||||
for my $wild ( @weak_wildcards )
|
||||
{
|
||||
if( index( $symbol, $wild ) == 0 )
|
||||
{
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( ! $found )
|
||||
{
|
||||
for my $wild ( @weak_regwildcards )
|
||||
{
|
||||
if( $symbol =~ /^$wild$/ )
|
||||
{
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( ! $found )
|
||||
{
|
||||
print STDERR "Public symbol " . $orig_symbol . " is not allowed!\n";
|
||||
$exit_code = 1;
|
||||
}
|
||||
}
|
||||
|
||||
close( FILEIN );
|
||||
|
||||
print STDOUT $exit_code == 0 ? "OK\n" : "FAILED\n";
|
||||
|
||||
exit $exit_code;
|
||||
|
||||
sub process_symbols($\@\%\@)
|
||||
{
|
||||
my $allowed_symbols = $_[ 0 ];
|
||||
my $wildcards_ref = $_[ 1 ];
|
||||
my $exacts_ref = $_[ 2 ];
|
||||
my $regwildcards_ref = $_[ 3 ];
|
||||
|
||||
$allowed_symbols =~ s/^ *//o; # strip whitespace
|
||||
$allowed_symbols =~ s/ *$//o;
|
||||
|
||||
if( $allowed_symbols eq "NONE" )
|
||||
{
|
||||
$allowed_symbols = "";
|
||||
}
|
||||
|
||||
my @symbols1 = split( ' ', $allowed_symbols );
|
||||
my $i = 0;
|
||||
my @symbols2 = ();
|
||||
while( defined( $symbols1[ $i ] ))
|
||||
{
|
||||
my $symbol = $symbols1[ $i ];
|
||||
if( $symbol =~ /\./ ) # dot in name -> file
|
||||
{
|
||||
open( SYMIN, $symbol ) || die ( "Cannot open file " . $symbol . "!" );
|
||||
while( $line = <SYMIN> )
|
||||
{
|
||||
$line =~ s/^\s*//o; # strip whitespace
|
||||
$line =~ s/\s*$//o;
|
||||
if( $line !~ /^$/o # empty line
|
||||
&& $line !~ /^\s*#/ ) # comment line starting with #
|
||||
{
|
||||
$symbols2[ $#symbols2 + 1 ] = $line;
|
||||
}
|
||||
}
|
||||
close( SYMIN );
|
||||
}
|
||||
else
|
||||
{
|
||||
$symbols2[ $#symbols2 + 1 ] = $symbol;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$i = 0;
|
||||
while( defined( $symbols2[ $i ] ))
|
||||
{
|
||||
my $symbol = $symbols2[ $i ];
|
||||
if( $symbol =~ /__/
|
||||
|| $symbol =~ /^_[A-Z]/ )
|
||||
{ # ISO C++ 2.10.2
|
||||
die "Symbols containing a double underscore or beginning with an underscore and an upper-case letter are reserved!\n";
|
||||
}
|
||||
elsif( $symbol eq "main"
|
||||
|| $symbol eq "main*" )
|
||||
{
|
||||
die "Symbol main is not allowed!\n";
|
||||
}
|
||||
if( $symbol =~ /^([^\*]*)\*$/o # trailing * without any * before it
|
||||
&& $symbol !~ /operator\*$/o )
|
||||
{
|
||||
print STDERR "wildcard:" . $symbol . "\n" if $debug;
|
||||
$wildcards_ref->[ $#{$wildcards_ref} + 1 ] = $1;
|
||||
}
|
||||
elsif( $symbol =~ /\*$/o
|
||||
&& ( $symbol =~ /\*::/o || $symbol =~ /::\*/o )
|
||||
&& $symbol !~ /^\*/o
|
||||
&& $symbol !~ /operator\*$/o )
|
||||
{
|
||||
print STDERR "regwildcard:" . $symbol . "\n" if $debug;
|
||||
$symbol =~ s/\*/\.\*/go; # change * to .* (regexp)
|
||||
$regwildcards_ref->[ $#{$regwildcards_ref} + 1 ] = $symbol;
|
||||
}
|
||||
else
|
||||
{
|
||||
print STDERR "exact:" . $symbol . "\n" if $debug;
|
||||
$exacts_ref->{ $symbol } = 1;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
@@ -1,192 +0,0 @@
|
||||
### -*- autoconf -*-
|
||||
|
||||
dnl This file is part of the KDE libraries/packages
|
||||
dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
|
||||
dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
|
||||
|
||||
dnl This file is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Library General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2 of the License, or (at your option) any later version.
|
||||
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Library General Public License for more details.
|
||||
|
||||
dnl You should have received a copy of the GNU Library General Public License
|
||||
dnl along with this library; see the file COPYING.LIB. If not, write to
|
||||
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
dnl Boston, MA 02111-1307, USA.
|
||||
|
||||
AC_DEFUN([KDE_CHECK_MICO],
|
||||
[
|
||||
AC_REQUIRE([KDE_CHECK_LIBDL])
|
||||
AC_REQUIRE([KDE_MISC_TESTS])
|
||||
AC_MSG_CHECKING(for MICO)
|
||||
|
||||
if test -z "$MICODIR"; then
|
||||
kde_micodir=/usr/local
|
||||
else
|
||||
kde_micodir="$MICODIR"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(micodir,
|
||||
[ --with-micodir=micodir where mico is installed ],
|
||||
kde_micodir=$withval,
|
||||
kde_micodir=$kde_micodir
|
||||
)
|
||||
|
||||
AC_CACHE_VAL(kde_cv_mico_incdir,
|
||||
[
|
||||
mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
|
||||
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
|
||||
|
||||
])
|
||||
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
|
||||
|
||||
if test ! -r $kde_micodir/include/CORBA.h; then
|
||||
AC_MSG_ERROR([No CORBA.h found, specify another micodir])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT($kde_micodir)
|
||||
|
||||
MICO_INCLUDES=-I$kde_micodir/include
|
||||
AC_SUBST(MICO_INCLUDES)
|
||||
MICO_LDFLAGS=-L$kde_micodir/lib
|
||||
AC_SUBST(MICO_LDFLAGS)
|
||||
micodir=$kde_micodir
|
||||
AC_SUBST(micodir)
|
||||
|
||||
AC_MSG_CHECKING([for MICO version])
|
||||
AC_CACHE_VAL(kde_cv_mico_version,
|
||||
[
|
||||
AC_LANG_C
|
||||
cat >conftest.$ac_ext <<EOF
|
||||
#include <stdio.h>
|
||||
#include <mico/version.h>
|
||||
int main() {
|
||||
|
||||
printf("MICO_VERSION=%s\n",MICO_VERSION);
|
||||
return (0);
|
||||
}
|
||||
EOF
|
||||
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
if eval `./conftest 2>&5`; then
|
||||
kde_cv_mico_version=$MICO_VERSION
|
||||
else
|
||||
AC_MSG_ERROR([your system is not able to execute a small application to
|
||||
find MICO version! Check $kde_micodir/include/mico/version.h])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([your system is not able to compile a small application to
|
||||
find MICO version! Check $kde_micodir/include/mico/version.h])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl installed MICO version
|
||||
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
|
||||
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
|
||||
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
|
||||
|
||||
if test "x$1" = "x"; then
|
||||
req_version="2.3.0"
|
||||
else
|
||||
req_version=$1
|
||||
fi
|
||||
|
||||
dnl required MICO version
|
||||
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
|
||||
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
|
||||
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
|
||||
|
||||
if test "$mico_v_maj" -lt "$req_v_maj" || \
|
||||
( test "$mico_v_maj" -eq "$req_v_maj" && \
|
||||
test "$mico_v_mid" -lt "$req_v_mid" ) || \
|
||||
( test "$mico_v_mid" -eq "$req_v_mid" && \
|
||||
test "$mico_v_min" -lt "$req_v_min" )
|
||||
|
||||
then
|
||||
AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
|
||||
at least is required. You should upgrade MICO.])
|
||||
else
|
||||
AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
|
||||
fi
|
||||
|
||||
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
|
||||
AC_SUBST(LIBMICO)
|
||||
if test -z "$IDL"; then
|
||||
IDL='$(kde_bindir)/cuteidl'
|
||||
fi
|
||||
AC_SUBST(IDL)
|
||||
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
|
||||
AC_SUBST(IDL_DEPENDENCIES)
|
||||
|
||||
idldir="\$(includedir)/idl"
|
||||
AC_SUBST(idldir)
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([KDE_CHECK_MINI_STL],
|
||||
[
|
||||
AC_REQUIRE([KDE_CHECK_MICO])
|
||||
|
||||
AC_MSG_CHECKING(if we use mico's mini-STL)
|
||||
AC_CACHE_VAL(kde_cv_have_mini_stl,
|
||||
[
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
kde_save_cxxflags="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#include <mico/config.h>
|
||||
],
|
||||
[
|
||||
#ifdef HAVE_MINI_STL
|
||||
#error "nothing"
|
||||
#endif
|
||||
],
|
||||
kde_cv_have_mini_stl=no,
|
||||
kde_cv_have_mini_stl=yes)
|
||||
CXXFLAGS="$kde_save_cxxflags"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
|
||||
if test "x$kde_cv_have_mini_stl" = "xyes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
$1
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
$2
|
||||
fi
|
||||
])
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([KDE_CHECK_ANSI],
|
||||
[
|
||||
])
|
||||
|
||||
AC_DEFUN([KDE_CHECK_INSURE],
|
||||
[
|
||||
AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
|
||||
[
|
||||
if test $enableval = "no"; dnl
|
||||
then ac_use_insure="no"
|
||||
else ac_use_insure="yes"
|
||||
fi
|
||||
], [ac_use_insure="no"])
|
||||
|
||||
AC_MSG_CHECKING(if we will use Insure++ to debug)
|
||||
AC_MSG_RESULT($ac_use_insure)
|
||||
if test "$ac_use_insure" = "yes"; dnl
|
||||
then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([KDE_CHECK_NEWLIBS],
|
||||
[
|
||||
|
||||
])
|
||||
-143
@@ -1,143 +0,0 @@
|
||||
#! /bin/sh
|
||||
# ylwrap - wrapper for lex/yacc invocations.
|
||||
# Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Usage:
|
||||
# ylwrap INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
|
||||
# * INPUT is the input file
|
||||
# * OUTPUT is file PROG generates
|
||||
# * DESIRED is file we actually want
|
||||
# * PROGRAM is program to run
|
||||
# * ARGS are passed to PROG
|
||||
# Any number of OUTPUT,DESIRED pairs may be used.
|
||||
|
||||
# The input.
|
||||
input="$1"
|
||||
shift
|
||||
case "$input" in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
# Absolute path; do nothing.
|
||||
;;
|
||||
*)
|
||||
# Relative path. Make it absolute.
|
||||
input="`pwd`/$input"
|
||||
;;
|
||||
esac
|
||||
|
||||
# The directory holding the input.
|
||||
input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
|
||||
# Quote $INPUT_DIR so we can use it in a regexp.
|
||||
# FIXME: really we should care about more than `.' and `\'.
|
||||
input_rx=`echo "$input_dir" | sed -e 's,\\\\,\\\\\\\\,g' -e 's,\\.,\\\\.,g'`
|
||||
|
||||
echo "got $input_rx"
|
||||
|
||||
pairlist=
|
||||
while test "$#" -ne 0; do
|
||||
if test "$1" = "--"; then
|
||||
shift
|
||||
break
|
||||
fi
|
||||
pairlist="$pairlist $1"
|
||||
shift
|
||||
done
|
||||
|
||||
# The program to run.
|
||||
prog="$1"
|
||||
shift
|
||||
# Make any relative path in $prog absolute.
|
||||
case "$prog" in
|
||||
[\\/]* | ?:[\\/]*) ;;
|
||||
*[\\/]*) prog="`pwd`/$prog" ;;
|
||||
esac
|
||||
|
||||
# FIXME: add hostname here for parallel makes that run commands on
|
||||
# other machines. But that might take us over the 14-char limit.
|
||||
dirname=ylwrap$$
|
||||
trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
|
||||
mkdir $dirname || exit 1
|
||||
|
||||
cd $dirname
|
||||
|
||||
$prog ${1+"$@"} "$input"
|
||||
status=$?
|
||||
|
||||
if test $status -eq 0; then
|
||||
set X $pairlist
|
||||
shift
|
||||
first=yes
|
||||
# Since DOS filename conventions don't allow two dots,
|
||||
# the DOS version of Bison writes out y_tab.c instead of y.tab.c
|
||||
# and y_tab.h instead of y.tab.h. Test to see if this is the case.
|
||||
y_tab_nodot="no"
|
||||
if test -f y_tab.c || test -f y_tab.h; then
|
||||
y_tab_nodot="yes"
|
||||
fi
|
||||
|
||||
while test "$#" -ne 0; do
|
||||
from="$1"
|
||||
# Handle y_tab.c and y_tab.h output by DOS
|
||||
if test $y_tab_nodot = "yes"; then
|
||||
if test $from = "y.tab.c"; then
|
||||
from="y_tab.c"
|
||||
else
|
||||
if test $from = "y.tab.h"; then
|
||||
from="y_tab.h"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test -f "$from"; then
|
||||
# If $2 is an absolute path name, then just use that,
|
||||
# otherwise prepend `../'.
|
||||
case "$2" in
|
||||
[\\/]* | ?:[\\/]*) target="$2";;
|
||||
*) target="../$2";;
|
||||
esac
|
||||
|
||||
# Edit out `#line' or `#' directives. We don't want the
|
||||
# resulting debug information to point at an absolute srcdir;
|
||||
# it is better for it to just mention the .y file with no
|
||||
# path.
|
||||
sed -e "/^#/ s,$input_rx,," "$from" > "$target" || status=$?
|
||||
else
|
||||
# A missing file is only an error for the first file. This
|
||||
# is a blatant hack to let us support using "yacc -d". If -d
|
||||
# is not specified, we don't want an error when the header
|
||||
# file is "missing".
|
||||
if test $first = yes; then
|
||||
status=1
|
||||
fi
|
||||
fi
|
||||
shift
|
||||
shift
|
||||
first=no
|
||||
done
|
||||
else
|
||||
status=$?
|
||||
fi
|
||||
|
||||
# Remove the directory.
|
||||
cd ..
|
||||
rm -rf $dirname
|
||||
|
||||
exit $status
|
||||
@@ -1,74 +0,0 @@
|
||||
# -*-shell-script-*-
|
||||
|
||||
[Meta]
|
||||
RootName: @kmess.sourceforge.net/kmess:$SOFTWAREVERSION
|
||||
DisplayName: KMess
|
||||
ShortName: kmess
|
||||
SoftwareVersion: 1.4
|
||||
## didn't get this working:
|
||||
# SoftwareVersion: @VERSION@
|
||||
Maintainer: The KMess Developers
|
||||
Packager: Diederik van der Boor
|
||||
Summary: MSN Messenger client for KDE
|
||||
URL: http://kmess.sourceforge.net/
|
||||
License: GNU General Public License, Version 2
|
||||
AutopackageTarget: 1.0
|
||||
|
||||
[Description]
|
||||
A MSN Messenger Client for KDE
|
||||
|
||||
KMess is a MSN Messenger client for Linux. It enables Linux
|
||||
users to chat with friends online who are using MSN Messenger
|
||||
in Windows or Mac OS. The strength of KMess is it's integration
|
||||
with the KDE desktop environment, focus on MSN Messenger specific
|
||||
features and an easy-to-use interface.
|
||||
|
||||
[BuildPrepare]
|
||||
# The bogus deps solve our warnings about older distro incompatiblity
|
||||
export APBUILD_BOGUS_DEPS='art_lgpl art_lgpl_2 dl expat fontconfig freetype GL ICE idn kdefx kdesu kwalletclient m nsl png pthread resolv SM util X11 Xcursor Xft Xi Xinerama Xmu Xrandr Xrender'
|
||||
# Xrender is suggested by makeinstaller,
|
||||
# the XScreenSaver stuff can be either in libXss or libXext
|
||||
export APBUILD_STATIC='Xrender Xext Xss'
|
||||
prepareBuild
|
||||
|
||||
[BuildUnprepare]
|
||||
unprepareBuild
|
||||
|
||||
[Imports]
|
||||
# tells autopackage to include all files created by "make install"
|
||||
# make sure the symlink does not get installed. recreate it during Install
|
||||
find . -name common -type d -o -type l -exec rm -Rf {} \;
|
||||
echo "*" | import
|
||||
|
||||
[Prepare]
|
||||
# KMess still supports 3.1 with #ifdef KDE_IS_VERSION(..) hacks.
|
||||
# Because we want to have a clean binary, use 3.2 as minimum requirement.
|
||||
require @kde.org/kdelibs 3.2
|
||||
|
||||
[Install]
|
||||
outputStatus "Installing application..."
|
||||
# note: it's not possible to use deep paths like share/apps/kmess/pics,
|
||||
# autopackage 1.0.4 does not handle those like I want
|
||||
installExe bin/*
|
||||
installData share/apps/ share/doc/ share/sounds/
|
||||
linkFile --silent "`getKdePrefix`/share/doc/HTML/en/common" "$PREFIX/share/doc/HTML/en/kmess/common"
|
||||
installIcon share/icons/hicolor/ share/icons/locolor/
|
||||
installDesktop "Internet" share/applications/kde/kmess.desktop
|
||||
installLocale share/locale/
|
||||
|
||||
# Make sure KDE can find our eventsrc file
|
||||
outputStatus "Installing kde system notifications plugin..."
|
||||
if [ "`id -u`" != 0 ]; then
|
||||
# user install
|
||||
linkFile --silent "$PREFIX/share/apps/kmess/eventsrc" "$HOME/.kde/share/apps/kmess/eventsrc"
|
||||
else
|
||||
# system wide install.
|
||||
# check if we're installing to a place KDE does not look for
|
||||
if ! isInList "$PREFIX" "$KDEDIRS:`getKdePrefix`"; then
|
||||
linkFile --silent "$PREFIX/share/apps/kmess/eventsrc" "`getKdePrefix`/share/apps/kmess/eventsrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
[Uninstall]
|
||||
uninstallFromLog
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,82 @@
|
||||
# - Try to find GCrypt
|
||||
# Once done this will define
|
||||
#
|
||||
# GCRYPT_FOUND - system has GCrypt
|
||||
# GCRYPT_INCLUDE_DIRS - the GCrypt include directory
|
||||
# GCRYPT_LIBRARIES - Link these to use GCrypt
|
||||
# GCRYPT_DEFINITIONS - Compiler switches required for using GCrypt
|
||||
#
|
||||
# Copyright (c) 2009 Andreas Schneider <mail@cynapses.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
# Imported into KMess, monday october 19, 2009 by Sjors
|
||||
# reference URL:
|
||||
# http://dev.libssh.org/export/27d25752e93c19d3e6584915bd64b72e43f3afc0/ \
|
||||
# cmake/Modules/FindGCrypt.cmake
|
||||
#
|
||||
|
||||
|
||||
if (GCRYPT_LIBRARIES AND GCRYPT_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
set(GCRYPT_FOUND TRUE)
|
||||
else (GCRYPT_LIBRARIES AND GCRYPT_INCLUDE_DIRS)
|
||||
|
||||
find_path(GCRYPT_INCLUDE_DIR
|
||||
NAMES
|
||||
gcrypt.h
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
/sw/include
|
||||
)
|
||||
mark_as_advanced(GCRYPT_INCLUDE_DIR)
|
||||
|
||||
find_library(GCRYPT_LIBRARY
|
||||
NAMES
|
||||
gcrypt
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
)
|
||||
mark_as_advanced(GCRYPT_LIBRARY)
|
||||
|
||||
if (GCRYPT_LIBRARY)
|
||||
set(GCRYPT_FOUND TRUE CACHE INTERNAL "Wether the gcrypt library has been found" FORCE)
|
||||
endif (GCRYPT_LIBRARY)
|
||||
|
||||
set(GCRYPT_INCLUDE_DIRS
|
||||
${GCRYPT_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if (GCRYPT_FOUND)
|
||||
set(GCRYPT_LIBRARIES
|
||||
${GCRYPT_LIBRARIES}
|
||||
${GCRYPT_LIBRARY}
|
||||
)
|
||||
endif (GCRYPT_FOUND)
|
||||
|
||||
if (GCRYPT_INCLUDE_DIRS AND GCRYPT_LIBRARIES)
|
||||
set(GCRYPT_FOUND TRUE)
|
||||
endif (GCRYPT_INCLUDE_DIRS AND GCRYPT_LIBRARIES)
|
||||
|
||||
if (GCRYPT_FOUND)
|
||||
if (NOT GCrypt_FIND_QUIETLY)
|
||||
message(STATUS "Found GCrypt: ${GCRYPT_LIBRARIES}")
|
||||
endif (NOT GCrypt_FIND_QUIETLY)
|
||||
else (GCRYPT_FOUND)
|
||||
if (GCrypt_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find GCrypt")
|
||||
endif (GCrypt_FIND_REQUIRED)
|
||||
endif (GCRYPT_FOUND)
|
||||
|
||||
# show the GCRYPT_INCLUDE_DIRS and GCRYPT_LIBRARIES variables only in the advanced view
|
||||
mark_as_advanced(GCRYPT_INCLUDE_DIRS GCRYPT_LIBRARIES)
|
||||
|
||||
endif (GCRYPT_LIBRARIES AND GCRYPT_INCLUDE_DIRS)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
QCATOOL_EXEC=$(which qcatool2 2>/dev/null)
|
||||
if [ ! -x "$QCATOOL_EXEC" ]; then
|
||||
echo 0
|
||||
exit
|
||||
fi
|
||||
|
||||
qcatool2 plugins | grep -q qca-ossl && echo 1 || echo 0
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* KMess configuration file
|
||||
*
|
||||
* The value for these defines is controlled by CMake at configuration time.
|
||||
* NOTE: This file needs to be written in C, as it will be included by C source files too.
|
||||
*/
|
||||
|
||||
/* Define the application version */
|
||||
#define KMESS_VERSION "${KMESS_VERSION}"
|
||||
|
||||
/* Define if debug output should be enabled */
|
||||
#define KMESS_DEBUG ${KMESS_ENABLE_DEBUG_OUTPUT}
|
||||
|
||||
/* Define what the build type of KMess is */
|
||||
#cmakedefine KMESS_BUILT_DEBUGFULL ${KMESS_BUILD_DEBUGFULL}
|
||||
|
||||
/* Define the fallback prefix */
|
||||
#define KMESS_PREFIX "${CMAKE_INSTALL_PREFIX}"
|
||||
|
||||
/* Define if you have the XScreenSaver extension */
|
||||
#cmakedefine HAVE_XSCREENSAVER ${HAVE_XSCREENSAVER}
|
||||
|
||||
/* Define if LikeBack is not needed */
|
||||
#define KMESS_DISABLE_LIKEBACK ${KMESS_DISABLE_LIKEBACK}
|
||||
|
||||
/* Define whether Ink support is enabled */
|
||||
#define KMESS_ENABLE_INK ${HAVE_LIBISFQT}
|
||||
|
||||
/* Define whether we have the new system tray */
|
||||
#cmakedefine HAVE_NEW_TRAY
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd `dirname $0`/..
|
||||
|
||||
# second sed expression fixes Mac OS X 10.4
|
||||
appver="`egrep 'SET.*KMESS_VERSION' CMakeLists.txt | sed -e 's/.*"\([^"]*\)".*/\1/'`"
|
||||
date="`date +%Y%m%d`"
|
||||
|
||||
# Make sure we have the right repository
|
||||
if [ ! -f kmess.kdev4 ]; then
|
||||
/bin/echo -n "git (unknown)"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Display normal version if git is not installed
|
||||
if [ ! -x `which git 2>/dev/null` ]; then
|
||||
/bin/echo -n "$appver"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Display subversion version if this is a working copy
|
||||
gitname=`LANG=C git describe --all HEAD 2>/dev/null | sed -e 's:^heads/::g'`
|
||||
gitver=`LANG=C git rev-parse --short HEAD 2>/dev/null`
|
||||
|
||||
# see if this is not a repository.
|
||||
if [ -z "$gitver" ]; then
|
||||
if [ -z "$KMESS_VER" ]; then
|
||||
/bin/echo -n "$appver";
|
||||
else
|
||||
/bin/echo -n "$KMESS_VER";
|
||||
fi
|
||||
exit;
|
||||
fi
|
||||
|
||||
# display subversion version and date
|
||||
/bin/echo -n "$appver-git ($gitname@$gitver >= $date)"
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
# This file is included here because the standard FindGIF.cmake file
|
||||
# requires the CHECK_STRUCT_MEMBER macro. It wasn't on my PC, at least, so
|
||||
# I include a copy of the macro here for giflib to use.
|
||||
|
||||
MACRO (CHECK_STRUCT_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
|
||||
SET(_INCLUDE_FILES)
|
||||
FOREACH (it ${_HEADER})
|
||||
SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
|
||||
ENDFOREACH (it)
|
||||
|
||||
SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE "
|
||||
${_INCLUDE_FILES}
|
||||
int main()
|
||||
{
|
||||
${_STRUCT}* tmp;
|
||||
tmp->${_MEMBER};
|
||||
return 0;
|
||||
}
|
||||
")
|
||||
|
||||
CHECK_CXX_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT})
|
||||
|
||||
ENDMACRO (CHECK_STRUCT_MEMBER)
|
||||
@@ -0,0 +1,299 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# configure - description
|
||||
# -------------------
|
||||
# begin : Wed Apr 9 2008
|
||||
# copyright : (C) 2008 by Diederik van der Boor
|
||||
# email : "vdboor" --at-- "codingdomain.com"
|
||||
#
|
||||
#
|
||||
# Emulation script of GNU ./configure to make compiling of KDE 4 software more standard.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Note for packagers:
|
||||
# this script is only written to provide a more user friendly
|
||||
# interaction between the command line and the cmake invocation.
|
||||
# If you are familiar with CMake, you may call it directly too.
|
||||
#
|
||||
|
||||
# ------------------------------
|
||||
#
|
||||
# Variables
|
||||
#
|
||||
|
||||
KDE4_PREFIX=""
|
||||
DEFAULT_PREFIX="/usr/local"
|
||||
|
||||
# auto-detect KDE Installation on the Mac.
|
||||
KDE4_CONFIG=""
|
||||
for i in `whereis kde4-config` /opt/local/bin/kde4-config
|
||||
do
|
||||
if [ -x "$i" ]; then
|
||||
KDE4_CONFIG="$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# auto-detect default prefix
|
||||
if [ -n "$KDE4_CONFIG" ]; then
|
||||
KDE4_PREFIX=`$KDE4_CONFIG --prefix`
|
||||
DEFAULT_PREFIX="$KDE4_PREFIX"
|
||||
fi
|
||||
|
||||
# To configure
|
||||
PREFIX=$DEFAULT_PREFIX
|
||||
BUILD_TYPE="relwithdebinfo"
|
||||
BUILD_DIR="build"
|
||||
REAL_BUILD_DIR=""
|
||||
DEBUG=0
|
||||
|
||||
# Globals
|
||||
cd `dirname $0`
|
||||
SRC_DIR="$PWD"
|
||||
KMESS_VER="`./cmake/get-git-version.sh`"
|
||||
|
||||
|
||||
|
||||
# ------------------------------
|
||||
#
|
||||
# Print the help page
|
||||
#
|
||||
|
||||
function print_help
|
||||
{
|
||||
echo "configure script for package: KMess $KMESS_VER
|
||||
|
||||
Usage: ./configure [arguments]
|
||||
|
||||
This is an emulation script of GNU ./configure to give compiling of KDE 4
|
||||
software a more familiar usage. Experienced users are free to use cmake
|
||||
instead. This configure script should provide everything you need though.
|
||||
|
||||
Configuration:
|
||||
-h, --help display this help and exit
|
||||
|
||||
Installation directories:
|
||||
--prefix=PREFIX install files in PREFIX. default: $DEFAULT_PREFIX
|
||||
|
||||
Optional Features:
|
||||
--enable-debug-output enable debugging output. default=no
|
||||
--build-dir=PATH path to store the build files. default: ./build
|
||||
--build-type=TYPE define the build configuration to use, values:
|
||||
release - standard release
|
||||
relwithdebinfo - release with debug info
|
||||
minsizerel - minimum size release
|
||||
debug - debug build
|
||||
debugfull - full debug build
|
||||
|
||||
|
||||
After running ./configure, you can type 'make' to build this project.
|
||||
"
|
||||
|
||||
# Hint for kde installation
|
||||
if [ "$KDE4_PREFIX" != "" ]; then
|
||||
if [ "$KDE4_PREFIX" != "$PREFIX" ]; then
|
||||
echo " NOTICE:
|
||||
|
||||
The installation prefix is set to '$PREFIX'. You may want to set
|
||||
the prefix to '$KDE4_PREFIX' to install the files in the KDE 4 folder.
|
||||
"
|
||||
fi
|
||||
else
|
||||
echo " WARNING:
|
||||
|
||||
kde4-config was not found. Please verify that
|
||||
you've installed the KDE 4 development packages!
|
||||
"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
# ------------------------------
|
||||
#
|
||||
# Run cmake
|
||||
#
|
||||
|
||||
function run_cmake
|
||||
{
|
||||
# Check prefix
|
||||
if [ ! -e "$PREFIX" ]; then
|
||||
echo "$0: installation directory not found: $PREFIX" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check build type
|
||||
case "$BUILD_TYPE" in
|
||||
debugfull) DEBUG=1 ;;
|
||||
release|relwithdebinfo|minsizerel|debug) ;;
|
||||
*)
|
||||
echo "$0: invalid build type: $BUILD_TYPE" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Make the directory,
|
||||
# and switch so build messages are ok.
|
||||
test -e "$BUILD_DIR" || mkdir "$BUILD_DIR" || exit 1
|
||||
cd "$BUILD_DIR"
|
||||
REAL_BUILD_DIR=`pwd`
|
||||
|
||||
# debug about cmake
|
||||
echo "configuring KMess $KMESS_VER"
|
||||
echo "checking build directory"
|
||||
echo "running cmake from $REAL_BUILD_DIR"
|
||||
echo "command: cmake -D CMAKE_INSTALL_PREFIX=$PREFIX \ "
|
||||
echo " -D CMAKE_BUILD_TYPE=$BUILD_TYPE \ "
|
||||
echo " -D KMESS_DEBUG_OUTPUT=$DEBUG \ "
|
||||
echo " "$SRC_DIR" "
|
||||
echo ""
|
||||
|
||||
# finally start cmake
|
||||
cmake -D CMAKE_INSTALL_PREFIX=$PREFIX \
|
||||
-D CMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
-D KMESS_DEBUG_OUTPUT=$DEBUG \
|
||||
"$SRC_DIR" \
|
||||
&& cmake_ok || cmake_error
|
||||
}
|
||||
|
||||
|
||||
function cmake_ok
|
||||
{
|
||||
# collect all settings
|
||||
local HAS_XSS="no (extension not detected)"
|
||||
local HAS_DEBUG="no (good!)"
|
||||
|
||||
if [ $DEBUG = "1" ]; then
|
||||
HAS_DEBUG="yes (KMess will be slow!)"
|
||||
fi
|
||||
|
||||
if grep -q '^#define HAVE_XSCREENSAVER 1$' "config-kmess.h"; then
|
||||
HAS_XSS="yes"
|
||||
fi
|
||||
|
||||
# create a makefile to redirect all calls to the build directory
|
||||
makefile=$SRC_DIR/Makefile
|
||||
targets=`grep '^[A-Za-z_\/\-]\+:' Makefile | cut -f 1 -d ':'`
|
||||
echo "# Generated by ./configure: NO NOT EDIT!
|
||||
# Build features:
|
||||
#
|
||||
# Install prefix: $PREFIX
|
||||
# Auto-away feature: $HAS_XSS
|
||||
# Debugging messages: $HAS_DEBUG
|
||||
# Build type: $BUILD_TYPE
|
||||
# Build directory: $BUILD_DIR
|
||||
#
|
||||
#
|
||||
# cmake command:
|
||||
#
|
||||
# cd \"$REAL_BUILD_DIR\"
|
||||
# cmake -D CMAKE_INSTALL_PREFIX=$PREFIX \\
|
||||
# -D CMAKE_BUILD_TYPE=$BUILD_TYPE \\
|
||||
# -D KMESS_DEBUG_OUTPUT=$DEBUG \\
|
||||
# \"$SRC_DIR\"
|
||||
#
|
||||
" > $makefile
|
||||
|
||||
for target in $targets; do
|
||||
echo "$target:" >> $makefile
|
||||
echo -en "\t" >> $makefile
|
||||
echo "@\$(MAKE) --no-print-directory -C '$BUILD_DIR' $target" >> $makefile
|
||||
echo "" >> $makefile
|
||||
done
|
||||
|
||||
# display a configure report
|
||||
echo "-- configure completed
|
||||
|
||||
|
||||
Build features:
|
||||
|
||||
Install prefix: $PREFIX
|
||||
Auto-away feature: $HAS_XSS
|
||||
Debugging messages: $HAS_DEBUG
|
||||
Build type: $BUILD_TYPE
|
||||
|
||||
|
||||
Enter the following command to continue:
|
||||
|
||||
make
|
||||
"
|
||||
}
|
||||
|
||||
function cmake_error
|
||||
{
|
||||
echo "-- cmake failed
|
||||
|
||||
Please fix the problems mentioned above, and run ./configure again.
|
||||
For example, make sure you have the KDE 4 devel packages installed.
|
||||
"
|
||||
}
|
||||
|
||||
|
||||
|
||||
# ------------------------------
|
||||
#
|
||||
# Main
|
||||
#
|
||||
|
||||
# parse arguments
|
||||
if [ -n "$*" ]; then
|
||||
|
||||
# check against BSD / Mac OS getopt, which is seriously lacking.
|
||||
# It does not support additional options, so it will recognize everything
|
||||
# after --longoptions as the $@ input.
|
||||
if ! getopt --longoptions --prefix -- "" 2>/dev/null >/dev/null; then
|
||||
echo "$0: Sorry, can't handle arguments at this platform.
|
||||
Your getopt version does not support long arguments.
|
||||
|
||||
Please run cmake directly, for example:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -D CMAKE_INSTALL_PREFIX=/usr ../
|
||||
make
|
||||
make install
|
||||
" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Parse the arguments
|
||||
longopts="help,prefix:,build-type:,build-dir:,build-folder:,enable-debug-output"
|
||||
TEMP=`getopt --name=configure \
|
||||
--options h \
|
||||
--longoptions "$longopts" -- "$@"`
|
||||
case "$?" in
|
||||
0) ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
|
||||
|
||||
# Note the quotes around `$TEMP': they are essential!
|
||||
eval set -- "$TEMP"
|
||||
|
||||
while true ; do
|
||||
case "$1" in
|
||||
-h|--help) print_help; exit 0 ;;
|
||||
--prefix) PREFIX=$2; shift 2 ;;
|
||||
--enable-debug-output) DEBUG=1; shift ;;
|
||||
--build-type) BUILD_TYPE="$2"; shift 2 ;;
|
||||
--build-dir) BUILD_DIR="$2"; shift 2 ;;
|
||||
--builddir|--build-directory|--build-folder) BUILD_DIR="$2"; shift 2 ;; # be forgiving with small errors.
|
||||
--) shift ; break ;;
|
||||
*) echo "$0: internal error at argument '$1'!" ; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
echo "$0: invalid arguments: $@"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Start cmake
|
||||
run_cmake
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
|
||||
if test "x$all_tests" = "xbad"; then
|
||||
echo ""
|
||||
echo "Fix the problems, and try to run ./configure again."
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Configure report:"
|
||||
echo ""
|
||||
echo " Install prefix: $prefix"
|
||||
|
||||
echo -n " Auto-away feature: "
|
||||
if test -z "$LIB_XSCREENSAVER"; then
|
||||
echo "no (extension not detected)"
|
||||
else
|
||||
echo "yes"
|
||||
fi
|
||||
|
||||
echo -n " Debugging messages: "
|
||||
if test "x$enable_debug_output" = "xyes"; then
|
||||
echo "yes (KMess will be slow!)"
|
||||
else
|
||||
echo "no (good!)"
|
||||
fi
|
||||
|
||||
echo -n " Binary relocatable: "
|
||||
if test "x$br_cv_binreloc" = "xyes"; then
|
||||
echo "yes"
|
||||
else
|
||||
echo "no (only supported in Linux)"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
fi
|
||||
@@ -1,30 +0,0 @@
|
||||
#MIN_CONFIG(3.1)
|
||||
|
||||
AM_INIT_AUTOMAKE(kmess,1.4)
|
||||
|
||||
dnl CXXFLAGS="$NOOPT_CXXFLAGS" dnl __kdevelop[noopt]__
|
||||
dnl CFLAGS="$NOOPT_CFLAGS" dnl __kdevelop[noopt]__
|
||||
dnl CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS" dnl __kdevelop[exc]__
|
||||
|
||||
dnl KDE_NEED_FLEX dnl __kdevelop__
|
||||
dnl AC_PROG_YACC dnl __kdevelop__
|
||||
|
||||
|
||||
dnl ---- Additional KMess options ----
|
||||
|
||||
# The syntax is: AC_ARG_ENABLE(flagname, description, if-user-desides, if-user-ignores)
|
||||
AC_ARG_ENABLE(debug-output,
|
||||
[ --enable-debug-output enable debugging output. [default=no]],
|
||||
[ enable_debug_output = "$enableval" ],
|
||||
[ enable_debug_output = "no" ] )
|
||||
|
||||
|
||||
# -- Check for Debug build messages ---------------------------------
|
||||
|
||||
if test "x$enable_debug_output" = "xyes" ; then
|
||||
AC_WARN(Creating debug build. This has serious implications in the performance of KMess)
|
||||
AC_DEFINE_UNQUOTED(KMESS_DEBUG, 1, [output debug?])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(KMESS_DEBUG, 0, [output debug?])
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
# Build files and dirs
|
||||
build*
|
||||
|
||||
# KDevelop and other IDE-specific project files
|
||||
*.kdev*
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
LibISF-Qt authors
|
||||
-------------------------
|
||||
|
||||
The developers of this library are:
|
||||
|
||||
- Valerio Pilo <valerio@kmess.org>
|
||||
- Adam Goossens <adam@kmess.org>
|
||||
|
||||
|
||||
Credits
|
||||
-------------------------
|
||||
|
||||
Creating this library would not have been possible without the previous efforts
|
||||
of some great people:
|
||||
|
||||
The tclISF authors:
|
||||
- Ole André Vadla Ravnås (oleavr)
|
||||
- Youness Alaoui (KaKaRoTo)
|
||||
- Boris Faure (billiob)
|
||||
|
||||
The pyISF author:
|
||||
- Kevin Campbell
|
||||
|
||||
We'd also like to thank Microsoft for publishing the file format specifications.
|
||||
@@ -0,0 +1,131 @@
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 3.16 )
|
||||
PROJECT( isf-qt LANGUAGES CXX )
|
||||
|
||||
|
||||
#### Main switches ####
|
||||
|
||||
# Bundled mode: you can add Isf-Qt as a subdirectory
|
||||
# of your CMake-based prjoect easily. Just use:
|
||||
# SET( USE_BUNDLED_LIBRARIES ISFQT )
|
||||
# and Isf-Qt will be built and statically linked in your
|
||||
# application, without installing anything
|
||||
IF( ISFQT_IS_BUNDLED OR USE_BUNDLED_LIBRARIES MATCHES "ISFQT" )
|
||||
SET( ISFQT_IS_BUNDLED TRUE )
|
||||
MESSAGE( "-- Will build Isf-Qt in bundled mode." )
|
||||
ELSE()
|
||||
SET( ISFQT_IS_BUNDLED FALSE )
|
||||
ENDIF()
|
||||
|
||||
# Only set the build type if we're not being bundled: if we are, we'll
|
||||
# use the build type specified by the parent project
|
||||
IF( NOT ISFQT_IS_BUNDLED )
|
||||
|
||||
# Define the default build type
|
||||
# Possible values:
|
||||
# - none
|
||||
# - release
|
||||
# - debug
|
||||
# - debugfull (even fewer optimisations)
|
||||
# - relwithdebinfo (release with debug info)
|
||||
# - minsizerel (minimum size release)
|
||||
# Uncomment the next line to force building in full debug mode
|
||||
SET( CMAKE_BUILD_TYPE debugfull )
|
||||
ENDIF()
|
||||
|
||||
# Define the library version number
|
||||
SET( ISFQT_VERSION "1.0dev" )
|
||||
|
||||
|
||||
#### Inclusions ####
|
||||
|
||||
FIND_PACKAGE( Qt6 REQUIRED COMPONENTS Core Core5Compat Gui Widgets )
|
||||
|
||||
OPTION( WANT_GIF "Enable support for reading and writing Fortified-GIF images" ON )
|
||||
IF( WANT_GIF )
|
||||
MESSAGE( "-- Looking for GifLib" )
|
||||
|
||||
# Apparently, the KDE CMake macros unset a check which is required by giflib.
|
||||
IF( KDE4_FOUND )
|
||||
INCLUDE( "cmake/giflib_hack.cmake" )
|
||||
ENDIF( KDE4_FOUND )
|
||||
|
||||
FIND_PACKAGE( GIF QUIET )
|
||||
|
||||
# At this point, we can be relatively sure that if it's there, it has been found
|
||||
IF( NOT GIF_FOUND )
|
||||
MESSAGE( "-- Looking for GifLib - not found!" )
|
||||
MESSAGE( FATAL_ERROR
|
||||
"Support to read and write Fortified-GIF images is missing.\n"
|
||||
" * You will need to install both the library and development packages of the GIF Library, giflib.\n"
|
||||
" * Usually the package names for this library are:\n"
|
||||
" on Ubuntu: 'libgif4' and 'libgif-dev'\n"
|
||||
" on openSUSE: 'giflib' and 'giflib-devel'\n"
|
||||
" * The project homepage is http://sourceforge.net/projects/giflib/\n" )
|
||||
ELSE()
|
||||
MESSAGE( "-- Looking for GifLib - found" )
|
||||
ENDIF()
|
||||
ELSE( WANT_GIF )
|
||||
MESSAGE( "-- GifLib support disabled" )
|
||||
ENDIF( WANT_GIF )
|
||||
|
||||
# Set the variable for isfqtconfig.h.in
|
||||
IF( WANT_GIF )
|
||||
SET( GIF_ENABLED 1 )
|
||||
ELSE()
|
||||
SET( GIF_ENABLED 0 )
|
||||
ENDIF()
|
||||
|
||||
|
||||
#### Compilation ####
|
||||
|
||||
IF( CMAKE_COMPILER_IS_GNUCXX )
|
||||
SET( CMAKE_CXX_FLAGS_DEBUGFULL
|
||||
"-O0 -g3 -fno-inline -Wall -Woverloaded-virtual -Wsign-compare -Wundef -fvisibility=default" )
|
||||
ENDIF( CMAKE_COMPILER_IS_GNUCXX )
|
||||
|
||||
IF( NOT ISFQT_DEBUG_OUTPUT STREQUAL "1" AND NOT ISFQT_DEBUG_OUTPUT STREQUAL "0" )
|
||||
IF( CMAKE_BUILD_TYPE MATCHES debug )
|
||||
SET( ISFQT_DEBUG_OUTPUT 1 )
|
||||
ELSE()
|
||||
SET( ISFQT_DEBUG_OUTPUT 0 )
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} src include )
|
||||
|
||||
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/isfqtconfig.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/isfqtconfig.h )
|
||||
|
||||
ADD_SUBDIRECTORY( src )
|
||||
|
||||
IF( NOT ISFQT_IS_BUNDLED )
|
||||
ENABLE_TESTING()
|
||||
ADD_SUBDIRECTORY( tests )
|
||||
ENDIF()
|
||||
|
||||
|
||||
#### Project CMake configuration files creation ####
|
||||
|
||||
# Define the shortcuts for the installation directories
|
||||
SET( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/isf-qt"
|
||||
CACHE STRING "Directory where the include files will be installed" )
|
||||
SET( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib"
|
||||
CACHE STRING "Directory where the lib will be installed" )
|
||||
SET( SHARED_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share"
|
||||
CACHE STRING "Directory where the shared data will be installed" )
|
||||
|
||||
# Prepare thej IsfQtConfig.cmake file, which allows other projects to find us
|
||||
CONFIGURE_FILE( cmake/IsfQtConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/IsfQtConfig.cmake" @ONLY )
|
||||
|
||||
|
||||
#### Installation ####
|
||||
|
||||
# Do not install the resources if we're bundling it into an application
|
||||
IF( NOT ISFQT_IS_BUNDLED )
|
||||
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/IsfQtConfig.cmake
|
||||
DESTINATION ${LIB_INSTALL_DIR}/isfqt )
|
||||
INSTALL( FILES cmake/FindIsfQt.cmake
|
||||
DESTINATION ${CMAKE_ROOT}/Modules )
|
||||
ENDIF()
|
||||
@@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
@@ -0,0 +1,307 @@
|
||||
2010-07-23 (Valerio)
|
||||
* Fixed the copy constructor in Stroke, it was not copying all the necessary properties.
|
||||
* Fixed some compiler warnings.
|
||||
* Improved bundled compilation mode.
|
||||
|
||||
2010-07-22 (Valerio)
|
||||
* Improved the InkEdit text - added a checkbox to show the usage of Canvas::isEmpty() and a label
|
||||
to show usage of the Canvas::inkChanged() signal.
|
||||
* Fixed inkChanged() signal emission in Canvas: it was emitted too early, when the drawing was not
|
||||
updated yet: slots connected to inkChanged() could then call isEmpty() and get a true return value,
|
||||
even if the drawing wasn't empty.
|
||||
|
||||
2010-06-27 (Adam)
|
||||
* Use Q_ASSERT_X instead of qWarning where appropriate.
|
||||
|
||||
2010-06-19 (Valerio)
|
||||
* Changed the default behavior of InkCanvas::pixmap(), now paints on a transparent
|
||||
background, instead of a white one.
|
||||
|
||||
2010-06-19 (Valerio)
|
||||
* Added support for PNG fortification. Like GIF fortification, this feature allows to
|
||||
write a PNG containing the full ISF drawing inside itself. Of course, it's now also
|
||||
possible to read a PNG containing ISF data and retrieve the actual drawing.
|
||||
|
||||
2010-03-20 (Adam)
|
||||
* Slight optimisation to painting - we no longer draw the background color, Qt does it for us.
|
||||
Also, only render the parts of the buffer that have changed.
|
||||
|
||||
2010-03-13 (Adam)
|
||||
* Add a bezier curve smoothing algorithm. Strokes with the FitToCurve flag set are
|
||||
rendered with an approximate bezier curve. Gives much smoother looking strokes.
|
||||
|
||||
2010-02-21 (Adam)
|
||||
* Optimise the painting of strokes. Cache logic added to IsfQtDrawing and only
|
||||
strokes that have been added are painted. Also, no longer do a full bounding rect
|
||||
recalculation when a stroke is added.
|
||||
|
||||
2009-10-03 (Adam)
|
||||
* Remove unused HIMETRIC conversion methods.
|
||||
|
||||
2009-09-11 (Adam)
|
||||
* Improve doxygen comments of InkCanvas.
|
||||
|
||||
2009-09-10 (Valerio)
|
||||
* Do not add twice single-dot strokes in InkCanvas.
|
||||
* Removed a leftover debug message.
|
||||
* Fixed the Drawing copy constructor, which was copying even empty lists.
|
||||
* Fixed Bit Packing compression and the Delta-Delta transform, now the lib
|
||||
works perfectly again.
|
||||
* Fixed argument parsing in test_decode.
|
||||
|
||||
2009-09-10 (Adam)
|
||||
* Don't extract private members in Doxygen output.
|
||||
|
||||
2009-09-09 (Valerio)
|
||||
* Added Fortified GIF read-write support. New optional dependency, giflib.
|
||||
* Added Base64-encoded input/output data support.
|
||||
* Updated the documentation files.
|
||||
* Added Doxygen documentation infrastructure. There still are a lot of errors.
|
||||
* Created proper Doxygen documentation for all classes.
|
||||
* Moved the resource files into the /data/ directory.
|
||||
* Added a proper copy constructor for Drawing.
|
||||
|
||||
2009-09-09 (Adam)
|
||||
* Add draw-eraser.svgz to comply with Oxygen licensing requirements.
|
||||
|
||||
2009-09-08 (Adam)
|
||||
* Make copyright headers standard across all files.
|
||||
* Replace the eraser cursor with draw-eraser.png take from Oxygen 16x16 icon set.
|
||||
|
||||
2009-08-30 (Valerio)
|
||||
* Rewritten the algorithm detection methods.
|
||||
* Changed the names of some internal data classes, and improved their namespaces.
|
||||
* Added a maximum drawing size check, to avoid errors from resulting in 80k by 70k pixel wide
|
||||
drawings.
|
||||
* Moved all algorithms into src/data/algorithms.
|
||||
* Renamed the Gorilla algorithm to "Bit Packing".
|
||||
* Separated the delta-delta transformation methods into their own files.
|
||||
* Added an algorithm to do bit-packing of bytes.
|
||||
* Fixed bug in DataSource, the last bit of data was never read.
|
||||
* Added parsing the GUID table tag and saving the GUIDs into Drawing.
|
||||
* Added parsing of custom tags and decoding their contents.
|
||||
|
||||
2009-08-29 (Valerio)
|
||||
* Fixed skipping unknown custom tags contents.
|
||||
* Changed more method names to adhere to Qt's method naming style.
|
||||
|
||||
2009-08-29 (Adam)
|
||||
* Start qt-ifying the function names ie, "penSize()" instead of "getPenSize()".
|
||||
* Add methods to return pen size, colour and brush type from InkCanvas.
|
||||
* Always write at least one transformation to the stream: if no custom transforms, write the default one.
|
||||
* No longer take ownership of Isf::Drawing instances set with setDrawing().
|
||||
* By default InkCanvas' initial Isf::Drawing instance that is created is no longer allocated
|
||||
with new. This frees us from the concern of "when do we delete this initial reference?".
|
||||
* Rename Isf::InkEdit to Isf::InkCanvas. A better suited name.
|
||||
* When building bundled isf-qt, link statically and do not install any library components.
|
||||
Non-bundled builds a shared library and installs all components.
|
||||
|
||||
2009-08-28 (Adam)
|
||||
* Fix writing of transformation data: write in the correct order and scale the transform values
|
||||
appropriately before writing.
|
||||
* Write TIDX properly when transformations change between strokes.
|
||||
* Properly apply scaling when calculating the bounding rectangle.
|
||||
* Do not use Compress.decode(*) calls as function parameters. The order of parameter
|
||||
evaluation is platform-dependent and hence cannot be relied on.
|
||||
* Properly apply stroke transforms when drawing; scale pen size appropriately.
|
||||
|
||||
2009-08-24 (Adam)
|
||||
* Fix Drawing::getStrokeAtPoint to properly return point strokes.
|
||||
* Prevent strokes from having a bounding rectangle of size 1x1 (otherwise the eraser never hit them)
|
||||
* Tweak the collision distance to give a 25% margin of error (in practice this works well).
|
||||
|
||||
2009-08-23 (Adam)
|
||||
* Add Drawing::getStrokeAtPoint method. Uses Heron's Formula and triangle heights to determine
|
||||
if the cursor is positioned above a stroke. Seems to work quite well and appears to be fast.
|
||||
* Basic eraser support working. Individual strokes can be erased.
|
||||
* InkEdit now shows a custom cursor - a point drawn with the current stroke colour and width.
|
||||
* Drawing now calculates its bounding rectangle as necessary. Calls to finalizeChanges are not
|
||||
necessary anymore.
|
||||
* Remove cropping. Found a better method whereby InkEdit will draw the rendered ISF using the
|
||||
offset provided by the bounding rectangle of Isf::Drawing.
|
||||
* Supply the FitToCurve flag for all strokes. Windows will render them using Bezier smoothing, making
|
||||
them appear nicer.
|
||||
* Upgrade the TestInkEdit application. Supports multiple stroke colours and pen widths.
|
||||
* Remove InkEdit::getImageBytes and replace with InkEdit::getBytes. InkEdit doesn't write to GIF.
|
||||
* Support changing the colour of the InkEdit canvas.
|
||||
* Add a convenience method, InkEdit::save(), that will write the ISF drawing to a given QIODevice.
|
||||
Optionally will write the drawing in base64.
|
||||
|
||||
2009-08-23 (Adam)
|
||||
* Bug fixes in isf-qt: properly assign stroke attributes when changing colour on InkEdit.
|
||||
* Fix a crash that would occur if stroke attributes or transform were null.
|
||||
* Initial version of isf-qt InkEdit committed. Works reasonably well. Not integrated in KMess yet.
|
||||
* Added a cropping property to Isf::Drawing. When true, Drawing::getImage returns a cropped image
|
||||
and getSize returns the cropped size. When false, does the opposite. Necessary for InkEdit to
|
||||
properly support adding strokes to loaded Ink data.
|
||||
* Add a test application for new InkEdit. Can create, save and load Ink data in both raw ISF and
|
||||
ISF-base64 format.
|
||||
* Fix a bug in tagswriter which cause corrupt ISF data if there were no metric blocks.
|
||||
|
||||
2009-08-20 (Valerio)
|
||||
* Implemented writing metric blocks into ISF streams.
|
||||
* Fixed transformation/attributeSet/metrics index writing, now the index tags are written only
|
||||
when necessary.
|
||||
* Removed all user-side required conversions between HiMetric units and pixels. The library
|
||||
now only offers data expressed in pixels.
|
||||
* Fixed a bug in writeHiMetricSize() which prevented ISF streams from being parsed by older
|
||||
Microsoft.Ink libraries, like the one of Windows Messenger.
|
||||
|
||||
2009-08-20 (Adam)
|
||||
* Fix install path of FindIsfQt.cmake.
|
||||
* Don't attempt to install FindIsfQt.cmake if the library is build bundled.
|
||||
|
||||
2009-08-19 (Valerio)
|
||||
* Added DataSource::reset() method to start reading data back from the start.
|
||||
* Added to DataSource some ways to detect errors.
|
||||
* Rewritten the multi-byte encoding tests.
|
||||
* Switched away from QTransform to QMatrix for transformations.
|
||||
* Fixed the write order of transformation values.
|
||||
* Fixed stroke saving. The library should now be able to generate new ink.
|
||||
* Renamed Isf::Parser::isfToDrawing() and Isf::Parser::drawingToIsf()
|
||||
to Isf::Stream::reader() and Isf::Stream::writer() to enhance readability.
|
||||
* Renamed the Isf::PointInfo structure to Isf::AttributeSet, because the old name made no sense.
|
||||
* Added manipulation methods for strokes, transformations and attribute sets.
|
||||
* Fixed compiler warning. Thanks to Émeric Dupont.
|
||||
* Fixed colors in written streams.
|
||||
* Fixed the Scale&Translate transformation once again.
|
||||
* Isf::Drawings are now created on the heap instead of on the stack, to avoid unwanted object
|
||||
deletions.
|
||||
* Added optional parameter to Isf::Drawing::getPixmap() to choose the background color of
|
||||
the created image.
|
||||
* Added a method to compute some useful values before rendering new and changed drawings.
|
||||
* Added a couple stream writer improvements.
|
||||
|
||||
2009-08-14 (Valerio)
|
||||
* Added Drawing::clean() method to reset a drawing without creating a new one.
|
||||
|
||||
2009-08-13 (Valerio)
|
||||
* Added DataSource method to append bit arrays to the data.
|
||||
* Implemented Huffman encoding. Still missing is the algo to select the best encoding index.
|
||||
|
||||
2009-08-07 (Valerio)
|
||||
* Added an AUTHORS file with credits.
|
||||
* Implemented Gorilla compression.
|
||||
* Added stroke writing in the stream writer.
|
||||
* Moved all of Drawing's object lists to pointer lists, to ease comparing their items.
|
||||
|
||||
2009-08-06 (Valerio)
|
||||
* Added Metrics recognization and saving.
|
||||
* Made sense into the property tags: they're now all in the PacketProperty enum.
|
||||
* Added MultiByteCoding utility methods to find out the encoded size of a value.
|
||||
* Changed the installed include files directory to PREFIX/include/isf-qt .
|
||||
* Added a NOTES file with possibly useful stuff.
|
||||
* Added metrics measurement units, found on MSDN.
|
||||
* Added a couple more checks on data.
|
||||
* Moved include isfdrawing.h to isfqtdrawing.h .
|
||||
* Fixed CMake installing bug and added C++ style includes, <IsfQt> and <IsfQtDrawing>.
|
||||
* Fixed name of the drawing-to-isf converting method.
|
||||
* Fixed crash when given an invalid drawing address.
|
||||
|
||||
2009-08-05 (Valerio)
|
||||
* Extended Adam's last fix to the other main drawing properties.
|
||||
* Added maximum stroke pen size value.
|
||||
* Added stroke and drawing bounding box values.
|
||||
* Added adjusting the drawing's bounding box to include thick strokes.
|
||||
* Enabled transformations.
|
||||
* Fixed transform data order, it was inverted for scale+translate transforms.
|
||||
* Fixed destination QPixmap's size, it's now fit for the drawing.
|
||||
* Completed CMake rules, now the library can be installed on the system and
|
||||
other projects can find it.
|
||||
* Improved debugging rules, now debug mode is controlled (again) from CMake
|
||||
and verbose output is configurable.
|
||||
* Fixed the documentation to reflect the name change "libisf" to "isf-qt",
|
||||
and updated it.
|
||||
* Added updated KDevelop3/4 project files.
|
||||
* Changed the library structure:
|
||||
- separated the public interface includes into the /include/ dir
|
||||
- moved all internally used inclusions and data structures into
|
||||
/src/isfqt-internal.h
|
||||
- reorganized the internal files structure
|
||||
- renamed class Tags to TagsParser as there will be a TagWriter (made up name)
|
||||
- Renamed the IsfData class to DataSource as it is at a lower level than ISF.
|
||||
- Moved the ISF parser into a class Parser, found in include/isfqt.h and src/isfqt.cpp
|
||||
* Added a dummy drawing-to-ISF method in class Parser.
|
||||
* Added multibyte encoding methods taking a DataSource.
|
||||
* Added float encoding method and fixed uint encoding method.
|
||||
* Fixed seeking bug in DataSource::append() methods.
|
||||
* Added DataSource::prepend() methods.
|
||||
* Started working on the ISF stream writer.
|
||||
|
||||
2009-08-05 (Adam)
|
||||
* Correct an issue with incorrect colours for strokes.
|
||||
|
||||
2009-08-04 (Adam)
|
||||
* Re-save test ISF data with official Microsoft Ink classes.
|
||||
* Add functions to convert between HiMetric units and pixels.
|
||||
* Antialiasing whilst drawing ISF to QPixmap.
|
||||
* Fix the drawing of ISF data to QPixmap: draw the lines correctly between points.
|
||||
|
||||
2009-08-04 (Valerio)
|
||||
* Fixed endianness problems when retrieving datastream bits with IsfData.
|
||||
* Added a new parameter to IsfData::atEnd() to check if the buffer was all used,
|
||||
including the current byte's bits.
|
||||
* Changed IsfData::seekByteBack() with seekRelative(), which makes more sense.
|
||||
* Added IsfData::skipToNextByte() to discard the current byte's bits and move on
|
||||
to the next byte.
|
||||
* Added Isf::Drawing method getPixmap() to convert a drawing to a QPixmap. Quite raw
|
||||
at the moment, but still.
|
||||
* Moved actual tag parsing into Isf::Drawing::parseTag().
|
||||
* Added a whole lot of tags to Isf::Tags. Now the parser is able to recognize the most
|
||||
useful tags (and mostly make use of their data).
|
||||
* Added a GUID mapping from the ISF specs, I doubt it'll ever be used though.
|
||||
* Added float decoding method to multibytecoding.cpp.
|
||||
* Added new test ISF files - more complex - and sorted all test ISF files by complexity.
|
||||
* Added new test application "test_decode", which displays a parsed ISF file.
|
||||
* Added pressure data recognization.
|
||||
* Added stroke description blocks recognization.
|
||||
* Fixed stroke payload parsing appearing when not needed (and wasting bytes).
|
||||
* Added a set of data structures to hold metrics and to better contain stroke attributes.
|
||||
* Reorganized the code of the Tags namespace, it's now a class with all static members;
|
||||
this simplifies quite a bit the passing of data between that and IsfDrawing.
|
||||
* Fixed bug in the GUID Table tag parser.
|
||||
* Added more compiler flags (and warnings) to ease debugging.
|
||||
* Added the infrastructure to link metrics and transforms data to the strokes.
|
||||
* Finally linked the drawing attributes and stroke info to the strokes' data:
|
||||
libisf-qt is now correctly decoding all tests (except test 6).
|
||||
* Fixed all compiler warnings and improved the debugging output.
|
||||
* Fixed point rendering didn't work when points are made by a line from a point
|
||||
to the same point.
|
||||
* Fixed broken main parser loop, continued forever.
|
||||
|
||||
2009-07-30 (Valerio)
|
||||
* Added IsfData class to read and write bit-by-bit an array of bytes.
|
||||
* Changed all the code to use it instead of plain QByteArrays.
|
||||
* Completed huffman decompression support.
|
||||
* Added algorithm data to help writing gorilla decompression.
|
||||
* Added tests for the IsfData class.
|
||||
* Added tag recognization.
|
||||
* Fixed some IsfData bugs.
|
||||
* Changed default CMake build type to debugfull.
|
||||
* Completed Gorilla decompression support.
|
||||
* Started tag parsing work, made basic analysis methods.
|
||||
* Made the ParserError enum (now IsfError) the library's error enumeration system.
|
||||
* Continued a bit the tag parsing work, added a couple tags and another testfile.
|
||||
|
||||
2009-07-08 (Adam)
|
||||
* Make decode(UInt|Int) take a reference as a position parameter. This
|
||||
reference is then incremented as the integer is decoded.
|
||||
* Re-work tests for IsfDrawing.
|
||||
* Create IsfDrawing::fromIsfData() static method to create a new IsfDrawing
|
||||
instance from a QByteArray containing ISF data.
|
||||
* Begin state matchine for ISF parser.
|
||||
* Add appropriate unit tests for ISF parser.
|
||||
* Added TODO file for libisf to keep track of things.
|
||||
|
||||
2009-06-30 (Adam)
|
||||
* Parse ISF version number properly; add unit tests for it.
|
||||
* Fix CMakeLists.txt to build with debug info by default
|
||||
* Moved format/types.(cpp|h) into the multibytecoding.(cpp|h) classes.
|
||||
Also moved these into libisf/ and deleted format/ directory.
|
||||
* Added Isf::encodeInt to encode a signed integer into multibyte format
|
||||
* Added test cases for the encode/decode functions.
|
||||
* Re-add libisf.h
|
||||
* Fix wrong e-mail addresses in copyright info.
|
||||
* Created a unit test framework for libisf-qt; run using make test
|
||||
* Created IsfDrawing class which will represent an ISF drawing.
|
||||
* Added some rudimentary unit tests for IsfDrawing
|
||||
@@ -0,0 +1,259 @@
|
||||
# Doxyfile 1.5.5-KDevelop
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = ISF-Qt
|
||||
PROJECT_NUMBER = 0.9
|
||||
OUTPUT_DIRECTORY = ./apidocs
|
||||
CREATE_SUBDIRS = YES
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF = "The $name class" \
|
||||
"The $name widget" \
|
||||
"The $name file" \
|
||||
is \
|
||||
provides \
|
||||
specifies \
|
||||
contains \
|
||||
represents \
|
||||
a \
|
||||
an \
|
||||
the
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 2
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
CPP_CLI_SUPPORT = NO
|
||||
SIP_SUPPORT = NO
|
||||
IDL_PROPERTY_SUPPORT = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = YES
|
||||
TYPEDEF_HIDES_STRUCT = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = YES
|
||||
EXTRACT_ANON_NSPACES = YES
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = YES
|
||||
SORT_GROUP_NAMES = NO
|
||||
SORT_BY_SCOPE_NAME = YES
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = NO
|
||||
SHOW_DIRECTORIES = NO
|
||||
SHOW_FILES = YES
|
||||
SHOW_NAMESPACES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = YES
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ./src ./include
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS = *.cpp \
|
||||
*.h \
|
||||
*.dox
|
||||
RECURSIVE = YES
|
||||
EXCLUDE = *.moc \
|
||||
*.moc.cpp \
|
||||
*.moc.h
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS = */build*/*
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS = *
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
REFERENCES_LINK_SOURCE = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 4
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER = doc/apidocs_header.html
|
||||
HTML_FOOTER = doc/apidocs_footer.html
|
||||
HTML_STYLESHEET = doc/doxygen.css
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
GENERATE_DOCSET = NO
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||
HTML_DYNAMIC_SECTIONS = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = YES
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = YES
|
||||
TREEVIEW_WIDTH = 250
|
||||
FORMULA_FONTSIZE = 10
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE = isf-qt.tag
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = NO
|
||||
MSCGEN_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = YES
|
||||
DOT_FONTNAME = FreeSans
|
||||
DOT_FONTPATH =
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = NO
|
||||
CALL_GRAPH = NO
|
||||
CALLER_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = NO
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_DEPTH = 1000
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = YES
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
||||
@@ -0,0 +1,163 @@
|
||||
|
||||
This file contains possibly useful stuff.
|
||||
|
||||
|
||||
|
||||
typedef struct _GUID
|
||||
{
|
||||
unsigned long Data1;
|
||||
unsigned short Data2;
|
||||
unsigned short Data3;
|
||||
unsigned char Data4[ 8 ];
|
||||
} GUID;
|
||||
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
const GUID name DECLSPEC_HIDDEN; \
|
||||
const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
|
||||
|
||||
DEFINE_GUID(GUID_LINENUMBER, 0xdbf29f2c, 0x5289, 0x4be8, 0xb3, 0xd8, 0x6e, 0xf6, 0x32, 0x46, 0x25, 0x3e);
|
||||
DEFINE_GUID(GUID_BOXNUMBER, 0x2c243e3a, 0xf733, 0x4eb6, 0xb1, 0xf8, 0xb5, 0xdc, 0x5c, 0x2c, 0x4c, 0xda);
|
||||
DEFINE_GUID(GUID_SEGMENTATION, 0xb3c0fe6c, 0xfb51, 0x4164, 0xba, 0x2f, 0x84, 0x4a, 0xf8, 0xf9, 0x83, 0xda);// {CA6F40DC-5292-452a-91FB-2181C0BEC0DE}
|
||||
DEFINE_GUID(GUID_HOTPOINT, 0xca6f40dc, 0x5292, 0x452a, 0x91, 0xfb, 0x21, 0x81, 0xc0, 0xbe, 0xc0, 0xde);// {BF0EEC4E-4B7D-47a9-8CFA-234DD24BD22A}
|
||||
DEFINE_GUID(GUID_MAX_STROKE_COUNT, 0xbf0eec4e, 0x4b7d, 0x47a9, 0x8c, 0xfa, 0x23, 0x4d, 0xd2, 0x4b, 0xd2, 0x2a);// {7DFE11A7-FB5D-4958-8765-154ADF0D833F}
|
||||
DEFINE_GUID(GUID_CONFIDENCELEVEL, 0x7dfe11a7, 0xfb5d, 0x4958, 0x87, 0x65, 0x15, 0x4a, 0xdf, 0xd, 0x83, 0x3f);// {8CC24B27-30A9-4b96-9056-2D3A90DA0727}
|
||||
DEFINE_GUID(GUID_LINEMETRICS, 0x8cc24b27, 0x30a9, 0x4b96, 0x90, 0x56, 0x2d, 0x3a, 0x90, 0xda, 0x7, 0x27);
|
||||
DEFINE_GUID(GUID_INRANGE, 0xdc00b1af, 0x7321, 0x4ac1, 0x91, 0x88, 0xe3, 0x20, 0x18, 0xeb, 0xb2, 0x3b);
|
||||
DEFINE_GUID(GUID_TOUCH, 0x65c98c60, 0xcd80, 0x447d, 0xb1, 0x29, 0x25, 0xf6, 0xe, 0x1d, 0x80, 0x5b);
|
||||
DEFINE_GUID(GUID_UNTOUCH, 0x378c85bb, 0x7118, 0x491e, 0x85, 0x16, 0xa7, 0x48, 0x2d, 0xb, 0x68, 0x3a);
|
||||
DEFINE_GUID(GUID_TAP, 0x9eaad4, 0xd133, 0x4ed2, 0xb1, 0x2c, 0x89, 0x1f, 0x8e, 0x82, 0x5e, 0x6a);
|
||||
DEFINE_GUID(GUID_QUALITY, 0xb7fe8008, 0x2df6, 0x4e1b, 0x8c, 0x43, 0xf5, 0xf1, 0x6, 0x8, 0x93, 0x2d);
|
||||
DEFINE_GUID(GUID_DATAVALID, 0xaacf46b5, 0xf107, 0x47b0, 0xb5, 0x77, 0xd9, 0x39, 0xc0, 0x53, 0xed, 0x41);
|
||||
DEFINE_GUID(GUID_TRANSDUCERINDEX, 0xa412b445, 0x7818, 0x4c83, 0x84, 0x55, 0x49, 0x29, 0xc8, 0x70, 0x76, 0x3b);
|
||||
DEFINE_GUID(GUID_TABLETFUNCTIONKEYS, 0xff3b8afe, 0x5f06, 0x494d, 0xa4, 0xf8, 0xd3, 0xe2, 0x85, 0xf9, 0x76, 0x30);
|
||||
DEFINE_GUID(GUID_PROGRAMCHANGEKEYS, 0x869c344a, 0x92a1, 0x4b6f, 0xb4, 0xbc, 0x3, 0x96, 0xc6, 0xa9, 0xf6, 0xaf);
|
||||
DEFINE_GUID(GUID_BATTERYSTRENGTH, 0x4ca0a0dc, 0x3549, 0x43f5, 0xa0, 0x32, 0x99, 0xf4, 0xe3, 0x3d, 0xf4, 0x90);
|
||||
DEFINE_GUID(GUID_INVERT, 0xc3aa28c8, 0x806b, 0x490c, 0xa8, 0x4a, 0xa7, 0x7a, 0xe7, 0x27, 0xc7, 0x18);
|
||||
DEFINE_GUID(GUID_BUTTON4,0x844b06d, 0xaa2c, 0x4c66, 0x99, 0x76, 0x88, 0xdd, 0x2a, 0x59, 0xe4, 0xf0);
|
||||
DEFINE_GUID(GUID_BUTTON5,0x944d1340, 0x2549, 0x4905, 0xbd, 0x54, 0x3e, 0xe3, 0x96, 0x3e, 0xe1, 0x57);
|
||||
DEFINE_GUID(GUID_BUTTON6,0xff19bd41, 0xa463, 0x4eaa, 0xaf, 0x10, 0xb5, 0x6, 0x48, 0x79, 0xe5, 0x4b);
|
||||
DEFINE_GUID(GUID_BUTTON7,0xdedaf13c, 0xb7dc, 0x423b, 0xb9, 0x7f, 0xa2, 0xbd, 0x68, 0xa2, 0xfd, 0x3d);
|
||||
DEFINE_GUID(GUID_BUTTON8,0xa6f70e64, 0x3a67, 0x4552, 0xa0, 0xc4, 0x17, 0x38, 0x4e, 0x49, 0x5a, 0x55);
|
||||
DEFINE_GUID(GUID_BUTTON9,0xbf55916c, 0xd6e6, 0x4fd3, 0x94, 0x62, 0x55, 0xd6, 0x9d, 0xb, 0xe7, 0x9c);
|
||||
DEFINE_GUID(GUID_BUTTON10,0x95f1b222, 0x1159, 0x4f9a, 0xb6, 0xe4, 0x6e, 0xde, 0xdf, 0xc7, 0x56, 0x9b);
|
||||
DEFINE_GUID(GUID_BUTTON11,0xf2dff7da, 0xf458, 0x4b61, 0xa2, 0x15, 0x62, 0xd0, 0x56, 0x48, 0x6, 0x53);
|
||||
DEFINE_GUID(GUID_BUTTON12,0x6a860858, 0x9b68, 0x4da6, 0xb3, 0x2a, 0x55, 0xe9, 0xe9, 0x75, 0xbe, 0xeb);
|
||||
DEFINE_GUID(GUID_BUTTON13,0x42ffb4d9, 0x7f95, 0x475e, 0x9c, 0x97, 0x82, 0xa0, 0x2b, 0xdc, 0x7e, 0xb6);
|
||||
DEFINE_GUID(GUID_BUTTON14,0x215008c8, 0xf09d, 0x48d7, 0x95, 0x2e, 0xc, 0x11, 0x8d, 0x6, 0xe8, 0xca);
|
||||
DEFINE_GUID(GUID_BUTTON15, 0xd1d1fa37, 0x1ee0, 0x4015, 0x9c, 0x33, 0x12, 0xcc, 0x42, 0x57, 0x60, 0x1);
|
||||
DEFINE_GUID(GUID_PEN_TIMESTAMP1, 0x413a7d1a, 0xeede, 0x45ce, 0xa4, 0x32, 0x80, 0x88, 0xca, 0x9e, 0x8e, 0x4a);
|
||||
DEFINE_GUID(GUID_PEN_TIMESTAMP2, 0x876c825, 0xcdc, 0x4395, 0xbf, 0x9b, 0x36, 0x7e, 0x69, 0x8a, 0x75, 0x56);
|
||||
DEFINE_GUID(GUID_WIDTH, 0xbaabe94d, 0x2712, 0x48f5, 0xbe, 0x9d, 0x8f, 0x8b, 0x5e, 0xa0, 0x71, 0x1a);
|
||||
DEFINE_GUID(GUID_HEIGHT, 0xe61858d2, 0xe447, 0x4218, 0x9d, 0x3f, 0x18, 0x86, 0x5c, 0x20, 0x3d, 0xf4);
|
||||
DEFINE_GUID(GUID_FINGERCONTACTCONFIDENCE, 0xe706c804, 0x57f0, 0x4f00, 0x8a, 0x0c, 0x85, 0x3d, 0x57, 0x78, 0x9b, 0xe9);
|
||||
DEFINE_GUID(GUID_TEMPID, 0x2585b91, 0x49b, 0x4750, 0x96, 0x15, 0xdf, 0x89, 0x48, 0xab, 0x3c, 0x9c);
|
||||
|
||||
const GUID FAR KNOWN_GUIDS[38] =
|
||||
{
|
||||
{ 0x598a6a8f, 0x52c0, 0x4ba0, { 0x93, 0xaf, 0xaf, 0x35, 0x74, 0x11, 0xa5, 0x61 } },
|
||||
{ 0xb53f9f75, 0x04e0, 0x4498, { 0xa7, 0xee, 0xc3, 0x0d, 0xbb, 0x5a, 0x90, 0x11 } },
|
||||
{ 0x735adb30, 0x0ebb, 0x4788, { 0xa0, 0xe4, 0x0f, 0x31, 0x64, 0x90, 0x05, 0x5d } },
|
||||
{ 0x6e0e07bf, 0xafe7, 0x4cf7, { 0x87, 0xd1, 0xaf, 0x64, 0x46, 0x20, 0x84, 0x18 } },
|
||||
{ 0x436510c5, 0xfed3, 0x45d1, { 0x8b, 0x76, 0x71, 0xd3, 0xea, 0x7a, 0x82, 0x9d } },
|
||||
{ 0x78a81b56, 0x0935, 0x4493, { 0xba, 0xae, 0x00, 0x54, 0x1a, 0x8a, 0x16, 0xc4 } },
|
||||
{ 0x7307502d, 0xf9f4, 0x4e18, { 0xb3, 0xf2, 0x2c, 0xe1, 0xb1, 0xa3, 0x61, 0x0c } },
|
||||
{ 0x6da4488b, 0x5244, 0x41ec, { 0x90, 0x5b, 0x32, 0xd8, 0x9a, 0xb8, 0x08, 0x09 } },
|
||||
{ 0x8b7fefc4, 0x96aa, 0x4bfe, { 0xac, 0x26, 0x8a, 0x5f, 0x0b, 0xe0, 0x7b, 0xf5 } },
|
||||
{ 0xa8d07b3a, 0x8bf0, 0x40b0, { 0x95, 0xa9, 0xb8, 0x0a, 0x6b, 0xb7, 0x87, 0xbf } },
|
||||
{ 0x0e932389, 0x1d77, 0x43af, { 0xac, 0x00, 0x5b, 0x95, 0x0d, 0x6d, 0x4b, 0x2d } },
|
||||
{ 0x029123b4, 0x8828, 0x410b, { 0xb2, 0x50, 0xa0, 0x53, 0x65, 0x95, 0xe5, 0xdc } },
|
||||
{ 0x82dec5c7, 0xf6ba, 0x4906, { 0x89, 0x4f, 0x66, 0xd6, 0x8d, 0xfc, 0x45, 0x6c } },
|
||||
{ 0x0d324960, 0x13b2, 0x41e4, { 0xac, 0xe6, 0x7a, 0xe9, 0xd4, 0x3d, 0x2d, 0x3b } },
|
||||
{ 0x7f7e57b7, 0xbe37, 0x4be1, { 0xa3, 0x56, 0x7a, 0x84, 0x16, 0x0e, 0x18, 0x93 } },
|
||||
{ 0x5d5d5e56, 0x6ba9, 0x4c5b, { 0x9f, 0xb0, 0x85, 0x1c, 0x91, 0x71, 0x4e, 0x56 } },
|
||||
{ 0x6a849980, 0x7c3a, 0x45b7, { 0xaa, 0x82, 0x90, 0xa2, 0x62, 0x95, 0x0e, 0x89 } },
|
||||
{ 0x33c1df83, 0xecdb, 0x44f0, { 0xb9, 0x23, 0xdb, 0xd1, 0xa5, 0xb2, 0x13, 0x6e } },
|
||||
{ 0x5329cda5, 0xfa5b, 0x4ed2, { 0xbb, 0x32, 0x83, 0x46, 0x01, 0x72, 0x44, 0x28 } },
|
||||
{ 0x002df9af, 0xdd8c, 0x4949, { 0xba, 0x46, 0xd6, 0x5e, 0x10, 0x7d, 0x1a, 0x8a } },
|
||||
{ 0x9d32b7ca, 0x1213, 0x4f54, { 0xb7, 0xe4, 0xc9, 0x05, 0x0e, 0xe1, 0x7a, 0x38 } },
|
||||
{ 0xe71caab9, 0x8059, 0x4c0d, { 0xa2, 0xdb, 0x7c, 0x79, 0x54, 0x47, 0x8d, 0x82 } },
|
||||
{ 0x5c0b730a, 0xf394, 0x4961, { 0xa9, 0x33, 0x37, 0xc4, 0x34, 0xf4, 0xb7, 0xeb } },
|
||||
{ 0x2812210f, 0x871e, 0x4d91, { 0x86, 0x07, 0x49, 0x32, 0x7d, 0xdf, 0x0a, 0x9f } },
|
||||
{ 0x8359a0fa, 0x2f44, 0x4de6, { 0x92, 0x81, 0xce, 0x5a, 0x89, 0x9c, 0xf5, 0x8f } },
|
||||
{ 0x4c4642dd, 0x479e, 0x4c66, { 0xb4, 0x40, 0x1f, 0xcd, 0x83, 0x95, 0x8f, 0x00 } },
|
||||
{ 0xce2d9a8a, 0xe58e, 0x40ba, { 0x93, 0xfa, 0x18, 0x9b, 0xb3, 0x90, 0x00, 0xae } },
|
||||
{ 0xc3c7480f, 0x5839, 0x46ef, { 0xa5, 0x66, 0xd8, 0x48, 0x1c, 0x7a, 0xfe, 0xc1 } },
|
||||
{ 0xea2278af, 0xc59d, 0x4ef4, { 0x98, 0x5b, 0xd4, 0xbe, 0x12, 0xdf, 0x22, 0x34 } },
|
||||
{ 0xb8630dc9, 0xcc5c, 0x4c33, { 0x8d, 0xad, 0xb4, 0x7f, 0x62, 0x2b, 0x8c, 0x79 } },
|
||||
{ 0x15e2f8e6, 0x6381, 0x4e8b, { 0xa9, 0x65, 0x01, 0x1f, 0x7d, 0x7f, 0xca, 0x38 } },
|
||||
{ 0x7066fbe4, 0x473e, 0x4675, { 0x9c, 0x25, 0x00, 0x26, 0x82, 0x9b, 0x40, 0x1f } },
|
||||
{ 0xbbc85b9a, 0xade6, 0x4093, { 0xb3, 0xbb, 0x64, 0x1f, 0xa1, 0xd3, 0x7a, 0x1a } },
|
||||
{ 0x039143d3, 0x78cb, 0x449c, { 0xa8, 0xe7, 0x67, 0xd1, 0x88, 0x64, 0xc3, 0x32 } },
|
||||
{ 0x67743782, 0x0ee5, 0x419a, { 0xa1, 0x2b, 0x27, 0x3a, 0x9e, 0xc0, 0x8f, 0x3d } },
|
||||
{ 0xf0720328, 0x663b, 0x418f, { 0x85, 0xa6, 0x95, 0x31, 0xae, 0x3e, 0xcd, 0xfa } },
|
||||
{ 0xa1718cdd, 0x0dac, 0x4095, { 0xa1, 0x81, 0x7b, 0x59, 0xcb, 0x10, 0x6b, 0xfb } },
|
||||
{ 0x810a74d2, 0x6ee2, 0x4e39, { 0x82, 0x5e, 0x6d, 0xef, 0x82, 0x6a, 0xff, 0xc5 } },
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
** InkDrawingAttributes **
|
||||
DISPID_DAHeight = 1
|
||||
DISPID_DAColor
|
||||
DISPID_DAWidth
|
||||
DISPID_DAFitToCurve
|
||||
DISPID_DAIgnorePressure
|
||||
DISPID_DAAntiAliased
|
||||
DISPID_DATransparency
|
||||
DISPID_DARasterOperation
|
||||
DISPID_DAPenTip
|
||||
DISPID_DAClone
|
||||
DISPID_DAExtendedProperties
|
||||
|
||||
|
||||
DISPID_DAFitToCurve
|
||||
DISPID_DAIgnorePressure
|
||||
DISPID_DAAntiAliased
|
||||
DISPID_DARasterOperation
|
||||
DISPID_DAPenTip
|
||||
DISPID_DAClone
|
||||
DISPID_DAExtendedProperties
|
||||
|
||||
|
||||
** InkBoundingBoxMode **
|
||||
IBBM_Default = 0,
|
||||
IBBM_NoCurveFit,
|
||||
IBBM_CurveFit,
|
||||
IBBM_PointsOnly,
|
||||
IBBM_Union
|
||||
|
||||
** InkRasterOperation **
|
||||
IRO_Black = 1,
|
||||
IRO_NotMergePen = 2,
|
||||
IRO_MaskNotPen = 3,
|
||||
IRO_NotCopyPen = 4,
|
||||
IRO_MaskPenNot = 5,
|
||||
IRO_Not = 6,
|
||||
IRO_XOrPen = 7,
|
||||
IRO_NotMaskPen = 8,
|
||||
IRO_MaskPen = 9,
|
||||
IRO_NotXOrPen = 10,
|
||||
IRO_NoOperation = 11,
|
||||
IRO_MergeNotPen = 12,
|
||||
IRO_CopyPen = 13,
|
||||
IRO_MergePenNot = 14,
|
||||
IRO_MergePen = 15,
|
||||
IRO_White = 16
|
||||
|
||||
|
||||
|
||||
If we scale the Ink Space Rect (canvas_) to or from HiMetric and using the metrics,
|
||||
do we get anything useful?
|
||||
- Valerio
|
||||
|
||||
|
||||
|
||||
To save received ISF from Messenger, put this code in src/chat/chatmaster.cpp at line 1324, below "case FORMAT_ISF:" but above the "break;":
|
||||
---
|
||||
QFile file( "~/output.isf" );
|
||||
file.open( QIODevice::WriteOnly );
|
||||
file.write( QByteArray::fromBase64( inkEncodedData ) );
|
||||
file.close();
|
||||
---
|
||||
You probably have to change the file path :P
|
||||
- Valerio
|
||||
@@ -0,0 +1,101 @@
|
||||
|
||||
About LibISF-Qt:
|
||||
============
|
||||
|
||||
LibISF-Qt is a Qt4 library made to encode and decode Microsoft's
|
||||
Ink Serialized Format (ISF) files.
|
||||
|
||||
Q. What is ISF?
|
||||
A. Ink Serialized Format is an open specification initially
|
||||
made by Microsoft, and then freed up with their "Open
|
||||
Specification Promise" initiative. ISF is a file format
|
||||
made to store handwriting very efficiently: an ISF file
|
||||
with a somewhat complex handwritten drawing takes less than
|
||||
1000 bytes. ISF supports metrics to adapt drawings to
|
||||
different form factors, bezier smoothing of drawn strokes,
|
||||
coloring, stroke size varying by pen pressure, linking
|
||||
in static data, and more.
|
||||
|
||||
Q. How does this library differ from aMSN's or Emesene's?
|
||||
A. It's written with Qt, which makes it easily portable on
|
||||
a lot of different architectures; also Qt's new licensing
|
||||
terms (LGPL) make it possible for everyone to use it
|
||||
easily.
|
||||
The library supports more ISF features than those two,
|
||||
since we've written it using the official specification.
|
||||
Moreover, aMSN's and Emesene's are not distributed by
|
||||
theirselves, ours is.
|
||||
|
||||
Q. What's the status of completion of the library, and which
|
||||
ISF features does/will support?
|
||||
A. Please see the TODO file to have an overview.
|
||||
|
||||
|
||||
|
||||
Compiling and installing:
|
||||
=================
|
||||
|
||||
LibISF-Qt uses CMake, a quick and clean alternative to Autotools.
|
||||
|
||||
First create a new directory within the one which contains this
|
||||
file (we'll have the library built there):
|
||||
$ mkdir build
|
||||
Enter it and run CMake:
|
||||
$ cd build
|
||||
$ cmake -D CMAKE_INSTALL_PREFIX=/usr ..
|
||||
Then, if everything went smoothly, build the library itself:
|
||||
$ make
|
||||
If everything went right again, install it:
|
||||
$ make install
|
||||
Aaand now you're set. :)
|
||||
|
||||
LibISF-Qt natively supports being bundled into other applications.
|
||||
Bundling means that the library does not get installed system-wide
|
||||
along with your application, but instead it gets statically linked
|
||||
into the application.
|
||||
The idea is that you copy the Isf-Qt source tree (with an SVN export
|
||||
or a Git submodule) into your project's tree, and then set up your
|
||||
CMake listfile to add this library as a subdirectory:
|
||||
> SET( ISFQT_IS_BUNDLED TRUE )
|
||||
> ADD_SUBDIRECTORY( contrib/isf-qt )
|
||||
And again, you're done!
|
||||
|
||||
|
||||
Documentation:
|
||||
=================
|
||||
|
||||
The ISF format is (albeit poorly*) documented: here's the
|
||||
sources we used.
|
||||
|
||||
- Original Microsoft ISF specification, made open with their
|
||||
Open Specification Promise:
|
||||
http://download.microsoft.com/download/0/B/E/0BE8BDD7-E5E8-422A-ABFD-4342ED7AD886/InkSerializedFormat(ISF)Specification.pdf
|
||||
- Quick explanation of the algorithms and other very useful
|
||||
details:
|
||||
http://synce.org/moin/FormatDocumentation/InkSerializedFormat
|
||||
- Original code from aMSN:
|
||||
https://amsn.svn.sourceforge.net/svnroot/amsn/trunk/amsn/utils/tclISF/src
|
||||
- Original code from emesene:
|
||||
https://emesene.svn.sourceforge.net/svnroot/emesene/trunk/emesene/pyisf
|
||||
|
||||
* = The specification was probably not meant for use by
|
||||
developers wanting to write an alternative implementation;
|
||||
there's a lot of guesswork to be done.
|
||||
|
||||
|
||||
|
||||
Licensing
|
||||
=========
|
||||
|
||||
Only the Oxygen icon, draw-eraser, is released under LGPL 3.0 (see http://www.oxygen-icons.org/). See COPYING_ICONS for full license text.
|
||||
|
||||
The remainder of ISF-qt is released under LGPL2.1. See COPYING for full license text.
|
||||
|
||||
|
||||
More Information
|
||||
================
|
||||
|
||||
For more information about LibISF-Qt, ask us:
|
||||
- forum board at http://www.kmess.org/board/
|
||||
- e-mail at project@kmess.org
|
||||
- IRC at #kmess on irc.freenode.net
|
||||
@@ -0,0 +1,42 @@
|
||||
libISF-Qt (Ink Serialized Format) TODO
|
||||
-----------------------------------
|
||||
|
||||
OUTSTANDING
|
||||
-----------
|
||||
- Bit Packing Byte codec:
|
||||
- Encoding
|
||||
- Bit Packing Word codec:
|
||||
- Encoding
|
||||
- Decoding
|
||||
- Bit Packing Long codec:
|
||||
- Encoding
|
||||
- Decoding
|
||||
- Read and write user-defined custom tags
|
||||
- Interpret, use and write pressure information
|
||||
- Associating text recognized by OCR to the drawn strokes
|
||||
- Alter stroke points
|
||||
|
||||
DONE
|
||||
----
|
||||
- State machine:
|
||||
- Parser
|
||||
- Writer
|
||||
- Multibyte values (int,uint,float):
|
||||
- Encoding
|
||||
- Decoding
|
||||
- Huffman codec:
|
||||
- Encoding
|
||||
- Decoding
|
||||
- Bit Packing codec:
|
||||
- Encoding
|
||||
- Decoding
|
||||
- Bit Packing Byte codec:
|
||||
- Decoding
|
||||
- Properly parse generated ISF test data
|
||||
- Generate new ISF data
|
||||
- Parse ISF data from WLM
|
||||
- Add new strokes to an IsfDrawing
|
||||
- Stroke attributes: width, colour, pressure
|
||||
- Export IsfDrawing to raw-isf, isf-base64 and fortified-gif
|
||||
- Export IsfDrawing to PNG
|
||||
- Delete strokes
|
||||
@@ -0,0 +1,19 @@
|
||||
# Find LibISF-Qt
|
||||
# Find the Ink Serialized Format library and includes
|
||||
# This module defines
|
||||
# ISFQT_FOUND - If false, do not try to use ISF-Qt
|
||||
# ISFQT_INCLUDE_DIR - where to find isfqtdrawing.h and friends
|
||||
# ISFQT_LIBRARIES - the libraries needed to use ISF-Qt
|
||||
# ISFQT_LIBRARY - Where to find the ISF-Qt library (generally not used)
|
||||
|
||||
FIND_PATH( ISFQT_INCLUDE_DIR isfqtdrawing.h /usr/include/isf-qt /usr/local/include/isf-qt )
|
||||
FIND_LIBRARY( ISFQT_LIBRARY NAMES isf-qt PATH /usr/lib /usr/local/lib )
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set ISFQT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE( FindPackageHandleStandardArgs )
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS( ISFQT DEFAULT_MSG ISFQT_LIBRARY ISFQT_INCLUDE_DIR )
|
||||
|
||||
IF( ISFQT_FOUND )
|
||||
SET( ISFQT_LIBRARIES ${ISFQT_LIBRARY} )
|
||||
ENDIF( ISFQT_FOUND )
|
||||
@@ -0,0 +1,14 @@
|
||||
# IsfQtConfig.cmake is generated by CMake from cmake/IsfQtConfig.cmake.in.
|
||||
# Any changed value in this file will be overwritten by CMake.
|
||||
|
||||
# Set the version numbers
|
||||
SET( ISFQT_VERSION @ISFQT_VERSION@ )
|
||||
SET( ISFQT_VERSION_STRING "@ISFQT_VERSION_STRING@" )
|
||||
|
||||
# Set the directories
|
||||
IF( NOT ISFQT_INSTALL_DIR )
|
||||
SET( ISFQT_INSTALL_DIR "@CMAKE_INSTALL_PREFIX@" )
|
||||
ENDIF( NOT ISFQT_INSTALL_DIR )
|
||||
|
||||
SET( ISFQT_INCLUDE_DIR "@INCLUDE_INSTALL_DIR@" )
|
||||
SET( ISFQT_LIBRARY_DIR "@LIB_INSTALL_DIR@" )
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
# This file is included here because the standard FindGIF.cmake file
|
||||
# requires the CHECK_STRUCT_MEMBER macro. It wasn't on my PC, at least, so
|
||||
# I include a copy of the macro here for giflib to use.
|
||||
|
||||
MACRO (CHECK_STRUCT_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
|
||||
SET(_INCLUDE_FILES)
|
||||
FOREACH (it ${_HEADER})
|
||||
SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
|
||||
ENDFOREACH (it)
|
||||
|
||||
SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE "
|
||||
${_INCLUDE_FILES}
|
||||
int main()
|
||||
{
|
||||
${_STRUCT}* tmp;
|
||||
tmp->${_MEMBER};
|
||||
return 0;
|
||||
}
|
||||
")
|
||||
|
||||
CHECK_CXX_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT})
|
||||
|
||||
ENDMACRO (CHECK_STRUCT_MEMBER)
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* LibISF-Qt configuration file
|
||||
*
|
||||
* The value for these defines is controlled by CMake at configuration time.
|
||||
*/
|
||||
|
||||
// Define the application version
|
||||
#define ISFQT_VERSION "${ISFQT_VERSION}"
|
||||
|
||||
// Define if debug output should be enabled
|
||||
#if ${ISFQT_DEBUG_OUTPUT}
|
||||
#define ISFQT_DEBUG
|
||||
#endif
|
||||
|
||||
// Define if fortified-GIF support is enabled
|
||||
#define ISFQT_GIF_ENABLED ${GIF_ENABLED}
|
||||
@@ -0,0 +1,5 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file>pics/draw-eraser.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 722 B |
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
|
||||
<!--#########-->
|
||||
</div>
|
||||
|
||||
<address>
|
||||
<small>Generated on $datetime for $projectname by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0">
|
||||
</a>
|
||||
$doxygenversion
|
||||
</small>
|
||||
</address>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<title>$title</title>
|
||||
<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css"></link>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<h1>ISF-Qt developer documentation
|
||||
<img class="logo" src="http://kmess.org/projects/isf-qt/isf-qt-logo.png" width="250" height="110" alt="">
|
||||
</h1>
|
||||
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li><a href="index.html">Main Page</a></li>
|
||||
<li><a href="modules.html">Modules</a></li>
|
||||
<li><a href="hierarchy.html">Class Hierarchy</a></li>
|
||||
<li><a href="annotated.html">Class List</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<!--#########-->
|
||||
@@ -0,0 +1,393 @@
|
||||
|
||||
/* standard fonts */
|
||||
|
||||
body,
|
||||
td,
|
||||
th {
|
||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
body,
|
||||
td {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: "Courier New", monospace;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
/* main top title */
|
||||
font-size: 140%;
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
|
||||
background-color: #99ccff;
|
||||
color: #0071BB;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#content h1
|
||||
{
|
||||
/* main content title */
|
||||
text-align: left;
|
||||
font-size: 160%;
|
||||
text-align: center;
|
||||
background-color: transparent;
|
||||
color: #000;
|
||||
padding-bottom: 15px;
|
||||
|
||||
/* center the element too so the float doesn't interfere */
|
||||
position: relative;
|
||||
margin-left: -25%;
|
||||
width: 50%;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
|
||||
h2 {
|
||||
/* section title */
|
||||
font-size: 140%;
|
||||
}
|
||||
|
||||
h2,
|
||||
h2 a {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 110%;
|
||||
}
|
||||
|
||||
h3 {
|
||||
text-align: center;
|
||||
|
||||
/* center the element too so the float doesn't interfere */
|
||||
position: relative;
|
||||
margin-left: -25%;
|
||||
width: 50%;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
a, a:visited {
|
||||
color: #0000cc;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:active, a:hover {
|
||||
color: #ff0000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 1px;
|
||||
border: none;
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
|
||||
#content li {
|
||||
list-style-type: disc;
|
||||
}
|
||||
|
||||
|
||||
/* layout of page */
|
||||
|
||||
html,body {
|
||||
background-color: #e6dede;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
background-color: #fff;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
#content {
|
||||
padding: 0 10px 5px 10px;
|
||||
}
|
||||
|
||||
|
||||
/* menu and navigation */
|
||||
|
||||
.logo {
|
||||
float: right;
|
||||
display: inline;
|
||||
margin: 0 5px 5px 5px;
|
||||
}
|
||||
|
||||
#menu li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
float: left;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
#menu ul:after {
|
||||
clear: left;
|
||||
display: block;
|
||||
content: '.';
|
||||
line-height: 0%;
|
||||
height: 0;
|
||||
visibility: hidden;
|
||||
overflow: none;
|
||||
}
|
||||
|
||||
/* for msie \*/
|
||||
* html #menu ul {
|
||||
height: 0.1em;
|
||||
}
|
||||
/* end of msie */
|
||||
|
||||
#menu ul,
|
||||
div.qindex {
|
||||
/* top index */
|
||||
background-color: #99ccff;
|
||||
border-bottom: 1px solid #000;
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
line-height: 140%;
|
||||
}
|
||||
|
||||
div.nav {
|
||||
/* directory location */
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.nav a.el {
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
#menu a,
|
||||
div.qindex a {
|
||||
color: #111;
|
||||
}
|
||||
|
||||
#menu a:hover,
|
||||
div.qindex a:hover {
|
||||
text-decoration: none;
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
div.qindex a.qindexHL {
|
||||
/* highlighted menu option */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* element reference in text. may occur everywhere */
|
||||
|
||||
a.el,
|
||||
a.el:active,
|
||||
a.el:visited { color: #5F2994; }
|
||||
|
||||
a.el {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.fragment {
|
||||
font-family: monospace
|
||||
}
|
||||
|
||||
pre.fragment {
|
||||
border: 1px solid #CCCCCC;
|
||||
background-color: #f5f5f5;
|
||||
margin: 4px 8px 4px 2px;
|
||||
padding: 4px 6px 4px 4px;
|
||||
}
|
||||
|
||||
td.indexkey,
|
||||
td.indexvalue {
|
||||
background-color: #eeeeff;
|
||||
background-color: #C9E2FF;
|
||||
padding: 2px 10px 2px 10px
|
||||
margin: 2px 0px 2px 0px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
td.indexkey {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
TR.memlist {
|
||||
/* separate member list page */
|
||||
background-color: #D6EEFF;
|
||||
}
|
||||
|
||||
/* not encountered
|
||||
|
||||
P.formulaDsp { text-align: center; }
|
||||
IMG.formulaDsp { }
|
||||
IMG.formulaInl { vertical-align: middle; }
|
||||
|
||||
*/
|
||||
|
||||
/* source code highlights */
|
||||
|
||||
SPAN.keyword { color: #008000 }
|
||||
SPAN.keywordtype { color: #604020 }
|
||||
SPAN.keywordflow { color: #e08000 }
|
||||
SPAN.comment { color: #800000 }
|
||||
SPAN.preprocessor { color: #806020 }
|
||||
SPAN.stringliteral { color: #002080 }
|
||||
SPAN.charliteral { color: #008080 }
|
||||
|
||||
/* Member description header */
|
||||
|
||||
.mdTable {
|
||||
border: 1px solid #868686;
|
||||
background-color: #C9E2FF;
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.mdRow {
|
||||
padding: 4px 5px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.md {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
td.mdname1 {
|
||||
font-weight: bold;
|
||||
color: #602020;
|
||||
}
|
||||
|
||||
td.mdname {
|
||||
/* parameter name in member description */
|
||||
font-weight: bold;
|
||||
color: #602020;
|
||||
}
|
||||
|
||||
.mdPrefix {
|
||||
/* template prefix in member description */
|
||||
color: #606060;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
|
||||
/* member summary table */
|
||||
|
||||
.mdescLeft,
|
||||
.mdescRight {
|
||||
padding: 0 8px 4px 8px;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
background-color: #D3E9FF;
|
||||
border: 1px none #E0E0E0;
|
||||
margin: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.memItemLeft,
|
||||
.memTemplItemLeft,
|
||||
.memItemRight,
|
||||
.memTemplItemRight {
|
||||
border-top: 1px solid #868686;
|
||||
background-color: #C9E2FF;
|
||||
font-size: 80%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.memItemLeft,
|
||||
.memTemplItemLeft {
|
||||
padding: 1px 0px 0px 8px;
|
||||
}
|
||||
|
||||
.memItemRight,
|
||||
.memTemplItemRight {
|
||||
padding: 1px 8px 0px 8px;
|
||||
}
|
||||
|
||||
.memTemplParams {
|
||||
/* template prefix in function list */
|
||||
border-top: 1px solid #868686;
|
||||
background-color: #C9E2FF;
|
||||
font-size: 80%;
|
||||
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
|
||||
/* member sections */
|
||||
|
||||
.memitem {
|
||||
padding-bottom: 2ex;
|
||||
}
|
||||
|
||||
.memproto {
|
||||
border-top: 1px dashed #333;
|
||||
padding: 1ex 4px 0 4px;
|
||||
margin: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.memproto td {
|
||||
color: #333;
|
||||
font-size: 110%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.memname {
|
||||
white-space: nowrap;
|
||||
font-size: 105%;
|
||||
}
|
||||
|
||||
.memdoc {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.memdoc p:first-child {
|
||||
margin-top: 0;
|
||||
padding-top: 0.5ex;
|
||||
margin-right: 4em;
|
||||
}
|
||||
|
||||
.memdoc dl,
|
||||
.memdoc dt,
|
||||
.memdoc dd {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.paramkey {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.paramtype {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.paramname {
|
||||
color: #602020;
|
||||
font-style: italic;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.directory p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1 @@
|
||||
#include "isfinkcanvas.h"
|
||||
@@ -0,0 +1 @@
|
||||
#include "isfqt.h"
|
||||
@@ -0,0 +1 @@
|
||||
#include "isfqtdrawing.h"
|
||||
@@ -0,0 +1 @@
|
||||
#include "isfqtstroke.h"
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef ISFQT_QMATRIX_COMPAT_H
|
||||
#define ISFQT_QMATRIX_COMPAT_H
|
||||
|
||||
#include <QTransform>
|
||||
|
||||
using QMatrix = QTransform;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,173 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* Copyright (C) 2009 by Adam Goossens *
|
||||
* adam@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ISFINKCANVAS_H
|
||||
#define ISFINKCANVAS_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "isfqt.h"
|
||||
#include "isfqtdrawing.h"
|
||||
|
||||
|
||||
|
||||
namespace Isf
|
||||
{
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @class InkCanvas
|
||||
* @brief This is a control designed for the drawing and display of Ink.
|
||||
*
|
||||
* InkCanvas is used for drawing and displaying Ink. The currently displayed Ink drawing can be retrieved
|
||||
* or set using the drawing() and setDrawing() methods.
|
||||
*
|
||||
* To set the properties of the current pen, use the setPenColor(), setPenSize() and setPenType() methods.
|
||||
* The supported pen types are outlined in the PenType enumeration documentation.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* \code
|
||||
* InkCanvas* canvas = new Isf::InkCanvas( this );
|
||||
* canvas->setPenColor( Qt::blue );
|
||||
* canvas->setPenSize( 10 );
|
||||
*
|
||||
* // the pen is now 10 pixels thick and blue.
|
||||
*
|
||||
* canvas->setPenType( EraserPen );
|
||||
*
|
||||
* // now an eraser will be used and strokes can be erased individually.
|
||||
* \endcode
|
||||
*
|
||||
* To return the currently displayed Ink as a QImage, use image(). To return the raw ISF data, suitable
|
||||
* for saving to disk or sending over a network, use bytes().
|
||||
*
|
||||
* To write the ISF data directly to a QIODevice, such as a file, use the save() method.
|
||||
*
|
||||
* Connect to the inkChanged() signal to be notified when the drawing displayed on the canvas changes,
|
||||
* either through strokes being drawn or deleted, or the current drawing being changed.
|
||||
*
|
||||
* @author Adam Goossens (adam@kmess.org)
|
||||
*/
|
||||
class InkCanvas : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
public: // public enumerations
|
||||
/**
|
||||
* The various types of pens supported by InkCanvas.
|
||||
*
|
||||
* The DrawingPen is a standard pen for drawing new strokes onto the canvas.
|
||||
* The pen size and color are controlled by setPenSize() and setPenColor().
|
||||
*
|
||||
* The EraserPen is used for erasing individual strokes. Pixel-by-pixel erase is not
|
||||
* yet supported.
|
||||
*/
|
||||
enum PenType
|
||||
{
|
||||
DrawingPen, ///< Used to draw Ink
|
||||
EraserPen ///< Used to erase by stroke
|
||||
};
|
||||
|
||||
public: // public constructors
|
||||
InkCanvas( QWidget* = 0 );
|
||||
~InkCanvas();
|
||||
|
||||
public: // public methods
|
||||
QByteArray bytes();
|
||||
Isf::Drawing* drawing();
|
||||
QImage image();
|
||||
bool isEmpty();
|
||||
QColor penColor();
|
||||
int penSize();
|
||||
PenType penType();
|
||||
void save( QIODevice&, bool = false );
|
||||
void setDrawing( Isf::Drawing* );
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
public slots:
|
||||
void clear();
|
||||
void setCanvasColor( QColor );
|
||||
void setPenColor( QColor );
|
||||
void setPenSize( int );
|
||||
void setPenType( PenType );
|
||||
|
||||
protected: // protected methods
|
||||
void mousePressEvent( QMouseEvent* );
|
||||
void mouseMoveEvent( QMouseEvent* );
|
||||
void mouseReleaseEvent( QMouseEvent* );
|
||||
void paintEvent( QPaintEvent* );
|
||||
void resizeEvent( QResizeEvent* );
|
||||
|
||||
private: // private methods
|
||||
void drawLineTo( const QPoint& );
|
||||
void clearBuffer();
|
||||
void updateCursor();
|
||||
|
||||
private: // private attributes
|
||||
/// Color of the canvas background
|
||||
QColor canvasColor_;
|
||||
/// Color of current pen
|
||||
QColor color_;
|
||||
/// Cursor pixmap
|
||||
QPixmap cursorPixmap_;
|
||||
/// Current cursor
|
||||
QCursor cursor_;
|
||||
/// It's true if the erase brush was selected
|
||||
bool erasingImage_;
|
||||
/// Current drawing being manipulated
|
||||
Isf::Drawing* drawing_;
|
||||
/// Initial drawing, can be overridden with drawing_
|
||||
Isf::Drawing initialDrawing_;
|
||||
/// Last point where the mouse pointer was released
|
||||
QPoint lastPoint_;
|
||||
/// True if the user is painting
|
||||
bool scribbling_;
|
||||
/// Pen size, in pixels.
|
||||
int penSize_;
|
||||
/// Pen type
|
||||
PenType penType_;
|
||||
/// The current stroke being drawn
|
||||
Isf::Stroke* currentStroke_;
|
||||
/// The pixmap buffer where in progress strokes are drawn
|
||||
QPixmap bufferPixmap_;
|
||||
/// Cache pixmap so the Ink isn't redrawn on every mouse move
|
||||
QPixmap isfCachePixmap_;
|
||||
/// Dirty value used to update isf cache pixmap.
|
||||
bool drawingDirty_;
|
||||
|
||||
signals:
|
||||
/// Emitted when the ink representation is modified (stroke drawn,
|
||||
/// stroke deleted, current drawing changed).
|
||||
void inkChanged();
|
||||
};
|
||||
|
||||
|
||||
|
||||
}; // namespace Isf
|
||||
|
||||
|
||||
|
||||
#endif // ISFINKCANVAS_H
|
||||
@@ -0,0 +1,322 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* Copyright (C) 2009 by Adam Goossens *
|
||||
* adam@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ISFQT_H
|
||||
#define ISFQT_H
|
||||
|
||||
#include <QColor>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QMatrix>
|
||||
#include <QPointF>
|
||||
#include <QRectF>
|
||||
#include <QSizeF>
|
||||
#include <QtGlobal>
|
||||
|
||||
|
||||
|
||||
namespace Isf
|
||||
{
|
||||
// Forward declarations
|
||||
class Drawing;
|
||||
class StreamData;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Possible error return values returned by the ISF library.
|
||||
*/
|
||||
enum IsfError
|
||||
{
|
||||
ISF_ERROR_NONE = 0 ///< No error
|
||||
|
||||
/// Stream reader errors
|
||||
, ISF_ERROR_BAD_VERSION ///< Incompatible ISF version
|
||||
, ISF_ERROR_BAD_STREAMSIZE ///< Stream size of ISF data is too small
|
||||
, ISF_ERROR_INVALID_STREAM ///< The stream contains wrong or duplicated tags
|
||||
, ISF_ERROR_INVALID_PAYLOAD ///< A tag's payload was empty
|
||||
, ISF_ERROR_INVALID_BLOCK ///< A block had invalid contents
|
||||
|
||||
/// Other errors
|
||||
, ISF_ERROR_INTERNAL ///< An error within the code has occurred
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* List of predefined packet properties.
|
||||
*
|
||||
* These are used with strokes and their attributes.
|
||||
* The Metrics structure defines how to interpret these properties.
|
||||
*/
|
||||
enum PacketProperty
|
||||
{
|
||||
KNOWN_GUID_BASE_INDEX = 50
|
||||
, GUID_X = KNOWN_GUID_BASE_INDEX + 0
|
||||
, GUID_Y = KNOWN_GUID_BASE_INDEX + 1
|
||||
, GUID_Z // = et cetera
|
||||
, GUID_PACKET_STATUS
|
||||
, GUID_TIMER_TICK
|
||||
, GUID_SERIAL_NUMBER
|
||||
, GUID_NORMAL_PRESSURE
|
||||
, GUID_TANGENT_PRESSURE
|
||||
, GUID_BUTTON_PRESSURE
|
||||
, GUID_X_TILT_ORIENTATION
|
||||
, GUID_Y_TILT_ORIENTATION // = KNOWN_GUID_BASE_INDEX + 10
|
||||
, GUID_AZIMUTH_ORIENTATION
|
||||
, GUID_ALTITUDE_ORIENTATION
|
||||
, GUID_TWIST_ORIENTATION
|
||||
, GUID_PITCH_ROTATION
|
||||
, GUID_ROLL_ROTATION
|
||||
, GUID_YAW_ROTATION
|
||||
, GUID_PEN_STYLE
|
||||
, GUID_COLORREF
|
||||
, GUID_PEN_WIDTH
|
||||
, GUID_PEN_HEIGHT // = KNOWN_GUID_BASE_INDEX + 20
|
||||
, GUID_PEN_TIP
|
||||
, GUID_DRAWING_FLAGS
|
||||
, GUID_CURSORID
|
||||
, GUID_WORD_ALTERNATES
|
||||
, GUID_CHAR_ALTERNATES
|
||||
, GUID_INKMETRICS
|
||||
, GUID_GUIDE_STRUCTURE
|
||||
, GUID_TIME_STAMP
|
||||
, GUID_LANGUAGE
|
||||
, GUID_TRANSPARENCY // = KNOWN_GUID_BASE_INDEX + 30
|
||||
, GUID_CURVE_FITTING_ERROR
|
||||
, GUID_RECO_LATTICE
|
||||
, GUID_CURSORDOWN
|
||||
, GUID_SECONDARYTIPSWITCH
|
||||
, GUID_BARRELDOWN
|
||||
, GUID_TABLETPICK
|
||||
, GUID_ROP // = KNOWN_GUID_BASE_INDEX + 37
|
||||
, KNOWN_GUID_LAST_INDEX
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Available pen tips.
|
||||
*/
|
||||
enum PenTip
|
||||
{
|
||||
Ball = 0 ///< The pen tip is a circle
|
||||
, Rectangle = 1 ///< The pen tip is a square or a rectangle
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Stroke drawing flags.
|
||||
*/
|
||||
enum StrokeFlag
|
||||
{
|
||||
FitToCurve = 0x0001 ///< Fit the lines between stroke points to Bezier curves
|
||||
, IgnorePressure = 0x0004 ///< Ignore the pressure level for this stroke
|
||||
, IsHighlighter = 0x0100 ///< This stroke is an highlighter stroke
|
||||
, IsRectangle = 0x0200 ///< Meaning unknown
|
||||
};
|
||||
Q_DECLARE_FLAGS( StrokeFlags, StrokeFlag );
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS( StrokeFlags );
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Units used for metric measurements.
|
||||
*
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms840884.aspx
|
||||
*/
|
||||
enum MetricScale
|
||||
{
|
||||
UNIT_UNUSED = -1
|
||||
, UNIT_DEFAULT = 0
|
||||
, UNIT_INCH = 1
|
||||
, UNIT_CENTIMETER = 2
|
||||
, UNIT_DEGREE = 3
|
||||
, UNIT_RADIAN = 4
|
||||
, UNIT_SECOND = 5
|
||||
, UNIT_POUND = 6
|
||||
, UNIT_GRAM = 7
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A single metric.
|
||||
*
|
||||
* It is a set of values representing what kind of values some
|
||||
* type of measurement will assume.
|
||||
*/
|
||||
struct Metric
|
||||
{
|
||||
/// Constructor for invalid metrics
|
||||
Metric()
|
||||
{
|
||||
}
|
||||
/// Initialized constructor
|
||||
Metric( qint64 vMin, qint64 vMax, MetricScale vUnits, float vResolution )
|
||||
: min( vMin )
|
||||
, max( vMax )
|
||||
, units( vUnits )
|
||||
, resolution( vResolution )
|
||||
{
|
||||
}
|
||||
/// Quick comparison operator
|
||||
bool operator ==( const Metric& other )
|
||||
{
|
||||
return min == other.min
|
||||
&& max == other.max
|
||||
&& units == other.units
|
||||
&& resolution == other.resolution;
|
||||
}
|
||||
|
||||
/// Minimum value
|
||||
qint64 min;
|
||||
/// Maximum value
|
||||
qint64 max;
|
||||
/// Measurement unit
|
||||
MetricScale units;
|
||||
/// Resolution
|
||||
float resolution;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A table of metrics.
|
||||
*
|
||||
* The default metric values are hard-coded here, different values read from the stream
|
||||
* will override these.
|
||||
*/
|
||||
struct Metrics
|
||||
{
|
||||
/// Constructor
|
||||
Metrics()
|
||||
{
|
||||
items[ GUID_X ] = Metric( 0, 12699, UNIT_CENTIMETER, 1000 );
|
||||
items[ GUID_Y ] = Metric( 0, 9649, UNIT_CENTIMETER, 1000 );
|
||||
items[ GUID_Z ] = Metric( -1023, 1023, UNIT_CENTIMETER, 1000 );
|
||||
items[ GUID_PACKET_STATUS ] = Metric( 0, 1023, UNIT_DEFAULT, 1 );
|
||||
items[ GUID_TIMER_TICK ] = Metric( 0, 1023, UNIT_DEFAULT, 1 );
|
||||
items[ GUID_SERIAL_NUMBER ] = Metric( 0, 1023, UNIT_DEFAULT, 1 );
|
||||
items[ GUID_NORMAL_PRESSURE ] = Metric( 0, 3600, UNIT_DEGREE, 10 );
|
||||
items[ GUID_TANGENT_PRESSURE ] = Metric( 0, 3600, UNIT_DEGREE, 10 );
|
||||
items[ GUID_BUTTON_PRESSURE ] = Metric( 0, 3600, UNIT_DEGREE, 10 );
|
||||
items[ GUID_X_TILT_ORIENTATION ] = Metric( -900, 900, UNIT_DEGREE, 10 );
|
||||
items[ GUID_Y_TILT_ORIENTATION ] = Metric( 0, 3600, UNIT_DEGREE, 10 );
|
||||
items[ GUID_AZIMUTH_ORIENTATION ] = Metric( -1, -1, UNIT_UNUSED, -1 );
|
||||
items[ GUID_ALTITUDE_ORIENTATION ] = Metric( -1, -1, UNIT_UNUSED, -1 );
|
||||
items[ GUID_TWIST_ORIENTATION ] = Metric( -1, -1, UNIT_UNUSED, -1 );
|
||||
items[ GUID_PITCH_ROTATION ] = Metric( -1, -1, UNIT_UNUSED, -1 );
|
||||
items[ GUID_ROLL_ROTATION ] = Metric( -1, -1, UNIT_UNUSED, -1 );
|
||||
items[ GUID_YAW_ROTATION ] = Metric( -1, -1, UNIT_UNUSED, -1 );
|
||||
}
|
||||
|
||||
/// The list of metrics defined in this table
|
||||
QMap<int,Metric> items;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A single point within a stroke.
|
||||
*/
|
||||
struct Point
|
||||
{
|
||||
/// Empty constructor
|
||||
Point()
|
||||
: position( 0, 0 )
|
||||
, pressureLevel( 0 )
|
||||
{
|
||||
}
|
||||
/// Constructor with point only
|
||||
Point( const QPoint& point )
|
||||
: position( point )
|
||||
, pressureLevel( 0 )
|
||||
{
|
||||
}
|
||||
/// Constructor with point and pressure
|
||||
Point( const QPoint& point, const qint64 pressure )
|
||||
: position( point )
|
||||
, pressureLevel( pressure )
|
||||
{
|
||||
}
|
||||
/// Quick comparison operator
|
||||
bool operator ==( const Point& other )
|
||||
{
|
||||
return position == other.position
|
||||
&& pressureLevel == other.pressureLevel;
|
||||
}
|
||||
|
||||
/// coordinates
|
||||
QPoint position;
|
||||
/// Pressure information
|
||||
qint64 pressureLevel;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A list of Point items.
|
||||
*/
|
||||
typedef QList<Point> PointList;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Conversion factor to convert from HiMetric units to pixels.
|
||||
*/
|
||||
const qreal HiMetricToPixel = 26.4572454037811;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @class Stream
|
||||
* @brief The main class of the library.
|
||||
*
|
||||
* This class contains the only methods you need to transform ISF data
|
||||
* into strokes or pictures, and from strokes to ISF data.
|
||||
*/
|
||||
class Stream
|
||||
{
|
||||
|
||||
public: // Public static methods
|
||||
|
||||
static Drawing &reader( const QByteArray&, bool = false );
|
||||
static Drawing &readerGif( const QByteArray&, bool = false );
|
||||
static Drawing &readerPng( const QByteArray&, bool = false );
|
||||
static bool supportsGif();
|
||||
static QByteArray writer( const Drawing&, bool = false );
|
||||
static QByteArray writerGif( const Drawing&, bool = false );
|
||||
static QByteArray writerPng( const Drawing&, bool = false );
|
||||
|
||||
private: // Private static properties
|
||||
static StreamData* streamData_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,133 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* Copyright (C) 2009 by Adam Goossens *
|
||||
* adam@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ISFQTDRAWING_H
|
||||
#define ISFQTDRAWING_H
|
||||
|
||||
#include <IsfQt>
|
||||
#include <IsfQtStroke>
|
||||
|
||||
#include <QMap>
|
||||
#include <QMatrix>
|
||||
#include <QPaintDevice>
|
||||
#include <QUuid>
|
||||
#include <QPixmap>
|
||||
|
||||
|
||||
// Forward declarations
|
||||
class QByteArray;
|
||||
|
||||
class AttributeSet;
|
||||
|
||||
|
||||
|
||||
namespace Isf
|
||||
{
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @class Drawing
|
||||
* @brief This is a manipulable representation of an ISF stream.
|
||||
*
|
||||
* This class is a container for the data of ISF (Ink Serialized Format)
|
||||
* drawings. You can manipulate its contents, or create a new one and
|
||||
* fill it, then save it back to ISF format with the Isf::Stream methods.
|
||||
*
|
||||
* @see Isf::Stream
|
||||
* @author Adam Goossens (adam@kmess.org)
|
||||
* @author Valerio Pilo (valerio@kmess.org)
|
||||
*/
|
||||
class Drawing
|
||||
{
|
||||
friend class Stream;
|
||||
friend class TagsParser;
|
||||
friend class TagsWriter;
|
||||
|
||||
public: // public constructors
|
||||
Drawing();
|
||||
Drawing( const Drawing& );
|
||||
~Drawing();
|
||||
|
||||
public: // public state retrieval methods
|
||||
QRect boundingRect() const;
|
||||
void clear();
|
||||
IsfError error() const;
|
||||
qint32 indexOfStroke( const Stroke* ) const;
|
||||
bool isEmpty() const;
|
||||
bool isNull() const;
|
||||
QPixmap pixmap( const QColor = Qt::transparent );
|
||||
void setBoundingRect( QRect );
|
||||
QSize size() const;
|
||||
Stroke* stroke( quint32 );
|
||||
Stroke* strokeAtPoint( const QPoint& );
|
||||
const QList<Stroke*> strokes();
|
||||
|
||||
public: // public manipulation methods
|
||||
qint32 addStroke( Stroke* );
|
||||
qint32 addStroke( PointList = PointList() );
|
||||
bool deleteStroke( quint32 );
|
||||
bool deleteStroke( Stroke* );
|
||||
|
||||
private:
|
||||
void updateBoundingRect();
|
||||
|
||||
private: // Private properties
|
||||
/// Bounding rectangle of the drawing
|
||||
QRect boundingRect_;
|
||||
/// Cached bounding rectangle
|
||||
QRect cacheRect_;
|
||||
/// The cached pixmap
|
||||
QPixmap cachePixmap_;
|
||||
/// Virtual drawing canvas dimensions
|
||||
QRect canvas_;
|
||||
/// A list of strokes that need to be repainted.
|
||||
QList<Stroke*> changedStrokes_;
|
||||
/// Is the drawing dirty? i.e, requires repainting?
|
||||
bool dirty_;
|
||||
/// Last parsing error (if there is one)
|
||||
IsfError error_;
|
||||
/// List of registered GUIDs
|
||||
QList<QUuid> guids_;
|
||||
/// Whether the drawing contains X coordinates or not
|
||||
bool hasXData_;
|
||||
/// Whether the drawing contains Y coordinates or not
|
||||
bool hasYData_;
|
||||
/// Whether the drawing is invalid or valid
|
||||
bool isNull_;
|
||||
/// Maximum GUID available in the drawing
|
||||
quint64 maxGuid_;
|
||||
/// Maximum thickness of the strokes
|
||||
QSizeF maxPenSize_;
|
||||
/// List of strokes composing this drawing
|
||||
QList<Stroke*> strokes_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
}; // namespace Isf
|
||||
|
||||
|
||||
|
||||
#endif // ISFQTDRAWING_H
|
||||
@@ -0,0 +1,117 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* Copyright (C) 2010 by Adam Goossens *
|
||||
* adam@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ISFQTSTROKE_H
|
||||
#define ISFQTSTROKE_H
|
||||
|
||||
#include <IsfQt>
|
||||
|
||||
#include <QColor>
|
||||
#include <QList>
|
||||
#include <QMatrix>
|
||||
#include <QRect>
|
||||
#include <QSizeF>
|
||||
|
||||
|
||||
// Forward declarations
|
||||
class QPainterPath;
|
||||
|
||||
|
||||
|
||||
namespace Isf
|
||||
{
|
||||
|
||||
|
||||
|
||||
// Forward declarations
|
||||
class AttributeSet;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A pen stroke.
|
||||
*/
|
||||
class Stroke
|
||||
{
|
||||
public:
|
||||
Stroke();
|
||||
Stroke( const Stroke& );
|
||||
~Stroke();
|
||||
|
||||
void addPoint( Point );
|
||||
void addPoints( PointList );
|
||||
QRect boundingRect() const;
|
||||
QColor color() const;
|
||||
void finalize();
|
||||
StrokeFlags flags() const;
|
||||
bool hasPressureData() const;
|
||||
Metrics* metrics();
|
||||
QPainterPath painterPath();
|
||||
QSizeF penSize() const;
|
||||
PointList& points();
|
||||
void setColor( QColor );
|
||||
void setFlag( StrokeFlag, bool = true );
|
||||
void setFlags( StrokeFlags );
|
||||
void setMetrics( Metrics* );
|
||||
void setPenSize( QSizeF );
|
||||
void setTransform( QMatrix* );
|
||||
QMatrix* transform();
|
||||
|
||||
private:
|
||||
void bezierCalculateControlPoints();
|
||||
void bezierGetFirstControlPoints( double[], double*, int );
|
||||
|
||||
private:
|
||||
/// Bezier data
|
||||
QList<QPointF> bezierControlPoints1_;
|
||||
QList<QPointF> bezierControlPoints2_;
|
||||
QList<QPointF> bezierKnots_;
|
||||
/// Bounding rectangle of this stroke
|
||||
QRect boundingRect_;
|
||||
/// The stroke color, optionally with alpha channel
|
||||
QColor color_;
|
||||
/// Whether the stroke data needs to be analyzed or not
|
||||
bool finalized_;
|
||||
/// Mask of StrokeFlags, @see StrokeFlags
|
||||
StrokeFlags flags_;
|
||||
/// Whether the stroke contains pressure information or not
|
||||
bool hasPressureData_;
|
||||
/// Link to this stroke's metrics, if any
|
||||
Metrics* metrics_;
|
||||
/// Dimensions of the pencil in pixels
|
||||
QSizeF penSize_;
|
||||
/// List of points
|
||||
PointList points_;
|
||||
/// Link to this stroke's transformation, if any
|
||||
QMatrix* transform_;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
}; // namespace Isf
|
||||
|
||||
|
||||
|
||||
#endif // ISFQTSTROKE_H
|
||||
@@ -0,0 +1,4 @@
|
||||
[Project]
|
||||
Name=isf-qt
|
||||
Manager=KDevCMakeManager
|
||||
VersionControl=
|
||||
@@ -0,0 +1,220 @@
|
||||
<?xml version = '1.0'?>
|
||||
<kdevelop>
|
||||
<general>
|
||||
<projectmanagement>KDevCustomProject</projectmanagement>
|
||||
<projectdirectory>.</projectdirectory>
|
||||
<absoluteprojectpath>false</absoluteprojectpath>
|
||||
<author>The KMess Development Team</author>
|
||||
<email>project@kmess.org</email>
|
||||
<version>0.1</version>
|
||||
<primarylanguage>C++</primarylanguage>
|
||||
<ignoreparts>
|
||||
<part>kdevtools</part>
|
||||
<part>kdevfileview</part>
|
||||
<part>kdevquickopen</part>
|
||||
<part>kdevabbrev</part>
|
||||
<part>kdevastyle</part>
|
||||
<part>kdevsnippet</part>
|
||||
<part>kdevctags2</part>
|
||||
<part>kdevfilelist</part>
|
||||
<part>kdevscripting</part>
|
||||
<part>kdevbookmarks</part>
|
||||
<part>kdevtexttools</part>
|
||||
<part>kdevdoxygen</part>
|
||||
<part>kdevdistpart</part>
|
||||
<part>kdevregexptest</part>
|
||||
</ignoreparts>
|
||||
<secondaryLanguages/>
|
||||
<projectname>isf-qt</projectname>
|
||||
<description>LibISF-Qt is a library to encode and decode Microsoft's Digital Ink format (Ink Serialized Format).</description>
|
||||
<defaultencoding/>
|
||||
<versioncontrol>kdevsubversion</versioncontrol>
|
||||
</general>
|
||||
<kdevcustomproject>
|
||||
<filelistdirectory>/home/valerio/kmess/trunk/contrib/isf-qt/</filelistdirectory>
|
||||
<run>
|
||||
<mainprogram>/home/valerio/kmess/trunk/contrib/isf-qt/build/tests/test_isfdrawing</mainprogram>
|
||||
<directoryradio>custom</directoryradio>
|
||||
<customdirectory>./build/</customdirectory>
|
||||
<programargs># tests/test1.isf</programargs>
|
||||
<terminal>false</terminal>
|
||||
<autocompile>false</autocompile>
|
||||
<envvars>
|
||||
<envvar value="en-US.UTF-8" name="LANG" />
|
||||
</envvars>
|
||||
<globaldebugarguments># tests/line2.isf</globaldebugarguments>
|
||||
<globalcwd>/home/valerio/kmess/trunk/contrib/isf-qt</globalcwd>
|
||||
<useglobalprogram>false</useglobalprogram>
|
||||
<autoinstall>false</autoinstall>
|
||||
<autokdesu>true</autokdesu>
|
||||
</run>
|
||||
<build>
|
||||
<buildtool>make</buildtool>
|
||||
<builddir>/home/valerio/kmess/trunk/contrib/isf-qt/build/</builddir>
|
||||
</build>
|
||||
<make>
|
||||
<abortonerror>false</abortonerror>
|
||||
<numberofjobs>2</numberofjobs>
|
||||
<dontact>false</dontact>
|
||||
<makebin>make</makebin>
|
||||
<selectedenvironment>default</selectedenvironment>
|
||||
<environments>
|
||||
<default/>
|
||||
</environments>
|
||||
<prio>0</prio>
|
||||
<defaulttarget/>
|
||||
<makeoptions/>
|
||||
</make>
|
||||
<filetypes>
|
||||
<filetype>*.h</filetype>
|
||||
<filetype>*.cpp</filetype>
|
||||
<filetype>CMakeLists.txt</filetype>
|
||||
<filetype>*.ui</filetype>
|
||||
</filetypes>
|
||||
<blacklist>
|
||||
<path>build</path>
|
||||
<path>build/CMakeFiles</path>
|
||||
<path>build/CMakeFiles/CompilerIdCXX</path>
|
||||
<path>build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp</path>
|
||||
<path>build/isfqtconfig.h</path>
|
||||
<path>build/tests</path>
|
||||
<path>build/tests/decode</path>
|
||||
<path>build/tests/decode/ui_testdecode.h</path>
|
||||
</blacklist>
|
||||
<other>
|
||||
<prio>0</prio>
|
||||
<otherbin/>
|
||||
<defaulttarget/>
|
||||
<otheroptions/>
|
||||
<selectedenvironment>default</selectedenvironment>
|
||||
<environments>
|
||||
<Debug/>
|
||||
<Release/>
|
||||
<default/>
|
||||
</environments>
|
||||
</other>
|
||||
</kdevcustomproject>
|
||||
<kdevfilecreate>
|
||||
<filetypes/>
|
||||
<useglobaltypes>
|
||||
<type ext="ui" />
|
||||
<type ext="cpp" />
|
||||
<type ext="h" />
|
||||
</useglobaltypes>
|
||||
</kdevfilecreate>
|
||||
<kdevdoctreeview>
|
||||
<projectdoc>
|
||||
<userdocDir>html/</userdocDir>
|
||||
<apidocDir>html/</apidocDir>
|
||||
</projectdoc>
|
||||
<ignoreqt_xml/>
|
||||
<ignoredoxygen/>
|
||||
<ignorekdocs/>
|
||||
<ignoretocs/>
|
||||
<ignoredevhelp/>
|
||||
</kdevdoctreeview>
|
||||
<cppsupportpart>
|
||||
<filetemplates>
|
||||
<interfacesuffix>.h</interfacesuffix>
|
||||
<implementationsuffix>.cpp</implementationsuffix>
|
||||
</filetemplates>
|
||||
</cppsupportpart>
|
||||
<kdevcppsupport>
|
||||
<codecompletion>
|
||||
<includeGlobalFunctions>true</includeGlobalFunctions>
|
||||
<includeTypes>true</includeTypes>
|
||||
<includeEnums>true</includeEnums>
|
||||
<includeTypedefs>false</includeTypedefs>
|
||||
<automaticCodeCompletion>true</automaticCodeCompletion>
|
||||
<automaticArgumentsHint>true</automaticArgumentsHint>
|
||||
<automaticHeaderCompletion>true</automaticHeaderCompletion>
|
||||
<codeCompletionDelay>1500</codeCompletionDelay>
|
||||
<argumentsHintDelay>1500</argumentsHintDelay>
|
||||
<headerCompletionDelay>250</headerCompletionDelay>
|
||||
<showOnlyAccessibleItems>false</showOnlyAccessibleItems>
|
||||
<completionBoxItemOrder>0</completionBoxItemOrder>
|
||||
<howEvaluationContextMenu>true</howEvaluationContextMenu>
|
||||
<showCommentWithArgumentHint>true</showCommentWithArgumentHint>
|
||||
<statusBarTypeEvaluation>true</statusBarTypeEvaluation>
|
||||
<namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
|
||||
<processPrimaryTypes>true</processPrimaryTypes>
|
||||
<processFunctionArguments>true</processFunctionArguments>
|
||||
<preProcessAllHeaders>true</preProcessAllHeaders>
|
||||
<parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
|
||||
<resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
|
||||
<alwaysParseInBackground>true</alwaysParseInBackground>
|
||||
<usePermanentCaching>true</usePermanentCaching>
|
||||
<alwaysIncludeNamespaces>true</alwaysIncludeNamespaces>
|
||||
<includePaths>.;</includePaths>
|
||||
</codecompletion>
|
||||
<references/>
|
||||
<qt>
|
||||
<used>true</used>
|
||||
<version>4</version>
|
||||
<includestyle>4</includestyle>
|
||||
<root>/usr/lib/qt3</root>
|
||||
<designerintegration>ExternalDesigner</designerintegration>
|
||||
<qmake>/usr/bin/qmake</qmake>
|
||||
<designer>/usr/bin/designer</designer>
|
||||
<designerpluginpaths/>
|
||||
</qt>
|
||||
<creategettersetter>
|
||||
<prefixGet>get</prefixGet>
|
||||
<prefixSet>set</prefixSet>
|
||||
<prefixVariable/>
|
||||
<parameterName>value</parameterName>
|
||||
<inlineGet>true</inlineGet>
|
||||
<inlineSet>true</inlineSet>
|
||||
</creategettersetter>
|
||||
<splitheadersource>
|
||||
<enabled>false</enabled>
|
||||
<synchronize>true</synchronize>
|
||||
<orientation>Vertical</orientation>
|
||||
</splitheadersource>
|
||||
</kdevcppsupport>
|
||||
<kdevfileview>
|
||||
<groups>
|
||||
<group pattern="CMakeLists.txt;*.cmake;" name="CMake" />
|
||||
<group pattern="*.h;*.hxx" name="Header" />
|
||||
<group pattern="*.cpp;*.c;*.C;*.cxx" name="Sources" />
|
||||
<group pattern="*.ui" name="Qt Designer files" />
|
||||
<hidenonprojectfiles>true</hidenonprojectfiles>
|
||||
<hidenonlocation>false</hidenonlocation>
|
||||
</groups>
|
||||
<tree>
|
||||
<hidepatterns>*.o,*.lo,CVS,*~,cmake*</hidepatterns>
|
||||
<hidenonprojectfiles>true</hidenonprojectfiles>
|
||||
<showvcsfields>false</showvcsfields>
|
||||
</tree>
|
||||
</kdevfileview>
|
||||
<kdevdebugger>
|
||||
<general>
|
||||
<gdbpath/>
|
||||
<dbgshell/>
|
||||
<configGdbScript/>
|
||||
<runShellScript/>
|
||||
<runGdbScript/>
|
||||
<breakonloadinglibs>true</breakonloadinglibs>
|
||||
<separatetty>false</separatetty>
|
||||
<floatingtoolbar>false</floatingtoolbar>
|
||||
<raiseGDBOnStart>false</raiseGDBOnStart>
|
||||
</general>
|
||||
<display>
|
||||
<staticmembers>false</staticmembers>
|
||||
<demanglenames>true</demanglenames>
|
||||
<outputradix>10</outputradix>
|
||||
</display>
|
||||
</kdevdebugger>
|
||||
<kdevdocumentation>
|
||||
<projectdoc>
|
||||
<docsystem/>
|
||||
<docurl/>
|
||||
<usermanualurl/>
|
||||
</projectdoc>
|
||||
</kdevdocumentation>
|
||||
<ctagspart>
|
||||
<customArguments/>
|
||||
<customTagfilePath>./tags</customTagfilePath>
|
||||
<activeTagsFiles/>
|
||||
</ctagspart>
|
||||
</kdevelop>
|
||||
@@ -0,0 +1,77 @@
|
||||
|
||||
#### Source files definitions ####
|
||||
|
||||
SET( ISFQT_SOURCES
|
||||
data/algorithms/bitpacking.cpp
|
||||
data/algorithms/bitpacking_byte.cpp
|
||||
data/algorithms/huffman.cpp
|
||||
data/algorithms/deltatransform.cpp
|
||||
data/compression.cpp
|
||||
data/datasource.cpp
|
||||
data/multibytecoding.cpp
|
||||
isfqtdrawing.cpp
|
||||
tagsparser.cpp
|
||||
tagswriter.cpp
|
||||
isfqt.cpp
|
||||
isfinkcanvas.cpp
|
||||
isfqtstroke.cpp
|
||||
)
|
||||
|
||||
SET( ISFQT_PUBLIC_HEADERS
|
||||
../include/isfqt.h
|
||||
../include/isfqtdrawing.h
|
||||
../include/isfinkcanvas.h
|
||||
../include/isfqtstroke.h
|
||||
../include/IsfQtDrawing
|
||||
../include/IsfInkCanvas
|
||||
../include/IsfQtStroke
|
||||
../include/IsfQt
|
||||
)
|
||||
|
||||
SET( ISFQT_LIBS
|
||||
Qt6::Core
|
||||
Qt6::Core5Compat
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
)
|
||||
|
||||
SET( ISFQT_RCCS
|
||||
../data/isfqtresources.qrc
|
||||
)
|
||||
|
||||
IF( GIF_FOUND )
|
||||
INCLUDE_DIRECTORIES( ${GIF_INCLUDE_DIR} )
|
||||
SET( ISFQT_LIBS ${ISFQT_LIBS} ${GIF_LIBRARIES} )
|
||||
ENDIF( GIF_FOUND )
|
||||
|
||||
|
||||
#### Compilation ####
|
||||
|
||||
QT6_WRAP_CPP( MOC_SRCS ../include/isfinkcanvas.h )
|
||||
|
||||
QT6_ADD_RESOURCES( ISFQT_RCC_SRCS ${ISFQT_RCCS} )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
|
||||
|
||||
# Do not install the library if we're bundling it into an application
|
||||
IF( ISFQT_IS_BUNDLED )
|
||||
ADD_LIBRARY( isf-qt STATIC ${ISFQT_SOURCES} ${MOC_SRCS} ${ISFQT_RCC_SRCS} )
|
||||
ELSE()
|
||||
ADD_LIBRARY( isf-qt SHARED ${ISFQT_SOURCES} ${MOC_SRCS} ${ISFQT_RCC_SRCS} )
|
||||
ENDIF()
|
||||
|
||||
TARGET_LINK_LIBRARIES( isf-qt ${ISFQT_LIBS} )
|
||||
|
||||
SET_TARGET_PROPERTIES( isf-qt PROPERTIES
|
||||
VERSION ${ISFQT_VERSION}
|
||||
SOVERSION ${ISFQT_VERSION} )
|
||||
|
||||
#### Installation ####
|
||||
|
||||
# Do not install the library if we're bundling it in KMess
|
||||
IF( NOT ISFQT_IS_BUNDLED )
|
||||
INSTALL( TARGETS isf-qt LIBRARY
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" )
|
||||
INSTALL( FILES ${ISFQT_PUBLIC_HEADERS}
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/include/isf-qt" )
|
||||
ENDIF()
|
||||
@@ -0,0 +1,196 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008-2009 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "isfqt-internal.h"
|
||||
#include "bitpacking.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
using namespace Isf::Compress;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the most appropriate block size for the given data.
|
||||
*
|
||||
* @param data Data to analyze
|
||||
* @return Block size
|
||||
*/
|
||||
quint8 BitPackingAlgorithm::blockSize( const QList<qint64>& data )
|
||||
{
|
||||
quint8 blockSize = 0;
|
||||
qint64 num;
|
||||
|
||||
for( qint32 index = 0; index < data.size(); ++index )
|
||||
{
|
||||
num = data[ index ];
|
||||
|
||||
if( num < 0 )
|
||||
{
|
||||
// We need the positive numbers: the +1 is for the sign bit
|
||||
num += - (num + 1);
|
||||
}
|
||||
|
||||
// Shift right the value by blockSize bits until it becomes zero:
|
||||
// we need to detect the maximum bitwise size required to store
|
||||
// the numbers in the data array.
|
||||
num >>= blockSize;
|
||||
while( num )
|
||||
{
|
||||
++blockSize;
|
||||
num >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
// The sign bit always takes up a bit
|
||||
++blockSize;
|
||||
|
||||
return blockSize;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Compress data with the Bit Packing algorithm.
|
||||
*
|
||||
* @param encodedData Byte array where to store the compressed data
|
||||
* @param blockSize Block size to use for compression
|
||||
* @param source List of values to compress
|
||||
* @return bool
|
||||
*/
|
||||
bool BitPackingAlgorithm::deflate( QByteArray& encodedData, quint8 blockSize, const QList<qint64>& source )
|
||||
{
|
||||
if( blockSize > 64 )
|
||||
{
|
||||
qWarning() << "A block size of" << blockSize << "is too high!";
|
||||
blockSize = 64; // Fuck it :P
|
||||
}
|
||||
|
||||
quint8 blockSizeLeft; // Remaining bits to encode of the current value
|
||||
quint8 freeBits = 8; // Free bits of the current byte, in LSB order
|
||||
quint8 signMask = 1 << ( blockSize - 1 ); // Mask to add the sign bit
|
||||
|
||||
quint8 byte = 0; // Byte to add to the array
|
||||
qint64 currentValue;
|
||||
|
||||
for( qint64 index = 0; index < source.count(); ++index )
|
||||
{
|
||||
currentValue = source[ index ];
|
||||
|
||||
if( currentValue < 0 )
|
||||
{
|
||||
currentValue |= signMask;
|
||||
}
|
||||
|
||||
blockSizeLeft = blockSize;
|
||||
|
||||
if( freeBits >= blockSizeLeft )
|
||||
{
|
||||
freeBits -= blockSizeLeft;
|
||||
byte |= currentValue << freeBits;
|
||||
|
||||
encodedData.append( byte );
|
||||
|
||||
byte = 0;
|
||||
freeBits = 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fill the current byte
|
||||
quint64 mask = 0xFFFFFFFF >> ( 32 - blockSizeLeft );
|
||||
byte |= currentValue >> ( blockSizeLeft - freeBits );
|
||||
|
||||
encodedData.append( byte );
|
||||
|
||||
byte = 0;
|
||||
blockSizeLeft -= freeBits;
|
||||
mask >>= freeBits;
|
||||
currentValue &= mask;
|
||||
|
||||
// Then fill all the next bytes required to encode the current value,
|
||||
// except the last one
|
||||
while( blockSizeLeft > 8 )
|
||||
{
|
||||
blockSizeLeft -= 8;
|
||||
encodedData.append( currentValue >> blockSizeLeft );
|
||||
|
||||
mask >>= 8;
|
||||
currentValue &= mask;
|
||||
}
|
||||
|
||||
// Finally, add the last byte
|
||||
freeBits = 8 - blockSizeLeft;
|
||||
encodedData.append( currentValue << freeBits );
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Decompress data with the Bit Packing algorithm.
|
||||
*
|
||||
* @param source Data source where to read the compressed bytes
|
||||
* @param length Number of items to read
|
||||
* @param blockSize Block size to use for compression
|
||||
* @param decodedData List where to place decompressed values
|
||||
* @return bool
|
||||
*/
|
||||
bool BitPackingAlgorithm::inflate( DataSource* source, quint64 length, quint8 blockSize, QList<qint64>& decodedData )
|
||||
{
|
||||
if( blockSize > 64 )
|
||||
{
|
||||
qWarning() << "A block size of" << blockSize << "is too high!";
|
||||
blockSize = 64; // Fuck it :P
|
||||
}
|
||||
|
||||
if( source->atEnd() )
|
||||
{
|
||||
qWarning() << "Cannot inflate: no more bits available!";
|
||||
return true;
|
||||
}
|
||||
|
||||
qint64 value;
|
||||
quint32 index = 0;
|
||||
quint64 signMask = (quint64)( 0xFFFFFFFF * pow( 2, blockSize - 1 ) ) & 0xFFFFFFFF;
|
||||
|
||||
while( index++ < length )
|
||||
{
|
||||
value = source->getBits( blockSize );
|
||||
|
||||
// If the mask matches, the sign bit is set, so ORing value and mask will
|
||||
// set all leftmost bits to 1, making it a real 64bit signed integer
|
||||
if( value & signMask )
|
||||
{
|
||||
value |= signMask;
|
||||
}
|
||||
|
||||
decodedData.append( value );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ISFCOMPRESSION_BITPACKING_H
|
||||
#define ISFCOMPRESSION_BITPACKING_H
|
||||
|
||||
#include "../datasource.h"
|
||||
|
||||
|
||||
|
||||
namespace Isf
|
||||
{
|
||||
namespace Compress
|
||||
{
|
||||
namespace BitPackingAlgorithm
|
||||
{
|
||||
|
||||
quint8 blockSize( const QList<qint64>& data );
|
||||
bool deflate( QByteArray& encodedData, quint8 blockSize, const QList<qint64>& source );
|
||||
bool inflate( DataSource* source, quint64 length, quint8 blockSize, QList<qint64>& decodedData );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,202 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008-2009 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "isfqt-internal.h"
|
||||
#include "bitpacking_byte.h"
|
||||
#include "bitpacking_table.h"
|
||||
|
||||
|
||||
using namespace Isf::Compress;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the most appropriate index for the given data.
|
||||
*
|
||||
* @param data Data to analyze
|
||||
* @return Index value
|
||||
*/
|
||||
quint8 BitPackingByteAlgorithm::index( const QList<qint64>& data )
|
||||
{
|
||||
Q_UNUSED( data );
|
||||
|
||||
quint8 index = 0;
|
||||
/*
|
||||
qint64 num;
|
||||
|
||||
for( qint32 index = 0; index < data.size(); ++index )
|
||||
{
|
||||
num = data[ index ];
|
||||
|
||||
if( num < 0 )
|
||||
{
|
||||
// We need the positive numbers: the +1 is for the sign bit
|
||||
num += - (num + 1);
|
||||
}
|
||||
|
||||
// Shift right the value by index bits until it becomes zero:
|
||||
// we need to detect the maximum bitwise size required to store
|
||||
// the numbers in the data array.
|
||||
num >>= index;
|
||||
while( num )
|
||||
{
|
||||
++index;
|
||||
num >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
// The sign bit always takes up a bit
|
||||
++index;
|
||||
*/
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Compress data with the Bit Packing algorithm.
|
||||
*
|
||||
* @param encodedData Byte array where to store the compressed data
|
||||
* @param index Index to use for compression
|
||||
* @param source List of values to compress
|
||||
* @return bool
|
||||
*/
|
||||
bool BitPackingByteAlgorithm::deflate( QByteArray& encodedData, quint8 index, const QList<qint64>& source )
|
||||
{
|
||||
Q_UNUSED( encodedData );
|
||||
Q_UNUSED( index );
|
||||
Q_UNUSED( source );
|
||||
|
||||
/*
|
||||
if( blockSize > 64 )
|
||||
{
|
||||
qWarning() << "A block size of" << blockSize << "is too high!";
|
||||
blockSize = 64; // Fuck it :P
|
||||
}
|
||||
|
||||
quint8 blockSizeLeft; // Remaining bits to encode of the current value
|
||||
quint8 freeBits = 8; // Free bits of the current byte, in LSB order
|
||||
quint8 signMask = 1 << ( blockSize - 1 ); // Mask to add the sign bit
|
||||
|
||||
quint8 byte = 0; // Byte to add to the array
|
||||
qint64 currentValue;
|
||||
|
||||
for( qint64 index = 0; index < source.count(); ++index )
|
||||
{
|
||||
currentValue = source[ index ];
|
||||
|
||||
if( currentValue < 0 )
|
||||
{
|
||||
currentValue |= signMask;
|
||||
}
|
||||
|
||||
blockSizeLeft = blockSize;
|
||||
|
||||
if( freeBits >= blockSizeLeft )
|
||||
{
|
||||
freeBits -= blockSizeLeft;
|
||||
byte |= currentValue << freeBits;
|
||||
|
||||
encodedData.append( byte );
|
||||
|
||||
byte = 0;
|
||||
freeBits = 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fill the current byte
|
||||
quint64 mask = 0xFFFFFFFF >> ( 32 - blockSizeLeft );
|
||||
byte |= currentValue >> ( blockSizeLeft - freeBits );
|
||||
|
||||
encodedData.append( byte );
|
||||
|
||||
byte = 0;
|
||||
blockSizeLeft -= freeBits;
|
||||
mask >>= freeBits;
|
||||
currentValue &= mask;
|
||||
|
||||
// Then fill all the next bytes required to encode the current value,
|
||||
// except the last one
|
||||
while( blockSizeLeft > 8 )
|
||||
{
|
||||
blockSizeLeft -= 8;
|
||||
encodedData.append( currentValue >> blockSizeLeft );
|
||||
|
||||
mask >>= 8;
|
||||
currentValue &= mask;
|
||||
}
|
||||
|
||||
// Finally, add the last byte
|
||||
freeBits = 8 - blockSizeLeft;
|
||||
encodedData.append( currentValue << freeBits );
|
||||
}
|
||||
}
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Decompress data with the Bit Packing Byte algorithm.
|
||||
*
|
||||
* @param source Data source where to read the compressed bytes
|
||||
* @param length Number of items to read
|
||||
* @param index Index to use for compression
|
||||
* @param decodedData List where to place decompressed values
|
||||
* @return bool
|
||||
*/
|
||||
bool BitPackingByteAlgorithm::inflate( DataSource* source, quint64 length, quint8 index, QList<qint64>& decodedData )
|
||||
{
|
||||
if( index > 24 )
|
||||
{
|
||||
qWarning() << "An index of" << index << "is too high!";
|
||||
index = 24; // Fuck it :P
|
||||
}
|
||||
|
||||
if( source->atEnd() )
|
||||
{
|
||||
qWarning() << "Cannot inflate: no more bits available!";
|
||||
return true;
|
||||
}
|
||||
|
||||
quint8 cBits = BitPackingAlgorithm::bitLookUpTable_[ index ][ CBITS ];
|
||||
// quint8 cPads = BitPackingAlgorithm::bitLookUpTable_[ index ][ CPADS ];
|
||||
quint16 count = ( length * 8 / cBits ); // Number of items in the compressed array
|
||||
|
||||
bool ok;
|
||||
quint64 pos = 0;
|
||||
while( pos++ < count )
|
||||
{
|
||||
quint8 byte = source->getBits( cBits, &ok );
|
||||
|
||||
if( ! ok )
|
||||
{
|
||||
qWarning() << "Decompression failure!";
|
||||
return false;
|
||||
}
|
||||
|
||||
decodedData.append( byte );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ISFCOMPRESSION_BITPACKING_BYTE_H
|
||||
#define ISFCOMPRESSION_BITPACKING_BYTE_H
|
||||
|
||||
#include "../datasource.h"
|
||||
|
||||
|
||||
|
||||
namespace Isf
|
||||
{
|
||||
namespace Compress
|
||||
{
|
||||
namespace BitPackingByteAlgorithm
|
||||
{
|
||||
|
||||
quint8 index( const QList<qint64>& data );
|
||||
bool deflate( QByteArray& encodedData, quint8 index, const QList<qint64>& source );
|
||||
bool inflate( DataSource* source, quint64 length, quint8 index, QList<qint64>& decodedData );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,95 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ISFCOMPRESSION_BITPACKING_H
|
||||
#define ISFCOMPRESSION_BITPACKING_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
|
||||
#define CBITS 0
|
||||
#define CPADS 1
|
||||
|
||||
|
||||
namespace Isf {
|
||||
namespace Compress {
|
||||
namespace BitPackingAlgorithm {
|
||||
|
||||
/// Table used to compute the length of bit-packed values and their remainders.
|
||||
quint8 bitLookUpTable_[ 48 ][ 2 ] =
|
||||
{
|
||||
// { cBits, cPads }
|
||||
{ 8, 0 }, // index 0
|
||||
{ 1, 0 },
|
||||
{ 1, 1 },
|
||||
{ 1, 2 },
|
||||
{ 1, 3 },
|
||||
{ 1, 4 },
|
||||
{ 1, 5 },
|
||||
{ 1, 6 },
|
||||
{ 1, 7 },
|
||||
{ 2, 0 },
|
||||
{ 2, 1 }, // index 10
|
||||
{ 2, 2 },
|
||||
{ 2, 3 },
|
||||
{ 3, 0 },
|
||||
{ 3, 1 },
|
||||
{ 3, 2 },
|
||||
{ 4, 0 },
|
||||
{ 4, 1 },
|
||||
{ 5, 0 },
|
||||
{ 5, 1 },
|
||||
{ 6, 0 }, // index 20
|
||||
{ 6, 1 },
|
||||
{ 7, 0 },
|
||||
{ 7, 1 },
|
||||
{ 8, 0 },
|
||||
{ 9, 0 },
|
||||
{ 10, 0 },
|
||||
{ 11, 0 },
|
||||
{ 12, 0 },
|
||||
{ 13, 0 },
|
||||
{ 14, 0 }, // index 30
|
||||
{ 15, 0 },
|
||||
{ 16, 0 },
|
||||
{ 17, 0 },
|
||||
{ 18, 0 },
|
||||
{ 19, 0 },
|
||||
{ 20, 0 },
|
||||
{ 21, 0 },
|
||||
{ 22, 0 },
|
||||
{ 23, 0 },
|
||||
{ 24, 0 }, // index 40
|
||||
{ 25, 0 },
|
||||
{ 26, 0 },
|
||||
{ 27, 0 },
|
||||
{ 28, 0 },
|
||||
{ 29, 0 },
|
||||
{ 30, 0 },
|
||||
{ 31, 0 } // index 47
|
||||
};
|
||||
|
||||
} // Namespace BitPackingAlgorithm
|
||||
} // Namespace Compress
|
||||
} // Namespace Isf
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,78 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "deltatransform.h"
|
||||
|
||||
|
||||
using namespace Isf::Compress;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Perform a delta-delta transformation on data to be deflated.
|
||||
*
|
||||
* @param data Data to transform - the list will be modified.
|
||||
* @return bool
|
||||
*/
|
||||
bool Delta::transform( QList<qint64>& data )
|
||||
{
|
||||
qint64 currentDelta = 0;
|
||||
qint64 previousDelta = 0;
|
||||
|
||||
for( qint64 index = 0; index < data.size(); ++index )
|
||||
{
|
||||
qint64 currentItem = data[ index ];
|
||||
|
||||
data[ index ] = data[ index ] + previousDelta - ( currentDelta * 2 );
|
||||
|
||||
previousDelta = currentDelta;
|
||||
currentDelta = currentItem;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Perform a delta-delta inverse transformation on just-inflated data.
|
||||
*
|
||||
* @param data Data to transform - the list will be modified.
|
||||
* @return bool
|
||||
*/
|
||||
bool Delta::inverseTransform( QList<qint64>& data )
|
||||
{
|
||||
qint64 currentDelta = 0;
|
||||
qint64 previousDelta = 0;
|
||||
|
||||
for( qint64 index = 0; index < data.size(); ++index )
|
||||
{
|
||||
qint64 delta = ( currentDelta * 2 ) - previousDelta + data[ index ];
|
||||
|
||||
previousDelta = currentDelta;
|
||||
currentDelta = delta;
|
||||
|
||||
data[ index ] = delta;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ISF_COMPRESS_DELTATRANSFORM_H
|
||||
#define ISF_COMPRESS_DELTATRANSFORM_H
|
||||
|
||||
#include <QList>
|
||||
|
||||
|
||||
namespace Isf
|
||||
{
|
||||
namespace Compress
|
||||
{
|
||||
namespace Delta
|
||||
{
|
||||
|
||||
bool transform( QList<qint64>& data );
|
||||
bool inverseTransform( QList<qint64>& data );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,284 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "huffman.h"
|
||||
|
||||
#include "isfqt-internal.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
||||
#define HUFFMAN_BASES_NUM 8
|
||||
#define HUFFMAN_BASE_SIZE 11
|
||||
|
||||
|
||||
using namespace Isf::Compress;
|
||||
|
||||
|
||||
/// Bit amounts.
|
||||
const int bitAmounts_[HUFFMAN_BASES_NUM][HUFFMAN_BASE_SIZE] =
|
||||
{
|
||||
{0, 1, 2, 4, 6, 8, 12, 16, 24, 32, -1},
|
||||
{0, 1, 1, 2, 4, 8, 12, 16, 24, 32, -1},
|
||||
{0, 1, 1, 1, 2, 4, 8, 14, 22, 32, -1},
|
||||
{0, 2, 2, 3, 5, 8, 12, 16, 24, 32, -1},
|
||||
{0, 3, 4, 5, 8, 12, 16, 24, 32, -1, -1},
|
||||
{0, 4, 6, 8, 12, 16, 24, 32, -1, -1, -1},
|
||||
{0, 6, 8, 12, 16, 24, 32, -1, -1, -1, -1},
|
||||
{0, 7, 8, 12, 16, 24, 32, -1, -1, -1, -1},
|
||||
};
|
||||
|
||||
|
||||
/// Huffman codec value bases.
|
||||
const int huffmanBases_[HUFFMAN_BASES_NUM][HUFFMAN_BASE_SIZE] =
|
||||
{
|
||||
{0, 1, 2, 4, 12, 44, 172, 2220, 34988, 8423596, -1},
|
||||
{0, 1, 2, 3, 5, 13, 141, 2189, 34957, 8423565, -1},
|
||||
{0, 1, 2, 3, 4, 6, 14, 142, 8334, 2105486, -1},
|
||||
{0, 1, 3, 5, 9, 25, 153, 2201, 34969, 8423577, -1},
|
||||
{0, 1, 5, 13, 29, 157, 2205, 34973, 8423581, -1, -1},
|
||||
{0, 1, 9, 41, 169, 2217, 34985, 8423593, -1, -1, -1},
|
||||
{0, 1, 33, 161, 2209, 34977, 8423585, -1, -1, -1, -1},
|
||||
{0, 1, 65, 193, 2241, 35009, 8423617, -1, -1, -1, -1},
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the most appropriate index for the given data.
|
||||
*
|
||||
* @param data Data to analyze
|
||||
* @return index value
|
||||
*/
|
||||
quint8 HuffmanAlgorithm::index( const QList<qint64>& data )
|
||||
{
|
||||
quint8 index = 0;
|
||||
|
||||
// TODO: Find out what the Huffman index algorithm is
|
||||
Q_UNUSED( data )
|
||||
index = 2;
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Compress data with the Huffman algorithm.
|
||||
*
|
||||
* @param encodedData Byte array where to store the compressed data
|
||||
* @param index Index to use for compression
|
||||
* @param source List of values to compress
|
||||
* @return bool
|
||||
*/
|
||||
bool HuffmanAlgorithm::deflate( QByteArray& encodedData, quint8 index, const QList<qint64>& source )
|
||||
{
|
||||
DataSource output( encodedData );
|
||||
output.skipToNextByte();
|
||||
|
||||
foreach( quint64 value, source )
|
||||
{
|
||||
if( ! deflateValue( &output, index, value ) )
|
||||
{
|
||||
#ifdef ISFQT_DEBUG
|
||||
qDebug() << "Deflating failure for value:" << value;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Flush any leftover bit to the byte array
|
||||
output.flush();
|
||||
|
||||
encodedData = output.data();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Compress a single value with the Huffman algorithm.
|
||||
*
|
||||
* @param output Data source where to store the compressed value
|
||||
* @param index Index to use for compression
|
||||
* @param value Value to compress
|
||||
* @return bool
|
||||
*/
|
||||
bool HuffmanAlgorithm::deflateValue( DataSource* output, quint8 index, qint64 value )
|
||||
{
|
||||
qint64 temp = value;
|
||||
quint8 requiredBits = 0;
|
||||
QBitArray valueBits;
|
||||
|
||||
// Fill in a bitAmounts local vector
|
||||
QVector<int> bitAmounts;
|
||||
for( int i = 0; i < HUFFMAN_BASE_SIZE; ++i )
|
||||
{
|
||||
if( bitAmounts_[ index ][ i ] == -1 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
bitAmounts.append( bitAmounts_[ index ][ i ] );
|
||||
}
|
||||
|
||||
// Find the number of bits needed to store this value
|
||||
while( temp )
|
||||
{
|
||||
temp /= 2;
|
||||
++requiredBits;
|
||||
}
|
||||
|
||||
while( ! bitAmounts.count( requiredBits ) )
|
||||
{
|
||||
++requiredBits;
|
||||
}
|
||||
|
||||
qint64 offset = ( value < 0 ) ? -value : +value;
|
||||
|
||||
quint8 prefixLength;
|
||||
for( prefixLength = 1;
|
||||
( prefixLength < HUFFMAN_BASE_SIZE ) && ( offset >= huffmanBases_[ index ][ prefixLength ] ); prefixLength++ )
|
||||
{
|
||||
// Empty loop on purpose
|
||||
}
|
||||
|
||||
|
||||
// Write prefixLength 1s to the stream, then a 0
|
||||
QBitArray bits( prefixLength );
|
||||
bits.fill( true );
|
||||
bits.clearBit( bits.size() - 1 );
|
||||
|
||||
// Write the number using the minimum possible number of bits
|
||||
qint32 size = bitAmounts_[ index ][ prefixLength - 1 ];
|
||||
qint64 mask = ( 1 << ( size - 1 ) ) - 1;
|
||||
|
||||
valueBits.resize( size );
|
||||
offset = ( offset - huffmanBases_[ index ][ prefixLength - 1 ] ) & mask;
|
||||
offset <<= 1;
|
||||
offset |= ( value < 0 ) ? 1 : 0;
|
||||
|
||||
// Copy the resulting offset
|
||||
for( qint64 i = 0; i < size; ++i )
|
||||
{
|
||||
valueBits.setBit( i, offset & ( 1 << ( size - i - 1 ) ) );
|
||||
}
|
||||
|
||||
// Add the bits to the data source
|
||||
output->append( bits );
|
||||
output->append( valueBits );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Decompress data with the Huffman algorithm.
|
||||
*
|
||||
* @param source Data source where to read the compressed bytes
|
||||
* @param length Number of items to read
|
||||
* @param index Index to use for compression
|
||||
* @param decodedData List where to place decompressed values
|
||||
* @return bool
|
||||
*/
|
||||
bool HuffmanAlgorithm::inflate( DataSource* source, quint64 length, quint8 index, QList<qint64>& decodedData )
|
||||
{
|
||||
QVector<int> huffmanBases;
|
||||
QVector<int> bitAmounts( HUFFMAN_BASE_SIZE );
|
||||
|
||||
// Initialize the bit amounts vector
|
||||
memcpy( bitAmounts.data(), bitAmounts_[ index ], sizeof(int)*HUFFMAN_BASE_SIZE );
|
||||
|
||||
int base = 1;
|
||||
huffmanBases.append( 0 );
|
||||
|
||||
// Fill up the huffman bases vector
|
||||
for( quint8 i = 0; i < bitAmounts.size(); ++i )
|
||||
{
|
||||
int value = bitAmounts[ i ];
|
||||
|
||||
// The bit amounts sequence ends in -1
|
||||
if( value == -1 )
|
||||
{
|
||||
bitAmounts.resize( i );
|
||||
break;
|
||||
}
|
||||
|
||||
if( value == 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
huffmanBases.append( base );
|
||||
base += pow( 2, value - 1 );
|
||||
}
|
||||
|
||||
|
||||
quint32 count = 0;
|
||||
qint64 value = 0;
|
||||
bool bit;
|
||||
|
||||
while( (uint)decodedData.length() < length )
|
||||
{
|
||||
bit = source->getBit();
|
||||
|
||||
if( bit )
|
||||
{
|
||||
count++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if( count == 0 )
|
||||
{
|
||||
value = 0;
|
||||
}
|
||||
else if( count < (uint)bitAmounts.size() )
|
||||
{
|
||||
quint64 offset = source->getBits( bitAmounts[ count ] );
|
||||
bool sign = offset & 0x1;
|
||||
offset /= 2;
|
||||
value = huffmanBases[ count ] + offset;
|
||||
value *= ( sign ? -1 : +1 );
|
||||
}
|
||||
else if( count == (uint)bitAmounts.size() )
|
||||
{
|
||||
// TODO: Implement 64-bit data decompression :)
|
||||
#ifdef ISFQT_DEBUG
|
||||
qDebug() << "Unsupported 64-bit value found!";
|
||||
#endif
|
||||
value = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef ISFQT_DEBUG
|
||||
qDebug() << "Decompression error!";
|
||||
#endif
|
||||
value = 0;
|
||||
}
|
||||
|
||||
decodedData.append( value );
|
||||
count = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ISFCOMPRESSION_HUFFMAN_H
|
||||
#define ISFCOMPRESSION_HUFFMAN_H
|
||||
|
||||
#include "../datasource.h"
|
||||
|
||||
|
||||
|
||||
namespace Isf
|
||||
{
|
||||
namespace Compress
|
||||
{
|
||||
namespace HuffmanAlgorithm
|
||||
{
|
||||
|
||||
bool deflate( QByteArray& encodedData, quint8 index, const QList<qint64>& source );
|
||||
bool inflate( DataSource* source, quint64 length, quint8 index, QList<qint64>& decodedData );
|
||||
quint8 index( const QList<qint64>& data );
|
||||
|
||||
// Internal use methods
|
||||
|
||||
bool deflateValue( DataSource* output, quint8 index, qint64 value );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,421 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "compression.h"
|
||||
|
||||
#include "isfqt-internal.h"
|
||||
#include "algorithms/bitpacking.h"
|
||||
#include "algorithms/bitpacking_byte.h"
|
||||
#include "algorithms/huffman.h"
|
||||
#include "algorithms/deltatransform.h"
|
||||
|
||||
|
||||
using namespace Isf;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Decompress packet data.
|
||||
*
|
||||
* The algorithm to use for the decompression is autodetected using
|
||||
* the so-called "algorithm byte" within the compressed data.
|
||||
*
|
||||
* @param source Data Source where to read compressed bytes from
|
||||
* @param length Number of items to decompress
|
||||
* @param decodedData List where to store the decoded values
|
||||
* @return bool
|
||||
*/
|
||||
bool Compress::inflatePacketData( DataSource* source, quint64 length, QList<qint64>& decodedData )
|
||||
{
|
||||
if( source->atEnd() )
|
||||
{
|
||||
#ifdef ISFQT_DEBUG
|
||||
qWarning() << "Source was at end!";
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
bool result = false;
|
||||
uchar byte = source->getByte();
|
||||
qint16 algorithm = ( byte & AlgorithmMask );
|
||||
quint8 algorithmData = 0;
|
||||
|
||||
// Detect which algorithm to use
|
||||
|
||||
// Use the "best compression" algorithm
|
||||
if( ( algorithm & BestCompression ) == BestCompression )
|
||||
{
|
||||
/* TODO: Not implemented yet. We don't know how ISF actually works here.
|
||||
* According to the specs, both bit packing and Huffman may be used; but
|
||||
* where are the rest of the bits stored? In the next byte?
|
||||
* We need an ISF stream with such a characteristic to be sure.
|
||||
*/
|
||||
qWarning() << "Unknown decompression method!";
|
||||
qDebug() << "[Information - type: best, byte:" << QString::number( source->getByte(), 16 ) << "hex]";
|
||||
return false;
|
||||
}
|
||||
// Use the "default compression" algorithm, which is Huffman
|
||||
else if( ( algorithm & DefaultCompression ) == DefaultCompression
|
||||
|| ( algorithm & Huffman ) == Huffman )
|
||||
{
|
||||
algorithm = Huffman;
|
||||
algorithmData = ( HuffmanMask & byte );
|
||||
}
|
||||
// According to the specs, the only other algorithm for packet data
|
||||
// is generic bit packing.
|
||||
else if( algorithm == BitPacking )
|
||||
{
|
||||
algorithm = BitPacking;
|
||||
algorithmData = ( BitPackingMask & byte );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Unknown algorithm. Throw an error below.
|
||||
algorithm = -1;
|
||||
}
|
||||
|
||||
// Apply the inflation algorithm
|
||||
|
||||
switch( algorithm )
|
||||
{
|
||||
case BitPacking:
|
||||
{
|
||||
// Detect if the data is encoded with delta-delta transformation
|
||||
bool requiresDeltaDeltaTransform = ( BitPackingTransformMask & byte );
|
||||
if( requiresDeltaDeltaTransform )
|
||||
{
|
||||
algorithmData ^= BitPackingTransformMask;
|
||||
}
|
||||
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
qDebug() << "- Inflating" << length << "items using the Bit Packing algorithm and a block size of" << algorithmData;
|
||||
#endif
|
||||
|
||||
result = BitPackingAlgorithm::inflate( source, length, algorithmData, decodedData );
|
||||
|
||||
if( result && requiresDeltaDeltaTransform )
|
||||
{
|
||||
result = Delta::inverseTransform( decodedData );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case Huffman:
|
||||
{
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
qDebug() << "- Inflating" << length << "items using the Huffman algorithm and index" << algorithmData;
|
||||
#endif
|
||||
result = HuffmanAlgorithm::inflate( source, length, algorithmData, decodedData );
|
||||
|
||||
// Always delta-inverse-transform data compressed with Huffman
|
||||
if( result )
|
||||
{
|
||||
result = Delta::inverseTransform( decodedData );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
qWarning() << "Unknown decompression method!";
|
||||
qDebug() << "[Information - type: unknown, byte:" << QString::number( byte, 16 ) << "hex]";
|
||||
|
||||
// Go back to the previous read position
|
||||
source->seekRelative( -1 );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// Discard any partially read bytes
|
||||
if( ! source->atEnd() )
|
||||
{
|
||||
source->skipToNextByte();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Compress packet data.
|
||||
*
|
||||
* The algorithm to use for the decompression is autodetected
|
||||
* by analyzing the data.
|
||||
*
|
||||
* @param encodedData Byte Array where to store the encoded data
|
||||
* @param source List of values to compress
|
||||
* @return bool
|
||||
*/
|
||||
bool Compress::deflatePacketData( QByteArray& encodedData, const QList<qint64>& source )
|
||||
{
|
||||
bool result;
|
||||
|
||||
// TODO Is this really how to detect the algorithm to use?
|
||||
int algorithm;
|
||||
if( source.count() == 1 )
|
||||
{
|
||||
algorithm = BitPacking;
|
||||
}
|
||||
else
|
||||
{
|
||||
algorithm = Huffman;
|
||||
}
|
||||
|
||||
|
||||
switch( algorithm )
|
||||
{
|
||||
case BitPacking:
|
||||
{
|
||||
quint8 blockSize = BitPackingAlgorithm::blockSize( source );
|
||||
|
||||
// Write the data encoding algorithm and block size
|
||||
encodedData.append( blockSize | BitPacking );
|
||||
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
qDebug() << "- Deflating" << source.count() << "items using the bit packing algorithm and a block size of" << blockSize;
|
||||
#endif
|
||||
|
||||
// Deflate the data
|
||||
result = BitPackingAlgorithm::deflate( encodedData, blockSize, source );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case Huffman:
|
||||
{
|
||||
quint8 index = HuffmanAlgorithm::index( source );
|
||||
|
||||
// Write the data encoding algorithm and index
|
||||
encodedData.append( index | Huffman );
|
||||
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
qDebug() << "- Deflating" << source.count() << "items using the Huffman algorithm and index" << index;
|
||||
#endif
|
||||
|
||||
// Deflate the data
|
||||
QList<qint64> list( source );
|
||||
result = Delta::transform( list );
|
||||
|
||||
if( result )
|
||||
{
|
||||
result = HuffmanAlgorithm::deflate( encodedData, index, list );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
#ifdef ISFQT_DEBUG
|
||||
qDebug() << "Encoding algorithm not implemented! (algorithm:" << QString::number( algorithm, 16 ) << ")";
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Decompress property data.
|
||||
*
|
||||
* The algorithm to use for the decompression is autodetected using
|
||||
* the so-called "algorithm byte" within the compressed data.
|
||||
*
|
||||
* @param source Data Source where to read compressed bytes from
|
||||
* @param length Number of items to decompress
|
||||
* @param decodedData List where to store the decoded values
|
||||
* @return bool
|
||||
*/
|
||||
bool Compress::inflatePropertyData( DataSource* source, quint64 length, QList<qint64>& decodedData )
|
||||
{
|
||||
if( source->atEnd() )
|
||||
{
|
||||
#ifdef ISFQT_DEBUG
|
||||
qWarning() << "Source was at end!";
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
bool result;
|
||||
quint8 byte = source->getByte();
|
||||
qint16 algorithm = ( byte & AlgorithmMask );
|
||||
quint8 algorithmData = 0;
|
||||
|
||||
// Detect which algorithm to use
|
||||
|
||||
// Use the "default compression" algorithm
|
||||
if( ( algorithm & DefaultCompression ) == DefaultCompression )
|
||||
{
|
||||
/* TODO: Not implemented yet. We don't know how ISF actually works here.
|
||||
* According to the specs, any of the 3 bit packing techniques may be used;
|
||||
* but where are the rest of the bits stored? In the next byte?
|
||||
* We need an ISF stream with such a characteristic to be sure.
|
||||
*/
|
||||
qWarning() << "Unknown decompression method!";
|
||||
qDebug() << "[Information - type: default, byte:" << QString::number( source->getByte(), 16 ) << "hex]";
|
||||
return false;
|
||||
}
|
||||
// Use the "best compression" algorithm, which is Huffman
|
||||
else if( ( algorithm & BestCompression ) == BestCompression
|
||||
|| ( algorithm & Huffman ) == Huffman )
|
||||
{
|
||||
algorithm = Huffman;
|
||||
algorithmData = ( HuffmanMask & byte );
|
||||
}
|
||||
else if( ( algorithm & LimpelZiv ) == LimpelZiv )
|
||||
{
|
||||
algorithm = LimpelZiv;
|
||||
}
|
||||
else if( ( algorithm & BitPackingByte ) == BitPackingByte )
|
||||
{
|
||||
algorithm = BitPackingByte;
|
||||
algorithmData = ( BitPackingByteMask & byte );
|
||||
}
|
||||
else if( ( algorithm & BitPackingWord ) == BitPackingWord )
|
||||
{
|
||||
algorithm = BitPackingWord;
|
||||
algorithmData = ( BitPackingWordMask & byte );
|
||||
}
|
||||
else if( ( algorithm & BitPackingLong ) == BitPackingLong )
|
||||
{
|
||||
algorithm = BitPackingLong;
|
||||
algorithmData = ( BitPackingLongMask & byte );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Unknown algorithm. Throw an error below.
|
||||
algorithm = -1;
|
||||
}
|
||||
|
||||
// Apply the deflation algorithm
|
||||
|
||||
switch( algorithm )
|
||||
{
|
||||
case BitPackingByte:
|
||||
{
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
qDebug() << "- Inflating" << length << "bytes using the Bit Packing Byte algorithm and an index of" << algorithmData;
|
||||
#endif
|
||||
|
||||
result = BitPackingByteAlgorithm::inflate( source, length, algorithmData, decodedData );
|
||||
break;
|
||||
}
|
||||
|
||||
case BitPackingWord:
|
||||
{
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
qDebug() << "- Inflating" << length << "bytes using the Bit Packing Word algorithm and an index of" << algorithmData;
|
||||
#endif
|
||||
|
||||
qWarning() << "Stream data is compressed with non implemented algorithm!";
|
||||
qDebug() << "[Information - algorithm: Bit Packing Word]";
|
||||
return false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case BitPackingLong:
|
||||
{
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
qDebug() << "- Inflating" << length << "bytes using the Bit Packing Long algorithm and an index of" << algorithmData;
|
||||
#endif
|
||||
|
||||
qWarning() << "Stream data is compressed with non implemented algorithm!";
|
||||
qDebug() << "[Information - algorithm: Bit Packing Long]";
|
||||
return false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case LimpelZiv:
|
||||
{
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
qDebug() << "- Inflating" << length << "items using the Limpel-Ziv algorithm and a block size of" << algorithmData;
|
||||
#endif
|
||||
|
||||
qWarning() << "Stream data is compressed with non implemented algorithm!";
|
||||
qDebug() << "[Information - algorithm: Limpel-Ziv]";
|
||||
return false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case Huffman:
|
||||
{
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
qDebug() << "- Inflating" << length << "items using the Huffman algorithm and index" << algorithmData;
|
||||
#endif
|
||||
result = HuffmanAlgorithm::inflate( source, length, algorithmData, decodedData );
|
||||
|
||||
// Always delta-inverse-transform data compressed with Huffman
|
||||
if( result )
|
||||
{
|
||||
result = Delta::inverseTransform( decodedData );
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
qWarning() << "Unknown decompression method!";
|
||||
qDebug() << "[Information - type: unknown, byte:" << QString::number( byte, 16 ) << "hex]";
|
||||
|
||||
// Go back to the previous read position
|
||||
source->seekRelative( -1 );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// Discard any partially read bytes
|
||||
if( ! source->atEnd() )
|
||||
{
|
||||
source->skipToNextByte();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Compress property data.
|
||||
*
|
||||
* The algorithm to use for the decompression is autodetected
|
||||
* by analyzing the data.
|
||||
*
|
||||
* @todo Implement!
|
||||
* @param encodedData Byte Array where to store the encoded data
|
||||
* @param source List of values to compress
|
||||
* @return bool
|
||||
*/
|
||||
bool Compress::deflatePropertyData( QByteArray& encodedData, const QList<qint64>& source )
|
||||
{
|
||||
Q_UNUSED( encodedData );
|
||||
Q_UNUSED( source );
|
||||
|
||||
bool result = false;
|
||||
|
||||
qWarning() << "Property data saving is not implemented at the moment!";
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ISFCOMPRESSION_H
|
||||
#define ISFCOMPRESSION_H
|
||||
|
||||
#include "datasource.h"
|
||||
|
||||
|
||||
|
||||
namespace Isf
|
||||
{
|
||||
namespace Compress
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Algorithm extra data masks.
|
||||
*
|
||||
* These masks are used to obtain the least significant bits which
|
||||
* are useful for the specific algorithm. If an algo takes no
|
||||
* useful bits, the mask is 0.
|
||||
*/
|
||||
enum AlgorithmMasks
|
||||
{
|
||||
AlgorithmMask = 0xF0 ///< Mask used to identify the algorithms
|
||||
, BitPackingMask = 0x3F ///< Mask for bit packing of arbitrary-sized integers
|
||||
, BitPackingTransformMask = 0x20 ///< Mask for delta-delta transformed bit packed data
|
||||
, HuffmanMask = 0x3F ///< Mask for Huffman
|
||||
, BitPackingLongMask = 0x3F ///< Mask for bit packing of 32bit signed integers
|
||||
, BitPackingWordMask = 0x1F ///< Mask for bit packing of 16bit unsigned integers
|
||||
, BitPackingByteMask = 0x1F ///< Mask for bit packing of 8bit unsigned integers
|
||||
, LimpelZivMask = 0x00 ///< Mask for Limpel-Ziv
|
||||
, BestCompressionMask = 0x00 ///< Mask for the best compression algo
|
||||
, DefaultCompressionMask = 0x00 ///< Mask for the default compression algo
|
||||
};
|
||||
|
||||
/**
|
||||
* Compression and decompressions algorithms.
|
||||
*
|
||||
* Bit assignment table for packets (strokes):
|
||||
* ---------------------------
|
||||
* | Algorithm | 7 6 5 4 3 2 1 0 (Bit assignment) |
|
||||
* Bit packing 0 0 D D D D D D
|
||||
* Huffman 1 0 D D D D D D
|
||||
* Default compression 1 1 0 0 X X X X
|
||||
* Best compression 1 1 1 1 X X X X
|
||||
*
|
||||
* Bit assignment table for properties (tags):
|
||||
* ---------------------------
|
||||
* | Algorithm | 7 6 5 4 3 2 1 0 (Bit assignment) |
|
||||
* Bit packing of bytes 0 0 0 D D D D D
|
||||
* Bit packing of words 0 0 1 D D D D D
|
||||
* Bit packing of longs 0 1 D D D D D D
|
||||
* Limpel-Ziv 1 0 1 0 X X X X
|
||||
* Default compression 1 1 0 0 X X X X
|
||||
* Best compression 1 1 1 1 X X X X
|
||||
*
|
||||
* D = Algorithm-specific data
|
||||
* X = Ignored bit
|
||||
*
|
||||
* We use the two most significant bits to identify the algorithms,
|
||||
* because they are guaranteed to not contain algorithm data.
|
||||
*
|
||||
* Also, note that these tables are not identical to the ones in the
|
||||
* specs: we changed them because they differ from our factual
|
||||
* observations (in the specs Huffman is missing, for example).
|
||||
*/
|
||||
enum CommonDataAlgorithms
|
||||
{
|
||||
BestCompression = 0xF0 ///< Best compression algorithm
|
||||
, DefaultCompression = 0xC0 ///< Default compression algorithm (Huffman)
|
||||
, Huffman = 0x80 ///< Huffman encoding
|
||||
};
|
||||
/**
|
||||
* Compression and decompressions algorithms.
|
||||
*
|
||||
* @see CommonDataAlgorithms
|
||||
*/
|
||||
enum PacketDataAlgorithms
|
||||
{
|
||||
BitPacking = 0x00 ///< Bit packing
|
||||
};
|
||||
/**
|
||||
* Compression and decompressions algorithms.
|
||||
*
|
||||
* @see CommonDataAlgorithms
|
||||
*/
|
||||
enum PropertyDataAlgorithms
|
||||
{
|
||||
LimpelZiv = 0xA0 ///< Limpel-Ziv compressionrs
|
||||
, BitPackingLong = 0x40 ///< Bit packing of 32bit signed integers
|
||||
, BitPackingWord = 0x20 ///< Bit packing of 16bit unsigned integers
|
||||
, BitPackingByte = 0x00 ///< Bit packing of 8bit unsigned integers
|
||||
};
|
||||
|
||||
|
||||
bool inflatePacketData( DataSource* source, quint64 length, QList<qint64>& decodedData );
|
||||
bool deflatePacketData( QByteArray& destination, const QList<qint64>& decodedData );
|
||||
|
||||
bool inflatePropertyData( DataSource* source, quint64 length, QList<qint64>& decodedData );
|
||||
bool deflatePropertyData( QByteArray& destination, const QList<qint64>& decodedData );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,720 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* Copyright (C) 2009 by Adam Goossens *
|
||||
* adam@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "datasource.h"
|
||||
|
||||
#include "isfqt-internal.h"
|
||||
|
||||
|
||||
using namespace Isf;
|
||||
using namespace Isf::Compress;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Empty constructor.
|
||||
*/
|
||||
DataSource::DataSource()
|
||||
: currentBitIndex_( 8 ) // Invalid position in the current byte
|
||||
{
|
||||
buffer_.open( QBuffer::ReadWrite );
|
||||
|
||||
currentByte_.resize( 8 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param data Byte array to copy and use as data source
|
||||
*/
|
||||
DataSource::DataSource( const QByteArray& data )
|
||||
: currentBitIndex_( 8 )
|
||||
{
|
||||
buffer_.setData( data );
|
||||
buffer_.open( QBuffer::ReadWrite );
|
||||
buffer_.seek( 0 );
|
||||
|
||||
currentByte_.resize( 8 );
|
||||
|
||||
// Move the first byte of data in the bit array
|
||||
moveByteToBitArray();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
DataSource::~DataSource()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Insert a byte at the end of the data.
|
||||
*
|
||||
* @param byte The byte to append
|
||||
*/
|
||||
void DataSource::append( char byte )
|
||||
{
|
||||
bool wasEmpty = ( buffer_.size() == 0 );
|
||||
|
||||
if( ! wasEmpty )
|
||||
{
|
||||
buffer_.seek( buffer_.size() );
|
||||
}
|
||||
|
||||
if( buffer_.write( &byte, 1 ) != 1 )
|
||||
{
|
||||
qWarning() << "DataSource::append() - Write failed at buffer position" << buffer_.pos();
|
||||
return;
|
||||
}
|
||||
|
||||
// Prepare the first byte to be read
|
||||
if( wasEmpty )
|
||||
{
|
||||
currentBitIndex_ = 8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Insert bits at the end of the data.
|
||||
*
|
||||
* @param constBits The list of bits to append
|
||||
*/
|
||||
void DataSource::append( const QBitArray& constBits )
|
||||
{
|
||||
if( constBits.size() == 0 )
|
||||
{
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
qDebug() << "Not writing an empty bit array, skipping.";
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if( buffer_.size() != 0 )
|
||||
{
|
||||
buffer_.seek( buffer_.size() );
|
||||
}
|
||||
|
||||
quint8 initialPos = 0;
|
||||
quint8 size = constBits.size();
|
||||
|
||||
// If there are unwritten bits, add them to the input bit array
|
||||
if( currentBitIndex_ != 8 )
|
||||
{
|
||||
size += currentBitIndex_;
|
||||
}
|
||||
|
||||
QBitArray bits( size );
|
||||
|
||||
// Copy on the input bit array the current byte then the input bits
|
||||
if( currentBitIndex_ != 8 )
|
||||
{
|
||||
initialPos = currentBitIndex_;
|
||||
for( quint8 idx = 0; idx < currentBitIndex_; ++idx )
|
||||
{
|
||||
bits[ idx ] = currentByte_[ idx ];
|
||||
}
|
||||
}
|
||||
for( quint8 idx = 0; idx < constBits.size(); ++idx )
|
||||
{
|
||||
bits[ idx + initialPos ] = constBits[ idx ];
|
||||
}
|
||||
|
||||
quint8 bit = 7;
|
||||
quint8 byte = 0;
|
||||
QByteArray bytes;
|
||||
quint8 byteWiseSize = bits.size() - ( bits.size() % 8 );
|
||||
|
||||
// Skip writing if there are no full bytes
|
||||
if( byteWiseSize != 0 )
|
||||
{
|
||||
for( quint8 idx = 0; idx < byteWiseSize; ++idx )
|
||||
{
|
||||
byte |= bits[ idx ] << bit;
|
||||
|
||||
// A byte was filled, push it to the bytearray
|
||||
if( bit-- == 0 )
|
||||
{
|
||||
bytes.append( byte );
|
||||
bit = 7;
|
||||
byte = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Write the bytes in the buffer
|
||||
if( bytes.size() > 0 && buffer_.write( bytes ) != bytes.size() )
|
||||
{
|
||||
qWarning() << "DataSource::append() - Write failed at buffer position" << buffer_.pos();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Move any remaining bits to the current byte
|
||||
quint8 remainingBitSize = ( bits.size() - byteWiseSize );
|
||||
if( remainingBitSize > 0 )
|
||||
{
|
||||
for( currentBitIndex_ = 0; currentBitIndex_ < remainingBitSize; ++currentBitIndex_ )
|
||||
{
|
||||
currentByte_[ currentBitIndex_ ] = bits[ currentBitIndex_ + byteWiseSize ];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
currentByte_.clear();
|
||||
currentByte_.resize( 8 );
|
||||
currentBitIndex_ = 8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Insert bytes at the end of the data.
|
||||
*
|
||||
* @param bytes The bytes to append
|
||||
*/
|
||||
void DataSource::append( const QByteArray& bytes )
|
||||
{
|
||||
bool wasEmpty = ( buffer_.size() == 0 );
|
||||
|
||||
if( ! wasEmpty )
|
||||
{
|
||||
buffer_.seek( buffer_.size() );
|
||||
}
|
||||
|
||||
if( buffer_.write( bytes ) != bytes.size() )
|
||||
{
|
||||
qWarning() << "DataSource::append() - Write of" << bytes.size() << "bytes failed at buffer position" << buffer_.pos();
|
||||
return;
|
||||
}
|
||||
|
||||
// Prepare the first byte to be read
|
||||
if( wasEmpty )
|
||||
{
|
||||
currentBitIndex_ = 8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get whether the buffer is finished.
|
||||
*
|
||||
* The buffer is finished (at the end) when there are no more
|
||||
* bytes to read. If the considerBits parameter is set, the
|
||||
* buffer is considered finished when all the bits have been
|
||||
* read.
|
||||
*
|
||||
* @param considerBits Whether to consider the data source as a bits source
|
||||
* @return bool
|
||||
*/
|
||||
bool DataSource::atEnd( bool considerBits ) const
|
||||
{
|
||||
if( considerBits )
|
||||
{
|
||||
// There's no more data only when both the buffer AND all the bits
|
||||
// have been read
|
||||
return buffer_.atEnd() && ( currentBitIndex_ >= 8 );
|
||||
}
|
||||
|
||||
return buffer_.atEnd();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Clear the data buffer.
|
||||
*/
|
||||
void DataSource::clear()
|
||||
{
|
||||
buffer_.close();
|
||||
buffer_.setData( QByteArray() );
|
||||
buffer_.open( QIODevice::ReadWrite );
|
||||
buffer_.seek( 0 );
|
||||
|
||||
currentBitIndex_ = 8;
|
||||
|
||||
currentByte_.clear();
|
||||
currentByte_.resize( 8 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Return a reference to the internal data array.
|
||||
*
|
||||
* @return byte array
|
||||
*/
|
||||
const QByteArray& DataSource::data() const
|
||||
{
|
||||
return buffer_.data();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Flush the current byte to the buffer.
|
||||
*
|
||||
* When in bit mode, this method can be used to save less than 8 bits
|
||||
* in the stream. The unsed bits are set to 0.
|
||||
*/
|
||||
void DataSource::flush()
|
||||
{
|
||||
if( currentBitIndex_ >= 8 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
quint8 bit = 7;
|
||||
quint8 byte = 0;
|
||||
for( quint8 index = 0; index < currentBitIndex_; ++index )
|
||||
{
|
||||
byte |= currentByte_[ index ] << bit--;
|
||||
}
|
||||
|
||||
// Write the bytes in the buffer
|
||||
if( buffer_.write( (char*)&byte, 1 ) != 1 )
|
||||
{
|
||||
qWarning() << "DataSource::flush() - Write failed at buffer position" << buffer_.pos();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve the index of the current bit.
|
||||
*
|
||||
* @return Current position within the byte we're reading at the moment
|
||||
*/
|
||||
quint8 DataSource::getBitIndex()
|
||||
{
|
||||
return currentBitIndex_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve the next bit from the data.
|
||||
*
|
||||
* @param ok If set, it will contain whether the call was successful or not.
|
||||
* @return bool
|
||||
*/
|
||||
bool DataSource::getBit( bool* ok )
|
||||
{
|
||||
if( currentBitIndex_ >= 8 )
|
||||
{
|
||||
// Also check the index again, in case somehow moveByteToBitArray()
|
||||
// fails to move the bit index
|
||||
if( ( ! moveByteToBitArray() ) || currentBitIndex_ >= 8 )
|
||||
{
|
||||
if( ok != 0 )
|
||||
{
|
||||
*ok = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Q_ASSERT( currentBitIndex_ == 0 );
|
||||
}
|
||||
|
||||
Q_ASSERT( currentByte_.size() == 8 );
|
||||
|
||||
if( ok != 0 )
|
||||
{
|
||||
*ok = true;
|
||||
}
|
||||
|
||||
++currentBitIndex_;
|
||||
|
||||
return currentByte_.at( currentBitIndex_ - 1 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve the next [amount] bits from the data.
|
||||
*
|
||||
* @param amount Number of bits to read
|
||||
* @param ok If set, it will contain whether the call was successful or not.
|
||||
* @return quint64 with the set of read bits
|
||||
*/
|
||||
quint64 DataSource::getBits( quint8 amount, bool* ok )
|
||||
{
|
||||
if( amount > 64 )
|
||||
{
|
||||
qWarning() << "DataSource:getBits() - Cannot retrieve" << amount << "bits, the maximum is 64 bits!";
|
||||
|
||||
if( ok != 0 )
|
||||
{
|
||||
*ok = false;
|
||||
}
|
||||
|
||||
return 0LL;
|
||||
}
|
||||
|
||||
bool gotBitOk = false;
|
||||
quint8 bitIndex = 0;
|
||||
quint64 value = 0;
|
||||
|
||||
while( ! atEnd( true ) && bitIndex < amount )
|
||||
{
|
||||
bool bit = getBit( &gotBitOk );
|
||||
|
||||
if( ! gotBitOk )
|
||||
{
|
||||
if( ok != 0 )
|
||||
{
|
||||
*ok = false;
|
||||
}
|
||||
|
||||
return 0LL;
|
||||
}
|
||||
|
||||
if( bit )
|
||||
{
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
value |= 1 << bitIndex;
|
||||
#else
|
||||
value |= 1 << ( amount - bitIndex - 1 );
|
||||
#endif
|
||||
}
|
||||
|
||||
++bitIndex;
|
||||
}
|
||||
|
||||
// If more bits must be read, but are not available, abort
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
if( ( bitIndex < amount ) && atEnd( true ) )
|
||||
{
|
||||
qDebug() << "Unable to read all bits: only" << bitIndex << "of" << amount << "were available.";
|
||||
}
|
||||
#endif
|
||||
|
||||
// Done!
|
||||
if( ok != 0 )
|
||||
{
|
||||
*ok = true;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve the next byte from the data
|
||||
*
|
||||
* @param ok If set, it will contain whether the call was successful or not.
|
||||
* @return char
|
||||
*/
|
||||
char DataSource::getByte( bool* ok )
|
||||
{
|
||||
bool gotBitOk;
|
||||
quint8 pos = 0;
|
||||
qint8 byte = 0;
|
||||
|
||||
while( pos < 8 )
|
||||
{
|
||||
bool bit = getBit( &gotBitOk );
|
||||
|
||||
if( ! gotBitOk )
|
||||
{
|
||||
if( ok != 0 )
|
||||
{
|
||||
*ok = false;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
byte |= ( bit << pos++ );
|
||||
#else
|
||||
byte |= ( bit << ( 7 - pos++ ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
// Done!
|
||||
if( ok != 0 )
|
||||
{
|
||||
*ok = true;
|
||||
}
|
||||
return byte;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve the next [amount] bytes from the data.
|
||||
*
|
||||
* @param amount Number of bytes to read
|
||||
* @param ok If set, it will contain whether the call was successful or not.
|
||||
* @return byte array of read bytes
|
||||
*/
|
||||
QByteArray DataSource::getBytes( quint8 amount, bool* ok )
|
||||
{
|
||||
QByteArray bytes;
|
||||
bool gotByteOk;
|
||||
quint8 index = 0;
|
||||
|
||||
while( ! atEnd() && index < amount )
|
||||
{
|
||||
quint8 byte = getByte( &gotByteOk );
|
||||
|
||||
if( ! gotByteOk )
|
||||
{
|
||||
if( ok != 0 )
|
||||
{
|
||||
*ok = false;
|
||||
}
|
||||
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
bytes.append( byte );
|
||||
++index;
|
||||
}
|
||||
|
||||
// Done!
|
||||
if( ok != 0 )
|
||||
{
|
||||
*ok = true;
|
||||
}
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Move a byte from the buffer into the 'current byte' bit array.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
bool DataSource::moveByteToBitArray()
|
||||
{
|
||||
quint8 byte = 0;
|
||||
|
||||
if( buffer_.size() == 0 )
|
||||
{
|
||||
qWarning() << "DataSource:moveByteToBitArray() - The buffer is empty!";
|
||||
currentByte_.clear();
|
||||
currentBitIndex_ = 8;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( buffer_.atEnd() )
|
||||
{
|
||||
qWarning() << "DataSource:moveByteToBitArray() - The buffer was completely parsed!";
|
||||
currentByte_.clear();
|
||||
currentBitIndex_ = 8;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( buffer_.getChar( (char*)&byte ) != 1 )
|
||||
{
|
||||
qWarning() << "DataSource::moveByteToBitArray() - Read failed at buffer position" << buffer_.pos();
|
||||
return false;
|
||||
}
|
||||
|
||||
for( qint8 i = 0; i < 8; i++ )
|
||||
{
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
currentByte_.setBit( i, byte & ( 1 << i ) );
|
||||
#else
|
||||
currentByte_.setBit( 7 - i, byte & ( 1 << i ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
currentBitIndex_ = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the current position within the internal data buffer.
|
||||
*
|
||||
* @return qint64
|
||||
*/
|
||||
qint64 DataSource::pos() const
|
||||
{
|
||||
return buffer_.pos();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Insert a byte at the beginning of the data.
|
||||
*
|
||||
* @param byte Byte to add
|
||||
*/
|
||||
void DataSource::prepend( char byte )
|
||||
{
|
||||
buffer_.buffer().prepend( byte );
|
||||
|
||||
bool wasAtBeginning = ( buffer_.pos() == 0 );
|
||||
|
||||
seekRelative( 1 );
|
||||
|
||||
if( wasAtBeginning )
|
||||
{
|
||||
moveByteToBitArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Insert bytes at the beginning of the data.
|
||||
*
|
||||
* @param bytes Bytes to add
|
||||
*/
|
||||
void DataSource::prepend( const QByteArray& bytes )
|
||||
{
|
||||
buffer_.buffer().prepend( bytes );
|
||||
|
||||
bool wasAtBeginning = ( buffer_.pos() == 0 );
|
||||
|
||||
seekRelative( bytes.size() );
|
||||
|
||||
if( wasAtBeginning )
|
||||
{
|
||||
moveByteToBitArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
/**
|
||||
* Return to the start of the buffer.
|
||||
*/
|
||||
void DataSource::reset()
|
||||
{
|
||||
buffer_.reset();
|
||||
currentBitIndex_ = 8;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
/**
|
||||
* Seek back and forth in the stream.
|
||||
*
|
||||
* A negative pos will move backwards within the stream.
|
||||
*
|
||||
* @param pos Relative position where to move
|
||||
*/
|
||||
void DataSource::seekRelative( int pos )
|
||||
{
|
||||
if( pos < 0 && buffer_.pos() <= 0 )
|
||||
{
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
qWarning() << "Cannot seek back!";
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
if( pos > 0 && ( buffer_.size() - buffer_.pos() ) < pos )
|
||||
{
|
||||
#ifdef ISFQT_DEBUG_VERBOSE
|
||||
qWarning() << "Cannot seek forward!";
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
buffer_.seek( buffer_.pos() + pos );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Replace the data byte array with another.
|
||||
*
|
||||
* @param data New array to copy and use as the data source
|
||||
*/
|
||||
void DataSource::setData( const QByteArray& data )
|
||||
{
|
||||
buffer_.close();
|
||||
buffer_.setData( data );
|
||||
buffer_.open( QIODevice::ReadWrite );
|
||||
buffer_.seek( 0 );
|
||||
|
||||
currentBitIndex_ = 8;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skip the rest of the current byte and read the next one.
|
||||
*
|
||||
* When using the data source in bit mode, this skips the
|
||||
* bits remaining in the current byte and prepares to read
|
||||
* the next byte.
|
||||
*/
|
||||
void DataSource::skipToNextByte()
|
||||
{
|
||||
if( currentBitIndex_ == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
moveByteToBitArray();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skip the rest of the current byte and read the previous one.
|
||||
*
|
||||
* When using the data source in bit mode, this skips the
|
||||
* bits remaining in the current byte and prepares to read
|
||||
* the next byte.
|
||||
*/
|
||||
void DataSource::skipToPrevByte()
|
||||
{
|
||||
currentBitIndex_ = 8;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
/**
|
||||
* Get the size of the data.
|
||||
*
|
||||
* @return qint64
|
||||
*/
|
||||
qint64 DataSource::size() const
|
||||
{
|
||||
return buffer_.size();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* Copyright (C) 2009 by Adam Goossens *
|
||||
* adam@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef DATASOURCE_H
|
||||
#define DATASOURCE_H
|
||||
|
||||
#include <QBitArray>
|
||||
#include <QBuffer>
|
||||
|
||||
|
||||
|
||||
namespace Isf
|
||||
{
|
||||
namespace Compress
|
||||
{
|
||||
/**
|
||||
* @class DataSource
|
||||
* @brief Class to handle a QBuffer at the bit level.
|
||||
*
|
||||
* You can use this class in two ways: first, reading and writing bytes
|
||||
* normally. Second, reading and writing individual bits.
|
||||
*
|
||||
* Warning: Mixing up the usage modes is not very well tested!
|
||||
*/
|
||||
class DataSource
|
||||
{
|
||||
|
||||
public: // Public constructors
|
||||
DataSource();
|
||||
DataSource( const QByteArray& data );
|
||||
~DataSource();
|
||||
|
||||
public: // Public status retrieval methods
|
||||
bool atEnd( bool considerBits = false ) const;
|
||||
const QByteArray& data() const;
|
||||
qint64 pos() const;
|
||||
qint64 size() const;
|
||||
|
||||
public: // Public data manipulation methods
|
||||
void append( char byte );
|
||||
void append( const QBitArray& bits );
|
||||
void append( const QByteArray& bytes );
|
||||
void clear();
|
||||
void flush();
|
||||
bool getBit( bool* ok = 0 );
|
||||
quint64 getBits( quint8 amount, bool* ok = 0 );
|
||||
quint8 getBitIndex();
|
||||
char getByte( bool* ok = 0 );
|
||||
QByteArray getBytes( quint8 amount, bool* ok = 0 );
|
||||
void prepend( char byte );
|
||||
void prepend( const QByteArray& bytes );
|
||||
void reset();
|
||||
void setData( const QByteArray& data );
|
||||
void seekRelative( int pos );
|
||||
void skipToNextByte();
|
||||
void skipToPrevByte();
|
||||
|
||||
private: // Private methods
|
||||
bool moveByteToBitArray();
|
||||
|
||||
private: // Private properties
|
||||
/// Main data buffer
|
||||
QBuffer buffer_;
|
||||
/// Current bit within the bit array
|
||||
quint8 currentBitIndex_;
|
||||
/// Current byte
|
||||
QBitArray currentByte_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,356 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* Copyright (C) 2009 by Adam Goossens *
|
||||
* adam@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "multibytecoding.h"
|
||||
|
||||
#include "isfqt-internal.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
||||
using namespace Isf;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Decodes an unsigned integer into a quint64 using multibyte decoding.
|
||||
*
|
||||
* @param source Data Source where to read bytes from
|
||||
* @return quint64
|
||||
*/
|
||||
quint64 Compress::decodeUInt( DataSource* source )
|
||||
{
|
||||
quint8 byte; // Current byte
|
||||
quint8 flag; // Used to find out if there are more bytes to convert
|
||||
quint8 count = 0; // Count of bits read so far
|
||||
quint64 value = 0; // Destination 64-bit value
|
||||
|
||||
do
|
||||
{
|
||||
byte = source->getByte();
|
||||
flag = byte & 0x80;
|
||||
value |= (byte & 0x7F) << count;
|
||||
count += 7;
|
||||
}
|
||||
while( flag );
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Decodes a signed integer into a qint64 using multibyte decoding.
|
||||
*
|
||||
* @param source Data Source where to read bytes from
|
||||
* @return qint64
|
||||
*/
|
||||
qint64 Compress::decodeInt( DataSource* source )
|
||||
{
|
||||
bool isNegative = false;
|
||||
qint64 value = decodeUInt( source );
|
||||
|
||||
// The least significant bit contains the sign
|
||||
if( value & 0x01 )
|
||||
{
|
||||
isNegative = true;
|
||||
}
|
||||
|
||||
// Remove the sign bit from the raw value
|
||||
value >>= 1;
|
||||
|
||||
// Apply the sign
|
||||
if( isNegative )
|
||||
{
|
||||
value *= -1;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Decodes a float using multibyte decoding.
|
||||
*
|
||||
* @param source Data Source where to read bytes from
|
||||
* @return float
|
||||
*/
|
||||
float Compress::decodeFloat( DataSource* source )
|
||||
{
|
||||
qint8 index;
|
||||
|
||||
// Union used to decode the float transparently
|
||||
union
|
||||
{
|
||||
float value;
|
||||
uchar bytes[4];
|
||||
} data;
|
||||
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
index = 3;
|
||||
do
|
||||
{
|
||||
data.bytes[ index-- ] = source->getByte();
|
||||
}
|
||||
while( index >= 0 );
|
||||
#else
|
||||
index = 0;
|
||||
do
|
||||
{
|
||||
data.bytes[ index++ ] = source->getByte();
|
||||
}
|
||||
while( index <= 3 );
|
||||
#endif
|
||||
|
||||
return data.value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Encodes an unsigned 64-bit integer into a byte array using multibyte encoding.
|
||||
*
|
||||
* @param value The value to encode
|
||||
* @return byte array
|
||||
*/
|
||||
QByteArray Compress::encodeUInt( quint64 value )
|
||||
{
|
||||
quint8 byte;
|
||||
quint8 flag;
|
||||
QByteArray result;
|
||||
|
||||
do
|
||||
{
|
||||
byte = value & 0x7F;
|
||||
value >>= 7;
|
||||
|
||||
flag = ( value == 0 ) ? 0 : 0x80;
|
||||
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
result.prepend( byte | flag );
|
||||
#else
|
||||
result.append( byte | flag );
|
||||
#endif
|
||||
}
|
||||
while( flag );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Encodes an unsigned 64-bit integer into the Data Source using multibyte encoding.
|
||||
*
|
||||
* @param source The data source
|
||||
* @param value The value to encode
|
||||
* @param prepend False (default value) to append the encoded value to the existing data
|
||||
* True to prepend the new value to the existing data
|
||||
*/
|
||||
void Compress::encodeUInt( DataSource* source, quint64 value, bool prepend )
|
||||
{
|
||||
QByteArray result( encodeUInt( value ) );
|
||||
|
||||
if( prepend )
|
||||
{
|
||||
source->prepend( result );
|
||||
}
|
||||
else
|
||||
{
|
||||
source->append( result );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Encodes a signed 64-bit integer into a byte array using multibyte encoding.
|
||||
*
|
||||
* @param value The value to encode
|
||||
* @return byte array
|
||||
*/
|
||||
QByteArray Compress::encodeInt( qint64 value )
|
||||
{
|
||||
bool isNegative = ( value < 0 );
|
||||
if ( isNegative ) value *= -1;
|
||||
|
||||
value = value << 1;
|
||||
|
||||
QByteArray result( encodeUInt( value ) );
|
||||
|
||||
if ( isNegative )
|
||||
{
|
||||
int pos;
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
pos = result.size() - 1;
|
||||
#else
|
||||
pos = 0;
|
||||
#endif
|
||||
|
||||
result[ pos ] = result[ pos ] | 0x1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Encodes a signed 64-bit integer into the Data Source using multibyte encoding.
|
||||
*
|
||||
* @param source The data source
|
||||
* @param value The value to encode
|
||||
* @param prepend False (default value) to append the encoded value to the existing data
|
||||
* True to prepend the new value to the existing data
|
||||
*/
|
||||
void Compress::encodeInt( DataSource* source, qint64 value, bool prepend )
|
||||
{
|
||||
QByteArray result( encodeInt( value ) );
|
||||
|
||||
if( prepend )
|
||||
{
|
||||
source->prepend( result );
|
||||
}
|
||||
else
|
||||
{
|
||||
source->append( result );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Encodes a floating-point value into a byte array using multibyte encoding.
|
||||
*
|
||||
* @param value The value to encode
|
||||
* @return byte array
|
||||
*/
|
||||
QByteArray Compress::encodeFloat( float value )
|
||||
{
|
||||
qint8 index;
|
||||
QByteArray result;
|
||||
|
||||
// Union used to encode the float transparently
|
||||
union
|
||||
{
|
||||
float number;
|
||||
uchar bytes[4];
|
||||
} data;
|
||||
|
||||
data.number = value;
|
||||
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
index = 3;
|
||||
do
|
||||
{
|
||||
result.append( data.bytes[ index-- ] );
|
||||
}
|
||||
while( index >= 0 );
|
||||
#else
|
||||
index = 0;
|
||||
do
|
||||
{
|
||||
result.append( data.bytes[ index++ ] );
|
||||
}
|
||||
while( index <= 3 );
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Encodes a floating-point value into the Data Source using multibyte encoding.
|
||||
*
|
||||
* @param source The data source
|
||||
* @param value The value to encode
|
||||
* @param prepend False (default value) to append the encoded value to the existing data
|
||||
* True to prepend the new value to the existing data
|
||||
*/
|
||||
void Compress::encodeFloat( DataSource* source, float value, bool prepend )
|
||||
{
|
||||
QByteArray result( encodeFloat( value ) );
|
||||
|
||||
if( prepend )
|
||||
{
|
||||
source->prepend( result );
|
||||
}
|
||||
else
|
||||
{
|
||||
source->append( result );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return how much bytes a certain unsigned value takes up using multi-byte encoding.
|
||||
*
|
||||
* @param value The unsigned value to check
|
||||
* @return Number of bytes required for multi-byte storage of that value
|
||||
*/
|
||||
quint8 Compress::getMultiByteSize( quint64 value )
|
||||
{
|
||||
quint8 bytes = 1;
|
||||
|
||||
while( value )
|
||||
{
|
||||
value >>= 7;
|
||||
|
||||
if( value )
|
||||
{
|
||||
++bytes;
|
||||
}
|
||||
}
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Return how much bytes a certain signed value takes up using multi-byte encoding.
|
||||
*
|
||||
* @param value The signed value to check
|
||||
* @return Number of bytes required for multi-byte storage of that value
|
||||
*/
|
||||
quint8 Compress::getMultiByteSize( qint64 value )
|
||||
{
|
||||
quint8 bytes = 1;
|
||||
|
||||
while( value )
|
||||
{
|
||||
value >>= 6;
|
||||
|
||||
if( value )
|
||||
{
|
||||
++bytes;
|
||||
}
|
||||
}
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* Copyright (C) 2009 by Adam Goossens *
|
||||
* adam@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MULTIBYTECODING_H
|
||||
#define MULTIBYTECODING_H
|
||||
|
||||
#include "datasource.h"
|
||||
|
||||
#include <QByteArray>
|
||||
|
||||
|
||||
|
||||
namespace Isf
|
||||
{
|
||||
namespace Compress
|
||||
{
|
||||
|
||||
quint64 decodeUInt( DataSource* source );
|
||||
qint64 decodeInt( DataSource* source );
|
||||
float decodeFloat( DataSource* source );
|
||||
|
||||
QByteArray encodeUInt( quint64 value );
|
||||
void encodeUInt( DataSource* source, quint64 value, bool prepend = false );
|
||||
|
||||
QByteArray encodeInt( qint64 value );
|
||||
void encodeInt( DataSource* source, qint64 value, bool prepend = false );
|
||||
|
||||
QByteArray encodeFloat( float value );
|
||||
void encodeFloat( DataSource* source, float value, bool prepend = false );
|
||||
|
||||
quint8 getMultiByteSize( quint64 value );
|
||||
quint8 getMultiByteSize( qint64 value );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,48 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 by Valerio Pilo *
|
||||
* valerio@kmess.org *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation; either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ISFQT_GIF_SUPPORT_H
|
||||
#define ISFQT_GIF_SUPPORT_H
|
||||
|
||||
#include <gif_lib.h>
|
||||
|
||||
#define MAX_GIF_BYTE 255
|
||||
|
||||
|
||||
|
||||
// Internal helper function to read GIF data from a byte array
|
||||
int GifReadFromByteArray( GifFileType* gif, GifByteType* bytes, int size )
|
||||
{
|
||||
QBuffer* buffer = (QBuffer*) gif->UserData;
|
||||
return buffer->read( (char*)bytes, size );
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Internal helper function to write GIF data into a byte array
|
||||
int GifWriteToByteArray( GifFileType* gif, const GifByteType* bytes, int size )
|
||||
{
|
||||
QBuffer* buffer = (QBuffer*) gif->UserData;
|
||||
return buffer->write( (char*)bytes, size );
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,32 @@
|
||||
// Define contents of the main page
|
||||
|
||||
/**
|
||||
* @mainpage ISF-Qt - Ink Serialized Format library
|
||||
*
|
||||
* @section about About ISF-Qt
|
||||
*
|
||||
* ISF-Qt is a library, written in C++ with the Qt 4 toolkit, capable of reading
|
||||
* and writing the ISF format. ISF stands for "Ink Serialized Format", and is
|
||||
* the disk serialization format used by the Windows.Ink C# library and by the
|
||||
* TabletPC platform, but also by applications like Windows Live Messenger - which
|
||||
* uses ISF to transfer handwriting messages.
|
||||
*
|
||||
* We had the need to interpret these handwriting messages in the best possible
|
||||
* way, and started to reverse-engineer the format, with the help of existing
|
||||
* (but incomplete) libraries and specifications. What we ended up with is ISF-Qt,
|
||||
* a library which can be used to decode an ISF file or data stream, manage it
|
||||
* and the the strokes which comprise the drawing, and write ISF files/streams.
|
||||
* You can also create new drawings from scratch.
|
||||
*
|
||||
*
|
||||
* @section intro About this documentation
|
||||
* This documentation is written towards developers, to be used
|
||||
* as reference manual when writing code which uses ISF-Qt, or when developing
|
||||
* the library itself.
|
||||
* Please take your time to understand the structure of the library, its classes
|
||||
* and methods.
|
||||
*
|
||||
* Since ISF-Qt is built on top of the Qt 4 library, you will also need to
|
||||
* be familiar with it; more information can be found online at:
|
||||
* - http://doc.trolltech.com/4.3/index.html
|
||||
*/
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user