View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009561 | Scribus | Build System | public | 2010-12-08 13:30 | 2010-12-08 14:00 |
Reporter | ale | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | no change required | ||
Product Version | 1.5.0 | ||||
Summary | 0009561: compile on windows | ||||
Description | taken from the mailing list: hi all. i'm compiling trunk version of scribus on windows. please find attached the patch with changes i had to make in order to do that. i changed install path so that it wouldn't contain spaces, which visual studio 2005 (or cmake generator for it) doesn't like. also, i think it will be interesting for you that i got most of the dependencies from KDE-windows installer. i had to remove FindTIFF.cmake and FindPNG.cmake from scribus/cmake/modules and replace FindLCMS.cmake with the one from KDE folder. i got cairo from http://www.gtk.org/download-windows.html and used the following cmake command: cmake .. -DLIBPODOFO_SHARED=0 -DPREFIX_CAIRO=D:\Scribus\cairo my intention is to write instructions for compiling using KDE installer on your wiki, beside from http://wiki.scribus.net/index.php/Building_Scribus_on_Windows e.g. http://wiki.scribus.net/index.php/Building_Scribus_on_Windows_with_KDE-Windows-Installer please say what's your opinion on that ??????? ?????????? <shafff@ukr.net> | ||||
Tags | No tags attached. | ||||
Patch | |||||
|
windows-compile.patch (6,539 bytes)
Index: CMakeLists.txt =================================================================== --- CMakeLists.txt (revision 15832) +++ CMakeLists.txt (working copy) @@ -6,6 +6,13 @@ #Require 2.4.3 for moc change detection and rpath updates for custom cairo install CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR) +IF(WIN32) + SET(SCRIBUS_INSTALL_PREFIX "C:/") +ELSE(WIN32) + SET(SCRIBUS_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) +ENDIF(WIN32) + + #IF(WIN32) # IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.6) # MESSAGE(FATAL_ERROR "Windows builds require CMake 2.6") @@ -88,7 +95,7 @@ IF (VERSION_SUFFIX) SET (VERSION ${VERSION}.${VERSION_SUFFIX}) ENDIF (VERSION_SUFFIX) -MESSAGE(STATUS "Scribus ${VERSION} will be built to install into ${CMAKE_INSTALL_PREFIX}") +MESSAGE(STATUS "Scribus ${VERSION} will be built to install into ${SCRIBUS_INSTALL_PREFIX}") #Set the permissions to be used when installing plugins SET(PLUGIN_PERMISSIONS WORLD_EXECUTE GROUP_EXECUTE OWNER_EXECUTE WORLD_READ GROUP_READ OWNER_READ OWNER_WRITE) @@ -217,19 +224,19 @@ ########## Install/Directory Setup ########## IF (APPLEBUNDLE) - IF ("${CMAKE_INSTALL_PREFIX}" MATCHES "[.]app/Contents/?$") + IF ("${SCRIBUS_INSTALL_PREFIX}" MATCHES "[.]app/Contents/?$") # all ok - ELSE ("${CMAKE_INSTALL_PREFIX}" MATCHES "[.]app/Contents/?$") - IF ("${CMAKE_INSTALL_PREFIX}" MATCHES "[.]app/?$") + ELSE ("${SCRIBUS_INSTALL_PREFIX}" MATCHES "[.]app/Contents/?$") + IF ("${SCRIBUS_INSTALL_PREFIX}" MATCHES "[.]app/?$") # add "/Contents" subpath - SET(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/Contents") - ELSE ("${CMAKE_INSTALL_PREFIX}" MATCHES "[.]app/?$") + SET(SCRIBUS_INSTALL_PREFIX "${SCRIBUS_INSTALL_PREFIX}/Contents") + ELSE ("${SCRIBUS_INSTALL_PREFIX}" MATCHES "[.]app/?$") # no bundle name spcified, use appname and version - SET(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/Scribus${VERSION}.app/Contents") - ENDIF ("${CMAKE_INSTALL_PREFIX}" MATCHES "[.]app/?$") - ENDIF ("${CMAKE_INSTALL_PREFIX}" MATCHES "[.]app/Contents/?$") + SET(SCRIBUS_INSTALL_PREFIX "${SCRIBUS_INSTALL_PREFIX}/Scribus${VERSION}.app/Contents") + ENDIF ("${SCRIBUS_INSTALL_PREFIX}" MATCHES "[.]app/?$") + ENDIF ("${SCRIBUS_INSTALL_PREFIX}" MATCHES "[.]app/Contents/?$") - MESSAGE(STATUS "APPLEBUNDLE install prefix: ${CMAKE_INSTALL_PREFIX}") + MESSAGE(STATUS "APPLEBUNDLE install prefix: ${SCRIBUS_INSTALL_PREFIX}") ENDIF (APPLEBUNDLE) @@ -238,7 +245,7 @@ CMAKE_POLICY(SET CMP0005 OLD) SET(MANDIR "share/man/") SET(SHAREDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/") -ADD_DEFINITIONS("-DSHAREDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SHAREDIR}\\\"") +ADD_DEFINITIONS("-DSHAREDIR=\\\"${SCRIBUS_INSTALL_PREFIX}/${SHAREDIR}\\\"") #SHARE - use the default on Apple as TAG_VERSION is empty IF(WIN32 OR OS2) @@ -250,7 +257,7 @@ SET(DOCDIR "share/doc/${MAIN_DIR_NAME}-${VERSION}/") ENDIF (TAG_VERSION OR BUILD_OSX_BUNDLE) ENDIF (WIN32 OR OS2) -ADD_DEFINITIONS("-DDOCDIR=\\\"${CMAKE_INSTALL_PREFIX}/${DOCDIR}\\\"") +ADD_DEFINITIONS("-DDOCDIR=\\\"${SCRIBUS_INSTALL_PREFIX}/${DOCDIR}\\\"") #ICON IF(WIN32) @@ -258,15 +265,15 @@ ELSE(WIN32) SET(ICONDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/icons/") ENDIF(WIN32) -ADD_DEFINITIONS("-DICONDIR=\\\"${CMAKE_INSTALL_PREFIX}/${ICONDIR}\\\"") +ADD_DEFINITIONS("-DICONDIR=\\\"${SCRIBUS_INSTALL_PREFIX}/${ICONDIR}\\\"") #SAMPLES SET(SAMPLESDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/samples/") -ADD_DEFINITIONS("-DSAMPLESDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SAMPLESDIR}\\\"") +ADD_DEFINITIONS("-DSAMPLESDIR=\\\"${SCRIBUS_INSTALL_PREFIX}/${SAMPLESDIR}\\\"") #SCRIPTS SET(SCRIPTSDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/scripts/") -ADD_DEFINITIONS("-DSCRIPTSDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SCRIPTSDIR}\\\"") +ADD_DEFINITIONS("-DSCRIPTSDIR=\\\"${SCRIBUS_INSTALL_PREFIX}/${SCRIPTSDIR}\\\"") #TEMPLATES IF(WIN32) @@ -274,11 +281,11 @@ ELSE(WIN32) SET(TEMPLATEDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/templates/") ENDIF(WIN32) -ADD_DEFINITIONS("-DTEMPLATEDIR=\\\"${CMAKE_INSTALL_PREFIX}/${TEMPLATEDIR}\\\"") +ADD_DEFINITIONS("-DTEMPLATEDIR=\\\"${SCRIBUS_INSTALL_PREFIX}/${TEMPLATEDIR}\\\"") #DESKTOP SET(DESKTOPDIR "share/applications/") -ADD_DEFINITIONS("-DDESKTOPDIR=\\\"${CMAKE_INSTALL_PREFIX}/${DESKTOPDIR}\\\"") +ADD_DEFINITIONS("-DDESKTOPDIR=\\\"${SCRIBUS_INSTALL_PREFIX}/${DESKTOPDIR}\\\"") # APPLICATION_DATA_DIR # It allows specify the user configuration directory in the compile time. @@ -301,7 +308,7 @@ ENDIF(WANT_LIB64) SET(LIB_DIR_NAME "lib${LIB_SUFFIX}") SET(LIBDIR "${LIB_DIR_NAME}/${MAIN_DIR_NAME}${TAG_VERSION}/") -ADD_DEFINITIONS("-DLIBDIR=\\\"${CMAKE_INSTALL_PREFIX}/${LIBDIR}\\\"") +ADD_DEFINITIONS("-DLIBDIR=\\\"${SCRIBUS_INSTALL_PREFIX}/${LIBDIR}\\\"") #PLUGINS IF(WIN32) @@ -309,7 +316,7 @@ ELSE(WIN32) SET(PLUGINDIR "${LIB_DIR_NAME}/${MAIN_DIR_NAME}${TAG_VERSION}/plugins/") ENDIF(WIN32) -ADD_DEFINITIONS("-DPLUGINDIR=\\\"${CMAKE_INSTALL_PREFIX}/${PLUGINDIR}\\\"") +ADD_DEFINITIONS("-DPLUGINDIR=\\\"${SCRIBUS_INSTALL_PREFIX}/${PLUGINDIR}\\\"") #INCLUDE SET(INCLUDEDIR "include/${MAIN_DIR_NAME}${TAG_VERSION}/") @@ -861,12 +868,12 @@ IF(APPLEBUNDLE) INSTALL(FILES Scribus.app/Contents/Info.plist - DESTINATION ${CMAKE_INSTALL_PREFIX} + DESTINATION ${SCRIBUS_INSTALL_PREFIX} ) INSTALL(FILES Scribus.app/Contents/Resources/Scribus.icns Scribus.app/Contents/Resources/Scribus-doc.icns - DESTINATION ${CMAKE_INSTALL_PREFIX}/Resources + DESTINATION ${SCRIBUS_INSTALL_PREFIX}/Resources ) ENDIF(APPLEBUNDLE) Index: scribus/scimgdataloader_pgf.cpp =================================================================== --- scribus/scimgdataloader_pgf.cpp (revision 15832) +++ scribus/scimgdataloader_pgf.cpp (working copy) @@ -195,7 +195,12 @@ } } pgfImg.Close(); +#ifdef WIN32 + CloseHandle(fd); +#else close(fd); +#endif + m_imageInfoRecord.type = ImageTypeOther; m_imageInfoRecord.exifDataValid = false; float xres = m_image.dotsPerMeterX() * 0.0254; Index: scribus/scpaths.cpp =================================================================== --- scribus/scpaths.cpp (revision 15832) +++ scribus/scpaths.cpp (working copy) @@ -43,8 +43,7 @@ // Singleton's public destructor void ScPaths::destroy() { - if (ScPaths::m_instance) - delete ScPaths::m_instance; + delete ScPaths::m_instance; } // Protected "real" constructor |
|
1) There is no need of a single patch to build scribus on Windows. If that was the case, they would already have been commited to trunk. 2) no need to use another variable to redefine CMAKE_INSTALL_PREFIX, it can be defined on cmake command line if needed 3) It's not even needed to use cmake, visual studio projects for msvc 2005 are already available on Scribus\win32\vc8 directory However no problem if someone create instructions on wiki for creating a Scribus build based on KDE libraries. But having to install KDE just to build scribus on Windows is just overkill. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-12-08 13:30 | ale | New Issue | |
2010-12-08 13:30 | ale | File Added: windows-compile.patch | |
2010-12-08 14:00 | jghali | Note Added: 0024995 | |
2010-12-08 14:00 | jghali | Status | new => resolved |
2010-12-08 14:00 | jghali | Resolution | open => no change required |
2010-12-08 14:00 | jghali | Assigned To | => jghali |
2010-12-08 14:00 | jghali | Status | resolved => closed |