Creating Setup of large data with NSIS Script - installation

I am creating setup of large data approximetly 10 GB with NSIS Script and trying to create a single setup (exe). Its giving an Error -
Internal compiler error #12345: error mmapping file (xxxxxxxxxx, xxxxxxxx) is out of range.
Note: you may have one or two (large) stale temporary file(s) left in your temporary directory (Generally this only happens on Windows 9x).
Please tell me how to solve this issue ?
Is there any other way to create a setup for this kinda situation ?

NSIS installers are limited to 2Gb.
If you absolutely need it to be one file and you want to continue to use NSIS you have to append the data to the end of the generated setup. I'm not sure I would recommend that approach but it could work if the appended data is a zip file (or some other format with the header at the end) and you use one of the NSIS zip plugins to extract at run-time...

I have used https://sourceforge.net/projects/nsisbi/ instead of normal NSIS. It solved the problem.

I was using Silent Install Builder 5 and received this same error with a package installer that had LESS that 2 GB total. Once I determined that the NSIS compiler was to blame, I began experimenting with several possible solutions and here's what worked: I downloaded the newer NSISBI compiler from here https://sourceforge.net/projects/nsisbi/ and then did these 3 steps:
Go to C:\Program Files (x86)\Silent Install Builder 5 and renamed the default NSIS folder to a new name.
Copied the NSISBI folder into the C:\Program Files (x86)\Silent Install Builder 5 directory and renamed IT to NSIS.
Tries to compile some large packages above and just below 2GB and the first few tries I would get missing file errors in the Silent Install Builder 5 compiling box. No worries because the missing files are in the old NSIS folder, that's why y9u don't delete it.
Each time find the missing file error displays, find the missing files and copy them into the same folder location in the new NSIS folder. About 3 times you will do this until there are no more errors at all and you can then include the large files without generating the "internal compiler error #12345: error mmapping file xxxx is out of range." error message. NSISBI works!

Related

Multiple problems installing TeX Live 2021 on Windows 10

I have a Windows 10 laptop where no TeX distribution was ever installed before (double-checked for config directories, files, and environment variables).
Wanting to install TeX Live 2021, I followed the full installation guide and also read the Windows-specific warnings. I've now tried several times, following different installation procedures - cleaning up everything (deleting base & user directories, environment variables, etc) before each time - but still don't manage to get a working installation. Before I report a bug at tex-live#tug, I wanted to ask for advice here, in case I'm doing something wrong. Here is what I did, step by step, and the problems I encountered in the process.
1. First I tried running the recommended online installer install-tl-windows.exe. It never got past the screen that tries to contact or load from a repository, even after a 30-min wait. Tried a dozen times, choosing different mirrors nearby and far away. No luck.
2. Then I downloaded and unpacked the install-tl.zip and run install-tl-windows.bat therein. This time the main installation window appeared. I left all default paths and environment variables (note that I do have write access to C:); in the selection scheme I unselected all languages except US & UK English, unselected XeTeX, LuaTeX, ConTeXt; also unselected TeXworks (I use Emacs), and clicked Install. After one to three hours (depending on the mirror I chose), the installation was complete.
I tried compiling a minimal latex document (see below), and got an error similar to the one in this old question:
I can't find the format file `pdflatex.fmt'
Following the advice in the answers to that question and similar questions elsewhere online such as this, I tried running texhash and fmtutil-sys --all. The latter gave the error
no appropriate script or programme found fmtutil.
for which there are also many posts online.
2a. Not understanding what the problem could be, I re-tried with all possible combinations of the following three options: (a) choosing different mirrors; (b) leaving the full selection of packages (ie without unselecting some languages, LuaTeX etc); (c) redoing the procedure by choosing "Run as Administrator". No luck.
3. At this point I tried downloading the ISO file with the full installation. Mounted the image and run install-tl-windows.bat (as normal user, as recommended; I repeat that I do have write access to C:). Everything proceeded as in step 2. above. At the end of the installation I tried running pdflatex on the minimal latex document. New error this time:
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/W32TeX) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./minimal-template.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-02-18>
! LaTeX Error: File `article.cls' not found.
Very strange. A file search revealed that article.cls is in the TeXLive file system; but kpathsea did not see it indeed.
4. At this point I opened the TeX Live Shell from the Start Menu; selected a CTAN mirror; updated the TL Manager which was not up to date; updated all packages; run Regenerate filename database; and run Regenerate formats. With the latter I got this error:
tex live shell:
mtutil [INFO]: total formats: 59
fmtutil [INFO]: exiting with status 53
C:\texlive\2021\bin\win32\runscript.tlu:915: command failed with exit code 53:
perl.exe c:\texlive\2021\texmf-dist\scripts\texlive\fmtutil.pl --sys --all
Here is a snip from the full set of errors appearing in the "Other" tab (I'm replacing my user directory with asterisks for privacy; note that I do have write access to these directories):
start load https://www.nic.funet.fi/pub/TeX/CTAN/systems/texlive/tlnet
finish load https://www.nic.funet.fi/pub/TeX/CTAN/systems/texlive/tlnet
start load http://contrib.texlive.info/current
finish load http://contrib.texlive.info/current
running mktexlsr ...
done running mktexlsr.
running mtxrun --generate ...
done running mtxrun --generate.
running updmap-sys ...
done running updmap-sys.
regenerating fmtutil.cnf in C:/texlive/2021/texmf-dist
running fmtutil-sys --byengine luatex --no-error-if-no-format --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --status-file=C:\Users\***\AppData\Local\Temp\rPSb0Dpak2\WW_dJvUHgX ...
tlmgr.pl: fmtutil-sys --byengine luatex --no-error-if-no-format --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --status-file=C:\Users\***\AppData\Local\Temp\rPSb0Dpak2\WW_dJvUHgX failed (status 255), output:
Unknown option: status-file
Try "fmtutil --help" for more information.
C:\texlive\2021\bin\win32\runscript.tlu:915: command failed with exit code 255:
perl.exe c:\texlive\2021\texmf-dist\scripts\texlive\fmtutil.pl --sys --byengine luatex --no-error-if-no-format --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --status-file=C:\Users\***\AppData\Local\Temp\rPSb0Dpak2\WW_dJvUHgX
running fmtutil-sys --byengine luajithbtex --no-error-if-no-format --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --status-file=C:\Users\***\AppData\Local\Temp\rPSb0Dpak2\WW_dJvUHgX ...
I tried to continue anyway with Regenerate fontmaps, and then tried again pdflatex on the minimal document. New error:
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/W32TeX) (preloaded format=pdflatex)
restricted \write18 enabled.
---! c:/texlive/2021/texmf-var/web2c/pdftex/pdflatex.fmt made by different executable version
(Fatal format file error; I'm stymied)
5. I tried again steps 3. and 4., but with "Run as Administrator". Same errors.
OK at this point I give up and really don't know what to do. Am I doing something wrong? For the moment I have to concur with this post: installation of TeX Live 2021 is an utter failure.
Here is the minimal latex file I used for testing (copy & paste):
\documentclass{article}
\begin{document}
test
\section{Section}
test
\end{document}
Found, that the download is not working because the system path to "cmd.exe" is not found. Therefore: open a cmd window and add the system path prior to starting the .bat file (set PATH=%PATH%;C:\Windows\system32)

How do I install shared data on Windows with CPack?

I'm trying to install some data which would be shared between a few different programs we make. The signs seem to point to C:\ProgramData\${CompanyName}, which is fine, but of course CPack objects to absolute paths.
In this case, I'm targeting the WIX installer.
I can't seem to find any documentation which says what I ought to be using.
INSTALL (FILES ../config/netstat_protocol.xml DESTINATION ${INSTALL_OCU_DIR} )
If I want INSTALL_OCU_DIR to resolve to something like C:\ProgramData\MyCompanyName\ocu, what's the right way?
Here are the lines I last tried:
set(INSTALL_OCU_DIR "%PROGRAMDATA%/CyPhy/ocu")
INSTALL(DIRECTORY DESTINATION ${INSTALL_OCU_DIR} DIRECTORY_PERMISSIONS WORLD_READ WORLD_WRITE WORLD_EXECUTE)
INSTALL (FILES ../config/netstat_protocol.xml DESTINATION ${INSTALL_OCU_DIR} )
This results in the error: Executing op:
SetTargetFolder(Folder=C:\Program Files\cyocu 2.0.0\%PROGRAMDATA%\CyPhy\ocu\)

F# Microsoft.ParallelArrays not defined

So I downloaded and installed Microsoft Accelerator v2 to use ParallelArrays. I have referenced it in my project but when I try and execute the code from the module in a script file I get:
"The namespace 'ParallelArrays' is not defined
I have followed the instructions on this post:
Microsoft Accelerator library with Visual Studio F#
I've added a reference to the managed version "Microsoft.Accelerator.dll" to my F# project and then added the native "Accelerator.dll" as an item in my solution and set it's 'Copy To Output Directory' to Copy Always.
Still getting the FSI error and inline error in my script file on the '#load ...' line, however the solution builds fine, and no error in the module file.
Any ideas on what I'm missing? I'm sure it's something stupid.
Thanks,
Justin
UPDATE
I tried mydogisbox's advice, which got rid of the error above, but now when I run the code in the .fsx file I get this error instead:
--> Referenced 'F:\Work\GitHub\qf-sharp\qf-sharp\bin\Debug\Microsoft.Accelerator.dll' (file may be locked by F# Interactive process)
[Loading F:\Work\GitHub\qf-sharp\qf-sharp\MonteCarloGPU.fs]
error FS0192: internal error: F:\Work\GitHub\qf-sharp\qf-sharp\Accelerator.dll: bad cli header, rva 0
UPDATE 2
So the bad header error has dissapeared, but now I get this instead:
Microsoft.ParallelArrays.AcceleratorException: Failure to create a DirectX 9 device.
at Microsoft.ParallelArrays.ParallelArrays.ThrowNativeAcceleratorException()
at Microsoft.ParallelArrays.DX9Target..ctor()
at <StartupCode$FSI_0002>.$FSI_0002_MonteCarloGPU.main#() in F:\Work\GitHub\qf- sharp\qf-sharp\MonteCarloGPU.fs:line 14
Stopped due to error
I found this thread on MSDN however the answers proposed as fixes on that thread barely even relate to the question.
http://social.msdn.microsoft.com/Forums/vstudio/en-US/98600646-0345-4f62-a6c5-f03ac9c77179/ms-accelerator?forum=csharpgeneral
My Direct X version is 11, and I imagine that will suffice, however I tried installing DX9 however, it tells me that a newer version is detected therefore cant install.
There are special directives for referencing dlls from fsi. The #load directive loads the .fs file only. You need to use the #r directive to reference the file. You can either use the full path of the file or you can use #I to include the path to the file. More details here. Keep in mind that fsi is completely independent of your project, so all references in your project must be duplicated in fsi for it to access the same types.

Why am I recieving this error: LNK1104: cannot open file 'opencv_core246d.lib''?

I am trying to run a program that does not include any opencv files, but for some reason this error keeps popping up and preventing me from running the program.
LNK1104: cannot open file 'opencv_core246d.lib' C:\Users\Public\Documents\imgSwitchingFiles
Please can somebody shed light on this issue?
It looks like your project options state this library should be linked to your binaries. Did you reuse this project from elsewhere?
If you really don't need OpenCV, simply remove its libraries from the project linking options.
In project properties:
VC++ Directories>Library files>C:\OpenCV2.4.3\build\x86\vc9\lib
&
Linker>Input>Additional Dependencies>
Add the following under edit (each on a new line)
opencv_core243d.lib; opencv_imgproc243d.lib; opencv_highgui243d.lib; opencv_ml243d.lib; opencv_video243d.lib; opencv_features2d243d.lib; opencv_calib3d243d.lib; opencv_objdetect243d.lib; opencv_contrib243d.lib; opencv_legacy243d.lib; opencv_flann243d.lib;
Your file paths may be different i.e. vc10 instead of vc9 or u may have x64 instead of x86.
Also u will have 246 in every .lib instead of 243.

File Replace during upgrade

We use Inno Setup(version 5.4.2) as the packaging tool to generate our installer. While upgrading our software from older version to current version,
we try to overwrite existing binaries/drivers. This is often leading to issues as some monitoring software like 'HP ArcSight Logger/Connector', 'SplunkUniversalForwarder' etc. are holding file handles on our binaries and casuing overwrite to fail. Our installer shows beolow popup message on encountering this issue each time.
"C:\Windows\System32\drivers\xxx.sys
An error occurred while trying to replace the existing file:
DeleteFile failed; code 5.
Access is denied.
Click Retry to try again, Ignore to skip this file(not recommended), or Abort to cancel installation"
Interestingly, even after above getting above pop-up, we were able to rename xxx.sys to xxx.sys.old manully. We used to suggest cusotmers to rename
xxx.sys to xxx.sys.old and 'Retry' the installation. After renaming, upgrade used to complete without any issues.
Questions
1) Is it possible to rename xxx.sys through program always, when we hit this issue.
2) Any process to reproduce the DeleteFile failed; code 5 issue?
Using the installer you can rename the existing file and install the new file using the correct file name with help from the windows registry.Remember to ask the user to reboot their computer to complete the install.Another option would be to either use the installer to rename the file and again using the window's registry to delete the unneeded file.
Window's registry allows you to delete or rename files on reboot as part of an install.
Reference to use of PendingFileRenameOperations:
http://support.microsoft.com/kb/181345
Example to rename from microsoft support:
The syntax used is (without quotes):
"\??\source file !\??\target file"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
Value name: PendingFileRenameOperations Data type : REG_MULTI_SZ
Value data: \??\c:\temp\win32k.sys !\??\c:\winnt\system32\win32k.s
The same command can be used to delete a file as well although requires the use of nulls.
http://www.pcreview.co.uk/forums/pendingfilerenameoperations-delete-file-t1715654.html
Same example used to delete a file:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
Value name: PendingFileRenameOperations Data type : REG_MULTI_SZ
Value data: \??\c:\temp\win32k.sys\0\0\0
I hope this helps you!

Resources