diff --git a/src/main/resources/win/bin/process.bat b/src/main/resources/win/bin/process.bat index cb224e52a..7bf1c98c5 100644 --- a/src/main/resources/win/bin/process.bat +++ b/src/main/resources/win/bin/process.bat @@ -1,2 +1,2 @@ @echo off -CALL "%~dp0..\util\util.bat" :runDataLoader run.mode=batch %* \ No newline at end of file +CALL "%~dp0..\util\util.bat" :runDataLoaderHeadless run.mode=batch %* \ No newline at end of file diff --git a/src/main/resources/win/util/util.bat b/src/main/resources/win/util/util.bat index 0c9de8d8f..9c09f4648 100755 --- a/src/main/resources/win/util/util.bat +++ b/src/main/resources/win/util/util.bat @@ -6,11 +6,19 @@ CALL %* EXIT /b %ERRORLEVEL% :initVars - SET DATALOADER_VERSION=@@FULL_VERSION@@ + SET DATALOADER_VERSION=67.0.0 FOR /f "tokens=1 delims=." %%a IN ("%DATALOADER_VERSION%") DO ( SET DATALOADER_SHORT_VERSION=%%a ) - SET MIN_JAVA_VERSION=@@MIN_JAVA_VERSION@@ + SET MIN_JAVA_VERSION=17 + rem Set ClassPath for headless win32 compatibility + set SWT_VERSION=4.36 + if /i "%PROCESSOR_ARCHITECTURE%"=="ARM64" ( + set "SWT_JAR=swtwin32_aarch64-%SWT_VERSION%.jar" + ) else ( + set "SWT_JAR=swtwin32_x86_64-%SWT_VERSION%.jar" + ) + set DATALOADER_HEADLESS_CP=%SWT_JAR%;dataloader-%DATALOADER_VERSION%.jar EXIT /b 0 :checkJavaVersion @@ -50,12 +58,17 @@ EXIT /b %ERRORLEVEL% echo ^ echo. EXIT -1 - + :runDataLoader CALL :checkJavaVersion java --enable-native-access=ALL-UNNAMED -cp "%~dp0..\*" com.salesforce.dataloader.process.DataLoaderRunner %* EXIT /b %ERRORLEVEL% +:runDataLoaderHeadless + CALL :checkJavaVersion + java -Djava.awt.headless=true --enable-native-access=ALL-UNNAMED -cp "%~dp0..\%DATALOADER_HEADLESS_CP%" com.salesforce.dataloader.process.DataLoaderRunner %* + EXIT /b %ERRORLEVEL% + REM Shortcut files have .lnk extension :CreateShortcut powershell -Command "$WshShell = New-Object -comObject WScript.Shell; $Shortcut = $WshShell.CreateShortcut(""""%~1""""); $Shortcut.WorkingDirectory = """"%~2""""; $Shortcut.TargetPath = """"%~2\dataloader.bat""""; $Shortcut.IconLocation = """"%~2\dataloader.ico""""; $Shortcut.WindowStyle=7; $Shortcut.Save()"