-
Notifications
You must be signed in to change notification settings - Fork 0
/
cross-mintelf-cygwin.nsi
545 lines (456 loc) · 20.6 KB
/
cross-mintelf-cygwin.nsi
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
############################################################################
# This is the source file for the installer of the MiNT ELF Cross Tools for Cygwin.
# Written by Vincent Rivière.
#
# This source is intended to be compiled with Nullsoft NSIS 3.09.
# You are free to use this file for any purpose. But if you rebuild the installer by yourself,
# please change COMPANY_NAME and COMPANY_EMAIL to your own information.
############################################################################
!include MUI2.nsh
!include LogicLib.nsh
!include nsDialogs.nsh
!include x64.nsh
!define PRODUCT_NAME "MiNT ELF Cross Tools for Cygwin"
!define COMPANY_NAME "Vincent Rivière"
!define COMPANY_EMAIL "[email protected]"
!define INSTALL_DIR /opt/cross-mintelf
# The following defines are generated by ./printversions.sh
# They must be manually copied/pasted into the NSIS source file.
!define THIS_YEAR 2024
!define PRODUCT_VERSION 20240218
!define PRODUCT_VERSION_DOTS 0.2024.2.18
!define BINUTILS_ARCHIVE binutils-2.42-mintelf-20240218-bin-cygwin-20240218.tar.xz
!define BINUTILS_VERSION 2.42-mintelf-20240218
!define BINUTILS_SIZE 12256
!define CFLIB_ARCHIVE cflib-Git-20230912-bin-cygwin-20240211.tar.xz
!define CFLIB_VERSION Git-20230912
!define CFLIB_SIZE 619
!define EXPAT_ARCHIVE expat-2.6.0-bin-cygwin-20240211.tar.xz
!define EXPAT_VERSION 2.6.0
!define EXPAT_SIZE 581
!define FDLIBM_ARCHIVE fdlibm-Git-20230207-bin-cygwin-20240211.tar.xz
!define FDLIBM_VERSION Git-20230207
!define FDLIBM_SIZE 2672
!define GCC_ARCHIVE gcc-13.2.0-mintelf-20240130-bin-cygwin-20240210.tar.xz
!define GCC_VERSION 13.2.0-mintelf-20240130
!define GCC_SIZE 110073
!define GEMLIB_ARCHIVE gemlib-Git-20230901-bin-cygwin-20240211.tar.xz
!define GEMLIB_VERSION Git-20230901
!define GEMLIB_SIZE 3088
!define GEMMA_ARCHIVE gemma-Git-20240218-bin-cygwin-20240218.tar.xz
!define GEMMA_VERSION Git-20240218
!define GEMMA_SIZE 246
!define GMP_ARCHIVE gmp-6.3.0-bin-cygwin-20240211.tar.xz
!define GMP_VERSION 6.3.0
!define GMP_SIZE 2957
!define LDG_ARCHIVE ldg-SVN-20230924-bin-cygwin-20240211.tar.xz
!define LDG_VERSION SVN-20230924
!define LDG_SIZE 30
!define MINTBIN_ARCHIVE mintbin-Git-20230913-bin-cygwin-20240211.tar.xz
!define MINTBIN_VERSION Git-20230913
!define MINTBIN_SIZE 217
!define MINTLIB_ARCHIVE mintlib-Git-20240114-bin-cygwin-20240211.tar.xz
!define MINTLIB_VERSION Git-20240114
!define MINTLIB_SIZE 9162
!define MPFR_ARCHIVE mpfr-4.2.1-bin-cygwin-20240211.tar.xz
!define MPFR_VERSION 4.2.1
!define MPFR_SIZE 2785
!define NCURSES_ARCHIVE ncurses-6.4-mintelf-20230910-bin-cygwin-20240211.tar.xz
!define NCURSES_VERSION 6.4-mintelf-20230910
!define NCURSES_SIZE 2377
!define OPENSSL_ARCHIVE openssl-3.2.1-mintelf-20240209-bin-cygwin-20240211.tar.xz
!define OPENSSL_VERSION 3.2.1-mintelf-20240209
!define OPENSSL_SIZE 23833
!define PKGCONF_ARCHIVE pkgconf-1-bin-cygwin-20240211.tar.xz
!define PKGCONF_VERSION 1
!define PKGCONF_SIZE 1
!define READLINE_ARCHIVE readline-8.2-bin-cygwin-20240210.tar.xz
!define READLINE_VERSION 8.2
!define READLINE_SIZE 1799
!define SDL_ARCHIVE sdl-1.2-Git-20231221-bin-cygwin-20240211.tar.xz
!define SDL_VERSION 1.2-Git-20231221
!define SDL_SIZE 1945
!define ZLIB_ARCHIVE zlib-1.3.1-bin-cygwin-20240210.tar.xz
!define ZLIB_VERSION 1.3.1
!define ZLIB_SIZE 405
!define ZSTD_ARCHIVE zstd-1.5.5-bin-cygwin-20240211.tar.xz
!define ZSTD_VERSION 1.5.5
!define ZSTD_SIZE 3259
############################################################################
# General settings
Unicode True
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile cross-mintelf-cygwin-${PRODUCT_VERSION}-setup.exe
SetCompressor zlib
RequestExecutionLevel admin
# Supported Install Types
# The order is important, it will be referenced by the sections
InstType Full
InstType Minimal
############################################################################
# Set an environment variable for the current process and its future children
!macro SetEnvironmentVariable name value
System::Call "kernel32::SetEnvironmentVariableW(t '${name}', t '${value}') i.r0"
!macroend
# Run a Cygwin command with no output
!macro RunCygwinCommand retvar command args
nsExec::Exec '"$cygwinHome\bin\${command}.exe" ${args}'
Pop ${retvar}
!macroend
# Run a Cygwin command and send the output to the install log
!macro RunCygwinCommandToLog retvar command args
nsExec::ExecToLog '"$cygwinHome\bin\${command}.exe" ${args}'
Pop ${retvar}
!macroend
# Run a Cygwin command and send the output to a variable
!macro RunCygwinCommandToVariable retvar ouputvar command args
nsExec::ExecToStack '"$cygwinHome\bin\${command}.exe" ${args}'
Pop ${retvar}
Pop ${ouputvar}
# Remove the Line Feed character
# BUG: This fails if the last character is not a Line Feed
StrLen $R0 ${ouputvar}
IntOp $R0 $R0 - 1
StrCpy ${ouputvar} ${ouputvar} $R0
!macroend
# Run a function from bashlib.sh
!macro RunBashLibFunction retvar function
!insertmacro RunCygwinCommand ${retvar} bash "bashlib.sh ${function}"
!macroend
# Install a Cygwin package
!macro InstallCygwinPackage package
File packages\${${package}_ARCHIVE}
!insertmacro RunCygwinCommandToLog $0 tar "-C / -xvf ${${package}_ARCHIVE}"
${If} $0 != 0
MessageBox MB_OK|MB_ICONSTOP "Error during installation of ${${package}_ARCHIVE}."
Abort "Error during installation of ${${package}_ARCHIVE}."
${EndIf}
# Delete the archive after installation to avoid wasting temporary space
SetDetailsPrint none
Delete ${${package}_ARCHIVE}
SetDetailsPrint both
!macroend
# Internal machinery for inserting several labels in a page
Var labelY
!define PageCurrentLine $labelY
!define LABEL_HEIGHT 10
!define /math LABEL_HEIGHT_X2 ${LABEL_HEIGHT} * 2
!define /math LABEL_HEIGHT_X3 ${LABEL_HEIGHT} * 3
!define /math LABEL_HEIGHT_X4 ${LABEL_HEIGHT} * 4
# Reset the page label position
!macro PageResetLine
StrCpy $labelY 0
!macroend
# Skip a line before the next label
!macro PageNewLine
IntOp $labelY $labelY + ${LABEL_HEIGHT}
!macroend
# Append a label to the current page
!macro AppendLabel height text
${NSD_CreateLabel} 0u ${PageCurrentLine}u 100% ${height}u "${text}"
Pop $0
IntOp ${PageCurrentLine} ${PageCurrentLine} + ${height}
!macroend
# Append a named label
!macro AppendNamedLabel name value
!insertmacro AppendLabel ${LABEL_HEIGHT} "${name}: ${value}"
!macroend
# Append an hyperlink to the current page
!macro AppendLink text
${NSD_CreateLink} 0u ${PageCurrentLine}u 100% ${LABEL_HEIGHT}u "${text}"
Pop $0
IntOp ${PageCurrentLine} ${PageCurrentLine} + ${LABEL_HEIGHT}
${NSD_OnClick} $0 onClickLink
!macroend
# Callback called when an hyperlink is clicked
Function onClickLink
Pop $0
${NSD_GetText} $0 $1
ExecShell open $1
FunctionEnd
# Check if a Cygwin package is installed
!macro CheckInstalledCygwinPackage package
${If} ${FileExists} $cygwinHome\etc\setup\${package}.lst.gz
StrCpy $0 "FOUND"
${Else}
StrCpy $0 "MISSING"
StrCpy $cygwinDependencyMissing 1
${EndIf}
!insertmacro AppendNamedLabel "Package ${package}" $0
!macroend
# Create a custom page, initially hidden
!macro CreateCustomPage
nsDialogs::Create 1018
Pop $0
${If} $0 == error
Abort
${EndIf}
!macroend
############################################################################
# Welcome Page
!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of $(^NameDA).$\n$\nThese tools will allow you to build software for the Atari ST and compatible computers running MiNT/TOS operating systems.$\n$\nThis package is provided to you by ${COMPANY_NAME}.$\n${COMPANY_EMAIL}$\n$\n$_CLICK"
!insertmacro MUI_PAGE_WELCOME
############################################################################
# License Page
!insertmacro MUI_PAGE_LICENSE license.txt
############################################################################
# Cygwin Requirements Page
Var cygwinHome
Function CygwinRequirementsPageCreator
!insertmacro MUI_HEADER_TEXT_PAGE "Cygwin Requirements" "Check current Cygwin installation and required packages."
!insertmacro CreateCustomPage
ShowWindow $0 ${SW_SHOW} # Display the window now to see the progression of the tests
!insertmacro PageResetLine
# Get the Cygwin home from the registry
ReadRegStr $cygwinHome HKLM SOFTWARE\Cygwin\setup rootdir
${If} ${Errors}
!insertmacro AppendLabel ${LABEL_HEIGHT_X2} "64-bit Cygwin is not installed on this system.$\nPlease download and install setup-x86_64.exe from the official website:"
!insertmacro AppendLink "http://www.cygwin.com/"
!insertmacro PageNewLine
!insertmacro AppendLabel ${LABEL_HEIGHT} "Then start this installation again."
EnableWindow $mui.Button.Next 0
nsDialogs::Show
Return
${EndIf}
!insertmacro AppendNamedLabel "Cygwin home" $cygwinHome
!insertmacro PageNewLine
# Check if the Cygwin home is valid
${IfNot} ${FileExists} $cygwinHome\bin\cygwin1.dll
!insertmacro AppendLabel ${LABEL_HEIGHT_X2} "This Cygwin installation directory is invalid.$\nPlease reinstall Cygwin, then start this installation again."
EnableWindow $mui.Button.Next 0
nsDialogs::Show
Return
${EndIf}
/*
!insertmacro RunCygwinCommandToVariable $0 $1 uname -r
!insertmacro AppendNamedLabel "Cygwin version" $1
*/
# The Cygwin bin directory is required to be in the PATH for tar being able to find xz
# Note that the following line replaces the whole contents of PATH, it seems to be OK.
!insertmacro SetEnvironmentVariable PATH $cygwinHome\bin
Var /GLOBAL cygwinDependencyMissing
StrCpy $cygwinDependencyMissing 0
!insertmacro CheckInstalledCygwinPackage xz
!insertmacro CheckInstalledCygwinPackage tar
!insertmacro CheckInstalledCygwinPackage libiconv2
!insertmacro CheckInstalledCygwinPackage libisl23
!insertmacro CheckInstalledCygwinPackage libgmp10
!insertmacro CheckInstalledCygwinPackage libmpc3
!insertmacro CheckInstalledCygwinPackage libmpfr6
!insertmacro CheckInstalledCygwinPackage libzstd1
!insertmacro CheckInstalledCygwinPackage zlib0
!insertmacro PageNewLine
${If} $cygwinDependencyMissing == 1
!insertmacro AppendLabel ${LABEL_HEIGHT_X3} "Some required Cygwin packages are missing.$\nPlease install them using the standard Cygwin setup program, then start this installation again."
EnableWindow $mui.Button.Next 0
nsDialogs::Show
Return
${EndIf}
!insertmacro AppendLabel ${LABEL_HEIGHT} "All the Cygwin requirements are met."
nsDialogs::Show
FunctionEnd
Page custom CygwinRequirementsPageCreator
############################################################################
# Installation Directory Page
Var winInstallDir
Function InstallDirPageCreator
!insertmacro MUI_HEADER_TEXT_PAGE "Installation Directory" "Information about the installation directory."
!insertmacro CreateCustomPage
ShowWindow $0 ${SW_SHOW} # Display the window now to see the progression of the tests
!insertmacro PageResetLine
!insertmacro AppendLabel ${LABEL_HEIGHT_X2} "The cross-tools will be installed into ${INSTALL_DIR}."
!insertmacro RunCygwinCommandToVariable $0 $winInstallDir cygpath "-w ${INSTALL_DIR}"
${If} $0 != 0
MessageBox MB_OK|MB_ICONSTOP "Error during the location of ${INSTALL_DIR}."
Quit
${EndIf}
!insertmacro AppendLabel ${LABEL_HEIGHT_X2} "It corresponds to the Windows directory $winInstallDir."
!insertmacro AppendLabel ${LABEL_HEIGHT_X3} "If you want to completely uninstall the cross-tools, you just have to remove manually the directory above. There is no uninstaller."
${If} ${FileExists} $winInstallDir
!insertmacro AppendLabel ${LABEL_HEIGHT_X4} "Warning: The directory $winInstallDir currently exists.$\nIf you continue this installation process, it will be automatically deleted with the third-party libraries you may have installed into it."
${EndIf}
nsDialogs::Show
FunctionEnd
Function InstallDirPageLeave
${If} ${FileExists} $winInstallDir
MessageBox MB_ICONEXCLAMATION|MB_YESNO "The installation directory $winInstallDir currently exists.$\nDo you want to remove it automatically, and lose any additional library you may have installed into it ?" IDYES +2
Abort
!insertmacro AppendLabel ${LABEL_HEIGHT} "Cleaning $winInstallDir, please wait..."
# Disable the Next button to prevent the user from clicking on it while RMDir is in progress
EnableWindow $mui.Button.Next 0
RMDir /r $winInstallDir
${If} ${Errors}
MessageBox MB_ICONSTOP|MB_OK "Fatal error: Cannot remove the directory $winInstallDir."
Quit
${EndIf}
${EndIf}
FunctionEnd
Page custom InstallDirPageCreator InstallDirPageLeave
############################################################################
# Components Page
!insertmacro MUI_PAGE_COMPONENTS
############################################################################
# Install Page
!insertmacro MUI_PAGE_INSTFILES
############################################################################
# Environment Variables Page
!macro CheckShellVariable variable function
!insertmacro RunBashLibFunction $0 ${function}
${If} $0 = 0
!insertmacro AppendLabel ${LABEL_HEIGHT} "${variable}: OK"
${Else}
!insertmacro AppendLabel ${LABEL_HEIGHT} "${variable}: NOT FOUND"
StrCpy $variablesFixingNeeded 1
${EndIf}
!macroend
Function VariablesPageCreator
!insertmacro MUI_HEADER_TEXT_PAGE "Environment Variables" "Check required environment variables."
!insertmacro CreateCustomPage
ShowWindow $0 ${SW_SHOW} # Display the window now to see the progression of the tests
!insertmacro PageResetLine
!insertmacro AppendLabel ${LABEL_HEIGHT} "Checking environment variables..."
!insertmacro PageNewLine
Var /GLOBAL variablesFixingNeeded
StrCpy $variablesFixingNeeded 0
!insertmacro CheckShellVariable PATH isPathOk
!insertmacro CheckShellVariable MANPATH isManpathOk
!insertmacro PageNewLine
${If} $variablesFixingNeeded == 0
StrCpy $0 "All the environment variables are already correct."
${Else}
StrCpy $0 "Some environment variables are not correctly set. You will be proposed to automatically fix them when you click Next."
${EndIf}
!insertmacro AppendLabel 40 $0
nsDialogs::Show
FunctionEnd
Function VariablesPageLeave
${If} $variablesFixingNeeded == 0
Return
${EndIf}
MessageBox MB_ICONQUESTION|MB_YESNO "Would you like to automatically fix your ~/.bash_profile file with the missing environment variables ?" IDYES +2
Return
!insertmacro RunBashLibFunction $0 fixConfigFile
${If} $0 != 0
MessageBox MB_OK|MB_ICONSTOP "Unable to fix the environment variables."
${EndIf}
FunctionEnd
Page custom VariablesPageCreator VariablesPageLeave
############################################################################
# Finish Page
!define MUI_FINISHPAGE_TEXT "$(^NameDA) has been installed on your computer.$\n$\nTo use this cross-compiler, open a Cygwin shell and use the m68k-atari-mintelf-gcc command like a standard gcc. It will produce MiNT/TOS executables ready to be run on your Atari computer or emulator.$\n$\nClick Finish to close this wizard."
!insertmacro MUI_PAGE_FINISH
############################################################################
# Sections
# Create a section for a package
!macro SectionPackage package displayname in
Section "${displayname} ${${package}_VERSION}" ${package}_SECTION_INDEX
SectionIn ${in}
!insertmacro InstallCygwinPackage ${package}
SectionEnd
!macroend
# Since this installer contains already compressed files, turn off the compression of the packages.
SetCompress off
!insertmacro SectionPackage BINUTILS binutils RO
!insertmacro SectionPackage MINTBIN MiNTBin RO
!insertmacro SectionPackage GCC GCC RO
!insertmacro SectionPackage MINTLIB MiNTLib RO
!insertmacro SectionPackage FDLIBM FDLIBM RO
!insertmacro SectionPackage GEMLIB GEMlib RO
#!insertmacro SectionPackage GDB GDB 1
!insertmacro SectionPackage CFLIB CFLIB 1
!insertmacro SectionPackage GEMMA gemma 1
!insertmacro SectionPackage LDG LDG 1
!insertmacro SectionPackage SDL SDL 1
!insertmacro SectionPackage NCURSES Ncurses 1
!insertmacro SectionPackage ZLIB zlib 1
!insertmacro SectionPackage ZSTD Zstandard 1
!insertmacro SectionPackage READLINE Readline 1
!insertmacro SectionPackage GMP GMP 1
!insertmacro SectionPackage MPFR MPFR 1
!insertmacro SectionPackage EXPAT Expat 1
!insertmacro SectionPackage OPENSSL OpenSSL 1
!insertmacro SectionPackage PKGCONF pkgconf 1
SetCompress auto
# Set the description for a package
!macro DescribePackage package description
!insertmacro MUI_DESCRIPTION_TEXT ${${package}_SECTION_INDEX} "${description}"
!macroend
# Description of the sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro DescribePackage BINUTILS "Basic GNU tools for building MiNT binaries, including assembler and linker."
!insertmacro DescribePackage MINTBIN "Additional tools for manipulating MiNT binaries."
!insertmacro DescribePackage GCC "The GNU C and C++ compilers."
!insertmacro DescribePackage MINTLIB "The MiNT standard library."
!insertmacro DescribePackage FDLIBM "A free math library."
!insertmacro DescribePackage GEMLIB "The bindings for making GEM programs."
# !insertmacro DescribePackage GDB "The GNU cross-debugger. It requires the gdbserver tool running on the target MiNT machine, and a working TCP/IP connection."
!insertmacro DescribePackage CFLIB "Christian Felsch's GEM utility library."
!insertmacro DescribePackage GEMMA "The GEM application support library."
!insertmacro DescribePackage LDG "Gem Dynamical Libraries. A shared libraries system."
!insertmacro DescribePackage SDL "Simple DirectMedia Layer. A cross-platform multimedia library."
!insertmacro DescribePackage NCURSES "A library for making fullscreen textmode programs."
!insertmacro DescribePackage ZLIB "A compression library implementing the Deflate algorithm, used by gzip and PKZIP."
!insertmacro DescribePackage ZSTD "A lossless data compression algorithm."
!insertmacro DescribePackage READLINE "A library to allow command line history and completion."
!insertmacro DescribePackage GMP "GNU Multiple Precision Arithmetic Library."
!insertmacro DescribePackage MPFR "GNU Multiple Precision Floating-Point Reliable Library."
!insertmacro DescribePackage EXPAT "A stream-oriented XML parser library written in C."
!insertmacro DescribePackage OPENSSL "SSL and cryptography library."
!insertmacro DescribePackage PKGCONF "A program which helps to configure compiler and linker flags for development libraries."
!insertmacro MUI_FUNCTION_DESCRIPTION_END
############################################################################
# Global callbacks
# Set the unpacked size of a package
!macro SetPackageUnpackedSize package
SectionSetSize ${${package}_SECTION_INDEX} ${${package}_SIZE}
!macroend
Function .onInit
# We only support 64-bit Windows and Cygwin
${If} ${RunningX64}
SetRegView 64
${Else}
MessageBox MB_OK|MB_ICONSTOP "This software requires a 64-bit system."
Abort
${EndIf}
# Since we install already compressed packages, we need to inform about the uncompressed size
!insertmacro SetPackageUnpackedSize BINUTILS
!insertmacro SetPackageUnpackedSize MINTBIN
!insertmacro SetPackageUnpackedSize GCC
!insertmacro SetPackageUnpackedSize MINTLIB
!insertmacro SetPackageUnpackedSize FDLIBM
!insertmacro SetPackageUnpackedSize GEMLIB
# !insertmacro SetPackageUnpackedSize GDB
!insertmacro SetPackageUnpackedSize CFLIB
!insertmacro SetPackageUnpackedSize GEMMA
!insertmacro SetPackageUnpackedSize LDG
!insertmacro SetPackageUnpackedSize SDL
!insertmacro SetPackageUnpackedSize NCURSES
!insertmacro SetPackageUnpackedSize ZLIB
!insertmacro SetPackageUnpackedSize ZSTD
!insertmacro SetPackageUnpackedSize READLINE
!insertmacro SetPackageUnpackedSize GMP
!insertmacro SetPackageUnpackedSize MPFR
!insertmacro SetPackageUnpackedSize EXPAT
!insertmacro SetPackageUnpackedSize OPENSSL
!insertmacro SetPackageUnpackedSize PKGCONF
# Our current directory will remain $PLUGINSDIR during the installation
InitPluginsDir
SetOutPath $PLUGINSDIR
File bashlib.sh
FunctionEnd
Function .onGUIEnd
# Go out from $PLUGINSDIR to allow it to be automatically removed
SetOutPath $EXEDIR
FunctionEnd
############################################################################
# Supported Languages
!insertmacro MUI_LANGUAGE "English"
############################################################################
# Version tab in the Windows File Properties dialog
VIProductVersion ${PRODUCT_VERSION_DOTS}
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${PRODUCT_NAME}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${PRODUCT_VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${PRODUCT_VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${PRODUCT_NAME} ${PRODUCT_VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright © ${THIS_YEAR} ${COMPANY_NAME}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${COMPANY_NAME}"