diff --git a/rtdata/CMakeLists.txt b/rtdata/CMakeLists.txt index 93aad1c70..fdbda3a2a 100644 --- a/rtdata/CMakeLists.txt +++ b/rtdata/CMakeLists.txt @@ -17,6 +17,28 @@ else (WIN32) set(OPTIONSFILE "options/options.lin") endif (WIN32) +if (WIN32) + find_file(HG_CMD hg.exe HINTS ENV Path PATH_SUFFIXES ../) + # Fail if Mercurial is not installed + if (HG_CMD STREQUAL HG_CMD-NOTFOUND) + message(FATAL_ERROR "hg command not found!") + else (HG_CMD STREQUAL HG_CMD-NOTFOUND) + message(STATUS "hg command found: ${HG_CMD}") + execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttag} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttagdistance} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_TAGDISTANCE OUTPUT_STRIP_TRAILING_WHITESPACE) + endif (HG_CMD STREQUAL HG_CMD-NOTFOUND) + + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + set(BUILD_BIT_DEPTH 32) + set(ARCHITECTURE_ALLOWED x86) + elseif (CMAKE_SIZEOF_VOID_P EQUAL 8) + set(BUILD_BIT_DEPTH 64) + set(ARCHITECTURE_ALLOWED x64) + endif (CMAKE_SIZEOF_VOID_P EQUAL 4) + configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/win/InnoSetup/WindowsInnoSetup.iss.in" "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss") + install (FILES "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss" DESTINATION ${BINDIR}) +endif (WIN32) + if (UNIX) configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/icons/rawtherapee.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop") install (FILES "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop" DESTINATION ${DESKTOPDIR}) @@ -40,6 +62,10 @@ install (DIRECTORY ${IMAGESDIR} DESTINATION "${DATADIR}" FILES_MATCHING PATTERN install (DIRECTORY ${IMAGESDIR} DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "*.png") install (FILES ${OPTIONSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ RENAME options) +if (WIN32) + install (FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1") +endif (WIN32) + if (APPLE) # CMake escapes first item quote character. Do not remove 'DUMMY_VARIABLE='. set (MACOSX_BUNDLE_COMMAND DUMMY_VARIABLE= diff --git a/rtdata/win/InnoSetup/WindowsInnoSetup.iss.in b/rtdata/win/InnoSetup/WindowsInnoSetup.iss.in new file mode 100644 index 000000000..a5a142491 --- /dev/null +++ b/rtdata/win/InnoSetup/WindowsInnoSetup.iss.in @@ -0,0 +1,126 @@ +; Script initially generated by the Inno Setup Script Wizard +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + + + +; This script has to be used by "INNO Setup" (http://www.jrsoftware.org/) to create a setup executable. +; When the "make install" process ends, you can double click on this file to load it into +; INNO Setup, then execute it to create the archive. It expect to find all the dependency libs +; in the root destination folder (the one of the 'make install' process), and the usual 'lib' directory. +; Please note that all *.dll files will be added, so be carefull on which dll are present in the directory +; before compiling the INNO Setup script. +; +; It also search for and bundles all "rawtherapee*.exe" files, which mean that you can bundle a Release and +; a Debug build at the same time (for conveniency), but official downloads must only contain the Release +; version. +; +; In all cases, you have to bundle at least one file named "rawtherapee.exe", which INNO Setup will require +; as a default executable to run. +; +; This script is configured to check that the operating system's bit depth is the same than the executable file. +; Please note that the ia64 architecture is not supported (is it really necessary?) + + + +#define MyAppName "RawTherapee" +#define MyAppVersion "${HG_VERSION}" +#define MyAppFullVersion "${HG_VERSION}.${HG_TAGDISTANCE}" +#define MyAppPublisher "rawtherapee.com" +#define MyAppURL "http://www.rawtherapee.com/" +#define MyAppExeName "rawtherapee.exe" +#define MyBuildBasePath "${CMAKE_INSTALL_PREFIX}" +#define MySourceBasePath "${PROJECT_SOURCE_DIR}" +#define MyBitDepth "${BUILD_BIT_DEPTH}" +#define MyTargetArchitecture "${ARCHITECTURE_ALLOWED}" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. +; Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{128459AB-59A7-430A-8BD0-3D8803D50400} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +VersionInfoVersion={#MyAppFullVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={pf}\{#MyAppName} {#MyAppFullVersion} +DefaultGroupName={#MyAppName} {#MyAppFullVersion} +AllowNoIcons=yes +LicenseFile={#MyBuildBasePath}\LICENSE.txt +OutputDir={#MyBuildBasePath}\..\ +OutputBaseFilename={#MyAppName}{#MyAppVersion}-Win{#MyBitDepth} +SetupIconFile={#MySourceBasePath}\rtgui\RT.ico +WizardImageFile={#MySourceBasePath}\rtdata\win\InnoSetup\installerStrip.bmp +WizardImageBackColor=$2A2A2A +Compression=lzma +SolidCompression=yes +ArchitecturesAllowed={#MyTargetArchitecture} +ArchitecturesInstallIn64BitMode=x64 + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" +Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl" +Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl" +Name: "corsican"; MessagesFile: "compiler:Languages\Corsican.isl" +Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl" +Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl" +Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl" +Name: "finnish"; MessagesFile: "compiler:Languages\Finnish.isl" +Name: "french"; MessagesFile: "compiler:Languages\French.isl" +Name: "german"; MessagesFile: "compiler:Languages\German.isl" +Name: "greek"; MessagesFile: "compiler:Languages\Greek.isl" +Name: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl" +Name: "hungarian"; MessagesFile: "compiler:Languages\Hungarian.isl" +Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl" +Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl" +Name: "nepali"; MessagesFile: "compiler:Languages\Nepali.islu" +Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl" +Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl" +Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl" +Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" +Name: "serbiancyrillic"; MessagesFile: "compiler:Languages\SerbianCyrillic.isl" +Name: "serbianlatin"; MessagesFile: "compiler:Languages\SerbianLatin.isl" +Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl" +Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" +Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +;Name: "desktopicon\common"; Description: "For all users"; GroupDescription: "Additional icons:"; Flags: exclusive +;Name: "desktopicon\user"; Description: "For the current user only"; GroupDescription: "Additional icons:"; Flags: exclusive unchecked +Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1 + +[Files] +Source: "{#MyBuildBasePath}\rawtherapee.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyBuildBasePath}\dcpprofiles\*"; DestDir: "{app}\dcpprofiles\"; Flags: ignoreversion recursesubdirs createallsubdirs +;Source: "{#MyBuildBasePath}\etc\*"; DestDir: "{app}\etc\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#MyBuildBasePath}\iccprofiles\*"; DestDir: "{app}\iccprofiles\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#MyBuildBasePath}\images\*"; DestDir: "{app}\images\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#MyBuildBasePath}\languages\*"; DestDir: "{app}\languages\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#MyBuildBasePath}\lib\*"; DestDir: "{app}\lib\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#MyBuildBasePath}\profiles\*"; DestDir: "{app}\profiles\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#MyBuildBasePath}\sounds\*"; DestDir: "{app}\sounds\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#MyBuildBasePath}\themes\*"; DestDir: "{app}\themes\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#MyBuildBasePath}\AboutThisBuild.txt"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyBuildBasePath}\AUTHORS.txt"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyBuildBasePath}\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyBuildBasePath}\RELEASE_NOTES.txt"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyBuildBasePath}\options"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyBuildBasePath}\*.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyBuildBasePath}\gspawn-win{#MyBitDepth}-helper.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyBuildBasePath}\gspawn-win{#MyBitDepth}-helper-console.exe"; DestDir: "{app}"; Flags: ignoreversion +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{group}\{#MyAppName} {#MyAppFullVersion}"; Filename: "{app}\{#MyAppExeName}" +Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" +Name: "{commondesktop}\{#MyAppName}{#MyAppFullVersion}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon +Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName} {#MyAppFullVersion}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent + diff --git a/rtdata/win/InnoSetup/installerStrip.bmp b/rtdata/win/InnoSetup/installerStrip.bmp new file mode 100644 index 000000000..032414c26 Binary files /dev/null and b/rtdata/win/InnoSetup/installerStrip.bmp differ diff --git a/rtdata/win/InnoSetup/installerStrip.svg b/rtdata/win/InnoSetup/installerStrip.svg new file mode 100644 index 000000000..eba47f3ff --- /dev/null +++ b/rtdata/win/InnoSetup/installerStrip.svg @@ -0,0 +1,671 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rtdata/win/readme.txt b/rtdata/win/readme.txt new file mode 100644 index 000000000..f32cdb50a --- /dev/null +++ b/rtdata/win/readme.txt @@ -0,0 +1,14 @@ + +INSTALLER SCRIPTS +----------------- + +This "win" directory includes installer setup mechanisms for Windows 32/64. + +As requested in issue 1904 ( http://code.google.com/p/rawtherapee/issues/detail?id=1904 ), +the preferred choice of setup mechanism is Wix widgets. However an InnoSetup script has been +created before the definitive choice and has been added to the source tree, for convenience. + +Once the Wix setup mechanism will be operational, the InnoSetup can be supressed from the source +tree. + +All discussion about the present document and the setup scripts has to be done in issue 1904. \ No newline at end of file