You are here

Online Installer

11 posts / 0 new
Last post
xmha97
Offline
Last seen: 4 hours 13 min ago
Joined: 2021-01-03 06:04
Online Installer

Hi, I creating online installer of Obsidian Portable.
The online installer works well but there are two problems:
1. The online installer can't download ARM 64-bit version of Obsidian app.
2. The online installer downloads the official Obsidian installation file multiple times.
Please help me.

You can download and test the my online installer here:
https://github.com/xmha97/PortableApps/releases/tag/obsidian-v1.8.9

[DownloadFiles]
DownloadURL=https://github.com/obsidianmd/obsidian-releases/releases/download/v1.8.9/Obsidian-1.8.9.exe
DownloadName=Obsidian (64-bit)
DownloadFilename=Obsidian-1.8.9.exe
DoubleExtractFilename=$$PLUGINSDIR\app-64.7z
DoubleExtract1To=App\Obsidian-amd64
DoubleExtract1Filter=**
AdditionalInstallSize=266743
DownloadSHA256=045f480fd779784ec647d654d17abb764b60bb1661b142c236f994c6c49e4dfb
Download2URL=https://github.com/obsidianmd/obsidian-releases/releases/download/v1.8.9/Obsidian-1.8.9.exe
Download2Name=Obsidian (32-bit)
Download2Filename=Obsidian-1.8.9.exe
Download2DoubleExtractFilename=$$PLUGINSDIR\app-32.7z
Download2DoubleExtract1To=App\Obsidian-386
Download2DoubleExtract1Filter=**
AdditionalInstallSize=266743
DownloadSHA256=045f480fd779784ec647d654d17abb764b60bb1661b142c236f994c6c49e4dfb
Download3URL=https://github.com/obsidianmd/obsidian-releases/releases/download/v1.8.9/Obsidian-1.8.9.exe
Download3Name=Obsidian (ARM 64-bit)
Download3Filename=Obsidian-1.8.9.exe
Download3DoubleExtractFilename=$$PLUGINSDIR\app-arm64.7z
Download3DoubleExtract1To=App\Obsidian-arm64
Download3DoubleExtract1Filter=**
AdditionalInstallSize=266743
DownloadSHA256=045f480fd779784ec647d654d17abb764b60bb1661b142c236f994c6c49e4dfb
John T. Haller
John T. Haller's picture
Offline
Last seen: 11 hours 52 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
2 Downloads

The PA.c Installer only supports 2 downloads. I'd suggest leaving off ARM

Sometimes, the impossible can become possible, if you're awesome!

xmha97
Offline
Last seen: 4 hours 13 min ago
Joined: 2021-01-03 06:04
2 Downloads

Can you add this feature to PA.c Installer? I don't want to leave off ARM.
I also wanted to know if there is a way to prevent the following file from being downloaded multiple times?
https://github.com/obsidianmd/obsidian-releases/releases/download/v1.8.9...

John T. Haller
John T. Haller's picture
Offline
Last seen: 11 hours 52 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
No Plans

There are no plans to add a 3rd download. For a complicated installer like this, download it once and then do additional extractions with custom code.

Sometimes, the impossible can become possible, if you're awesome!

xmha97
Offline
Last seen: 4 hours 13 min ago
Joined: 2021-01-03 06:04
Decompress ZIP

Do you know how I can decompress a zip file in custom code?
Or if you have done this yourself for a portable app, please tell me the name of that app.

John T. Haller
John T. Haller's picture
Offline
Last seen: 11 hours 52 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Custom

Be sure CustomCodeUses7zip is set in your installer.ini:

[DownloadFiles]
CustomCodeUses7zip=true

In the PortableApps.comInstallerCustom.nsh within Other\Source, here's an example:

!macro CustomCodePostInstall
	${If} ${FileExists} "$INSTDIR\App\FreeCAD.7z"
		nsExec::Exec `"$INSTDIR\7ztemp\7z.exe" x "$INSTDIR\App\FreeCAD.7z" -o"$INSTDIR\App\FreeCAD" -aoa`
	${EndIf}
	Delete "$INSTDIR\App\FreeCAD.7z"
!macroend

These are from FreeCAD which doesn't download the 7z. So you'd need to have your installer.ini first download and extract the whole thing. Similar to what you're doing above but without the Double Extract filter.

Sometimes, the impossible can become possible, if you're awesome!

JLim
Offline
Last seen: 2 days 9 hours ago
Joined: 2013-07-17 01:30
Are you using a non official

Are you using a non official PA launcher generator? The official version not yet support ProgramExecutableARM64=Obsidian-arm64\Obsidian.exe

John T. Haller
John T. Haller's picture
Offline
Last seen: 11 hours 52 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Custom Code

There is custom code that adds this:

${SegmentPre}
	ReadRegStr $0 HKLM "HARDWARE\DESCRIPTION\System" "Identifier"
	StrCpy $1 $0 3 0
		
	${If} $1 == "ARM"
		${ReadLauncherConfig} $ProgramExecutable Launch ProgramExecutableARM64
	${EndIf}
!macroend

Sometimes, the impossible can become possible, if you're awesome!

JLim
Offline
Last seen: 2 days 9 hours ago
Joined: 2013-07-17 01:30
No custom code

I don't see custom code in his package. May be he hide it.

John T. Haller
John T. Haller's picture
Offline
Last seen: 11 hours 52 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Didn't Know

I'd wager the developer doesn't know that they need it for that part to function.

Sometimes, the impossible can become possible, if you're awesome!

JLim
Offline
Last seen: 2 days 9 hours ago
Joined: 2013-07-17 01:30
Modified online installer

https://www.upload.ee/files/17913369/ObsidianPortable_1.8.9_online.paf.e...
Files modified:
..\App\AppInfo\installer.ini
..\Other\Source\PortableApps.comInstallerCustom.nsh

btw 32 bit version can not be run in 32 bit Win 7. Error message: Obsidian.exe is not a valid Win32 application.

Log in or register to post comments