You are here

Using DoubleExtractFilename

9 posts / 0 new
Last post
Drazick
Offline
Last seen: 4 days 19 hours ago
Joined: 2010-09-06 06:36
Using DoubleExtractFilename

I am trying to build a PortableApp.
The installer is an online installer.

The download file is an EXE file which has a folder within named $PLUGINSDIR which has a file named app-64.7z inside it.
What I want is to be able to extract the contents of app-64.7z into App\AppName folder.

Hence I created installer.ini as following:

[Source]
IncludeInstallerSource=true

[DownloadFiles]
DownloadURL=https://github.com/someorg/someproject/releases/download/somefile.0.14.6.exe
DownloadName=AppName 64 Bit
DownloadFilename=somefile.0.14.6.exe
AdvancedExtract1To=App\AppName
AdvancedExtract1Filter=$PLUGINSDIR\app-64.7z
DoubleExtractFilename=app-64.7z
DoubleExtract1To=App\AppName
DoubleExtract1Filter=**
AdditionalInstallSize=500000

I can successfully package the installer.
When I run it, it downloads the file but I get an error and the App\AppName is empty.

How should I properly do it?

Drazick
Offline
Last seen: 4 days 19 hours ago
Joined: 2010-09-06 06:36
Looking at Google Chrome Example

I looked at code of the Google Chrome installer.

I can see it directly use the file name to extract, hence I tried:

[Source]
IncludeInstallerSource=true

[DownloadFiles]
DownloadURL=https://github.com/someorg/someproject/releases/download/somefile.0.14.6.exe
DownloadName=AppName 64 Bit
DownloadFilename=somefile.0.14.6.exe
DoubleExtractFilename=app-64.7z
DoubleExtract1To=App\AppName
DoubleExtract1Filter=**
AdditionalInstallSize=500000

It still didn't work.
I also tried DoubleExtractFilename=$PLUGINSDIR/app-64.7z which didn't work either.

Does the double extraction functionality assumes the archive is flat (Like in Chrome)?

Drazick
Offline
Last seen: 4 days 19 hours ago
Joined: 2010-09-06 06:36
The File Structure

In order to make the file structure more explicit, it look like:

- MyInstaller.exe
    - $PLUGINSDIR
        - app-64.7z
        - SomeFile001.smt
        - SomeFile002.smt
        - SomeFile003.smt
        - SomeFile004.smt
    - SomeFile.smf
    - OtherFile.smt

What I want is to extract app-64.7z to the App\AppName folder.

Could it be done? Or is it a feature request?

Drazick
Offline
Last seen: 4 days 19 hours ago
Joined: 2010-09-06 06:36
Any Assistance on DoubleExtractFilename

@John, @Gord, Any chance for your assistance on this?

What are the assumption of DoubleExtractFilename?
Is it assumed the 2nd archive is directly under the main archive or can it be inside a sub folder?

JLim
Offline
Last seen: 5 months 4 days ago
Joined: 2013-07-17 01:30
$PLUGINSDIR

$PLUGINSDIR is a variable which point to %Temp%\ns*.tmp
If $PLUGINSDIR is a directory or file name in your case, you should enter the code as:
$$PLUGINSDIR\app-64.7z or '$'PLUGINSDIR\app-64.7z

Drazick
Offline
Last seen: 4 days 19 hours ago
Joined: 2010-09-06 06:36
Incorporating Your Suggestion

So, accoridng to this, I should do something like:

[Source]
IncludeInstallerSource=true

[DownloadFiles]
DownloadURL=https://github.com/someorg/someproject/releases/download/somefile.0.14.6.exe
DownloadName=AppName 64 Bit
DownloadFilename=somefile.0.14.6.exe
DoubleExtractFilename=$$PLUGINSDIR\app-64.7z
DoubleExtract1To=App\AppName
DoubleExtract1Filter=**
AdditionalInstallSize=500000

Am I missing something?

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 day 14 hours ago
DeveloperModerator
Joined: 2008-07-24 18:46
Not familiar, possibly

Drazick, I'm not familiar with how that particular filter is used, not having used it before, but what I've been able to determine is that your DoubleExtractFilename should probably be as suggested by JLim. However, without being able to test myself (I haven't found an exe with a zip file in the plugins directory), I can't say for sure.

JLim
Offline
Last seen: 5 months 4 days ago
Joined: 2013-07-17 01:30
Don't use PAI

Sorry, can't help you in PAI because I don't use. I portablize softwares for my own use only.

Drazick
Offline
Last seen: 4 days 19 hours ago
Joined: 2010-09-06 06:36
It Worked!

Well, you got it correctly, it seems your trick of using $$PLUGINSDIR worked.

Thank You.

Log in or register to post comments