Upgrade Process?
by ubeefx
Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins
Upgrade Process?
by Lodici » 29 Mar 2014, 21:36
Can we clarify what are the steps for upgrading an older version of Magarena to a newer version. If it is a case of installing a new version to a new folder and importing the images from the older version then we will also need to think about copying across user generated data such as custom decks, player profiles, stats, etc. The simplest way is to overwrite the existing installation but then you might end up with duplicate/similar script files with different names (see viewtopic.php?f=82&t=3735&p=149388#p149388), etc.
Re: Upgrade Process?
by ShawnieBoy » 29 Mar 2014, 23:32
I've always had to install a new version, using the image import, then go over and find all my decks to copy over.
If I was to extract the zip into my existing folder, 'things' would go wrong. Not been able to pick out exactly what it is, but I normally end up with errors.
Having an import for decks and now the player profiles would be really handy. Better still, a simpler way of updating.
If I was to extract the zip into my existing folder, 'things' would go wrong. Not been able to pick out exactly what it is, but I normally end up with errors.
Having an import for decks and now the player profiles would be really handy. Better still, a simpler way of updating.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Upgrade Process?
by frank » 29 Mar 2014, 23:48
one word on importing images (and the corresponding descriptions):
I had for quite some time foreign descriptions to english texted card images - some 20-30, take or give. I was about to report them when I installed magarena on a different computer. There I did a fresh image download and no more foreign description. Pure chance.
Don't know how long I was carrying them over and over again, but a fresh image download from time to time should be advised...
I had for quite some time foreign descriptions to english texted card images - some 20-30, take or give. I was about to report them when I installed magarena on a different computer. There I did a fresh image download and no more foreign description. Pure chance.
Don't know how long I was carrying them over and over again, but a fresh image download from time to time should be advised...
Re: Upgrade Process?
by Huggybaby » 30 Mar 2014, 01:45
If Magarena uses MTGImage for pics now, then you could have lots of pics left from previous sources too. I'm just guessing, but it is something to look at.
-
Huggybaby - Administrator
- Posts: 3207
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 701 times
- Been thanked: 594 times
Re: Upgrade Process?
by hong yie » 30 Mar 2014, 05:27
another thing to be considered is:
sometime there're custom files such as token creature picture that a user wants to keep. i have one of these custom token that i really like, away from the default one. so far i handle this manually.
sometime there're custom files such as token creature picture that a user wants to keep. i have one of these custom token that i really like, away from the default one. so far i handle this manually.
-
hong yie - Programmer
- Posts: 216
- Joined: 10 Mar 2013, 06:44
- Location: Jakarta
- Has thanked: 75 times
- Been thanked: 9 times
Re: Upgrade Process?
by Lodici » 30 Mar 2014, 07:11
Thanks for the feedback. Being lazy, my preference is to upgrade Magarena by extracting the new zip into the existing directory. From an end user point of view I think this is the simplest and most intuitive approach while we use the zip file method of distribution. With a few small tweaks to the CI build process and startup code we should also be able to keep development effort to a minimum as well since we will not have to consider migrating user data. Here is what I suggest...
During the CI build process and just prior to packaging everything into the zip file, any data directories that need to be upgraded should be renamed by appending a ".new" postfix. This rename will prevent overwriting the existing directory when the zip file is initially extracted.
When Magarena next starts it checks for the ".new" postfix and if found triggers the upgrade code for the specific directory. For example, if the "scripts" directory is renamed to "scripts.new" then when Magarena next starts it will simply delete the existing "scripts" directory and rename "scripts.new" to "scripts". This way we can be sure that the scripts directory matches exactly with the latest release.
We can use the same convention with any other data directories which may require some sort of upgrade process.
During the CI build process and just prior to packaging everything into the zip file, any data directories that need to be upgraded should be renamed by appending a ".new" postfix. This rename will prevent overwriting the existing directory when the zip file is initially extracted.
When Magarena next starts it checks for the ".new" postfix and if found triggers the upgrade code for the specific directory. For example, if the "scripts" directory is renamed to "scripts.new" then when Magarena next starts it will simply delete the existing "scripts" directory and rename "scripts.new" to "scripts". This way we can be sure that the scripts directory matches exactly with the latest release.
We can use the same convention with any other data directories which may require some sort of upgrade process.
Re: Upgrade Process?
by hong yie » 02 Apr 2014, 04:08
i like this solution. but... as i remember, Magarena always extracted to a new folder followed by version number. it doesn't integrate with the old folder. That's why i still keep my magarena folder from last year. i just drag all of the files from the zip and overwrite them to my old Magarena folder. is it better to move all necessary old file to a new folder instead?Lodici wrote:Thanks for the feedback. Being lazy, my preference is to upgrade Magarena by extracting the new zip into the existing directory. From an end user point of view I think this is the simplest and most intuitive approach while we use the zip file method of distribution. With a few small tweaks to the CI build process and startup code we should also be able to keep development effort to a minimum as well since we will not have to consider migrating user data. Here is what I suggest...
During the CI build process and just prior to packaging everything into the zip file, any data directories that need to be upgraded should be renamed by appending a ".new" postfix. This rename will prevent overwriting the existing directory when the zip file is initially extracted.
When Magarena next starts it checks for the ".new" postfix and if found triggers the upgrade code for the specific directory. For example, if the "scripts" directory is renamed to "scripts.new" then when Magarena next starts it will simply delete the existing "scripts" directory and rename "scripts.new" to "scripts". This way we can be sure that the scripts directory matches exactly with the latest release.
We can use the same convention with any other data directories which may require some sort of upgrade process.
-
hong yie - Programmer
- Posts: 216
- Joined: 10 Mar 2013, 06:44
- Location: Jakarta
- Has thanked: 75 times
- Been thanked: 9 times
Re: Upgrade Process?
by Lodici » 04 Apr 2014, 11:35
You are right in that it seems to be structured in such a way as to discourage you from overwriting the existing folder. I use Windows 7 and 7-zip. To unzip files I usually right click the file and select the "Uncompress here..." option. With the Magarena zip file this extracts the contents to a new folder, "Magarena-1.x". To overwrite the existing folder, I have to actually open the zip file, open the "Magarena-1.x" folder inside the zip, select the contents and drag into the existing installation - a right pain.hong yie wrote:i like this solution. but... as i remember, Magarena always extracted to a new folder followed by version number. it doesn't integrate with the old folder.
So now I will go with the flow and extract to a new folder each time (which means I have to update the shortcut each time as well! ) but it does mean that we will have to consider more than just importing existing images, especially now that player profiles have been implemented.
Here is what I would do to manually upgrade to version 1.49 -
- download Magarena-1.49.zip
- extract zip contents, which should create a new Magarena-1.49 folder.
- copy ..\Magarena-1.48\Magarena\players to ..\Magarena-1.49\Magarena\players.
- copy ..\Magarena-1.48\Magarena\duels to ..\Magarena-1.49\Magarena\duels.
- copy any other stuff you might have added yourself.
- create a new shortcut to ..\Magarena-1.49\Magarena.exe.
- run Magarena-1.49 and import the images from ..\Magarena-1.48\Magarena.
- delete the Magarena-1.48 folder.
If you mean overwriting a new installation then I would not recommend doing that. The script and groovy files are constantly being updated so you could easily overwrite a newer version with an older version.hong yie wrote:is it better to move all necessary old file to a new folder instead?
Re: Upgrade Process?
by melvin » 08 Apr 2014, 08:20
I did some research on auto upgrade for Java apps previously and one of the projects I found to be promising for use in Magarena is https://github.com/UrsKR/updates-r-simple
https://code.google.com/p/magarena/issues/detail?id=39 is about adding auto upgrade.
https://code.google.com/p/magarena/issues/detail?id=39 is about adding auto upgrade.
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 42 guests