21 Commits
Author SHA1 Message Date
Hossein a34dcd0325 Prepend instdir/program to the PATH in bin/run
To avoid problems described in 21cf443235,
do not change directory.

Change-Id: I56590c4728a6505c089a5bc06bed2a31a0cd0362
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156973
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-09-20 14:23:33 +02:00
Hossein 140fe3080d Make sure bin/run script finds the correct dlls
On Windows/Cygwin, if you put "C:\Program Files\LibreOffice\program"
in PATH, bin/run will have trouble finding correct vcllo.dll and other
LibreOffice .dll files inside instdir/program. Because the script uses
the absolute path of the executable, it is enough to use instdir/program
as the current working directory.

The symptom was that in the above case it was not possible to run the
workbenches like vcldemo, minvcl, etc. The error was:

$ ./bin/run minvcl

minvcl.exe - Entry Point Not Found | The procedure entry point
?RasterFromBitmap@SKImages@@... could not be located in the dynamic
link library vcllo.dll

$ ldd ./lode/dev/core/workdir/LinkTarget/Executable/minvcl.exe
	...
        comphelper.dll => not found
        fwklo.dll => not found
        i18nlangtag.dll => /cygdrive/c/Program Files/LibreOffice/program/i18nlangtag.dll (?)
        sal3.dll => /cygdrive/c/Program Files/LibreOffice/program/sal3.dll (?)
        vcllo.dll => not found
        MSVCP140D.dll => /cygdrive/c/WINDOWS/SYSTEM32/MSVCP140D.dll (?)
        VCRUNTIME140D.dll => /cygdrive/c/WINDOWS/SYSTEM32/VCRUNTIME140D.dll (?)
        VCRUNTIME140_1D.dll => /cygdrive/c/WINDOWS/SYSTEM32/VCRUNTIME140_1D.dll (?)
        ucrtbased.dll => /cygdrive/c/WINDOWS/SYSTEM32/ucrtbased.dll (?)

Change-Id: I02b6d9aca1062b22a91d5a1f9bce0cf7238a896a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156902
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-09-15 21:24:09 +02:00
Hossein 482264a7c2 Remove extra output from "bin/run -l" on Windows
The previous output contained extra file names other than executables,
but now we limit the output to *.bat and *.exe files.

Change-Id: Ie785d1e4388780b290f6580d02af635279080412
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138556
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-08-20 12:12:19 +02:00
Hossein a6c50882fd Fix "bin/run -l" to work correctly on Windows
On Windows, the script did not run correctly because of the "return"s.
Here, we use "exit" instead.

Also, there were many files with the same name but with different
extensions in the output. Now, we only print out the names using grep,
awk and sort utilities.

In addition, a description for bin/run is added to bin/README.md

Change-Id: Ifb106c89199ebc5a9debf6caef80bd1edf143b20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138514
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-08-19 12:21:16 +02:00
Hossein c2746a6656 Add help and list executables options for bin/run script
bin/run script is described as:

"simple wrapper script to run non-installed executables from workdir".

When the bin/run script was used without parameters, it was generating
error as it could not run the folder workdir/LinkTarget/Executable.
Now, we print usage instructions in this case, or when help is
requested with -h, -help or --help.

Also, now user can get the list of executables with -l, -list or --list.

In normal execution, the script's name is also printed. For example:

$ ./bin/run minvcl
Setting env variables and running workdir/LinkTarget/Executable/minvcl
...

Change-Id: I5c62c300d5247f55d1d1cfd095cecffc979d494b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137626
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-07-30 06:35:50 +02:00
Stephan Bergmann 1b2da574ba bin/run: missing exedir for macOS
...but even the you still get a failure

> $ bin/run vcldemo
> 2019-11-17 10:37:53.159 vcldemo[18891:7736267] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting

Change-Id: I7c11ee5a02c4a71cf3c79dc7b5b180c3e28c059b
Reviewed-on: https://gerrit.libreoffice.org/83015
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-17 13:16:13 +01:00
Jan-Marek Glogowski 78073ecfdc Refactor bin/run
Just merges some common code into setdefaults.

Change-Id: I2ba2c06425bcfe569fa147af713a064a145a2018
Reviewed-on: https://gerrit.libreoffice.org/65367
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-12-19 08:02:27 +01:00
Kacper Kasper 60f1490af9 Buildsystem changes to recognize Haiku.
Change-Id: I219d556f8e124cfe426cc1ac3c54da34eb7ef790
Reviewed-on: https://gerrit.libreoffice.org/49925
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-02-19 12:58:11 +01:00
Caolán McNamara 00657aef09 migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
  MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
  goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
  to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
  mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
  results in inserting the english original so something can be found, now the
  standard fallback of using the english original from the source key is used, so
  partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
   xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
   xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
   content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
      com::sun::star::resource::OfficeResourceLoader
      com::sun::star::resource::XResourceBundleLoader
      com::sun::star::resource::XResourceBundle
    when translating strings via uno apis
      com.sun.star.resource.StringResourceWithLocation
    can continue to be used

Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21 08:20:50 +01:00
Miklos Vajna 6d78caf68c bin/run: fix LO_TRACE on Windows
exedir has to be in the c:/foo form, instead of /cygdrive/c/foo,
otherwise a native wrapper set by LO_TRACE won't understand it.

With this, it's possible to use DrMemory on executables invoked by
bin/run.

Change-Id: I5332342fdbf7d9e4859360dd7fbd3d74c149b2dc
2015-08-14 17:32:51 +02:00
Jan Holesovsky c5bd865ac6 bin/run: Survive files with spaces in filenames.
Change-Id: Ifeeb839f82891057fe8e3e8fd6d537861d99f69f
2015-04-08 00:04:05 +02:00
Miklos Vajna e3cb10c3c5 bin/run: fix indentation
Change-Id: I97d58f0e6780986356479279f91eba46951b1be0
Reviewed-on: https://gerrit.libreoffice.org/14783
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2015-03-07 17:56:44 +00:00
Tor Lillqvist 874fb37294 Make bin/run work better on OS X
The app bundle in instdir is called either LibreOffice.app or
LibreOfficeDev.app.

Change-Id: I2e21656324cc7c52380fc86023bb95c848bb3962
2015-01-19 16:22:37 +02:00
Stephan Bergmann f3c653a138 bin/run LO_TRACE hook
(similar to our CPPUNITTRACE hook)

Change-Id: Iec4e8d4246ba7fca0afe5f9be6f6bcd9e0289e49
2014-12-10 17:25:25 +01:00
Michael Stahl 79233d98d9 bin/run: add WNT support
Change-Id: I9dd1ae23d27c5733770314ca907b5d36b749fd74
2014-12-04 16:09:07 +01:00
Michael Stahl 9eda6b307b bin/run: Adapt to run on Debian so-called GNU/Linux systems too
Amazingly Debian does not ship the realpath(1) from coreutils but has a
separate source package for it, and it's not installed by default.
Use readlink -f instead.

Change-Id: I6e97c851e6ab96dac08771145e2ab39dd9c11c22
2014-12-04 15:35:28 +01:00
Stephan Bergmann 45ca1bfc22 Fold URE: Linux ure/lib/* -> program/
The ../../../program/ links in the URE jar Class-Paths are a temporary kludge
(and juh.jar had lacked adaption for Mac OS X).

Change-Id: I2542d8a582866485dd61c05df3fc6b4b39a8403d
2014-11-28 11:57:28 +01:00
Stephan Bergmann 21cf443235 No need to cd into instdir/program
(and it is confusing if you pass a relative pathname argument to the program
you call via bin/run)

Change-Id: If8baef6d76e1f9ad7e5f2d361bd9b93fcbb76f7a
2014-11-18 15:37:38 +01:00
Michael Stahl 8a8dd1c7d1 bin/run: add a license header
Change-Id: I5461a0d4e372260623ebb8833d60a9dc318757dd
2014-11-17 11:06:50 +01:00
Stephan Bergmann 218840babb Adapt bin/run for OS X
...which does not have realpath(1), so just require CWD to match BUILDDIR there

Change-Id: I245241299d650c541f86cf440d3b57308c86d3fb
2014-11-12 11:11:07 +01:00
Michael Stahl e37837c48b bin/run: add a convenient shell wrapper to run executables from workdir
Change-Id: Ide3361fd5eba6462095cc45c0c99b1ab27a16262
2014-10-31 17:55:14 +01:00