| 1 |
; Creating a FreeFem++ package for Microsoft Windows with Inno Setup |
| 2 |
; $Id$ |
| 3 |
;; m4 def |
| 4 |
;; `DHOSTOS' = HOSTOS |
| 5 |
;; `SIZEOFPTR' = SIZEOFPTR |
| 6 |
;; ifelse(SIZEOFPTR,64, define(`SUFF64',`-64' ),define(`SUFF64',`' )) |
| 7 |
;; define(IFMPI,ifelse(len(MPIPROG),0,; ,)) |
| 8 |
;; define(IFMGW32,ifelse(SIZEOFPTR,32,,;)) |
| 9 |
;; define(IFMGW64,ifelse(SIZEOFPTR,64,,;)) |
| 10 |
;; define(IFPETSC,ifelse(len(FFPETSC),0,; ,)) |
| 11 |
|
| 12 |
|
| 13 |
;; -- end def m4 |
| 14 |
; The Inno Setup configuration file WindowsPackage.iss is built from |
| 15 |
; WindowsPackage.m4 with the command "make WindowsPackage.iss". |
| 16 |
|
| 17 |
; No source file here. They are in the source tar ball. |
| 18 |
; suppress -cs version no fltk to day , wait the next version |
| 19 |
; FH version 3.0-1 |
| 20 |
[Setup] |
| 21 |
AppName=FreeFem++-win`'SIZEOFPTR-VERSION |
| 22 |
AppVerName=FreeFem++ version VERSION (win SIZEOFPTR bits) |
| 23 |
DefaultDirName={commonpf}\FreeFem++`'SUFF64 |
| 24 |
DefaultGroupName=FreeFem++`'SUFF64 |
| 25 |
PrivilegesRequired=admin |
| 26 |
Compression=lzma |
| 27 |
SolidCompression=yes |
| 28 |
ChangesAssociations=yes |
| 29 |
OutputBaseFilename=FreeFEM-VERSION-amd64-win`'SIZEOFPTR |
| 30 |
ChangesEnvironment=yes |
| 31 |
|
| 32 |
[Dirs] |
| 33 |
Name: "{app}"; |
| 34 |
; set writing permissions for examples with write and read files |
| 35 |
Name: "{app}\examples\misc"; Permissions: everyone-full |
| 36 |
Name: "{app}\examples\plugin"; Permissions: everyone-full |
| 37 |
Name: "{app}\examples\tutorial"; Permissions: everyone-full |
| 38 |
Name: "{app}\examples\3d"; Permissions: everyone-full |
| 39 |
Name: "{app}\examples\3dSurf"; Permissions: everyone-full |
| 40 |
Name: "{app}\examples\3dCurve"; Permissions: everyone-full |
| 41 |
Name: "{app}\examples\examples"; Permissions: everyone-full |
| 42 |
Name: "{app}\examples\eigen"; Permissions: everyone-full |
| 43 |
Name: "{app}\idp"; Permissions: everyone-full |
| 44 |
IFMPI Name: "{app}\examples\mpi"; Permissions: everyone-full |
| 45 |
IFMPI Name: "{app}\examples\hpddm"; Permissions: everyone-full |
| 46 |
IFMPI Name: "{app}\examples\ffddm"; Permissions: everyone-full |
| 47 |
IFMPI Name: "{app}\examples\bem"; Permissions: everyone-full |
| 48 |
|
| 49 |
; PETSc |
| 50 |
IFPETSC Name: "{app}\ff-petsc"; Permissions: everyone-full |
| 51 |
|
| 52 |
[Files] |
| 53 |
; README |
| 54 |
Source: "README.md"; DestDir: "{app}" |
| 55 |
Source: "readme\README_WINDOWS.md"; DestDir: "{app}" |
| 56 |
Source: "readme\INNOVATION"; DestDir: "{app}" |
| 57 |
;Source: "readme\AUTHORS"; DestDir: "{app}" ; the file disapear !!!! FH |
| 58 |
Source: "readme\BUGS"; DestDir: "{app}" |
| 59 |
Source: "readme\COPYRIGHT"; DestDir: "{app}" |
| 60 |
Source: "readme\COPYING"; DestDir: "{app}" |
| 61 |
;Source: "README"; DestDir: "{app}" |
| 62 |
;Source: "crimson-freefem++.zip"; DestDir: "{app}" |
| 63 |
;Source: "0ldUserReadMe.txt"; DestDir: "{app}" |
| 64 |
|
| 65 |
; Programs |
| 66 |
Source: "src\bin-win32\FreeFem++.exe"; DestDir: "{app}" |
| 67 |
Source: "freefem++.pref"; DestDir: "{app}" |
| 68 |
ifelse(len(MPIPROG),0,; ,)Source: "src\bin-win32\FreeFem++-mpi.exe"; DestDir: "{app}" |
| 69 |
ifelse(len(MPIPROG),0,; ,)Source: "src\mpi\ff-mpirun"; DestDir: "{app}" |
| 70 |
Source: "src\bin-win32\launchff++.exe"; DestDir: "{app}" |
| 71 |
Source: "src\bin-win32\md2edp.exe"; DestDir: "{app}" |
| 72 |
; |
| 73 |
; no freefem++-cs today see ALH (FH) |
| 74 |
;Source: "src\bin-win32\FreeFem++-cs.exe"; DestDir: "{app}" |
| 75 |
;Source: "src\ide\FreeFem++-cs.exe"; DestDir: "{app}" |
| 76 |
Source: "src\nw\ffglut.exe"; DestDir: "{app}" |
| 77 |
Source: "src\medit\ffmedit.exe"; DestDir: "{app}" |
| 78 |
;Source: "src\bin-win32\FreeFem++-nw.exe"; DestDir: "{app}" |
| 79 |
Source: "src\bin-win32\bamg.exe"; DestDir: "{app}" |
| 80 |
Source: "src\bin-win32\cvmsh2.exe"; DestDir: "{app}" |
| 81 |
; Source: "src\bin-win32\drawbdmesh.exe"; DestDir: "{app}" |
| 82 |
Source: "src\bin-win32\*.dll"; DestDir: "{app}" |
| 83 |
Source: "plugin\seq\ff-c++"; DestDir: "{app}" |
| 84 |
Source: "plugin\seq\ff-get-dep.awk"; DestDir: "{app}" |
| 85 |
Source: "plugin\seq\WHERE_LIBRARY-config"; DestDir: "{app}" |
| 86 |
Source: "plugin\seq\WHERE_LIBRARY"; DestDir: "{app}" |
| 87 |
Source: "plugin\seq\WHERE_LIBRARY-download"; DestDir: "{app}" |
| 88 |
Source: "plugin\seq\ff-pkg-download"; DestDir: "{app}" |
| 89 |
Source: "plugin\seq\ff-get-dep"; DestDir: "{app}" |
| 90 |
|
| 91 |
; mingwm10.dll is necessary when "-mthreads" is used as a compilation |
| 92 |
; flag. |
| 93 |
; |
| 94 |
;ldd.exe src/bin-win32/FreeFem++.exe |awk '/mingw64/ {print "cygpath -w ",$3}'|sh|awk '{print "IFMGW64 Source: @" $0 "@ DestDir: @{app}@"}'|sed 's/@/"/g' |
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
IFMGW32 ; mingw32 .... FH. I have put all dll in bin-win32 dir .... |
| 99 |
#ifexist "C:\MinGW\bin\mingwm10.dll" |
| 100 |
IFMGW32 Source: "C:\MinGW\bin\mingwm10.dll"; DestDir: "{app}" |
| 101 |
; Source: "C:\Cygwin\bin\glut32.dll"; DestDir: "{app}" |
| 102 |
IFMGW32 Source: "C:\MinGW\msys\1.0\bin\freeglut.dll"; DestDir: "{app}" |
| 103 |
IFMGW32 Source: "C:\MinGW\bin\pthreadGC2.dll"; DestDir: "{app}" |
| 104 |
IFMGW32 Source: "C:\MinGW\bin\libgcc_s_dw2-1.dll"; DestDir: "{app}" |
| 105 |
IFMGW32 Source: "C:\MinGW\bin\libstdc++-6.dll"; DestDir: "{app}" |
| 106 |
IFMGW32 Source: "C:\MinGW\bin\libgfortran-*.dll"; DestDir: "{app}" |
| 107 |
IFMGW32 Source: "C:\MinGW\bin\libquadmath-*.dll"; DestDir: "{app}" |
| 108 |
|
| 109 |
IFMGW64 Source: "C:\msys64\mingw64\bin\libgcc_s_seh-*.dll"; DestDir: "{app}" |
| 110 |
IFMGW64 Source: "C:\msys64\mingw64\bin\libstdc++-*.dll"; DestDir: "{app}" |
| 111 |
IFMGW64 Source: "C:\msys64\mingw64\bin\libwinpthread-1.dll"; DestDir: "{app}" |
| 112 |
IFMGW64 Source: "C:\msys64\mingw64\bin\libgfortran-*.dll"; DestDir: "{app}" |
| 113 |
IFMGW64 Source: "C:\msys64\mingw64\bin\libquadmath-*.dll"; DestDir: "{app}" |
| 114 |
IFMGW64 Source: "C:\msys64\mingw64\bin\libfreeglut.dll"; DestDir: "{app}" |
| 115 |
IFMGW64 Source: "C:\msys64\mingw64\bin\libgsl*.dll"; DestDir: "{app}" |
| 116 |
#endif |
| 117 |
#ifexist "D:\MinGW\bin\mingwm10.dll" |
| 118 |
IFMGW32 Source: "D:\MinGW\bin\mingwm10.dll"; DestDir: "{app}" |
| 119 |
; Source: "D:\Cygwin\bin\glut32.dll"; DestDir: "{app}" |
| 120 |
IFMGW32 Source: "D:\MinGW\msys\1.0\bin\freeglut.dll"; DestDir: "{app}" |
| 121 |
IFMGW32 Source: "D:\MinGW\bin\pthreadGC2.dll"; DestDir: "{app}" |
| 122 |
IFMGW32 Source: "D:\MinGW\bin\libgcc_s_dw2-1.dll"; DestDir: "{app}" |
| 123 |
IFMGW32 Source: "D:\MinGW\bin\libstdc++-6.dll"; DestDir: "{app}" |
| 124 |
IFMGW32 Source: "D:\MinGW\bin\libgfortran-*.dll"; DestDir: "{app}" |
| 125 |
IFMGW32 Source: "D:\MinGW\bin\libquadmath-*.dll"; DestDir: "{app}" |
| 126 |
|
| 127 |
IFMGW64 Source: "D:\msys64\mingw64\bin\libgcc_s_seh-*.dll"; DestDir: "{app}" |
| 128 |
IFMGW64 Source: "D:\msys64\mingw64\bin\libstdc++-*.dll"; DestDir: "{app}" |
| 129 |
IFMGW64 Source: "D:\msys64\mingw64\bin\libwinpthread-1.dll"; DestDir: "{app}" |
| 130 |
IFMGW64 Source: "D:\msys64\mingw64\bin\libgfortran-*.dll"; DestDir: "{app}" |
| 131 |
IFMGW64 Source: "D:\msys64\mingw64\bin\libquadmath-*.dll"; DestDir: "{app}" |
| 132 |
IFMGW64 Source: "D:\msys64\mingw64\bin\libfreeglut.dll"; DestDir: "{app}" |
| 133 |
IFMGW64 Source: "D:\msys64\mingw64\bin\libgsl*.dll"; DestDir: "{app}" |
| 134 |
#endif |
| 135 |
|
| 136 |
IFMGW64 ; mingw64 .... FH. I have put all dll in bin-win32 dir .... |
| 137 |
|
| 138 |
;; end of mingw ------------ |
| 139 |
|
| 140 |
|
| 141 |
; Does not include FreeFem++-x11 which would need the Cygwin X-Server |
| 142 |
; Does not include FreeFem++-glx which would need the Cygwin X-Server |
| 143 |
|
| 144 |
; Examples |
| 145 |
Source: "idp\*.idp"; DestDir: "{app}\idp" |
| 146 |
Source: "examples\misc\*.edp"; DestDir: "{app}\examples\misc" |
| 147 |
Source: "examples\eigen\*.edp"; DestDir: "{app}\examples\eigen" |
| 148 |
Source: "examples\tutorial\*.edp"; DestDir: "{app}\examples\tutorial" |
| 149 |
Source: "examples\tutorial\aile.msh"; DestDir: "{app}\examples\tutorial" |
| 150 |
Source: "examples\tutorial\xyf"; DestDir: "{app}\examples\tutorial" |
| 151 |
Source: "examples\examples\*.edp"; DestDir: "{app}\examples\examples" |
| 152 |
Source: "examples\plugin\*.edp"; DestDir: "{app}\examples\plugin" |
| 153 |
Source: "examples\plugin\*.pgm"; DestDir: "{app}\examples\plugin" |
| 154 |
Source: "examples\plugin\*.pts"; DestDir: "{app}\examples\plugin" |
| 155 |
Source: "examples\plugin\cube.msh"; DestDir: "{app}\examples\plugin" |
| 156 |
Source: "examples\plugin\g.gmesh"; DestDir: "{app}\examples\plugin" |
| 157 |
|
| 158 |
Source: "plugin\seq\load.link"; DestDir: "{app}\plugin" |
| 159 |
Source: "plugin\include-tmp\*"; DestDir: "{app}\include" |
| 160 |
Source: "examples\3d\*.edp"; DestDir: "{app}\examples\3d" |
| 161 |
Source: "examples\3d\dodecaedre01.mesh"; DestDir: "{app}\examples\3d" |
| 162 |
Source: "examples\3d\lac-leman-v4.msh"; DestDir: "{app}\examples\3d" |
| 163 |
Source: "examples\3dSurf\*.edp"; DestDir: "{app}\examples\3dSurf" |
| 164 |
Source: "examples\3dCurve\*.edp"; DestDir: "{app}\examples\3dCurve" |
| 165 |
IFMPI Source: "examples\mpi\ff*.txt"; DestDir: "{app}\examples\mpi" |
| 166 |
IFMPI Source: "examples\mpi\*.edp"; DestDir: "{app}\examples\mpi" |
| 167 |
IFMPI Source: "examples\hpddm\*.edp"; DestDir: "{app}\examples\hpddm" |
| 168 |
IFMPI Source: "examples\bem\*.edp"; DestDir: "{app}\examples\bem" |
| 169 |
;Source: "0ldUserReadMe.txt"; DestDir: "{app}\examples\load" |
| 170 |
;Source: "0ldUserReadMe.txt"; DestDir: "{app}\examples\tutorial" |
| 171 |
;Source: "0ldUserReadMe.txt"; DestDir: "{app}\examples\examples" |
| 172 |
;Source: "0ldUserReadMe.txt"; DestDir: "{app}\examples\misc" |
| 173 |
;Source: "0ldUserReadMe.txt"; DestDir: "{app}\examples\eigen" |
| 174 |
|
| 175 |
;PETSc |
| 176 |
#if DirExists("FFPETSC") |
| 177 |
IFPETSC Source: "FFPETSC\*"; DestDir: "{app}\ff-petsc"; Flags: recursesubdirs |
| 178 |
#endif |
| 179 |
#if DirExists("D:\a\_temp\msys64\mingw64\ff-petsc\") |
| 180 |
IFPETSC Source: "D:\a\_temp\msys64\mingw64\ff-petsc\*"; DestDir: "{app}\ff-petsc"; Flags: recursesubdirs |
| 181 |
#endif |
| 182 |
|
| 183 |
; Documentation files may need to be copied from another machine if |
| 184 |
; Cygwin refuses to build them. |
| 185 |
|
| 186 |
Source: "FreeFEM-documentation.pdf"; DestDir: "{app}" |
| 187 |
|
| 188 |
; Icons for Windows can be created from a 32x32 image with icotool |
| 189 |
; (Linux Debian unstable), or IrfanView (Windows, not very good |
| 190 |
; results) or paint (Windows, save in .bmp then rename to .ico). |
| 191 |
|
| 192 |
Source: "etc\logo\logo.ico"; DestDir: "{app}" |
| 193 |
|
| 194 |
[Icons] |
| 195 |
|
| 196 |
; Menu |
| 197 |
Name: "{group}\FreeFem++"; Filename: "{app}\launchff++.exe"; IconFilename: "{app}\logo.ico" |
| 198 |
;Name: "{group}\FreeFem++ GUI"; Filename: "{app}\FreeFem++-cs.exe" |
| 199 |
Name: "{group}\PDF manual"; Filename: "{app}\FreeFEM-documentation.pdf" |
| 200 |
Name: "{group}\Examples\Tutorial"; Filename: "{app}\examples\tutorial" |
| 201 |
Name: "{group}\Examples\chapt3"; Filename: "{app}\examples\examples" |
| 202 |
Name: "{group}\Examples\load"; Filename: "{app}\examples\plugin" |
| 203 |
Name: "{group}\Examples\Main"; Filename: "{app}\examples\misc" |
| 204 |
Name: "{group}\Examples\Eigenvalues"; Filename: "{app}\examples\eigen" |
| 205 |
Name: "{group}\Examples\3d"; Filename: "{app}\examples\3d" |
| 206 |
Name: "{group}\Examples\3dSurf"; Filename: "{app}\examples\3dSurf" |
| 207 |
Name: "{group}\Examples\3dCurve"; Filename: "{app}\examples\3dCurve" |
| 208 |
IFMPI Name: "{group}\Examples\mpi"; Filename: "{app}\examples\mpi" |
| 209 |
IFMPI Name: "{group}\Examples\hpddm"; Filename: "{app}\examples\hpddm" |
| 210 |
IFMPI Name: "{group}\Examples\bem"; Filename: "{app}\examples\bem" |
| 211 |
|
| 212 |
Name: "{group}\Uninstall FreeFem++ VERSION"; Filename: "{uninstallexe}" |
| 213 |
|
| 214 |
; Desktop |
| 215 |
Name: "{userdesktop}\FreeFem++ VERSION"; Filename: "{app}\launchff++.exe"; IconFilename: "{app}\logo.ico" |
| 216 |
;Name: "{userdesktop}\FreeFem++ VERSION GUI"; Filename: "{app}\FreeFem++-cs.exe" |
| 217 |
Name: "{userdesktop}\FreeFem++ VERSION Examples"; Filename: "{group}\Examples" |
| 218 |
|
| 219 |
|
| 220 |
[Registry] |
| 221 |
|
| 222 |
; Link .edp file extension to FreeFem++ |
| 223 |
Root: HKCR; Subkey: ".edp"; ValueType: string; ValueName: ""; ValueData: "FreeFemVERSIONScript"; Flags: uninsdeletevalue |
| 224 |
Root: HKCR; Subkey: "FreeFemVERSIONScript"; ValueType: string; ValueName: ""; ValueData: "FreeFem++ Script"; Flags: uninsdeletekey |
| 225 |
Root: HKCR; Subkey: "FreeFemVERSIONScript\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\logo.ico" |
| 226 |
Root: HKCR; Subkey: "FreeFemVERSIONScript\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\launchff++.exe"" ""%1""" |
| 227 |
|
| 228 |
|
| 229 |
[Tasks] |
| 230 |
Name: modifypath; Description: &Add application directory to your system path (if missing you can have trouble with on-the-fly graphic ) ; Flags: checkedonce |
| 231 |
; unchecked |
| 232 |
|
| 233 |
[Code] |
| 234 |
const |
| 235 |
ModPathName = 'modifypath'; |
| 236 |
ModPathType = 'system'; |
| 237 |
|
| 238 |
function ModPathDir(): TArrayOfString; |
| 239 |
begin |
| 240 |
setArrayLength(Result, 1) |
| 241 |
Result[0] := ExpandConstant('{app}'); |
| 242 |
end; |
| 243 |
#include "bin\modpath.iss" |