|
|
#1 |
|
Junior Member
Join Date: Feb 2016
Posts: 11
|
7z file outside the installer.
Hello everyone.
It's been a week i'm trying to build an installer. Everything is done except one thing. I can't find a way to build the installer with the 7z file outside. The folder which contains the subfolders and files is around 13.4 gb. With 7z on max compression it will go around 6 gb. So what i want to do is to build the installer with the data.7z next to it. During the installation the installer will extract the data in $INSTDIR. Please don't recommand me CABSetup plug-in. I downloaded it, read the steps in the readme file and i couldn't understand a thing. Everything looked so difficult. I have also tried the following but it didn't work: Nsis7z::ExtractWithDetails "$EXEPATH\data.7z" "Installing: %s..." I wish you guys have a solution. You are my last hope... |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
Instead of using a .7z file, try my fork for big installers: https://sourceforge.net/projects/nsisbi/.
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2016
Posts: 11
|
Huge thanks for assisting me Jason.
As a first step i added this line in my script: SetExOutFile true Then i compiled it with makensisw.exe from your fork. The installer got created successfully together with a nsisbin file. The problem is that when i run the installer i get this error: ![]() What can be wrong? :s |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
And didn't work means what exactly? Compiler error? Error when running? No error at run-time and no files extracted?
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Feb 2016
Posts: 11
|
|
|
|
|
|
|
#6 |
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
I don't think $EXEPATH exists, try using $EXEDIR.
As for the nsis error from my fork, try creating your installer again but without all the data. If it still fails, then I can start looking into it. "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
It does but it is the full path including the filename. If it did not exist he would have gotten a compiler warning. I think you found the smoking gun...
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#8 | |
|
Junior Member
Join Date: Feb 2016
Posts: 11
|
Quote:
I have one more question guys. Why nsis7z can't decompress lzma2 archives? Is it outdated? |
|
|
|
|
|
|
#9 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
The current version of nsis7z is based on a Beta version of 7-zip. 7-zip 15.14 is now stable but I have not yet updated the plug-in. You can try an older version of the plug-in.
|
|
|
|
|
|
#10 |
|
Junior Member
Join Date: Feb 2016
Posts: 11
|
Well, i used lzma on max compression level. I'm fine with the result.
|
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Feb 2016
Posts: 11
|
Alright. The installer is ready and it looks awesome thanks to you guys. I put everything in an ISO file. I also included an autorun.inf file. Everything is perfect. Now i'm moving on the creation of the installer for the update patches of my application. It will be using VPatch. The idea is like this. There are some files (more than 14) that are ~100 mb each one of them. I don't want to include these files in the installer. So is there any way the installer does the following process?
- Checks those files if they are up-to-date in the installation folder. - Then (If they are not) the installer patches them. - Or (if they are) the installer will do a DetailPrint "<file name> is up-to-date!" I certainly have already taken a look at the example.nsi file of VPatch. It seems in both normal way and hard way the installer includes the updated file. But i don't want that. I want to keep the installer ~100-120 mb max. By the way i would like to use the hard way so the .pat files are extracted in the plug-ins folder. In this way customers will not see any temporary files in the installation folder. Thanks in advance. |
|
|
|
|
|
#12 | |
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
VPatch stores the differences in the files, so when you create the patch, you give it the original file that was on the "install disk", and the new version of the file, and the resulting .pat file contains the difference between them. I think it also stores checksum data to check the original file to see if it can be patched? I don't remember, I've only read the documentation.
Generally the .pat file is included in the installer with 'File', and you extract this file to the $pluginsdir, and call vpatch from there. Quote:
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|
|
|
|
|
|
#13 |
|
Junior Member
Join Date: Feb 2016
Posts: 11
|
Alright i will try it and i will give you feedback as soon as possible.
Oh! Since i want to patch multiple files during the installation what am i supposed to do? Something like this? vpatch::vpatchfile "$PLUGINSDIR\patch.pat" vpatch::vpatchfile "$PLUGINSDIR\patch.pat" . . . vpatch::vpatchfile "$PLUGINSDIR\patch.pat" In a few words, am i supposed to call the above command as many times as the files i want to patch? |
|
|
|
|
|
#14 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
If you have more than one .pat file then you need to delete the old and extract the new file for each. Maybe you should just play around with the plugin a bit to get a feel for how it works...
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#15 |
|
Junior Member
Join Date: Feb 2016
Posts: 11
|
No it's actually only one .pat file. I used the VPatchGUI.exe and there i selected all the files i want to patch. E.g.:
file A v1 > file A v2 file B v1 > file B v2 . . . But how do i call VPatch for each file during installation? I checked all the readme and example files of the plugin but i didn't find anything useful. :/ |
|
|
|
|
|
#16 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
I have not used VPatch in years so I don't remember the details. I suggest that you just create some text files and then create some patches and just try to get it working on the easy to debug text files...
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#17 | |
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
From the VPatch docs:
Quote:
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|
|
|
|
|
|
#18 |
|
Junior Member
Join Date: Feb 2016
Posts: 11
|
Guys i want to thank all of you, especially you Jason for helping me.
![]() The main installer and the installer for the update patches are ready. I also want to thank Afrow for updating his Nsis7z plugin. I accidentally noticed that a few minutes ago. I would like to report some things about the plugin though, since i downloaded the new version and used it. - If i use the x86-unicode version, no errors, nothing is extracted. - If i use the x64-unicode version, i get the following error during compiling: Invalid command: Nsis7z::ExtractWithDetails - The x86-ansi version seems to be working well though. I'm waiting for your reply Afrow. P.S. The data.7z file is made by 7-Zip 15.14 (64-bit). |
|
|
|
|
|
#19 |
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
NSIS 2.x is ansi 32bit only (x86-ansi).
NSIS 3.x is ansi and unicode 32bit only (x86-ansi, x86-unicode). You can compile NSIS 3.x as a 64bit version, this uses the 'amd64-unicode' plugin. "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|
|
|
|
|
#20 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You don't need to use the 64-bit version of the plug-in just because you've used the 64-bit version of 7-Zip to create the archive!
Stu |
|
|
|
|
|
#21 |
|
Junior Member
Join Date: Feb 2016
Posts: 11
|
@Jason
I installed NSIS v3.x and installed the plugin but during compiling my script i was getting error(s). I can't remember what error(s) i was getting though. I was too tired and sleepy to solve another mystery. So i switched back to NSIS v2.50 and i installed the ansi version of the plugin. Both of them do their job so no problem. @Afrow Yeah i know. The situation was that i didn't know which version (x64 unicode, x86 unicode, x86 ansi) to install so i started testing each one of them. And while i was testing them, i faced those issues i reported. Guys now i will need your experience one more time, hopefully the last one. I am head admin of a forum. That forum provides a software. Another head admin of that forum was responsible for the update patches of the software. Unfortunately that head admin is no longer active and the last time i asked him, he told me that he lost the nsis scripts and the old versions of the files he was creating patches for. The last cumulative patch he made was v8. So here is my question now. Is there anyway i continue making cumulative patches considering i can't have the old versions of the files? And what i want isn't i continue providing his cumulative patch v8 and my cumulative patch next to it. What i want is i continue his cumulative patch so there is only one patch available. I wish you have a solution for this guys, i really do. Because for me, it already seems very tricky. :/ |
|
|
|
|
|
#22 |
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
This is tricky. One answer is time consuming, which involves checking and patching. How many versions of the patches are still available?
The basic idea is that you are recreating the patch tree yourself. Basically you take a fresh install, copy the relevant files that need to be updated (these are the 'originals'), apply the first version of the patch, copy the updated files (these are 'v1', so to speak), apply the second version of the patch, copy those files (these are 'v2'), and so on. Writing the scripts is another story, I haven't used VPatch before so I have very little experience in writing scripts that use it. The idea is to write a 'generation' script for each version, a script that auto-searches the versions and adds patches that didn't exist before. This is just one possible solution, there may be better or worse ones out there. "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|
|
|
|
|
#23 |
|
Junior Member
Join Date: Feb 2016
Posts: 11
|
Right now, there is only his cumulative patch v8 and my patch v11 which is not cumulative. I have an idea and i want you tell
me if it will work. - I do a clean install of the application. - Compare the files of the installed app with the files of the current latest version of the app. Then save the old files in a folder named "initial". - Install his cumulative patch and compare the files again. Then save the old files in a folder named "latest installed". - I remove my patch v11 from the forum. - I make a new patch v11 which is cumulative this time which can update fresh setups of the app and setups that have his v8 patch installed. - And every time there is a new update i will just compare the files, copy the old ones and paste them in the "latest installed" folder overwriting the previous ones. In this way, every new cumulative patch i will release it will be able to update fresh setups and setups that have the previous cumulative patch installed. What do you think? |
|
|
|
|
|
#24 |
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
I think you are one step ahead of me. I don't have enough experience in this area, so at this point you know more about it than I do.
The problem solver in me says to try a couple of tests/processes offline and find one that works well, then build the new patch and 'publish' it online. "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|
|
|
![]() |
|
|||||||
| Tags |
| 2 gb limit, 7zip, files out of installer, nsis |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|