Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/resources/win/bin/process.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
CALL "%~dp0..\util\util.bat" :runDataLoader run.mode=batch %*
CALL "%~dp0..\util\util.bat" :runDataLoaderHeadless run.mode=batch %*
19 changes: 16 additions & 3 deletions src/main/resources/win/util/util.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -50,12 +58,17 @@ EXIT /b %ERRORLEVEL%
echo ^<full path to the JRE installation folder^>
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()"
Expand Down