Hi everyone,
I wanted to make a portable version of a game, for personal use only, since I bought the game myself. (Is this allowed?)
I extracted the installer, got all the files, they work, run, do everything I want to when ran from any location.
Now i wanted to make this little game portable. I made the *gamenameportable*launcher.ini. (As you can see I left out the name of the game, I wasn't sure if I was allowed to do this in the first place.)
[Launch] AppName=*gamename*Portable ProgramExecutable=*gamename*\*gamename*.exe LaunchAppAfterSplash=true [DirectoriesMove] Save\*gamename*\=%DOCUMENTS%\Games\*gamename*\
This should copy all the files I need. (Is there something wrong with this file?)
I haven't had time to check for registry keys and such, I wanted to do that after I knew the files were copied correctly, but since the game crashes when the launcher opens it I can't test that either. The game opens, changes the resolution and a second after that windows' Werfault.exe tells me the program has encountered an error.
When I run the game directly from its folder (without the launcher) or in a .bat script it runs just fine. Since I didn't make the game myself I can't give more information.
I also used debug.nsh, but since this contains the name of the game I won't post it untill it's needed.
Thanks for reading, can someone help me, please?
Where are you getting CopyFromDirectory and CopyToDirectory from? These don't exist in the launcher manual under DirectoriesMove.
I don't really know, I found them on some page I can't find anymore...
Anyways, thanks for the tip. I removed those line (also from the top post) and re-ran the launcher generator and still have the same problem.
Do I have to post the debug.log, or how can I give more information so that you can help me?
Yes, I set the working directory!
For personal use, you are not likely to be breaking the law; refer to the product's EULA for accurate guidance, however.
[DirectoriesMove] doesn't work correctly if the parent of the source directory doesn't exist; this is one reason that we avoid using subdirectories in [DirectoriesMove]; (I have no interest in fixing it as a flatter structure tends in my opinion to be better;) additionally, trailing backslashes are not supported (they may work in some places, but they definitely don't in some places). The end result is that your [DirectoriesMove] should contain just a single line something like
SavedGames=%DOCUMENTS%\Games\gamename
.The nub of the issue is likely to be that the batch file sets something up which you haven't done; likely candidates are environment variables (
set
statements in the batch file) and command line arguments. Make sure you're doing all that the batch file does in the launcher, or if you wish you can run the .bat file instead of the .exe file from the launcher (we don't recommend it for released apps here, largely because it just adds overhead, but for an app of your own you probably don't need to worry about that).I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
Ok, I removed the trailing backslashes. Still same problem...
The only thing that is in my batch file is the calling of the game-exe, nothing more, nothing less.
Yes, I set the working directory!
Try adding the following line to
[Launch]
:Previously known as kAlug.
Thanks, now it works
Many thanks to all of you for your time!
Yes, I set the working directory!