It is currently 26 Aug 2025, 22:31
   
Text Size

slimming down the distributable

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

slimming down the distributable

Postby myk » 17 Mar 2013, 23:13

Hi all,

Now that the quest-related pack pics will be downloaded from the server, we can shave about 20 MB off the distributable size. But we can do better than that. I was thinking skins and sounds could also be moved out of the distributable and onto the server (except the default skin -- something needs to come up on first load). We've actually been holding back on adding new skins and sounds due to the space they take up, but if we add them to the server it is much less of a concern.

Does anyone have any thoughts or opinions on how this should be done (or whether it should not be done)?

There are also a number of tools that are taking up space in the res/ directory. Would anyone mind if I moved the following files to a new top-level directory named tools?
  • PerSetTracking.py
  • assignSetInfo.py
  • cardTemplateScript.py
  • mtg-data.txt
  • mtgdata-sets-to-forge.txt
  • oracleScript.py
I've already tested the scripts in their proposed new location and modified the paths inside so they can still find the cardsfolder data.

On a side note, does anyone know how many people we have running off of SVN? How long should we wait for SVN users to get their data migrated before we clean up pics_product and the old user data directories?
myk
 
Posts: 439
Joined: 17 Jan 2013, 02:39
Location: California
Has thanked: 38 times
Been thanked: 57 times

Re: slimming down the distributable

Postby Chris H. » 18 Mar 2013, 00:16

Sounds good to me

and

a week or two?
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: slimming down the distributable

Postby friarsol » 18 Mar 2013, 02:12

Yea I'm cool with moving the scripting tools outside of the distribution.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: slimming down the distributable

Postby myk » 18 Mar 2013, 06:02

done. After I recheck the migration procedure, I'll see if I can write up a proposal for skins management.
myk
 
Posts: 439
Joined: 17 Jan 2013, 02:39
Location: California
Has thanked: 38 times
Been thanked: 57 times

Re: slimming down the distributable

Postby Max mtg » 18 Mar 2013, 10:05

We'll have to update references from python scripts to res folder though - but it's minor. I think the one who runs a script first will adjust the paths.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: slimming down the distributable

Postby friarsol » 18 Mar 2013, 12:25

Max mtg wrote:We'll have to update references from python scripts to res folder though - but it's minor. I think the one who runs a script first will adjust the paths.
Myk already said he did that in the original post.

"I've already tested the scripts in their proposed new location and modified the paths inside so they can still find the cardsfolder data."
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: slimming down the distributable

Postby moomarc » 18 Mar 2013, 13:12

friarsol wrote:
Max mtg wrote:We'll have to update references from python scripts to res folder though - but it's minor. I think the one who runs a script first will adjust the paths.
Myk already said he did that in the original post.

"I've already tested the scripts in their proposed new location and modified the paths inside so they can still find the cardsfolder data."
I just tried cardTemplateScript and PerSetTracking, but they're not seeing mtg-data.txt even though its in the same folder. I've looked at the scripts but obviously don't know enough about python to see why it's not working. As far as I can tell it seems to look in the same folder for it and has another path set up for cardsfolder. :-s
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: slimming down the distributable

Postby myk » 20 Mar 2013, 16:12

can anyone else confirm this? mtg-data was found by the scripts just fine in my testing:
Code: Select all
$ ./cardTemplateScript.py
Enter Card Name: Abbey Matron

Name:Abbey Matron
ManaCost:2 W
Types:Creature Human Cleric
PT:1/3
{W}, {T}: CARDNAME gets +0/+3 until end of turn.
SVar:Picture:http://www.wizards.com/global/images/magic/general/abbey_matron.jpg
myk
 
Posts: 439
Joined: 17 Jan 2013, 02:39
Location: California
Has thanked: 38 times
Been thanked: 57 times

Re: slimming down the distributable

Postby friarsol » 20 Mar 2013, 16:25

myk wrote:can anyone else confirm this? mtg-data was found by the scripts just fine in
perSetTracking.py worked for me, so I'm not sure what's going on with moomarc.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: slimming down the distributable

Postby moomarc » 20 Mar 2013, 17:25

Its probably just Eclipse being a right pain it the ass again. The scripts work fine if I drop a copy of mtgdata back into the res folder, so somewhere something in Eclipse isn't updating properly... Grumble grumble... I'll have to try do a fresh build at some stage. Or is there some external pointer to mtgdata that I'm overlooking?
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: slimming down the distributable

Postby myk » 20 Mar 2013, 17:27

I updated the scripts to be working-directory agnostic. This should allow them to run properly no matter what eclipse tells them the current directory is. Does this get it working for you?
myk
 
Posts: 439
Joined: 17 Jan 2013, 02:39
Location: California
Has thanked: 38 times
Been thanked: 57 times

Re: slimming down the distributable

Postby moomarc » 20 Mar 2013, 17:35

Thanks for the fix, but unfortunately I won't be able to test it before Monday - leaving for holiday tomorrow and I'm already shut down for the night. Well, there's a small chance I'll get to test tomorrow morning. If I do, I'll let you know whether it worked for me. Then Monday I'm back, will test if I didn't before, then some designs I need to finish for a client, then back to getting out the remaining Nemesis Oath cycle. :D
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: slimming down the distributable

Postby myk » 20 Mar 2013, 17:50

Sounds like a rich, full weekend : ) Have fun!
myk
 
Posts: 439
Joined: 17 Jan 2013, 02:39
Location: California
Has thanked: 38 times
Been thanked: 57 times

Re: slimming down the distributable

Postby myk » 21 Mar 2013, 19:17

Chris H. wrote:
myk wrote:How long should we wait for SVN users to get their data migrated before we clean up pics_product and the old user data directories?
a week or two?
I'll go ahead and remove the old user data directories from svn on Tuesday, 26 March. Everyone who is updating via svn: please migrate your data out of the following directories by that date or your svn client will unceremoniously delete it all:
  • res/decks/
  • res/gauntlet/
  • res/layouts/
  • res/pics/
  • res/pics_product/
  • res/preferences/
  • res/quest/data/
After migration, all these folders will be empty of user data (pics_product will have old copies, but nothing to worry about). To migrate, update your code from svn, build, and run. The migration dialog will fire up and help you from there. If it is already past the 26th, copy your data to another directory before you update, then use the Import Data dialog to re-import it from where ever you copied it to.
This warning and procedure is only for those who update via SVN. If you install releases or snapshots downloaded from cardforge.org, there is nothing you need to do. The automatic migration process will walk you through all steps you need to take when you upgrade, no matter what the date.

Thanks!
Myk

(edit: added res/preferences, thx Max!)
Last edited by myk on 22 Mar 2013, 13:39, edited 2 times in total.
myk
 
Posts: 439
Joined: 17 Jan 2013, 02:39
Location: California
Has thanked: 38 times
Been thanked: 57 times

Re: slimming down the distributable

Postby Max mtg » 22 Mar 2013, 06:34

Did you list only notable folders, or just all of them? If it's the second case you're definitelly missing res/preferences. They have also moved to C:\Users\Max\AppData\Roaming\Forge
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Next

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 28 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 28 users online :: 0 registered, 0 hidden and 28 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 28 guests

Login Form