Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1057 from solita/feature/ae-2042-et-sign-in-windows
Browse files Browse the repository at this point in the history
Feature/ae 2042 et sign in windows
  • Loading branch information
muep authored Dec 8, 2023
2 parents 2a0d5d5 + e4660c4 commit d4f39a0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
mpollux:
image: nginx
ports:
- 127.0.0.1:53952:443
- 127.0.0.1:53952:8443
volumes:
- type: bind
source: ./mpollux/api
Expand Down
4 changes: 2 additions & 2 deletions docker/mpollux/conf.d/default.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
server {
listen 443 ssl;
listen [::]:443;
listen 8443 ssl;
listen [::]:8443;
server_name localhost;

ssl_certificate /keys/localhost.crt;
Expand Down
21 changes: 15 additions & 6 deletions etp-backend/src/main/clj/solita/common/libreoffice.clj
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,19 @@
"--headless"
args)))

(defn run-with-args [& args]
(let [tmpdir (make-tmpdir)]
(try
(populate-tmpdir tmpdir)
(exec-libreoffice tmpdir args)
(finally (rm-path tmpdir)))))
(defn exec-libreoffice-on-windows [args]
;; On windows, it seems to be difficult to get the UserInstallation parameter
;; to work at all. Because this is strictcly a development situation, we
;; ignore the usual need of having a per-process configuration. Instead, we
;; expect the developer to not run multiple PDF generaion operations
;; concurrently
(apply shell/sh "C:\\Program Files\\LibreOffice\\program\\soffice.bin" "--headless" args))

(defn run-with-args [& args]
(if (-> "os.name" System/getProperty (.startsWith "Windows "))
(exec-libreoffice-on-windows args)
(let [tmpdir (make-tmpdir)]
(try
(populate-tmpdir tmpdir)
(exec-libreoffice tmpdir args)
(finally (println (str 'rm-path tmpdir)))))))

0 comments on commit d4f39a0

Please sign in to comment.