• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

THW Project Manager

Status
Not open for further replies.
Level 31
Joined
Jul 10, 2007
Messages
6,306
So, I was working on that installation stuff, right? Everyone wanted a central repo, right?

Been working on this UI for a couple of days =). It's going to conect to THW and let you browse resources. The manager will be open for a specific map. If you choose to install a resource, it'll retrieve all required resources, install those, then install the resource.

As I get more into what the resource browser portion is going to look like, I'll post more screenshots ^_-.


Resources must be in a zip file and must have a config.xml file in the main directory. The config file will tell the project manager how to install the resource and what the requirements are, etc =). I'll be sure to do a Resource Editor thing in this too.

attachment.php
 

Attachments

  • THW Project Manager UI.jpg
    THW Project Manager UI.jpg
    118.1 KB · Views: 362
Level 6
Joined
Jul 30, 2013
Messages
282
config.XML..

*shudder*

you do realise XML is like the most human hostile config format out there..?

why not like use .ini or json (or UCL if you want to be permissive + comments yay!)
or YAML for sth nice and human readable..



ok, moving on.

the ui looks quite nice so +1 for that...



usage: how to post a resource, what format?
do they all need to be THW threads 1 per resource?

how do you detect the resources? require them all to be links to threads and just DL all the .zip files linked?


why make this from scratch, why not reuse/piggyback on some existing package manager, like every language out there has one.

will there be a way to request for resources by name/version(/author?)


command line interface, will it be a thing? will it be a first-class thing?


Will it support workflows where some/most/all of some types of resources are stored externally from the map? (scripts matter a lot to be, but the other bits i care about too..)

what would the capabilities of the conf be? will it just be an overcompilicated requirements.txt?
can you like specify what syntax/preprocessor your script uses etc?
run some installer script? (like run objectmerger once and set up conf variables to capture results?)
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
you do realise XML is like the most human hostile config format out there..?

I plan on making a resource publisher that will generate the XML for you.

how to post a resource, what format?

Post it to the Models, Icons, Skins, Spells, or Packs section. Upload a zip file instead of a map.

do they all need to be THW threads 1 per resource?

Not threads, but 1 resource per thing, yes. You can technically combine resources into packs, like lots of little libs together ; ). The XML configuration is pretty flexible.

how do you detect the resources? require them all to be links to threads and just DL all the .zip files linked?

The exe will go right on to the THW website and browse those sections. All links with zipped archies (.7z, .rar, zip, etc) uploaded to them will be included in the browser. There will be descriptions, pictures, ratings, sorting, and an Install or Installed button. You'll also be able to configure the resource with a built-in installer.

will there be a way to request for resources by name/version(/author?)

They can be requested by version if the versions are all included in the resource. You could configure the XML file to have 100 different versions if you wanted and then have the user select one : ). Resources will also request by version. Versions will be managed via timestamps in the publisher. When retrieving required resources, the correct versions will automatically be selected unless there are conflicts. As for the other stuff, look at the top left of the UI : ).

command line interface, will it be a thing? will it be a first-class thing?

I haven't thought about a CLI. I'd sooner do a dll.

Will it support workflows where some/most/all of some types of resources are stored externally from the map? (scripts matter a lot to be, but the other bits i care about too..)

Scripts are being stored externally. Models and what not can't be stored externally sadly : (. Those will be injected into the map. Any objects will also be injected. There's no way to not do this unless you do a full IDE, which I'm not going to do : P.

what would the capabilities of the conf be? will it just be an overcompilicated requirements.txt?

I'll post more on that later. Optional requirements, file paths, hard requirements, and a way to configure the resource. I'm thinking of something like <input></input>. The input will be mapped into things like object generation and the input will be displayed to the user within the installer ; ). I haven't figured that part out yet. I know I am not going to support custom scripts, lol. I personally don't want a random stranger's custom script running on my machine : P.

syntax/preprocessor? Any will work. This is configured for vJASS though, but as long as it has a //! import directive, it'll work. I can set it up for several languages =).



There is no installer script that runs. There is a special installer thing embedded in this exe that will look at your xml file and do all of the appropriate steps. This is coded in c#, so I can freely use the wc3 map editing dlls. I also have unfettered easy access to the Windows API : ). Also, by installer, I mean a literal installer, where you go through the window and click "next" and stuff. It'll be pretty nice.
 
Level 6
Joined
Jul 30, 2013
Messages
282
I plan on making a resource publisher that will generate the XML for you.
what about if i want to edit it manually or use some script to generate some values?
They can be requested by version if the versions are all included in the resource. You could configure the XML file to have 100 different versions if you wanted and then have the user select one : ). Resources will also request by version. Versions will be managed via timestamps in the publisher. When retrieving required resources, the correct versions will automatically be selected unless there are conflicts. As for the other stuff, look at the top left of the UI : ).
So if i want to upload serveral resources i need to stuff all of them inside the same .zip file? this doenst sound like a reasonable thing to do.
I haven't thought about a CLI. I'd sooner do a dll.
If you give me a dll i need to make a whole application to use it, if you give me a cli that means i can easily scrip it togeter with other applications.

For example if i wanted to add a git hook i'm not going to write an app in C or sth for it, but a .bat file with a handful of carefully tuned lines would be quite reasonable.

So a CLI would be much more versitile and useful (that is having both is best but if you had to pick one).
Scripts are being stored externally. Models and what not can't be stored externally sadly : (. Those will be injected into the map. Any objects will also be injected. There's no way to not do this unless you do a full IDE, which I'm not going to do : P.
wouldnt it be possible to like store the model files externally and register it in some file (sth.not-xml :p ) and have a command to import all of these.

if you already do the importing in to the map would it be too much effort to defer the import-to-map bit?

I'm really frustrated with having to version control binary blobs, so something that forces me to keep even more tings internal to the map is rather annoying.
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
wouldnt it be possible to like store the model files externally and register it in some file (sth.not-xml :p ) and have a command to import all of these.

It would, but you'd then have a "build project" sorta deal, which would be more towards a full IDE. That's definitely not my goal here =).

So if i want to upload serveral resources i need to stuff all of them inside the same .zip file? this doenst sound like a reasonable thing to do.

Well, more like you just stick to 1 resource per submission on THW as is usual. If you want more than one on a single submission, then yea, you gotta stuff the archive ; ). A submission can only have 1 download as well, so there's that.

So a CLI would be much more versitile and useful (that is having both is best but if you had to pick one).

How about I do a dll and make a CLI that uses that dll? The THW manager thing can use the dll too.

what about if i want to edit it manually or use some script to generate some values?

You can edit the XML file manually, sure. As for scripts, I'm not going to support those at all. I see no need to support scripts tbh. Every feature you could ever want can be supported with XML. Given that, I'd prefer to just stick with safety. I'd only support scripts if I saw some realistic use case that could only ever be done with scripts. I've so far handled everything with just XML.
 
Level 6
Joined
Jul 30, 2013
Messages
282
You can still segfault warcraft 3 tho.. thus its probably exploitable..

would that not be more likely a target for mean ppl than posting stuff on hive..?

also newgen still gets detected as a virus...

is it rly a thing avoiding executable stuff in dependencies?

perhaps there should just be a better way to audit the resources?
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,178
If it connects to THW then you need to make sure Ralle is OK with this. It may filter out adverts and things which makes it detrimental to running the site.

You can still segfault warcraft 3 tho.. thus its probably exploitable..
It should not be because code pages are read only. Trying to write to a code page or trying to execute not a code page should produce a security exception and immediately crash the process.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,178
DSG, it just loads up the web pages and parses the HTML. Downloads whatever files and stuff ; ).
As trivial as it sounds you should still ask permission since it is not your server bandwidth that it uses. Bandwidth is not free and although the site is public your program will be possibly using it in an unintended way.

Such a problem happened in the past when Pyrite and various moderators had a bulk file downloader for checking/archiving resources. This is why there is a file download limit currently as such programs used up a lot of bandwidth as well as the tendency to cause site performance problems.

It would be best to work together. Rather than administration having to modify the site to prevent problems you accidently cause (as was the case with the bulk file downloader).
 
Level 6
Joined
Jul 30, 2013
Messages
282
well since it only allows managing resources inside the map archive im not ever going to be able to use this anyway.. so take this with a grain of salt maybe..

Having to download the entire .zip file just to get at the config file is quite wasteful if you then decide that the resource is not what you wanted. maybe not for 1 user but if this takes off a large % of THW traffic could be made by this program...

Id rather have some centralised index that you can register resources to, that comply with the correct format and that is friendly to external programs.
 
Level 6
Joined
Jul 30, 2013
Messages
282
if you want to scrape THW forums then yes..
but if you are ok with having say a dedicated service to maintain the index then possibly but not necessarily.
its kind of a pain to have a magical forum-post format anyway..
 
Status
Not open for further replies.
Top