Pathing 'fix' for /interface/addons removal + read-only fix

Support and feedback for UniUploader
UniUploader requires microsoft .net runtimes!

Pathing 'fix' for /interface/addons removal + read-only fix

Postby zugster » Thu Dec 21, 2006 4:33 pm

Ok..after getting tired of rebuilding paths to include /interface/addons when most mods dont use this, I made a change to extract to this directory automatically. So if you want to use this replacement file, your zip package should just be a single folder (/modname, in most cases).

Also, I found that uniuploader was failing for some mods (most notably ctraidassist). Turns out any mod/directory that has a read-only file causes the update to fail. To correct this, I wrote a new routine which strips the read-only tag off all the files and folders in the old mod directory.

As a reminder, if you have a zip file with /interface/addons/mod as the structure, you'll have to make a new zip with just /mod. However, this is much easier as you can zip up your own /interface/addons/mod directories in a batch with winrar and specify 'new archive for each folder', making the process MUCH easier.

1) get the uniuploader source and extract it
2) overwrite the Form1.cs file with the Form1.txt attached here (wont let me upload a *.cs file).
3) rebuild the project

C# Express is now a freebie, so $ is no excuse ;)

Hope this helps someone other than me. We've been using it in our guild now and corrects some weird failures we had as well as making it easier on me to build packages. But, as always, no warranty/guarantee.
Last edited by zugster on Fri Dec 22, 2006 9:27 am, edited 8 times in total.
zugster
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Thu Dec 07, 2006 2:30 am

Re: Pathing 'fix' for /interface/addons removal + read-only

Postby Jacklifear » Thu Dec 21, 2006 9:12 pm

the txt file is 0 bytes. Mind reposting it?
Jacklifear
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Sun Jul 16, 2006 7:59 pm

Pathing 'fix' for /interface/addons removal + read-only fix

Postby bbj911 » Fri Dec 22, 2006 12:53 am

i presume youve also confirmed that the bit that checks for md5 checksums is looking in the correct path.
Uniadmin also need checking as it unzips the file to get the md5 checksums of the files. Dunno its logic for finding the files.
User avatar
bbj911
WR.net Apprentice
WR.net Apprentice
 
Posts: 61
Joined: Mon Oct 23, 2006 6:47 pm

Re: Pathing 'fix' for /interface/addons removal + read-only

Postby zugster » Fri Dec 22, 2006 9:39 am

Arrgh..not letting me upload files..everything goes to 0 bytes. So here's the changes from Forms1.cs: (the md5 calcs are done after the pathing has been determined, so this should not affect anything).


(starting at line 4808)
=============

return UpdateList;
}

+ public void RemoveReadOnly(string path)
+ {
+ try
+ {
+ DirectoryInfo current = new DirectoryInfo(path);
+ current.Attributes = FileAttributes.Normal;
+
+ foreach (FileSystemInfo file in current.GetFileSystemInfos())
+ file.Attributes = FileAttributes.Normal;
+
+ foreach (DirectoryInfo folder in current.GetDirectories())
+ RemoveReadOnly(folder.FullName);
+ }
+ catch (System.Exception excpt)
+ {
+ Console.WriteLine(excpt.Message);
+ }
+ }

=====================

line 4577 changes to:
string directoryName = GetInstallPath()+@"\Interface\Addons\"+Path.GetDirectoryName(theEntry.Name);

( old was string directoryName = GetInstallPath()+@"\"+Path.GetDirectoryName(theEntry.Name); )

=======================

line 4859
try
{
+ RemoveReadOnly(addonFolder);
Directory.Delete(addonFolder,true);
}
Last edited by zugster on Fri Dec 22, 2006 9:40 am, edited 1 time in total.
zugster
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Thu Dec 07, 2006 2:30 am

Pathing 'fix' for /interface/addons removal + read-only fix

Postby MattM » Fri Dec 22, 2006 12:52 pm

The reason I've not done this already is because some people have addon content which doesn't go in the Interface\Addons folder, and this type of change would limit all updates to that folder.

I will add the "read only" bug to the todo list, and I thank you for finding it and fixing it for me.
MattM
UA/UU Developer
UA/UU Developer
Gimpy Developer
Gimpy Developer
 
Posts: 886
Joined: Tue Jul 04, 2006 9:53 pm
Location: USA

Pathing 'fix' for /interface/addons removal + read-only fix

Postby Jacklifear » Fri Dec 22, 2006 9:57 pm

So, I attempted to download C# express and attempted to your bug fixes, and didn't get much love due to errors. The errors are in other portions, so I was wondering if you could find a way to getting this patched up uniuploader to me? I'd really appreciate it as this is the last step needed for my guild to get our addon section working the way we want it to with ease
Jacklifear
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Sun Jul 16, 2006 7:59 pm

Re: Pathing 'fix' for /interface/addons removal + read-only

Postby zugster » Sat Dec 23, 2006 2:49 pm

there were 2 errors and, iirc, 14 warnings from the compile. The two errors had to do with something along the following

Form1.cs 4428:
old:
double progress_now = Math.Floor(((progressBar1.Value/100) * 100) / (progressBar1.Maximum/100));

new:
double progress_now = Math.Floor(((double)(progressBar1.Value/100) * 100) / (progressBar1.Maximum/100));


essentially, the latest .net is a bit less forgiving on types.

attached is the release binary for just the uniuploader.exe with the interface/addons, readonly, and (double) changes.

Also is the Form1.cs file with the changes for those who would rather build it themselves (today the files are uploading..go figure).

Just as a reminder, the official devs are working on the/interface/addons vs. / change officially. I only did this for the readonly issue and because we were starting our mods from scratch because of 2.01. I dont want to cause any 'unofficial' change issues with the devs.
Attachments
form1.rar
(34.7 KiB) Downloaded 221 times
uniuploader.rar
(108.38 KiB) Downloaded 225 times
Last edited by zugster on Sat Dec 23, 2006 2:55 pm, edited 3 times in total.
zugster
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Thu Dec 07, 2006 2:30 am

Pathing 'fix' for /interface/addons removal + read-only fix

Postby MattM » Mon Dec 25, 2006 12:01 pm

can you please point me to some official notice that they are indeed working on the pathing change, I would like to see more details on it.
MattM
UA/UU Developer
UA/UU Developer
Gimpy Developer
Gimpy Developer
 
Posts: 886
Joined: Tue Jul 04, 2006 9:53 pm
Location: USA

Re: Pathing 'fix' for /interface/addons removal + read-only

Postby zugster » Wed Dec 27, 2006 1:14 am

http://www.wowroster.net/ProjectsPro/ta ... id=48.html

Although despite being assigned to internal testing and at 90% completion, I see no one assigned to it..lol. I'm still trying to find the feature reqeust accept/deny list that I saw a while back.
zugster
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Thu Dec 07, 2006 2:30 am

Pathing 'fix' for /interface/addons removal + read-only fix

Postby zanix » Sat Feb 17, 2007 5:14 am

I'm bringing this back up for matt to fix

Matt, a new value could and should be in the UA xml output called "full_path" (not in 0.7.5, but could be in future release)
full_path = 1 // don't prepend "/Interface/AddOns"
full_path = 0 // prepend "/Interface/AddOns"

I think this will solve this problem
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Pathing 'fix' for /interface/addons removal + read-only

Postby swampy » Tue Feb 20, 2007 9:06 am

zanix wrote:I'm bringing this back up for matt to fix

Matt, a new value could and should be in the UA xml output called "full_path" (not in 0.7.5, but could be in future release)
full_path = 1 // don't prepend "/Interface/AddOns"
full_path = 0 // prepend "/Interface/AddOns"

I think this will solve this problem


This sounds as if it's a database change on UniAdmin - a tinyint(1) field in the uniadmin_addons table?

Means Matt doesn't need to change anything in the filename field like adding the \interface\addons directory, and it makes it easier to change the full_path field from the interface without having to reupload the file. The only time Matt would need to worry about prepending the interface\addons directory is when the 'tree' is displayed in the addon details screen.

For most users you might be able to have yes/no/autodetect, with autodetect being the default. If the zipfile contains items with Interface/Addons directories already there, assume the file contains an addon with the full path (full_path=1). If the zipfile contains no Interface/Addons directories, assume the zipfile doesn't contain the full path (full_path=0)

Just a thought from a fellow developer :)
Last edited by swampy on Tue Feb 20, 2007 9:07 am, edited 1 time in total.
User avatar
swampy
WR.net Apprentice
WR.net Apprentice
 
Posts: 43
Joined: Mon Sep 25, 2006 9:38 pm
Location: UK

Pathing 'fix' for /interface/addons removal + read-only fix

Postby zanix » Tue Feb 20, 2007 6:34 pm

My thoughts exactly :)
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to UniUploader

Who is online

Users browsing this forum: No registered users and 1 guest

cron