You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Fixing cmake build scripts to support 64bit on Windows. Also refactoring some pointer handling to support 64bit on Windows (Linux and Mac have always supported it). Adding instructions for setting up a Windows 64 bit build environment using MSYS2.
This commit is contained in:
@@ -1,12 +1,51 @@
|
||||
Installing ImageMagick on Windows using Qt's version of MinGW:
|
||||
####################################################################
|
||||
Install Dependencies for Windows
|
||||
####################################################################
|
||||
|
||||
Step 1) Copy these files into your local MSYS environment
|
||||
Step 2) Run MSYS Shell
|
||||
Step 3) Install wget command (this requires your c:\mingw folder to be at the end of your PATH)
|
||||
$ mingw-get install msys-wget
|
||||
Step 4) Execute this command (this requires the C:\Qt\Qt5.2.1\Tools\mingw48_32\bin at the beginning of your PATH)
|
||||
$ ./build-imagemagick.sh
|
||||
Step 5) Copy the MSYS /local/bin/ DLLs to your PATH
|
||||
Install MSYS2 (64 bit environment)
|
||||
Append PATH:
|
||||
$ PATH=$PATH:/c/msys64/mingw64/bin:/c/msys64/mingw64/lib
|
||||
|
||||
These ImageMagick DLL's need to be found by the libopenshot build process,
|
||||
and linked and loaded at runtime.
|
||||
Sync pacman
|
||||
$ pacman -Syu
|
||||
|
||||
Install the following packages:
|
||||
$ pacman -S mingw-w64-x86_64-toolchain
|
||||
$ pacman -S mingw64/mingw-w64-x86_64-ffmpeg
|
||||
$ pacman -S mingw64/mingw-w64-x86_64-python3-pyzmq
|
||||
$ pacman -S mingw64/mingw-w64-x86_64-python3-pyqt5
|
||||
$ pacman -S mingw64/mingw-w64-x86_64-swig
|
||||
$ pacman -S mingw64/mingw-w64-x86_64-cmake
|
||||
$ pacman -S mingw64/mingw-w64-x86_64-doxygen
|
||||
$ pacman -S mingw64/mingw-w64-x86_64-python3-pyzmq
|
||||
$ pacman -S mingw64/mingw-w64-x86_64-python3-pip
|
||||
$ pacman -S git
|
||||
|
||||
Install ImageMagick if needed (OPTIONAL and NOT NEEDED)
|
||||
$ pacman -S mingw64/mingw-w64-x86_64-imagemagick
|
||||
|
||||
Install httplib2 for Python3
|
||||
$ pip3 install httplib2
|
||||
$ pip3 install slacker
|
||||
$ pip3 install tinys3
|
||||
|
||||
Download Unittest++ into /c/home/jonathan/unittest-cpp-master/
|
||||
Configure Unittest++:
|
||||
$ cmake -G "MSYS Makefiles" ../ -DCMAKE_MAKE_PROGRAM=mingw32-make
|
||||
Build Unittest++ (as Administrator):
|
||||
$ mingw32-make install (NOTE: This installs to C:\Program Files (x86)\UnitTest++)
|
||||
|
||||
ZMQ++ Header
|
||||
NOTE: Download and copy zmq.hpp into the /c/msys64/mingw64/include/ folder
|
||||
|
||||
|
||||
####################################################################
|
||||
OPTIONAL: Installing ImageMagick on Windows
|
||||
####################################################################
|
||||
|
||||
If you would rather install ImageMagick from source code yourself, follow these steps:
|
||||
|
||||
Step 1) Copy [build-imagemagick.sh and urls.txt] into your local MSYS2 environment
|
||||
Step 2) Run MSYS2 Shell
|
||||
Step 3) Execute this command
|
||||
$ ./build-imagemagick.sh
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
~VideoRenderer();
|
||||
|
||||
/// Override QWidget which needs to be painted
|
||||
void OverrideWidget(long qwidget_address);
|
||||
void OverrideWidget(long long qwidget_address);
|
||||
|
||||
signals:
|
||||
void present(const QImage &image);
|
||||
|
||||
@@ -80,10 +80,10 @@ namespace openshot
|
||||
/// Set the QWidget which will be used as the display (note: QLabel works well). This does not take a
|
||||
/// normal pointer, but rather a LONG pointer id (and it re-casts the QWidget pointer inside libopenshot).
|
||||
/// This is required due to SIP and SWIG incompatibility in the Python bindings.
|
||||
void SetQWidget(long qwidget_address);
|
||||
void SetQWidget(long long qwidget_address);
|
||||
|
||||
/// Get the Renderer pointer address (for Python to cast back into a QObject)
|
||||
long GetRendererQObject();
|
||||
long long GetRendererQObject();
|
||||
|
||||
/// Get the Playback speed
|
||||
float Speed();
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace openshot
|
||||
void paint(const std::tr1::shared_ptr<Frame> & frame);
|
||||
|
||||
/// Allow manual override of the QWidget that is used to display
|
||||
virtual void OverrideWidget(long qwidget_address) = 0;
|
||||
virtual void OverrideWidget(long long qwidget_address) = 0;
|
||||
|
||||
protected:
|
||||
RendererBase();
|
||||
|
||||
@@ -33,7 +33,7 @@ OPTION(USE_SYSTEM_JSONCPP "Use system installed JsonCpp" OFF)
|
||||
# required for libopenshot-audio headers
|
||||
IF (WIN32)
|
||||
add_definitions( -DIGNORE_JUCE_HYPOT=1 )
|
||||
SET(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -march=i686 -include cmath -std=c++0x")
|
||||
SET(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -include cmath -std=c++0x")
|
||||
ENDIF(WIN32)
|
||||
IF (APPLE)
|
||||
# If you still get errors compiling with GCC 4.8, mac headers need to be patched: http://hamelot.co.uk/programming/osx-gcc-dispatch_block_t-has-not-been-declared-invalid-typedef/
|
||||
|
||||
@@ -38,7 +38,7 @@ VideoRenderer::~VideoRenderer()
|
||||
}
|
||||
|
||||
/// Override QWidget which needs to be painted
|
||||
void VideoRenderer::OverrideWidget(long qwidget_address)
|
||||
void VideoRenderer::OverrideWidget(long long qwidget_address)
|
||||
{
|
||||
// re-cast QWidget pointer (long) as an actual QWidget
|
||||
override_widget = reinterpret_cast<QWidget*>(qwidget_address);
|
||||
|
||||
@@ -158,14 +158,14 @@ ReaderBase* QtPlayer::Reader() {
|
||||
}
|
||||
|
||||
// Set the QWidget pointer to display the video on (as a LONG pointer id)
|
||||
void QtPlayer::SetQWidget(long qwidget_address) {
|
||||
void QtPlayer::SetQWidget(long long qwidget_address) {
|
||||
// Update override QWidget address on the video renderer
|
||||
p->renderer->OverrideWidget(qwidget_address);
|
||||
}
|
||||
|
||||
// Get the Renderer pointer address (for Python to cast back into a QObject)
|
||||
long QtPlayer::GetRendererQObject() {
|
||||
return (long) (VideoRenderer*)p->renderer;
|
||||
long long QtPlayer::GetRendererQObject() {
|
||||
return (long long)(VideoRenderer*)p->renderer;
|
||||
}
|
||||
|
||||
// Get the Playback speed
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
IF (WIN32)
|
||||
STRING(REPLACE "/" "\\\\" TEST_MEDIA_PATH "${openshot_SOURCE_DIR}/src/examples/")
|
||||
add_definitions( -DIGNORE_JUCE_HYPOT=1 -DTEST_MEDIA_PATH="${TEST_MEDIA_PATH}" )
|
||||
SET(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -march=i686 -include cmath -std=c++0x")
|
||||
SET(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -include cmath -std=c++0x")
|
||||
ENDIF(WIN32)
|
||||
|
||||
################### UNITTEST++ #####################
|
||||
|
||||
Reference in New Issue
Block a user