You are here

[newbie]I have an app to portabilize, DLL is trouble. cant use my updater. Update message in luancher?

12 posts / 0 new
Last post
Flametail
Offline
Last seen: 11 years 1 month ago
Joined: 2009-09-18 20:41
[newbie]I have an app to portabilize, DLL is trouble. cant use my updater. Update message in luancher?

Hi! I have a game I develop that I want to see portable.
The game itself is already portable, persay. uses only relative paths, and can use it's DLLs from the working directory.
No issue there.

HOWEVER, there is an updater, which is mandatory for continued play of the game.
This updater, written in visual basic, requires a DLL to be registered. It is called Z-Updater, and can be found on sourceforge.

If anyone can edit the source code of the updater to no longer require the DLL, it would be greatly appreciated.

Otherwise, can portableapps format register the DLL, then unregister it?

My app: http://flametail.webege.com/it/

John T. Haller
John T. Haller's picture
Offline
Last seen: 6 hours 45 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
admin rights

I'm pretty sure dll registration requires admin rights, which would affect portability a bit.

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

Flametail
Offline
Last seen: 11 years 1 month ago
Joined: 2009-09-18 20:41
I realize that.If anyone

I realize that.

If anyone knows Visual Basic, perhaps they know how to remedy this issue? Make it look in the current directory instead of registered?

The updater with the required dll is open source, and is found here http://zupdate.sourceforge.net/

I hope someone can fix this.

There were no links in here.

Aluísio A. S. G.
Offline
Last seen: 8 years 5 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Nope

The DLL is responsible for the registration; so, it will depend on each DLL.
Of course, unless I'm reading the source code wrongly.

Previously known as kAlug.

Flametail
Offline
Last seen: 11 years 1 month ago
Joined: 2009-09-18 20:41
Dammit. I was wodering why

Dammit. I was wodering why zlib.dll didnt need to be registered. the dll is vbWebDownload.dll, in case it rings any bells on a workaround.

There were no links in here.

Aluísio A. S. G.
Offline
Last seen: 8 years 5 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Why?

PortableApps.com releases are normally updated separately from the main app; so there's no need for an updater. Perhaps you can detect portable mode and avoid calling it?

Previously known as kAlug.

Flametail
Offline
Last seen: 11 years 1 month ago
Joined: 2009-09-18 20:41
I guess I have to try. The

I guess I have to try. The updater is required becuase outdated versions cuase problems with the servers.. Is there a way to add a notice to a portableapp?

Like, when theres an update, it refuses to luanch and instead pops up a message and opens a browser to the portableapps site?

I'm asking if theres a way to do it in NSIS, for the launcher. I am not asking how to do it in my app.

There were no links in here.

Aluísio A. S. G.
Offline
Last seen: 8 years 5 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Undesirable, but possible

/* John: this includes standalone uses */
I guess you can use custom code, the Inetc plugin and ${ConfigRead} to do it. I'll try to post a sample soon.

Previously known as kAlug.

Flametail
Offline
Last seen: 11 years 1 month ago
Joined: 2009-09-18 20:41
Thanks. Now, how would this

Thanks.

Now, how would this work? by checking the version against a file on a webserver?

As in, my current updater checks http://flametail.webege.com/it/updater/info.ini to decide if it needs an update. Can the same be done here?

There were no links in here.

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

We could write a small script to check it and stick that in between the launcher and the actual EXE (adding InetC to a PA.c Launcher directly isn't really supported). Downloading an INI and doing a VersionCompare is pretty trivial.

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

Aluísio A. S. G.
Offline
Last seen: 8 years 5 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
And here is it!

Put InetC.dll in App\AppInfo\Launcher and use this as custom code:

${SegmentFile}

!addplugindir "${PACKAGE}\App\AppInfo\Launcher"

LangString _Custom_Outdated_ ${LANG_ENGLISH}      "A newer version ($R2) is available; please upgrade before using this app."
LangString _Custom_Outdated_ ${LANG_PORTUGUESEBR} "Uma nova versão ($R2) está disponível; por favor atualize antes de utilizar este programa."

${SegmentInit}
	InetC::Get /SILENT /NOCANCEL http://flametail.webege.com/it/updater/info.ini $PLUGINSDIR\LatestVersion.ini /END
	Pop $R0
	${If} $R0 == OK
		ReadINIStr $R1 $EXEDIR\App\AppInfo\AppInfo.ini Version PackageVersion
		ReadINIStr $R2 $PLUGINSDIR\LatestVersion.ini   VERSION PortableVersion
		${VersionCompare} $R1 $R2 $R3
		${If} $R3 = 2
			MessageBox MB_OK|MB_ICONSTOP "$(_Custom_Outdated_)"
			Abort
		${EndIf}
	${EndIf}
!macroend

Also, add a PortableVersion entry to your INI file matching the latest PackageVersion.

Previously known as kAlug.

Flametail
Offline
Last seen: 11 years 1 month ago
Joined: 2009-09-18 20:41
EDIT: Yeah, I messed up.

EDIT: Yeah, I messed up. Wrong folder.

There were no links in here.

Log in or register to post comments