Portable Wesnoth

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderators: Forum Moderators, Developers

Forum rules
Before posting a new idea, you must read the following:
darkwraith007
Posts: 40
Joined: December 6th, 2006, 2:27 am
Location: USA

Portable Wesnoth

Post by darkwraith007 » December 7th, 2006, 11:19 pm

NOTE: All ideas refer to Win32 development but may be applicable or helpful for other operating systems. I know you all don't make the binaries so this is for whoever makes the binaries.

Hello everyone,

Based on the success of other similar open-source projects, I propose an implementation of Wesnoth that doesn't require installation on Windows. The current need to download, install, and then uninstall to upgrade to a new version is quite a hassle.

(I haven't been able to update via the online in-game interface, hence my mention of that. It just crashes on me. I may submit a bug report if I can get more details.)

BENEFITS:

-Wesnoth can be self-sufficient, which increases compatibility and porting between operating systems.

-Wesnoth is less vulnerable to various windows problems, especially with the EVIL EVIL EVIL registry!

-Its a trivial matter to create a desktop icon of a program, and I don't know of many people that even use the Start Menu at all. It would be nice to ask people before just sticking shortcuts in the Start Menu. That's why installers are horrid.

-No messing with "Add or Remove programs", since many new users might look there first for an uninstall link rather then the Start Menu. Thus by not having any installation, this reduces user frustration.

-Installation on work computers. Typically heavily restricted, installation at work is not possible with most people resorting to playing in-browser Java games. By not requiring people to install it, they might install it at work, and attract attention of others, and thus it might spread throughout the workplace. Affecting productivity might be a concern, moreso then other games, but I'm sure it won't be too bad to multitask. ^_^

-Easy updating. Not having "installation" makes it SO MUCH EASIER to update for those without easily available internet access. Please also it would be nice to have patches to upgrade between minor versions, and post links on the main homepage, but that's a minor quibble.

-Its been done before, with other open-source projects. A guy named "John Haller" has done it with several other open-source applications so it would be easy to access his code, maybe even let him know where his code will be used (if you want), and he may even offer to convert it himself!

Here's his website: http://johnhaller.com/jh/
Here's his portable apps website: http://portableapps.com/
A list of applications already made portable: http://portableapps.com/apps


DRAWBACKS:

-Time needed to convert the binaries to "portable" format.

-Code to eliminate any dependencies on the Windows Registry, remove windows installer code, and eliminate any creating of shortcuts or files in the Start Menu or on the desktop.

-Altering readme to indicate the changes and explain how to create a desktop shortcut in Windows. Also how to make a start menu program group (for those who really don't know how). I'd be willing to contribute this documentation myself if you wish.

-Altering code so Wesnoth can be fun from USB flash drives or other removable media. Removing any and all dependencies on the specific environment of the application so that it doesn't error out.

-Bug-fixing to make sure everything works well, plus supporting two versions: Install version and NoInstall version. Possibly dropping the Install version support in the near future, as I don't doubt most people will love a NoInstall version, even if they have to manually make a desktop shortcut (which isn't all that hard). I actually have a windows script/file that is built-into windows xp and previous versions and its in the "SendTo" menu. It says "Send to desktop (as shortcut)". I can send this file and it can be implemented easily perhaps or included in the download and documented in the readme.

-Altering cache use to minimize the reads/writes to extend the flash drive lifespan. Possibly being able to work without a cache, or asking the user which hard drive to use as a temporary cache.

-Making profile and preferences portable and easily transferable between versions. Anything otherwise should be included in the documentation, but most people would really like to be told before upgrading.

I hope you all read this, maybe implement it, and we can all be having fun anywhere!
^_^

elricz
Posts: 194
Joined: September 7th, 2006, 8:19 pm
Location: Imrryr
Contact:

Post by elricz » December 8th, 2006, 3:21 am

I am not sure, but I think that Wesnoth for Windows is portable by now. This is what I have done:
- Install version 1.1.13
- Copy the Wesnoth folder to a pen drive
- Uninstall Wesnoth
- Double click on the Wesnoth.exe on the pendrive
- It worked!
I started playing HttT, and it crashed mid-game, probably because it was doing too much readings from the USB drive (I don't know why, I may do a deeper analysis on the resources consumed by the game in Windows), but the game worked.
After that I have copied it back (not installing it), and it also allows you to play. It works as usual, but also crashed mid-game; I don't know if it was because the installation or another thing.

Maybe the Windows packager can put some light about if this is supposed to work or not...

Darth Fool
Retired Developer
Posts: 2633
Joined: March 22nd, 2004, 11:22 pm
Location: An Earl's Roadstead

Post by Darth Fool » December 8th, 2006, 4:27 am

I am not the windows packager, but I am pretty sure that wesnoth is pretty portable, unless you are using "portable" as a term of art that has some specific meaning other than the obvious. So, what exactly are you suggesting?

ikanreed
Posts: 6
Joined: December 6th, 2006, 2:46 am
Contact:

Post by ikanreed » December 8th, 2006, 6:55 am

Darth Fool wrote:I am not the windows packager, but I am pretty sure that wesnoth is pretty portable, unless you are using "portable" as a term of art that has some specific meaning other than the obvious. So, what exactly are you suggesting?
He's asking for something that's not really appropriate for a game. Software like firefox can be run without being on a hard disk(or other permenant storage). This is so it can be run on machines that don't grant installation privilages.

My guess is that he probably wants to run it at school.

Yogibear
Retired Developer
Posts: 1086
Joined: September 16th, 2005, 5:44 am
Location: Hamburg, Germany

Post by Yogibear » December 8th, 2006, 7:39 am

Well, i am the windows packager, and i really am not sure if i understand what you are aiming at. But maybe a few facts will help you:

Look into your "evil evil registry" and search for wesnoth. You won't find anything (unless maybe in the recent used files section). Simply because wesnoth doesn't use the registry.

In fact, the installer does nothing more than file copying. Actually you wouldn't even need one, i could as well provide you with an archive of the files and let you do the startup menu or desktop links by yourself. It is all but convenience, especially for those users who don't know how to do it themselves. And believe me, i don't want to be around the first time that is changed :P .

So, everything that is needed to run wesnoth is found in the wesnoth folder. You could as well uninstall it by simply deleting that folder.
Smart persons learn out of their mistakes, wise persons learn out of others mistakes!

Sangel
Moderator Emeritus
Posts: 2232
Joined: March 26th, 2004, 10:58 pm
Location: New York, New York

Post by Sangel » December 8th, 2006, 8:40 am

Yogi Bear wrote:Well, i am the windows packager, and i really am not sure if i understand what you are aiming at. But maybe a few facts will help you:

Look into your "evil evil registry" and search for wesnoth. You won't find anything (unless maybe in the recent used files section). Simply because wesnoth doesn't use the registry.

In fact, the installer does nothing more than file copying. Actually you wouldn't even need one, i could as well provide you with an archive of the files and let you do the startup menu or desktop links by yourself. It is all but convenience, especially for those users who don't know how to do it themselves. And believe me, i don't want to be around the first time that is changed :P .

So, everything that is needed to run wesnoth is found in the wesnoth folder. You could as well uninstall it by simply deleting that folder.
Wow. That's almost... Mac-like. :wink:
"Pure logic is the ruin of the spirit." - Antoine de Saint-Exupéry

VS
Translator
Posts: 187
Joined: November 27th, 2005, 10:07 am

Re: Portable Wesnoth

Post by VS » December 8th, 2006, 9:57 am

darkwraith007 wrote:-Wesnoth is less vulnerable to various windows problems, especially with the EVIL EVIL EVIL registry!
Registry are not evil, it is just a kind of database system. Maybe poorly secured one, but ... ok, that's another story. Back on topic: Wesnoth does not interact with registry at all. If you used something like Sysinternals regmon and saw any registry actions owned by Wesnoth, it's only XPs trying to find some information about process before (?) starting it, that is, if it requires some special handling etc. This happens with every program.
darkwraith007 wrote:-Easy updating. Not having "installation" makes it SO MUCH EASIER to update for those without easily available internet access.
Why? Wesnoth Windows installer has some 60 MB because it already contains everything. It does not need download anything. And sourceforge mirrors work with download accelerators, so you can use the resume function and keep downloading Wesnoth for a week, like I used to do. And if your point was that the game needs to be properly installed, well, it does not have to. It is just copying files, as Yogi said.

So, nearly everything you ask for is already either done or possible with minimal amount of effort on user's side.

User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam » December 8th, 2006, 12:06 pm

I think Wesnoth installer for MS Windows does the following:
1) creates the "Wesnoth" directory and copies the files
2) creates Start menu
3) creates Desktop icon
4) creates registry entries for "Add/Remove Programs" menu

The step (1) is the only required. Steps (2), (3), (4) are just for user convenience. So, the installer does write to registry, but that registry entry is necessary only for standard uninstalling; it is not used when running the program.

That means: Wesnoth is portable. Only you cannot download the portable version from SourceForge. It would probably be nice to also upload MS Windows version in a ZIP file. But it would be the same ZIP file that you can make at home by zipping the "C:\Program Files\Wesnoth" directory.

ILikeProgramming
Posts: 837
Joined: April 14th, 2005, 4:17 am

Post by ILikeProgramming » December 8th, 2006, 2:54 pm

I agree that Wesnoth is portable, because a long time ago I put a version on my iPod. The problem is that running it from USB is super slow, especially USB1

VS
Translator
Posts: 187
Joined: November 27th, 2005, 10:07 am

Post by VS » December 8th, 2006, 9:30 pm

For some reason Wesnoth reads some really big volumes of data from disk. So you better put it on something faster than USB stick.

Note: It is the blue graph; scale is about 1.6 MB for peaks.
Attachments
wesnoth_disk.png
wesnoth_disk.png (48.75 KiB) Viewed 2688 times

darkwraith007
Posts: 40
Joined: December 6th, 2006, 2:27 am
Location: USA

reply after haitus

Post by darkwraith007 » December 17th, 2006, 2:43 am

Hello everyone.

I would've replied earlier but I've been too busy playing BfW.
^_^

Its a good game, though I had some problems with mermen not being able to hit that other water-enemy in that scenario where you first get them. Five of my mermen, all attacks miss, yet they are able to hit me almost every damn time. It seems biased in favor of the enemy, plus I heard there's a hidden "evade" statistic that also determines things in addition to the standard defense rating. I really think damage shouldn't be fixed, but should be reduced by the defensive % of your terrain, like an elven archer in a forest with 70% terrain defense would only ever get 30% of max damage, unless at night, then they'd receive 40% of max damage. That way you can hit and be hit every time, but the terrain advantages and disadvantages are still there. Less frustration, IMHO. But I digress....

Anyways, I've read up on this "portable" wesnoth thread and I appreciate all the replies. Is there a way to package wesnoth and optimize it specifically for portable USB drives? Perhaps not having it make so many writes to disk? I mean if Firefox can run without a cache....perhaps Wesnoth could pre-load EVERYTHING (longer load times, of course, but its worth it) and then not do any writes to the cache during the entire scenario (unless saving/loading or modifying options/preferences).

By "portable", I meant that it would be a version of Wesnoth optimized and made for copying to Portable USB flash drives and being run directly from the drive, without any installation needed. If you wish, I'm thinking John Haller might give tips on what he did when making programs "portable".

Here's a game, in case anyone was wondering:
http://portableapps.com/apps/games/sudoku_portable

It can be done, and here's what he did to make it portable:

I made some modifications to the default version of Sudoku to make it more USB key friendly (decreasing total install size and the number of writes to the drive, which will increase drive life). These changes are listed here so you'll know what they are, and so you can recreate the process, if so desired.

* Friendly Launcher - Sudoku Portable launcher is included.
* EXEs and DLLs Compressed - All EXEs and DLLs were recompressed using UPX. This gets our installed size down to one that is a bit more manageable. The options used were: --best --compress-icons=0 --nrv2d --crp-ms=999999 -k
* PREF Code - The preferences handler within Sudoku/FLTK was modified to use the Windows environment variable instead of the registry.

I'll play Wesnoth on my computer regularly in the meantime, but I appreciate the responses. ^_^

User avatar
Jetrel
Art Director
Posts: 7241
Joined: February 23rd, 2004, 3:36 am
Location: Midwest US

Post by Jetrel » December 18th, 2006, 3:56 am

Yogi Bear wrote:In fact, the installer does nothing more than file copying. Actually you wouldn't even need one, i could as well provide you with an archive of the files and let you do the startup menu or desktop links by yourself. It is all but convenience, especially for those users who don't know how to do it themselves. And believe me, i don't want to be around the first time that is changed :P.
I don't think there would be much uproar.

What you describe is the standard way of installing files on a mac. On macs, "installer programs" are viewed as very user unfriendly. Likewise, having a whole folder for an application is viewed as very unfriendly - apps should have all support files built-in, and should show up in the desktop manager as a single icon.

Macs had installers for a while (during the 90s), but any programs that have them these days are typically received in a very hostile manner. There were no tears shed over the loss of an installer program.


Any ancilliary operations like building support files in ~/Library/Application Support/ are coded right into the application itself. Things like "adding the program to the start menu" or "adding a desktop icon" would fall under this heading. Plugins are typically installed in ~/Library/Application Support/, unless they're something very cross-application in nature (like quicktime codec plugins, or web browser plugins), in which case they have their own folder in ~/Library/.

darkwraith007
Posts: 40
Joined: December 6th, 2006, 2:27 am
Location: USA

7z file request

Post by darkwraith007 » December 27th, 2006, 6:37 am

Hello to all, a small request.

It may seem like a big deal but I wish to try out with experimenting with creating a truely Portable Wesnoth. In doing so I am unable to compile from source myself due to crappy hardware to work with so I ask if the Windows packager of the Wesnoth source could create a .7z or even a .zip file without any installation program, that would be ideal for my needs in figuring this out.

You can even make it a self-extracting .exe if you wish.
Thanks again for everyone's help, particularly the graph. I might have to see about reducing the writes on the drive somehow, even if I get this working. I might have to make do with using the USB drive for transport of a self-contained Wesnoth, but being able to copy/paste it to the desktop and run it from there and have it run from the hard drive of the computer you're on, rather then the USB flash drive, and just have the game be entirely self-contained which it has been previously stated that it is, so that's good.

Only thing is that in the event that copy/paste is restricted, they're still outta luck, whereas if Portable Wesnoth itself could have a special .ini file that would specify and override any path selections within the program itself to those you choose (basically the least-restricted directory of the host drive you're using which the user should know). Perhaps a prompt of some kind? This way it could stay in the USB flash drive, but run from the host HD and copy data to/from the HD temporarily until it exits, whereupon it wipes all the info that was temporarily on the host HD as to leave no traces.

Again this may all seem a bit much but for many people, playing on super-restricted computers at work may be the key towards this game developing something larger then the current *small* cult following it has. That way there's no excuses.

-Oh I can't install it
Doesn't need install

-Oh its restricted
It works around that, don't worry about it

-Don't wanna leave any files on the computer
It'll remove anything that it uses, and it won't use much anyways. It would run from the USB drive but your USB drive would wear out pretty quickly then.

-My boss could monitor this somehow?
Well yes, with screencapture software/spyware, but otherwise it doesn't leave traces on the computer. Its open-source so many people have checked it out to make sure it does its thing.

-Looks complicated
It isn't! Just try it! I have it on my USB drive!

-Those things can carry viruses
Ok then just scan it really quick.

-But that'll take forever
No it won't file size isn't that big, under 50 MB. Even then most of the code is optimized so it should go pretty quickly depending on what scanner you use. Also I've checked it myself and I assure you its safe, I protect myself anyways.

-Fine.

*game loads up*
*playing scenarios a little bit*

-Whoa, great graphics, what is this?
An awesome game, enjoy!

Uh...see? That's just an example but you get my drift. I'm trying to expand the current audience to include those who don't otherwise have any other means of playing stuff on their work computers and thus resort to java/browser games. We might do Java Wesnoth instead but that would require an entire code rewrite or something. O_O

Till then.

darkwraith007
Posts: 40
Joined: December 6th, 2006, 2:27 am
Location: USA

nevermind

Post by darkwraith007 » January 1st, 2007, 5:32 am

Nevermind guys, I already just installed it then zipped up the main directory. I'm gonna look through the files and see what I can see.

Till then.

EDIT: Progress is slow, as I'm doing this in my spare time, but if anyone wishes to help, feel free to contact me. I've found a link that should help me out.

http://portableapps.com/development

The idea I've been thinking of is letting wesnoth use the hard drive as a temporary cache, thus not using the portable drive itself for the massive amounts of reads/writes. And "safely" removing the device via Windows would also ensure that no traces were left behind.

Again I would like some help with this, preferably from someone who would know how to alter the number of reads/writes that wesnoth does, or the location of the cache (or have it pop up in a dialog box at startup so the user can choose which drive to use for cache).

I'll keep everyone posted when/if I can.
TT.

:DanishCow
Posts: 7
Joined: May 27th, 2006, 11:13 am

they were right.

Post by :DanishCow » March 3rd, 2007, 5:08 pm

I though i had tried it, mayby it diddent work the first time for me becouse I did not uninstall the installed version but my wesnoth is now portable and it don't look like theres any problems.

Works fine on my hacked sandisk cruzer 4 GB Titananium.
How can i check how much harddrive Wesnoth is using when I run it?

Dearly Regards DanishCow
Dearly Regards DanishCow

Post Reply