diff --git a/win-linux/package/linux/Makefile b/win-linux/package/linux/Makefile index 30289d80d..c0f7a25c7 100644 --- a/win-linux/package/linux/Makefile +++ b/win-linux/package/linux/Makefile @@ -156,6 +156,9 @@ ifneq ($(COMPANY_NAME), ONLYOFFICE) M4_PARAMS += -D M4_MEDIAVIEWER_PREFIX='$(MEDIAVIEWER_PREFIX)' M4_PARAMS += -D M4_IMAGEVIEWER_EXEC='$(IMAGEVIEWER_EXEC)' M4_PARAMS += -D M4_VIDEOPLAYER_EXEC='$(VIDEOPLAYER_EXEC)' + M4_PARAMS += -D M4_SCHEME_HANDLER='$(COMPANY_NAME_LOW)' +else + M4_PARAMS += -D M4_SCHEME_HANDLER='oo-office' endif M4_PARAMS += -D M4_DEB_ARCH='$(DEB_ARCH)' ifdef ASTRALINUX_KEYS_DIR @@ -180,6 +183,9 @@ ifneq ($(COMPANY_NAME), ONLYOFFICE) RPM_PARAMS += --define '_mediaviewer_prefix $(MEDIAVIEWER_PREFIX)' RPM_PARAMS += --define '_imageviewer_exec $(IMAGEVIEWER_EXEC)' RPM_PARAMS += --define '_videoplayer_exec $(VIDEOPLAYER_EXEC)' + RPM_PARAMS += --define '_scheme_handler $(COMPANY_NAME_LOW)' +else + RPM_PARAMS += --define '_scheme_handler oo-office' endif RPM_PARAMS += --define '_binary_payload w7.xzdio' diff --git a/win-linux/package/linux/common/usr/share/applications/desktopeditors.desktop.m4 b/win-linux/package/linux/common/usr/share/applications/desktopeditors.desktop.m4 index a88e9e3ce..346187c64 100644 --- a/win-linux/package/linux/common/usr/share/applications/desktopeditors.desktop.m4 +++ b/win-linux/package/linux/common/usr/share/applications/desktopeditors.desktop.m4 @@ -24,7 +24,7 @@ Terminal=false Icon=M4_PACKAGE_NAME Keywords=Text;Document;OpenDocument Text;Microsoft Word;Microsoft Works;odt;doc;docx;rtf; Categories=Office;WordProcessor;Spreadsheet;Presentation; -MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;text/spreadsheet;application/csv;application/excel;application/x-excel;application/x-msexcel;application/x-ms-excel;text/comma-separated-values;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.slide;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;x-scheme-handler/oo-office;text/docxf;text/oform; +MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;text/spreadsheet;application/csv;application/excel;application/x-excel;application/x-msexcel;application/x-ms-excel;text/comma-separated-values;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.slide;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;x-scheme-handler/M4_SCHEME_HANDLER;text/docxf;text/oform; Actions=NewDocument;NewSpreadsheet;NewPresentation; [Desktop Action NewDocument] diff --git a/win-linux/package/linux/deb/template/postinst.m4 b/win-linux/package/linux/deb/template/postinst.m4 index 0bc5ca625..340624f4d 100644 --- a/win-linux/package/linux/deb/template/postinst.m4 +++ b/win-linux/package/linux/deb/template/postinst.m4 @@ -24,8 +24,8 @@ MIMEAPPS_LIST="/usr/share/applications/mimeapps.list" if [ ! -f "$MIMEAPPS_LIST" ]; then echo "[Default Applications]" >"$MIMEAPPS_LIST" fi -if [ $(cat "$MIMEAPPS_LIST" | grep x-scheme-handler/oo-office | wc -l) -eq "0" ]; then - echo "x-scheme-handler/oo-office=M4_DESKTOPEDITORS_EXEC.desktop" >>"$MIMEAPPS_LIST" +if [ $(cat "$MIMEAPPS_LIST" | grep x-scheme-handler/M4_SCHEME_HANDLER | wc -l) -eq "0" ]; then + echo "x-scheme-handler/M4_SCHEME_HANDLER=M4_DESKTOPEDITORS_EXEC.desktop" >>"$MIMEAPPS_LIST" fi if [ $(cat "$MIMEAPPS_LIST" | grep text/docxf | wc -l) -eq "0" ]; then echo "text/docxf=M4_DESKTOPEDITORS_EXEC.desktop" >>"$MIMEAPPS_LIST" diff --git a/win-linux/package/linux/rpm/common.spec b/win-linux/package/linux/rpm/common.spec index 053264bca..cf2bb09ab 100644 --- a/win-linux/package/linux/rpm/common.spec +++ b/win-linux/package/linux/rpm/common.spec @@ -96,8 +96,8 @@ MIMEAPPS_LIST="/usr/share/applications/mimeapps.list" if [ ! -f "$MIMEAPPS_LIST" ]; then echo "[Default Applications]" >"$MIMEAPPS_LIST" fi -if [ $(cat "$MIMEAPPS_LIST" | grep x-scheme-handler/oo-office | wc -l) -eq "0" ]; then - echo "x-scheme-handler/oo-office=%{_desktopeditors_exec}.desktop" >>"$MIMEAPPS_LIST" +if [ $(cat "$MIMEAPPS_LIST" | grep x-scheme-handler/%{_scheme_handler} | wc -l) -eq "0" ]; then + echo "x-scheme-handler/%{_scheme_handler}=%{_desktopeditors_exec}.desktop" >>"$MIMEAPPS_LIST" fi if [ $(cat "$MIMEAPPS_LIST" | grep text/docxf | wc -l) -eq "0" ]; then echo "text/docxf=%{_desktopeditors_exec}.desktop" >>"$MIMEAPPS_LIST"