From c708fc24e40d9c9fa5ce40f46478c4a2f152a5c7 Mon Sep 17 00:00:00 2001 From: Bay Dam Date: Wed, 16 Mar 2016 11:08:34 +0100 Subject: [PATCH 1/2] Preparing for Windows operating system --- Commands.cpp | 23 +++++++++++++++++++++++ Commands.h | 5 +++-- MapperGLCanvas.cpp | 1 + MappingGui.h | 7 +------ Maths.h | 4 ---- Paint.cpp | 1 - Shape.h | 1 - ShapeGraphicsItem.cpp | 4 ---- VideoImpl.cpp | 2 +- mapmap.pro | 28 +++++++++++++--------------- 10 files changed, 42 insertions(+), 34 deletions(-) diff --git a/Commands.cpp b/Commands.cpp index 514c0b7..b1e0146 100644 --- a/Commands.cpp +++ b/Commands.cpp @@ -1,3 +1,26 @@ +/* + * Commands.cpp + * + * (c) 2014 Sofian Audry -- info(@)sofianaudry(.)com + * (c) 2014 Alexandre Quessy -- alexandre(@)quessy(.)net + * (c) 2014 Dame Diongue -- baydamd(@)gmail(.)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 3 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 General Public License + * along with this program. If not, see . + */ + +#include "MainWindow.h" +#include "MapperGLCanvas.h" #include "Commands.h" diff --git a/Commands.h b/Commands.h index ee5a7d3..4d53faf 100644 --- a/Commands.h +++ b/Commands.h @@ -23,8 +23,6 @@ #define COMMANDS_H_ #include -#include "MainWindow.h" -#include "MapperGLCanvas.h" enum CommandId { CMD_KEY_MOVE_VERTEX, @@ -33,6 +31,9 @@ enum CommandId { CMD_MOUSE_TRANSLATE_SHAPE, }; +class MainWindow; +class MapperGLCanvas; + class AddShapesCommand : public QUndoCommand { public: diff --git a/MapperGLCanvas.cpp b/MapperGLCanvas.cpp index af798c9..db57a40 100644 --- a/MapperGLCanvas.cpp +++ b/MapperGLCanvas.cpp @@ -18,6 +18,7 @@ * along with this program. If not, see . */ +#include "ShapeGraphicsItem.h" #include "MapperGLCanvas.h" #include "MainWindow.h" diff --git a/MappingGui.h b/MappingGui.h index 63d434a..116cade 100644 --- a/MappingGui.h +++ b/MappingGui.h @@ -39,11 +39,10 @@ #include "MapperGLCanvas.h" -#ifndef WIN32 #include "ShapeGraphicsItem.h" #include "ShapeControlPainter.h" + #include "Util.h" -#endif #include "qtpropertymanager.h" #include "qtvariantproperty.h" @@ -54,10 +53,6 @@ #include "variantmanager.h" #include "variantfactory.h" -class MapperGLCanvas; -class ShapeGraphicsItem; -class ShapeControlPainter; - /** * This is the "view" side of the Mapping class (model). It contains the graphic items for * both input and output as well as the properties editor. diff --git a/Maths.h b/Maths.h index d14ba3e..0d28f6e 100644 --- a/Maths.h +++ b/Maths.h @@ -25,10 +25,6 @@ #include #include -#ifndef M_PI -# define M_PI 3.14159265358979323846 -#endif - /// Converts from degrees to radians. inline qreal degreesToRadians(qreal degrees) { return degrees / 180.0f * M_PI; } diff --git a/Paint.cpp b/Paint.cpp index 5da1cfe..4611b57 100644 --- a/Paint.cpp +++ b/Paint.cpp @@ -235,7 +235,6 @@ bool Video::_generateThumbnail() // Copy bits into thumbnail QImage. QImage thumbnail(getWidth(), getHeight(), QImage::Format_ARGB32); - int i=0; for (int y=0; y -#include #include diff --git a/ShapeGraphicsItem.cpp b/ShapeGraphicsItem.cpp index c3d656f..678ffd0 100644 --- a/ShapeGraphicsItem.cpp +++ b/ShapeGraphicsItem.cpp @@ -22,10 +22,6 @@ #include "MainWindow.h" -#ifdef WIN32 -#include "Util.h" -#endif - ShapeGraphicsItem::ShapeGraphicsItem(Mapping::ptr mapping, bool output) : _mapping(mapping), _output(output) { diff --git a/VideoImpl.cpp b/VideoImpl.cpp index 39fe02c..d70095b 100644 --- a/VideoImpl.cpp +++ b/VideoImpl.cpp @@ -296,7 +296,7 @@ void VideoImpl::resetMovie() if (_seekEnabled) { if (_rate > 0) - seekTo(0UL); + seekTo((guint64)0); else { // NOTE: Untested. diff --git a/mapmap.pro b/mapmap.pro index 119e9f4..9212c0b 100644 --- a/mapmap.pro +++ b/mapmap.pro @@ -163,25 +163,23 @@ mac { # Windows-specific: win32 { DEFINES += WIN32 - INCLUDEPATH += \ - C:/gstreamer/include \ - C:/gstreamer/include/libxml2 \ - C:/gstreamer/include/glib-2.0 \ - C:/gstreamer/lib/glib-2.0/include \ - C:/gstreamer/include/gstreamer-0.10 - LIBS += -L"C:/gstreamer/lib" \ - -L"C:/gstreamer/bin" \ - -lgstreamer-0.10 \ - -lglib-2.0 \ - -lgmodule-2.0 \ + INCLUDEPATH += C:/gstreamer/1.0/x86/lib/gstreamer-1.0/include \ + C:/gstreamer/1.0/x86/include/glib-2.0 \ + C:/gstreamer/1.0/x86/lib/glib-2.0/include \ + C:/gstreamer/1.0/x86/include/gstreamer-1.0 + LIBS += -LC:/gstreamer/1.0/x86/lib \ + -lgstapp-1.0 \ + -lgstbase-1.0 \ + -lgstpbutils-1.0 \ + -lgstreamer-1.0 \ -lgobject-2.0 \ - -lgthread-2.0 \ - -lgstinterfaces-0.10 \ - -lopengl32 \ - -lglu32 + -lglib-2.0 \ + -lopengl32 + # Add console to the CONFIG to see debug messages printed in # the console on Windows CONFIG += console + QMAKE_CXXFLAGS += -D_USE_MATH_DEFINES } # Adds the tarball target From afb771ba22649843cc8c99cc27b3aa00bdc99ad1 Mon Sep 17 00:00:00 2001 From: baydam Date: Wed, 16 Mar 2016 10:41:28 +0000 Subject: [PATCH 2/2] Fix compilation error --- .gitignore | 1 + resources/texts/mapmap_fr.qm | Bin 0 -> 8843 bytes 2 files changed, 1 insertion(+) create mode 100644 resources/texts/mapmap_fr.qm diff --git a/.gitignore b/.gitignore index 7c99f78..f3d6d30 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ Release/ *.tar *.rar *.qm +!resources/texts/*.qm *.psd *.ai *.gif diff --git a/resources/texts/mapmap_fr.qm b/resources/texts/mapmap_fr.qm new file mode 100644 index 0000000000000000000000000000000000000000..00e08cd76a7e015918edc69ca3833e8b4741b23b GIT binary patch literal 8843 zcmcgxeQYFU8GqXDcKfmI9b9`?xKdsV-Med{+|>Z4oCp2n3Rmu~*E>ig%G~a>JD1s+ zVP>`;7a_&x9JPN%!? zcEKE^AG13%@ALegkN5d{cYZ6=@zcLPaPQAQ)OqTb2fz2qFj4J8L^nM~bm84p``9!1 zo~PJ7kK_Ahihmo|3r+{uuIs4xJ29e~3#s>)J-F_t-Z!@6`eW+5|7omyjrx9p^>r80 zwZFrA&3W2=#qWu_o~P?Gw-cTB8twV?y`cBq;M%o;Zusm|;4?*r4tlX^dSNt6RDThj zUfM;}u%)KiZzDSQ3pGPmzY4nd)GYnrt3-5V&69UOOSIvp+WzNW!1JqWKla2Oc>n9Q zC-3_ao>T4L{tSNSEZ3g-8J@2nscZkl*ND!4vhDz{Z~A;)I{sfg@2Gp`#Cp&@Sof!W z^F$jz6{~%@i>SRVmhU=&`+tZXx85X5wB!13T*qU_ZOE0Fk3D?i3{m3|T;Ia=OR+~T z0sY43;#W?59QwF3{*eR6h}Om8N0+XI+#ilV`h-u^_M7@`rx-`R-gx;W_`FzeZg`6I zU;pqe{~_wM>Yup&w?vyK60IFy2A#hr(wBEZzU9Qi0_18rl(_BYFXH+@;_)7fD1JEc zBJ*omPMq#M5BxrvchkPA(Hd^m=LccFH`fmVF zOR{m%c^c0jZhYj_uVJr~jqkMgga4aNAAR;V=&7&iROTS>FUY^l0qN&UqD_~z&P+ZA{4ceB<-Qm3{rPoMv%nKOx$gDPLGE>zulr}yUfBB| z2At)GbwF?~rRe)4$RU?({I|(#z-_AMztqrSJMSm(v1w8>tQ!q0W6#&{vSAvc8T=TO zrYz}LEXc&w!!->e7Wue$CcKxSynLeJiB5B*Mc8ztMh(v~wMCKEtU1jSY1{H$+w@e7 z2bGL95T5~Ii~cAX>-e6*cL6{)fcOBahjMKU8A3WI?~8dUn2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