Make a standalone version of an AM game easily

This forum is meant for people to share their knowledge by writing their own tutorials for Adventure Maker.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Make a standalone version of an AM game easily

Postby Simon » Fri Mar 01, 2013 2:27 pm

Hi everyone !

As you probably know, I've been working for a long time on a way to make a standalone version of ASA: A Space Adventure, in order to release it on Desura (and other similar portals like Steam).

Here's my method to create easily a standalone version of ANY AM game ! (standalone = no previous install needed ! Can run in ANY folder, you can copy/paste your game where you want : it will play)

Method :

1 ? Create your game with Adventure Maker, build it and install it like you usually do.
2 ? Move to the folder where you installed your game, select the whole content (exe, files and folders) and make an archive of it (rar or zip)...
3 ? Keep your archive in a safe place, and uninstall your game properly.
4 ? Delete all the files related to your game (unless the saved games if you want to use them later)
5 - Extract your archive in the folder of your choice. You can name it how you want, and you can even rename the .exe
6 ? Try to launch the game : an error should happen, asking for a dll or ocx. That is normal !
7 ? Download all the AM dependencies from here : http://www.adventuremaker.com/systemfiles and keep them in a same folder.
8 ? Create a new empty txt file (notepad) next to your game EXE, and name it [name_of_your_exe].exe.local (example : ASA.exe.local if the exe is ASA.exe) ?> This will force a VBS exe to look for system files in the local folder, instead of the system32 folder ! So your AM game exe will search for the dependencies in the game folder, not in the Windows system32 ! Great, uh ?
9 ? Copy the AM dependencies (dll and ocx - see point 7) next to your exe and exe.local
10 - Run the game !!!
11 - It should play normally, so you can create an archive for distribution. No more install needed, you can play your AM game everywhere, from any media (CD, DVD, USB, etc...)


It worked for me on Windows 8. Also I wasn't sure that I had deleted all the previous installed dlls and ocx (from ASA or from AM), so I made another check :
I formated an old PC and installed Windows XP on it. It's a clean install, where there has never been AM or an AM game.
I copied my standalone version of ASA, and it worked too !

So, to conclude, this method will create your AM game standalone version, and it will work on Xp and win8 for sure.
I'm not sure about the others, but tell me !

Update :

Looks like it will only work if you don't use spaces or special characters in the name of your EXE (and so the exe.local file). So to be sure that this trick will work, name your exe using a dos filename (8.3 filename, I think), that is to say : no spaces, 8 letters max, no special letters (* - + / ? ! etc...)

Example :

First time I tried, the game exe was named : ASA - A Space Adventure.exe
I created with notepade the ASA - A Space Adventure.exe.local
--> it didn't work.

Then I renamed the exe into : ASA.exe
And renamed the notepad file in : ASA.exe.local
--> it worked !
Last edited by Simon on Wed Mar 06, 2013 4:26 pm, edited 1 time in total.
User avatar
Simon
Expert Member
 
Posts: 418
Joined: Sun Jun 10, 2012 1:47 pm
Location: France

Re: Make a standalone version of an AM game easily

Postby Candle » Fri Mar 01, 2013 6:41 pm

SpyMe Tools is very useful in detecting Registry and Disk changes. If any application installs spyware, adware, dlls, programs, files, or any other type of file, picture, or program, etc. or changes the Registry's content, you will be able to see exactly where the modification occurred so you can take measures. It seems like more and more programs are attempting to install spyware, advertisements, or other garbage without your knowledge, but with this software you will know everything that is added or removed.

http://www.lcibrossolutions.com/spyme_tools.htm

see where the files are installed.
Please don't PM me questions, ask here in the forums!
``````````````
Between grand theft and a legal fee, there only stands a law degree.
User avatar
Candle
Administrator
 
Posts: 3055
Joined: Sat Feb 07, 2004 2:21 am
Location: Rudy's Bar

Re: Make a standalone version of an AM game easily

Postby reneuend » Sat Mar 02, 2013 1:09 am

Great Work, Simon!

This adds some versatility to installing.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2693
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Make a standalone version of an AM game easily

Postby time-killer-games » Thu Oct 10, 2013 2:25 am

Oh my, I've waited literally years trying to find out how to do this! Thanks Simon! You're my hero! <3
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: Make a standalone version of an AM game easily

Postby Simon » Thu Oct 10, 2013 1:19 pm

From the feedback I had with ASA, I'm sorry to inform you that this tip seems to work only for win XP.

Under win 7 and win 8, it only works when they have previously installed AM, or a game made with AM. This will copy some system files needed by AM and allow the game to run...
The only solution I found in win7 and win8 was to relaeas a patch, with is, in fact, a manual installation of an empty AM game...
User avatar
Simon
Expert Member
 
Posts: 418
Joined: Sun Jun 10, 2012 1:47 pm
Location: France

Re: Make a standalone version of an AM game easily

Postby reneuend » Thu Oct 10, 2013 11:58 pm

I wonder what is missing that causes it to need a manual installation. If this was know, then it might be possible to write a script, or a program to run the install.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2693
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Make a standalone version of an AM game easily

Postby Simon » Fri Oct 11, 2013 8:05 am

It has to be one or several of these system files that are not found by win 7 or 8 : http://www.adventuremaker.com/systemfiles

- with XP, my previous trick works and these files are taken into account when launching the game.
- with 7 and 8, the exe.local file (explained in the tuto) doesn't work anymore and the system files need a manual installation as usual.

This has something to do with the use of Visual Basic within the different versions of windows.
XP seemed to manage differently the exe applications developed in VB. XP could detect, at launch of an application, if the exe file was coded with VB or not - and if yes, the exe.local file located next to it was being taken into account, in order to look for system files within the same folder.
This doesn't seem to be the case anymore with the new windows versions. There might be a security to prevent running bad system files, or maybe the Visual Basic function is not implemented anymore and considered unused ?
The exe.local file works only when windows knows that he's running a file developed in VBS.
Maybe it could help find a clue ?
User avatar
Simon
Expert Member
 
Posts: 418
Joined: Sun Jun 10, 2012 1:47 pm
Location: France

Re: Make a standalone version of an AM game easily

Postby time-killer-games » Fri Oct 11, 2013 3:00 pm

I'm looking into a way to create a silent / invisible installer which should solve these problems on windows 7 and 8. The only issue that can't be worked around is it has to be run on an administrative account. Here's a useful discussion I found which I will test in VB6 when I get the chance:

http://www.vbforums.com/showthread.php? ... on-message
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: Make a standalone version of an AM game easily

Postby Simon » Fri Oct 11, 2013 3:35 pm

Hey yes, that's a very good idea TKG !! I'll have a look at this too !
This is certainly the solution : regsvr32 dllname.dll /s
User avatar
Simon
Expert Member
 
Posts: 418
Joined: Sun Jun 10, 2012 1:47 pm
Location: France

Re: Make a standalone version of an AM game easily

Postby time-killer-games » Tue Oct 15, 2013 2:32 am

Well Simon, I have a wonderful surprise for you. :) I have tested and can verify that this works, however, it only does if the end users you are distributing your game to are all on administrative accounts on their PCs. So here's how it works, download an extract this free tool I created, the VB6 source code is included in the zip for anyone to modify it however they want. Compile and install your AM created game, copy all the contents (all files and folders) found in the root directory of your installer output directory and paste them into the "lib" folder that came from the zip you extracted earlier. Make sure the areas, frames, external, etc directories are in the lib folder and not in a subfolder of the lib directroy. Run The Adventure Maker Player, the game should silently install and it only takes about half a second for everything to be written to the registry, and last but not least the game window opens.

Here's a little spoiler, so you can have a peek at the source code before you download:
Code: Select all
Private Declare Function WinExec Lib "Kernel32.dll" (ByVal CmdLine As String, ByVal CmdShow As Long) As Long
Private Declare Function CopyFileW Lib "Kernel32.dll" (ByVal ExistingFileName As String, ByVal NewFileName As String, _
ByVal FailIfExists As Boolean) As Long

Private Sub Form_Initialize()

    'Copy all Adventure Maker plugin controls and dependencies to a location without spaces:
    Call CopyFileW(App.Path + "\lib\msvbvm60.dll", "c:\windows\system32\msvbvm60.dll", True)
    Call CopyFileW(App.Path + "\lib\Oleaut32.dll", "c:\windows\system32\Oleaut32.dll", True)
    Call CopyFileW(App.Path + "\lib\Olepro32.dll", "c:\windows\system32\Olepro32.dll", True)
    Call CopyFileW(App.Path + "\lib\Stdole2.tlb", "c:\windows\system32\Stdole2.tlb", True)
    Call CopyFileW(App.Path + "\lib\ctl3d32.dll", "c:\windows\system32\ctl3d32.dll", True)
    Call CopyFileW(App.Path + "\lib\Comcat.dll", "c:\windows\system32\Comcat.dll", True)
    Call CopyFileW(App.Path + "\lib\Asycfilt.dll", "c:\windows\system32\Asycfilt.dll", True)
    Call CopyFileW(App.Path + "\lib\Gif89.dll", "c:\windows\system32\Gif89.dll", True)
    Call CopyFileW(App.Path + "\lib\FoxCBmp3.dl", "c:\windows\system32\FoxCBmp3.dl", True)
    Call CopyFileW(App.Path + "\lib\Msdxm6.ocx", "c:\windows\system32\Msdxm6.ocx", True)
    Call CopyFileW(App.Path + "\lib\Msscript1.ocx", "c:\windows\system32\Msscript1.ocx", True)
    Call CopyFileW(App.Path + "\lib\Msimg32.dll", "c:\windows\system32\Msimg32.dll", True)
    Call CopyFileW(App.Path + "\lib\AAVideoLoaderProj.ocx", "c:\windows\system32\AAVideoLoaderProj.ocx", True)
    Call CopyFileW(App.Path + "\lib\AMPanoramaPlugin_ID7.ocx", "c:\windows\system32\AMPanoramaPlugin_ID7.ocx", True)
    Call CopyFileW(App.Path + "\lib\CubicPanoramaPlugin_ID1.ocx", "c:\windows\system32\CubicPanoramaPlugin_ID1.ocx", True)
    Call CopyFileW(App.Path + "\lib\QuickTimeSimple.ocx", "c:\windows\system32\QuickTimeSimple.ocx", True)
    Call CopyFileW(App.Path + "\lib\KeyGuard.ocx", "c:\windows\system32\KeyGuard.ocx", True)
    Call CopyFileW(App.Path + "\lib\ThirdPersonPluginOCXVER1.ocx", "c:\windows\system32\ThirdPersonPluginOCXVER1.ocx", True)

    'Register all common Adventure Maker plugin controls and dependencies:
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\msvbvm60.dll /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Oleaut32.dll /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Olepro32.dll /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Stdole2.tlb /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\ctl3d32.dll /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Comcat.dll /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Asycfilt.dll /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Gif89.dll /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\FoxCBmp3.dl /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Msdxm6.ocx /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Msscript1.ocx /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Msimg32.dll /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\AAVideoLoaderProj.ocx /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\AMPanoramaPlugin_ID7.ocx /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\CubicPanoramaPlugin_ID1.ocx /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\QuickTimeSimple.ocx /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\KeyGuard.ocx /s", 5)
    Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\ThirdPersonPluginOCXVER1.ocx /s", 5)
   
    'Run the game and then close the silent installer:
    Call WinExec(App.Path + "\lib\run.exe", 5)
    End
   
End Sub
Cheers!
TKG
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: Make a standalone version of an AM game easily

Postby Simon » Tue Oct 15, 2013 9:33 am

Thanks for your help ! It seems great, I'm going to try this as soon as possible !

edit : it doesn't work for me. I get an error message...
I have pasted all the game files in the LIB folder and I run the adventuremakerplayer.exe
It seems that the system files are still not found. I'll have a closer look later, but thanks I'm sure it will help.
User avatar
Simon
Expert Member
 
Posts: 418
Joined: Sun Jun 10, 2012 1:47 pm
Location: France

Re: Make a standalone version of an AM game easily

Postby time-killer-games » Tue Oct 15, 2013 12:35 pm

Well, that's i interesting, I wonder why it didn't work for you. Before I ran it, those AM dependencies were not in the system32 folder. After I ran it, they were. I tried getting rid of the "/s" parameter so the controls wouldn't be registered silently and sure enough I got a message for each control one after the other saying "DLLRegisterServer registered this file successfully".

You mind showing me a screenshot of the errors you're getting? Thanks.
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: Make a standalone version of an AM game easily

Postby Simon » Wed Oct 16, 2013 6:00 pm

Sorry TKG, I've been busy today so I couldn't send the screenshot, but I've seen your message. I'll post it here asap !

edit : OK I could finally find some time !
This is the error I get. It is related to the function to play the game fullscreen.
Attachments
amplayer_error1.jpg
amplayer_error1.jpg (65.23 KiB) Viewed 7936 times
User avatar
Simon
Expert Member
 
Posts: 418
Joined: Sun Jun 10, 2012 1:47 pm
Location: France

Re: Make a standalone version of an AM game easily

Postby Simon » Mon Oct 21, 2013 3:43 pm

Hey TKG, did you notice that I had posted a screenshot of the error ?
I was wondering if you have an idea about this function to get fullscreen ? Maybe one of the dll or ocx file doesn't register ? It would be truly awesome to fix this.
User avatar
Simon
Expert Member
 
Posts: 418
Joined: Sun Jun 10, 2012 1:47 pm
Location: France

Re: Make a standalone version of an AM game easily

Postby Simon » Thu Oct 31, 2013 2:39 pm

I've tried again various things, but nothing seems to solve this issue. I wonder what's wrong...
User avatar
Simon
Expert Member
 
Posts: 418
Joined: Sun Jun 10, 2012 1:47 pm
Location: France

Re: Make a standalone version of an AM game easily

Postby Simon » Sat Nov 02, 2013 3:59 pm

@TKG : I could fix a part of the problem, though now it returns an error 711 about Nsplay. After looking here and there, I learned that it's Nsplay.ocx that is missing.
It seems that we need to find this file and include it in the AMPlayer too ! With luck, it will solve the problem once and for all...
User avatar
Simon
Expert Member
 
Posts: 418
Joined: Sun Jun 10, 2012 1:47 pm
Location: France

Re: Make a standalone version of an AM game easily

Postby time-killer-games » Mon Jan 27, 2014 9:37 pm

I actually gave up on this thinking there was nothing I could do but this is great news I'll try adding that newly discovered dependency and see if we can get it working! =)
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA


Return to Post Your Own Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests

cron