From 819e8a4f84bc6798b4e890090fb74a3f02626d6b Mon Sep 17 00:00:00 2001
From: Emilio Jesus Gallego Arias
Date: Sun, 4 Apr 2021 15:17:37 +0200
Subject: [build] Remove leftovers of codesigning / OSX IDe infrastructure.
This is not used anymore, and after #14122 the makefile parts for the
dmg generation are not used anymore.
Closes #7476 .
---
Makefile.build | 16 +------
Makefile.checker | 3 +-
Makefile.ide | 77 +------------------------------
Makefile.make | 2 +-
configure.ml | 34 --------------
ide/coqide/MacOS/Info.plist.template | 89 ------------------------------------
6 files changed, 6 insertions(+), 215 deletions(-)
delete mode 100644 ide/coqide/MacOS/Info.plist.template
diff --git a/Makefile.build b/Makefile.build
index cbd4f4efbe..2b626506a3 100644
--- a/Makefile.build
+++ b/Makefile.build
@@ -256,17 +256,6 @@ BYTEFLAGS=$(CAMLDEBUG) $(USERFLAGS)
OPTFLAGS=$(CAMLDEBUGOPT) $(CAMLTIMEPROF) $(USERFLAGS) $(FLAMBDA_FLAGS)
DEPFLAGS=$(LOCALINCLUDES) -map gramlib/.pack/gramlib.ml $(if $(filter plugins/% user-contrib/%,$@),, -I ide/coqide -I ide/coqide/protocol)
-# On MacOS, the binaries are signed, except our private ones
-ifeq ($(shell which codesign > /dev/null 2>&1 && echo $(ARCH)),Darwin)
-LINKMETADATA=$(if $(filter $(PRIVATEBINARIES),$@),,-ccopt "-sectcreate __TEXT __info_plist config/Info-$(notdir $@).plist")
-CODESIGN=$(if $(filter $(PRIVATEBINARIES),$@),true,codesign -s -)
-CODESIGN_HIDE=$(CODESIGN)
-else
-LINKMETADATA=
-CODESIGN=true
-CODESIGN_HIDE=$(HIDE)true
-endif
-
ifeq ($(STRIP),true)
STRIP_HIDE=$(HIDE)true
else
@@ -293,7 +282,7 @@ endef
define bestocaml
$(if $(OPT),\
-$(OCAMLOPT) $(MLINCLUDES) $(OPTFLAGS) $(LINKMETADATA) -o $@ -linkpkg $(1) $^ && $(STRIP) $@ && $(CODESIGN) $@,\
+$(OCAMLOPT) $(MLINCLUDES) $(OPTFLAGS) -o $@ -linkpkg $(1) $^ && $(STRIP) $@,\
$(OCAMLC) $(MLINCLUDES) $(BYTEFLAGS) $(CUSTOM) -o $@ -linkpkg $(1) $^)
endef
@@ -431,9 +420,8 @@ bin/%.opt$(EXE): topbin/%_bin.ml $(LINKCMX) $(LIBCOQRUN)
$(SHOW)'COQMKTOP -o $@'
$(HIDE)$(OCAMLOPT) -linkall -linkpkg $(MLINCLUDES) \
$(SYSMOD) \
- $(LINKCMX) $(OPTFLAGS) $(LINKMETADATA) $< -o $@
+ $(LINKCMX) $(OPTFLAGS) $< -o $@
$(STRIP_HIDE) $@
- $(CODESIGN_HIDE) $@
bin/%.byte$(EXE): topbin/%_bin.ml $(LINKCMO) $(LIBCOQRUN)
$(SHOW)'COQMKTOP -o $@'
diff --git a/Makefile.checker b/Makefile.checker
index ad296e0e88..320b03fea7 100644
--- a/Makefile.checker
+++ b/Makefile.checker
@@ -38,9 +38,8 @@ ifeq ($(BEST),opt)
$(CHICKEN): config/config.cmxa clib/clib.cmxa lib/lib.cmxa kernel/kernel.cmxa \
checker/check.cmxa $(LIBCOQRUN) checker/coqchk.mli checker/coqchk.ml
$(SHOW)'OCAMLOPT -o $@'
- $(HIDE)$(OCAMLOPT) -linkpkg $(SYSMOD) $(CHKLIBS) $(OPTFLAGS) $(LINKMETADATA) -o $@ $^
+ $(HIDE)$(OCAMLOPT) -linkpkg $(SYSMOD) $(CHKLIBS) $(OPTFLAGS) -o $@ $^
$(STRIP_HIDE) $@
- $(CODESIGN_HIDE) $@
else
$(CHICKEN): $(CHICKENBYTE)
rm -f $@ && cp $< $@
diff --git a/Makefile.ide b/Makefile.ide
index 6e3713c7bf..e721e90628 100644
--- a/Makefile.ide
+++ b/Makefile.ide
@@ -28,8 +28,6 @@
COQIDEBYTE:=bin/coqide.byte$(EXE)
COQIDE:=bin/coqide$(EXE)
-COQIDEAPP:=bin/CoqIDE_$(VERSION).app
-COQIDEINAPP:=$(COQIDEAPP)/Contents/MacOS/coqide
## CoqIDE source directory and files
@@ -154,9 +152,8 @@ $(IDETOP): ide/coqide/idetop.ml $(LINKCMX) $(LIBCOQRUN) $(IDETOPCMX)
$(SHOW)'COQMKTOP -o $@'
$(HIDE)$(OCAMLOPT) -linkall -linkpkg $(MLINCLUDES) -I ide/coqide -I ide/coqide/protocol/ \
$(SYSMOD) \
- $(LINKCMX) $(IDETOPCMX) $(OPTFLAGS) $(LINKMETADATA) $< -o $@
+ $(LINKCMX) $(IDETOPCMX) $(OPTFLAGS) $< -o $@
$(STRIP_HIDE) $@
- $(CODESIGN_HIDE) $@
$(IDETOPBYTE): ide/coqide/idetop.ml $(LINKCMO) $(LIBCOQRUN) $(IDETOPCMA)
$(SHOW)'COQMKTOP -o $@'
@@ -217,7 +214,7 @@ ifeq ($(BEST),opt)
$(INSTALLSH) $(FULLCOQLIB) $(IDECMA:.cma=.cmxa) $(IDECMA:.cma=.a)
endif
-install-ide-files: #Please update $(COQIDEAPP)/Contents/Resources/ at the same time
+install-ide-files:
$(MKDIR) $(FULLDATADIR)
$(INSTALLLIB) ide/coqide/coq.png ide/coqide/*.lang ide/coqide/coq_style.xml $(IDEBINDINGS) $(FULLDATADIR)
$(MKDIR) $(FULLCONFIGDIR)
@@ -226,76 +223,6 @@ install-ide-info:
$(MKDIR) $(FULLDOCDIR)
$(INSTALLLIB) ide/coqide/FAQ $(FULLDOCDIR)/FAQ-CoqIde
-###########################################################################
-# CoqIde MacOS special targets
-###########################################################################
-
-.PHONY: $(COQIDEAPP)/Contents
-
-$(COQIDEAPP)/Contents:
- $(MKDIR) $@
- sed -e "s/VERSION/$(VERSION4MACOS)/g" ide/coqide/MacOS/Info.plist.template > $@/Info.plist
- $(MKDIR) "$@/MacOS"
-
-$(COQIDEINAPP): ide/coqide/macos_prehook.cmx $(LINKIDEOPT) | $(COQIDEAPP)/Contents
- $(SHOW)'OCAMLOPT -o $@'
- $(HIDE)$(OCAMLOPT) $(COQIDEFLAGS) $(OPTFLAGS) -o $@ \
- -linkpkg -package str,unix,threads,lablgtk3-sourceview3 $(IDEFLAGS:.cma=.cmxa) $^
- $(STRIP_HIDE) $@
-
-$(COQIDEAPP)/Contents/Resources/share: $(COQIDEAPP)/Contents
- $(MKDIR) $@/coq/
- $(INSTALLLIB) ide/coqide/coq.png ide/coqide/*.lang ide/coqide/coq_style.xml $(IDEBINDINGS) $@/coq/
- $(MKDIR) $@/gtksourceview-3.0/{language-specs,styles}
- $(INSTALLLIB) "$(SOURCEVIEWSHARE)/"gtksourceview-3.0/language-specs/{def.lang,language2.rng} $@/gtksourceview-3.0/language-specs/
- $(INSTALLLIB) "$(SOURCEVIEWSHARE)/"gtksourceview-3.0/styles/{styles.rng,classic.xml} $@/gtksourceview-3.0/styles/
- cp -R "$(GTKSHARE)/"locale $@
- cp -R "$(GTKSHARE)/"themes $@
- $(MKDIR) $@/glib-2.0/schemas
- glib-compile-schemas --targetdir=$@/glib-2.0/schemas "$(GTKSHARE)/"glib-2.0/schemas/
- cp -R "$(ADWAITASHARE)/"icons $@
-
-$(COQIDEAPP)/Contents/Resources/loaders: $(COQIDEAPP)/Contents
- $(MKDIR) $@
- $(INSTALLLIB) $$("$(PIXBUFBIN)/gdk-pixbuf-query-loaders" | sed -n -e '5 s!.*= \(.*\)$$!\1!p')/libpixbufloader-png.so $@
-
-$(COQIDEAPP)/Contents/Resources/immodules: $(COQIDEAPP)/Contents
- $(MKDIR) $@
- $(INSTALLLIB) "$(GTKLIBS)/gtk-3.0/3.0.0/immodules/"*.dylib $@ || $(INSTALLLIB) "$(GTKLIBS)/gtk-3.0/3.0.0/immodules/"*.so $@
-
-
-$(COQIDEAPP)/Contents/Resources/etc: $(COQIDEAPP)/Contents/Resources/lib
- $(MKDIR) $@/xdg/coq
- $(MKDIR) $@/gtk-3.0
- { "$(PIXBUFBIN)/gdk-pixbuf-query-loaders" $@/../loaders/*.so |\
- sed -e "s!/.*\(/loaders/.*.so\)!@executable_path/../Resources/\1!"; } \
- > $@/gtk-3.0/gdk-pixbuf.loaders
- { "$(GTKBIN)/gtk-query-immodules-3.0" $@/../immodules/*.{dylib,so} |\
- sed -e "s!/.*\(/immodules/.*.dylib\)!@executable_path/../Resources/\1!" |\
- sed -e "s!/.*\(/immodules/.*.so\)!@executable_path/../Resources/\1!" |\
- sed -e "s!/.*\(/share/locale\)!@executable_path/../Resources/\1!"; } \
- > $@/gtk-3.0/gtk-immodules.loaders
- $(MKDIR) $@/pango
- echo "[Pango]" > $@/pango/pangorc
-
-$(COQIDEAPP)/Contents/Resources/lib: $(COQIDEAPP)/Contents/Resources/immodules $(COQIDEAPP)/Contents/Resources/loaders $(COQIDEAPP)/Contents $(COQIDEINAPP)
- $(MKDIR) $@
- macpack -d ../Resources/lib $(COQIDEINAPP)
- for i in $@/../bin/*; \
- do \
- macpack -d ../lib $$i; \
- done
- for i in $@/../loaders/*.so $@/../immodules/*.{dylib,so}; \
- do \
- macpack -d ../lib $$i; \
- done
-
-$(COQIDEAPP)/Contents/Resources:$(COQIDEAPP)/Contents/Resources/etc $(COQIDEAPP)/Contents/Resources/share
- $(INSTALLLIB) ide/coqide/MacOS/*.icns $@
-
-$(COQIDEAPP):$(COQIDEAPP)/Contents/Resources
- $(CODESIGN_HIDE) $@
-
###########################################################################
# CoqIde for Windows special targets
###########################################################################
diff --git a/Makefile.make b/Makefile.make
index 9f0e06dffc..dc123820ee 100644
--- a/Makefile.make
+++ b/Makefile.make
@@ -277,7 +277,7 @@ cacheclean:
find theories user-contrib test-suite -name '.*.aux' -exec rm -f {} +
cleanconfig:
- rm -f config/Makefile config/coq_config.ml dev/ocamldebug-coq config/Info-*.plist
+ rm -f config/Makefile config/coq_config.ml dev/ocamldebug-coq
distclean: clean cleanconfig cacheclean timingclean
diff --git a/configure.ml b/configure.ml
index abea59bd60..68e4621cd5 100644
--- a/configure.ml
+++ b/configure.ml
@@ -13,15 +13,9 @@
open Printf
let coq_version = "8.14+alpha"
-let coq_macos_version = "8.13.90" (** "[...] should be a string comprised of
-three non-negative, period-separated integers [...]" *)
let vo_magic = 81391
let state_magic = 581391
let is_a_released_version = false
-let distributed_exec =
- ["coqtop.opt"; "coqidetop.opt"; "coqqueryworker.opt"; "coqproofworker.opt"; "coqtacticworker.opt";
- "coqc.opt";"coqchk";"coqdoc";"coqworkmgr";"coq_makefile";"coq-tex";"coqwc";"csdpcert";"coqdep";"votour"]
-
let verbose = ref false (* for debugging this script *)
let red, yellow, reset =
@@ -1159,7 +1153,6 @@ let write_makefile f =
List.iter (fun (v,_,dir,_) -> pr "%s=%S\n" v dir) install_dirs;
pr "\n# Coq version\n";
pr "VERSION=%s\n" coq_version;
- pr "VERSION4MACOS=%s\n\n" coq_macos_version;
pr "# Objective-Caml compile command\n";
pr "OCAML=%S\n" camlexec.top;
pr "OCAMLFIND=%S\n" camlexec.find;
@@ -1235,33 +1228,6 @@ let write_dune_c_flags f =
let _ = write_dune_c_flags "config/dune.c_flags"
-let write_macos_metadata exec =
- let f = "config/Info-"^exec^".plist" in
- let () = safe_remove f in
- let o = open_out f in
- let pr s = fprintf o s in
- pr "\n";
- pr "\n";
- pr "\n";
- pr "\n";
- pr " CFBundleIdentifier\n";
- pr " fr.inria.coq.%s\n" exec;
- pr " CFBundleName\n";
- pr " %s\n" exec;
- pr " CFBundleVersion\n";
- pr " %s\n" coq_macos_version;
- pr " CFBundleShortVersionString\n";
- pr " %s\n" coq_macos_version;
- pr " CFBundleInfoDictionaryVersion\n";
- pr " 6.0\n";
- pr "\n";
- pr "\n";
- let () = close_out o in
- Unix.chmod f 0o444
-
-let () =
- if arch = "Darwin" then List.iter write_macos_metadata distributed_exec
-
let write_configpy f =
safe_remove f;
let o = open_out f in
diff --git a/ide/coqide/MacOS/Info.plist.template b/ide/coqide/MacOS/Info.plist.template
deleted file mode 100644
index e4fb0e5980..0000000000
--- a/ide/coqide/MacOS/Info.plist.template
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
- CFBundleDocumentTypes
-
-
- CFBundleTypeExtensions
-
- *
-
- CFBundleTypeName
- NSStringPboardType
- CFBundleTypeOSTypes
-
- ****
-
- CFBundleTypeRole
- Editor
-
-
- CFBundleTypeIconFile
- coqfile.icns
- CFBundleTypeName
- Coq file
- CFBundleTypeRole
- Editor
- CFBundleTypeMIMETypes
-
- text/plain
-
- CFBundleTypeExtensions
-
- v
-
- LSHandlerRank
- Owner
-
-
- CFBundleTypeName
- All
- CFBundleTypeRole
- Editor
- CFBundleTypeMIMETypes
-
- text/plain
-
- LSHandlerRank
- Default
- CFBundleTypeExtensions
-
- *
-
-
-
- CFBundleIconFile
- coqide.icns
- CFBundleVersion
- 390
- CFBundleName
- CoqIDE
- CFBundleShortVersionString
- VERSION
- CFBundleDisplayName
- Coq Proof Assistant vVERSION
- CFBundleGetInfoString
- Coq_vVERSION
- NSHumanReadableCopyright
- Copyright 1999-2019, Inria, CNRS and contributors
- CFBundleHelpBookFolder
- share/doc/coq/html/
- CFAppleHelpAnchor
- index
- CFBundleExecutable
- coqide
- CFBundlePackageType
- APPL
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleIdentifier
- fr.inria.coq.coqide
- LSApplicationCategoryType
- public.app-category.developer-tools
- CFBundleDevelopmentRegion
- English
- NSPrincipalClass
- NSApplication
-
-
--
cgit v1.2.3