Bug 146098 - setsdkenv_windows.bat failed with LO directory containing parenthesis ( ex: C:\Program Files (x86)\LibreOffice )
Summary: setsdkenv_windows.bat failed with LO directory containing parenthesis ( ex: C...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-07 15:26 UTC by Marc Le Douarain
Modified: 2025-11-25 15:32 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Le Douarain 2021-12-07 15:26:45 UTC
Description:
The batch setsdk for windows will fail when pointing a LibreOffice directory containing parenthesis.
When installing 32 bits version of LibreOffice (x86), the trouble appears because you have generally to set in setsdkenv_windows.bat
set OFFICE_HOME=C:\Program Files (x86)\LibreOffice
and the batch file doesn't support quotes for directory and trouble later with "if defined xxxx ( ... )" expressions then...


Here what I've done to be able to compile sdk examples, by modifying some lines in file "setsdkenv_windows.bat" (stored for me at "C:\Users\USERNAME\AppData\Roaming\libreoffice7.1_sdk"


REM ***** IF PRESENCE OF PARENTHESES LIKE '(x86)', ADD QUOTES FOR THIS PATH HERE !!!!! *****
set OFFICE_HOME="C:\Program Files (x86)\LibreOffice"

...

REM ***** COMMENT THESES LINES NOT USED ****
REM if defined CPP_WINDOWS_SDK (
REM     set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib
REM  )

...


if defined OFFICE_HOME (
   set UNO_PATH=%OFFICE_PROGRAM_PATH%
 )

REM ***** ADDED HERE TO REMOVE NOW THE TEMPORARY QUOTES IN PATH VARIABLES... *****
set OFFICE_HOME=%OFFICE_HOME:"=%
set OFFICE_PROGRAM_PATH=%OFFICE_PROGRAM_PATH:"=%
set UNO_PATH=%UNO_PATH:"=%

set OO_SDK_URE_BIN_DIR=%OFFICE_PROGRAM_PATH%
set OO_SDK_URE_LIB_DIR=%OFFICE_PROGRAM_PATH%
set OO_SDK_URE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes
set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%
set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH%
set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes


And batch modified like that is working with LibreOffice installed in "C:\Program Files (x86)\LibreOffice" directory !



Actual Results:
set sdk Windows batch launch failed.


Expected Results:
An error appeared when launching the batch file.



Reproducible: Always


User Profile Reset: No



Additional Info:
"Shell prepared for sdk" in the title.
to indicate that sdk examples can now be compiled from it.
Comment 1 Julien Nabet 2021-12-07 20:18:01 UTC
Code pointer odk/config/setsdkenv_windows.bat
(https://opengrok.libreoffice.org/xref/core/odk/config/setsdkenv_windows.bat?r=7d69efd0)

Stephan: thought you might be interested in this one since it concerns SDK moreover the reporter proposes a solution.
Comment 2 Xisco Faulí 2025-03-04 11:26:57 UTC
Hello,
It's been a while since this issue was reported.
Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 3 QA Administrators 2025-09-01 03:12:02 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2025-11-25 15:32:43 UTC
Dear Marc Le Douarain,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp