Skip to content

Commit

Permalink
Support DxO PureRAW 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sto3014 committed Mar 18, 2022
1 parent c353e85 commit 4d8055c
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 41 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@ Fix installation chapter in README.md
### Changed
### Fixed

## [1.5.1.0] - 2022
## [1.5.1.0] - 2022-01-14
### Added
* New standard filter: Missing photos are excluded.
### Changed
### Fixed
* Fixed missing titles in export filter.
* Fixed error when only missing photos were exported.


## [1.5.2.0] - 2022-03-18
### Added
* Support for DxO PureRAW 2
### Changed
### Fixed
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ _Lightroom Classic_ plug-in which add an export provider for _DxO PureRAW_.

---

* _DxO PureRAW_ 1.X
* _DxO PureRAW_ 1.0 or higher

## Installation

---

1. [Download](https://github.com/sto3014/LRPureRAW/archive/refs/tags/1.5.1.0.zip) the zip archive for version 1.5.1.0.
1. [Download](https://github.com/sto3014/LRPureRAW/archive/refs/tags/1.5.2.0.zip) the zip archive for version 1.5.2.0.
2. Extract the archive in the download folder.
3. Install plug-in
1. On Windows
In Explore goto `Downloads\LRPureRAW-1.5.1.0` and double click `install.bat`.
In Explore goto `Downloads\LRPureRAW-1.5.2.0` and double click `install.bat`.
2. On macOS
Open a terminal window, change to `Downloads/LRPureRAW-1.5.1.0` and execute `install.sh`:
Open a terminal window, change to `Downloads/LRPureRAW-1.5.2.0` and execute `install.sh`:
```
-> ~ cd Downloads/LRPureRAW-1.5.1.0
-> ~ cd Downloads/LRPureRAW-1.5.2.0
-> ./install.sh
```
4. Restart Lightroom
Expand Down Expand Up @@ -218,13 +218,16 @@ In this section the paths for the _DxO PureRAW_ executable are defined.
* On Windows
* DxO PureRAW Executable
Path to the exe file. The default value is `C:\Program Files\DxO\DxO PureRAW\PureRawv1.exe`
Path to the exe file. The default value is `C:\Program Files\DxO\DxO PureRAW 2\PureRawv2.exe` for DxO Pure RAW 2
or `C:\Program Files\DxO\DxO PureRAW\PureRawv1.exe` for DxO PureRAW 1 and 1.5.
If DxO PureRAW was installed in a different place you have to select the executable by yourself.
* On macOS
* DxO PureRAW Application Path to the application. The default value is `/Applications/DxO PureRAW.app`
If DxO PureRAW was installed in a different place you have to select the executable by yourself.
* DxO PureRAW Application Path to the application. The default value is `/Applications/DxO PureRAW 2.app` for DxO
Pure RAW 2 or `/Applications/DxO PureRAW.app` for DxO PureRAW 1 and 1.5.
If DxO PureRAW was installed in a different place you have to select the path by yourself.
* DxO PureRAW Executable
The name of the executable. The default value is `PureRawv1`
The name of the executable. The default value is `PureRawv2` respectively `PureRawv1`. Normally there is no reason
to change it.
### Set after export
Expand Down Expand Up @@ -296,8 +299,8 @@ The `Filter for valid photos` register defines 4 filter options:
`Software`. If the value is `DxO PureRAW` it will be rejected.
This filter is always set to true, and you can't change it. It is displayed just for clearness.
* Exclude missing photos
Photos which are not available are excluded. For some kind of export Smart Previews are enough, but we need
the RAW file of course. This filter is always active, and you can't change it. It is displayed just for clearness.
Photos which are not available are excluded. For some kind of export Smart Previews are enough, but we need the RAW
file of course. This filter is always active, and you can't change it. It is displayed just for clearness.
* Exclude virtual copies
Maybe you do not want that a virtual copy is exported, because you prefer another workflow:
* process the original photo
Expand Down
2 changes: 1 addition & 1 deletion install.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
set SCRIPT_DIR=%~dp0
set VERSION=1.5.1.0
set VERSION=1.5.2.0
::
powershell -command "Expand-Archive -Force '%SCRIPT_DIR%target\LRPureRAW%VERSION%_win.zip' '%HOMEDRIVE%%HOMEPATH%'"
pause
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
cd "$(dirname "$0")"
export SCRIPT_DIR="$(pwd)"
export VERSION=1.5.1.0
export VERSION=1.5.2.0

cd $SCRIPT_DIR/target
echo Extract files to ~:
Expand Down
2 changes: 1 addition & 1 deletion package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export TARGET_DIR_MAC="$SCRIPT_DIR/target/mac/Library/Application Support/Adobe/
export TARGET_DIR_WIN="$SCRIPT_DIR/target/win/AppData/Roaming/Adobe/Lightroom"
export SOURCE_DIR=$SCRIPT_DIR/src/main/lua/$PACKAGE_NAME.lrdevplugin
export RESOURCE_DIR=$SCRIPT_DIR/res
export VERSION=1.5.1.0
export VERSION=1.5.2.0
#
# mac
#
Expand Down
2 changes: 1 addition & 1 deletion src/main/lua/lrpureraw.lrdevplugin/Info.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ return {
id = "at.homebrew.lrpureraw", -- unique identifier for export filter
},

VERSION = { major = 1, minor = 5, revision = 1, build = 0, },
VERSION = { major = 1, minor = 5, revision = 2, build = 0, },

}
9 changes: 6 additions & 3 deletions src/main/lua/lrpureraw.lrdevplugin/InfoProvider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ local LrFileUtils = import("LrFileUtils")
--[[----------------------------------------------------------------------------
-----------------------------------------------------------------------------]]
local logger = require("Logger")
local utils = require("Utils")


local InfoProvider = {}

Expand Down Expand Up @@ -64,6 +66,7 @@ function InfoProvider.sectionsForTopOfDialog(f, _)
prefs.PureRawPath = pureRawPath[1]
prefs.PureRawExe = LrPathUtils.leafName(pureRawPath[1])
prefs.PureRawDir = LrPathUtils.parent(pureRawPath[1])
prefs.PureRawVersion = utils.getPureRawVersion(prefs.PureRawDir)
end
end
})
Expand Down Expand Up @@ -246,9 +249,9 @@ function InfoProvider.sectionsForTopOfDialog(f, _)
if type(pureRawDir) == "table" and #pureRawDir > 0 then
if (pureRawDir[1]:sub(-#".app") == ".app") then
prefs.PureRawDir = pureRawDir[1]
local version = getPureRawVersion(prefs.PureRawDir)
logger.trace("version=" .. tostring(version))
prefs.PureRawExe = "PureRawv" .. version
prefs.PureRawVersion = utils.getPureRawVersion(prefs.PureRawDir)
logger.trace("version=" .. tostring(prefs.PureRawVersion ))
prefs.PureRawExe = "PureRawv" .. prefs.PureRawVersion
prefs.PureRawPath = prefs.PureRawDir .. "/Contents/MacOS/" .. prefs.PureRawExe
logger.trace(prefs.PureRawPath)
if LrFileUtils.exists(prefs.PureRawPath) ~= "file" then
Expand Down
51 changes: 37 additions & 14 deletions src/main/lua/lrpureraw.lrdevplugin/InitProvider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ local LrDialogs = import "LrDialogs"
--[[----------------------------------------------------------------------------
-----------------------------------------------------------------------------]]
local logger = require("Logger")
local utils = require("Utils")

local currentPrefs = { ["PureRawDir"] = true,
["PureRawExe"] = true,
["PureRawPath"] = true,
["PureRawVersion"] = true,
["excludeAlreadyProcessed"] = true,
["excludeMissing"] = true,
["excludeNoneDNG"] = true,
Expand All @@ -30,6 +32,7 @@ local currentPrefs = { ["PureRawDir"] = true,
["scriptBeforeExecute"] = true,
["scriptBeforePath"] = true }


--[[----------------------------------------------------------------------------
-----------------------------------------------------------------------------]]
function init()
Expand Down Expand Up @@ -65,6 +68,7 @@ function init()
prefs.PureRawDir = '/Applications/DxO PureRAW 2.app'
prefs.PureRawExe = "PureRawv2"
prefs.PureRawPath = prefs.PureRawDir .. "/Contents/MacOS/" .. prefs.PureRawExe
prefs.PureRawVersion=2
if (LrFileUtils.exists(prefs.PureRawPath) ~= "file") then
for i = 5, 1, -1 do
local tempPath
Expand All @@ -81,6 +85,7 @@ function init()
prefs.PureRawExe = tempExe
prefs.PureRawPath = tempPath
prefs.PureRawDir = tempDir
prefs.PureRawVersion= tostring(i)
break
end
end
Expand All @@ -90,23 +95,35 @@ function init()
--
-- Windows
--
if prefs.PureRawPath == nil or prefs.PureRawPath:len() == 0 then
pureRawDir = 'C:\\Program Files\\DxO\\DxO PureRAW'
prefs.PureRawDir = pureRawDir
end
if (prefs.PureRawExe == nil or prefs.PureRawExe:len() == 0) then
prefs.PureRawExe = "PureRawv1.exe"
end
prefs.PureRawPath = prefs.PureRawDir .. "\\" .. prefs.PureRawExe
if (LrFileUtils.exists(prefs.PureRawPath) ~= "file") then
for i = 1, 5, 1 do
local tempPath = prefs.PureRawDir .. "\\" .. "PureRawv" .. tostring(i) .. ".exe"
if (LrFileUtils.exists(tempPath) == "file") then
prefs.PureRawExe = "PureRawv" .. tostring(i) .. ".exe"
prefs.PureRawPath = tempPath
if (prefs.PureRawPath == nil or prefs.PureRawPath:len() == 0) then
-- Default values since 18.03.2022
prefs.PureRawDir = "C:\\Program Files\\DxO\\DxO PureRAW 2"
prefs.PureRawExe = "PureRawv2.exe"
prefs.PureRawPath = prefs.PureRawDir .. "\\" .. prefs.PureRawExe
prefs.PureRawVersion=2
if (LrFileUtils.exists(prefs.PureRawPath) ~= "file") then
for i = 5, 1, -1 do
local tempPath
local tempExe
local tempDir
tempExe = "PureRawv" .. tostring(i) .. ".exe"
if ( i == 1 ) then
tempDir = "C:\\Program Files\\DxO\\DxO PureRAW"
else
tempDir = "C:\\Program Files\\DxO\\DxO PureRAW " .. tostring(i)
end
tempPath = tempDir .. "\\" .. tempExe
if (LrFileUtils.exists(tempPath) == "file") then
prefs.PureRawExe = tempExe
prefs.PureRawPath = tempPath
prefs.PureRawDir = tempDir
prefs.PureRawVersion= tostring(i)
break
end
end
end
end

end

if (prefs.PureRawPath == nil or prefs.PureRawPath:len() == 0 or LrFileUtils.exists(prefs.PureRawPath) ~= "file") then
Expand All @@ -116,6 +133,12 @@ function init()
prefs.hasErrors = true
end

if (prefs.PureRawVersion == nil or prefs.PureRawVersion:len() ==0) then
if ( prefs.PureRawDir ~= nil and prefs.PureRawDir:len() >0) then
prefs.PureRawVersion = utils.getPureRawVersion(prefs.PureRawDir)
end
end

if (prefs.hasErrors) then
logger.trace("Has errors: \n" .. errorMessage)
LrDialogs.message(LOC("$$$/LRPurePath/Init/Failed=PureRaw could not be initialised."), LOC("$$$/LRPurePath/Settings/BadSettings/message=One more more settings have wrong values:^1", errorMessage), "critical")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,14 @@ local function initExportProgress()
-------------------------------------------------------------------------------]]
local function initExportProgress(exportContext)
logger.trace("initExportProgress() start")

local prefs = LrPrefs.prefsForPlugin()
local exportSession = exportContext.exportSession
local exportSettings = assert(exportContext.propertyTable)
local nPhotos = exportSession:countRenditions()
local progressScope = exportContext:configureProgress {
title = nPhotos > 1 and
LOC("$$$/LRPurePath/ProgressMany=Export ^1 photos for DxO PureRAW", nPhotos)
or LOC "$$$/LRPurePath/ProgressOne=Export one photo for DxO PureRAW",
LOC("$$$/LRPurePath/ProgressMany=Export ^1 photos for DxO PureRAW ^2", nPhotos, prefs.PureRawVersion)
or LOC("$$$/LRPurePath/ProgressOne=Export one photo for DxO PureRAW ^1",prefs.PureRawVersion)
}
logger.trace("Export format is " .. exportSettings.LR_format)
logger.trace("Renditions: " .. exportSession:countRenditions())
Expand Down
4 changes: 2 additions & 2 deletions src/main/lua/lrpureraw.lrdevplugin/TranslatedStrings_de.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"$$$/LRPureRaw/Reset/label=Farbmarkierung"
"$$$/LRPureRaw/Reset/pickstatus=Markierung"
"$$$/LRPureRaw/Reset/rating=Bewertung"
"$$$/LRPurePath/ProgressMany=Exportiere ^1 Fotos für DxO PureRAW"
"$$$/LRPurePath/ProgressOne=Exportiere ein Foto für DxO PureRAW"
"$$$/LRPurePath/ProgressMany=Exportiere ^1 Fotos für DxO PureRAW ^2"
"$$$/LRPurePath/ProgressOne=Exportiere ein Foto für DxO PureRAW ^1"
"$$$/LRPureRaw/Settings/ScriptsTitle=Scripts:"
"$$$/LRPureRaw/Settings/ScriptBeforeTitle=Vor Export"
"$$$/LRPureRaw/Settings/ScriptBeforeExecuteTitle=Ausführen"
Expand Down
4 changes: 2 additions & 2 deletions src/main/lua/lrpureraw.lrdevplugin/TranslatedStrings_en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"$$$/LRPureRaw/Reset/label=Color Label"
"$$$/LRPureRaw/Reset/pickstatus=Flag"
"$$$/LRPureRaw/Reset/rating=Rating"
"$$$/LRPurePath/ProgressMany=Export ^1 photos to DxO PureRAW"
"$$$/LRPurePath/ProgressOne=Export one photo to DxO PureRAW"
"$$$/LRPurePath/ProgressMany=Export ^1 photos to DxO PureRAW ^2"
"$$$/LRPurePath/ProgressOne=Export one photo to DxO PureRAW ^1"
"$$$/LRPureRaw/Settings/ScriptsTitle=Scripts:"
"$$$/LRPureRaw/Settings/ScriptBeforeTitle=Before export"
"$$$/LRPureRaw/Settings/ScriptBeforeExecuteTitle=Execute"
Expand Down
15 changes: 15 additions & 0 deletions src/main/lua/lrpureraw.lrdevplugin/Utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,19 @@ function Utils.ends_with(str, ending)
end
--[[----------------------------------------------------------------------------
-----------------------------------------------------------------------------]]
function Utils.getPureRawVersion(pureRawDir)
local version
if (MAC_ENV) then
version = string.sub(pureRawDir, -5, -5)
else
version = string.sub(pureRawDir, -1, -1)
end
if (version ~= "W") then
return version
else
return 1
end
end
--[[----------------------------------------------------------------------------
-----------------------------------------------------------------------------]]
return Utils

0 comments on commit 4d8055c

Please sign in to comment.