forked from ocaml/merlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmerlin.iss
110 lines (98 loc) · 4.12 KB
/
merlin.iss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#include "config.iss"
#define MyAppName "Merlin"
#define MyAppVersion "2.3"
#define MyAppPublisher "The Lambda Church"
#define MyAppURL "https://github.com/the-lambda-church/merlin"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{CADFEBAC-3A03-4FAF-96CE-4A7156B529F8}
AppName={#MyAppName}
AppVersion={#MyAppVersion} for {#OCAML_VERSION}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=C:\OCaml
DefaultGroupName={#MyAppName}
DirExistsWarning=no
AllowNoIcons=yes
OutputDir=.
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
UninstallFilesDir={app}\merlin
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "ocamlmerlin.exe"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: binary; AfterInstall:
Source: "emacs\*"; DestDir: "{app}\merlin\emacs"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: emacs
Source: "vim\merlin\*"; DestDir: "{app}\merlin\vim"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: vim
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Components]
Name: "binary"; Description: "OCamlmerlin binary"; Types: full compact custom
Name: "emacs"; Description: "Emacs mode"; Types: full
Name: "vim"; Description: "Vim plugin"; Types: full
; Name: "sublime"; Description: "Install Sublime Text 3 mode"
[Run]
Filename: https://github.com/the-lambda-church/merlin/wiki; Description: "Visit wiki to get started"; Flags: postinstall shellexec
[Code]
var
EmacsMemo: TOutputMsgMemoWizardPage;
VimMemo: TOutputMsgMemoWizardPage;
procedure InitializeWizard;
begin
EmacsMemo := CreateOutputMsgMemoPage(wpInstalling,
'Information', 'Please read the following important information before continuing.',
'Information regarding setup of the emacs mode.', '');
VimMemo := CreateOutputMsgMemoPage(EmacsMemo.ID,
'Information', 'Please read the following important information before continuing.',
'Information regarding setup of the vim plugin.', '');
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
if CurPageID = wpSelectDir then
begin
EmacsMemo.RichEditViewer.RTFText :=
'The emacs mode files have been installed in:'#13#10
+ #09 + ExpandConstant('{app}\merlin\emacs')
+ #13#10#13#10
+ 'You will probably want to add the following snippet to your .emacs file:'#13#10
+ #13#10
+ ';; Add merlin mode directory to load path'#13#10
+ '(add-to-list ''load-path "' + ExpandConstant('{app}\merlin\emacs') + '")'#13#10
+ ';; Load merlin-mode'#13#10
+ '(require ''merlin)'#13#10
+ ';; Start merlin on ocaml files'#13#10
+ '(add-hook ''tuareg-mode-hook ''merlin-mode t)'#13#10
+ '(add-hook ''caml-mode-hook ''merlin-mode t)'#13#10
+ ';; Enable auto-complete'#13#10
+ '(setq merlin-use-auto-complete-mode ''easy)'#13#10;
VimMemo.RichEditViewer.RTFText :=
'The vim plugin files have been installed in:'#13#10
+ #09 + ExpandConstant('{app}\merlin\vim')
+ #13#10#13#10
+ 'You will probably want to add the following snippet to your vimrc file:'#13#10
+ #13#10
+ '" Add merlin plugin directory to runtime path'#13#10
+ 'set rtp+=' + ExpandConstant('{app}\merlin\vim') + ''#13#10
+ '(require ''merlin)'#13#10
+ ''#13#10
+ '" Execute the following command once to update vim documentation'#13#10
+ ':helptags ' + ExpandConstant('{app}\merlin\vim\doc') + ''#13#10;
end;
Result := True;
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if PageID = EmacsMemo.ID then
Result := not IsComponentSelected('emacs')
else if PageID = VimMemo.ID then
Result := not IsComponentSelected('vim')
else
Result := False;
end;