Jump to content
  • Announcements

    • AndalayBay

      Orphan Attachments   07/31/2018

      I have been doing some housekeeping lately and I've noticed that I had a lot of orphaned attachments. Attachments get orphaned when the PM or post is deleted without removing the attachment first. Deleting a PM or post does not delete the attachment and the file or image remain on the server. I'd like to ask all members to go through their attachments and delete any attachments you don't need anymore or those that have been orphaned. Where can I get a list of my attachments? Click on your display name in the upper right corner of the forums and pick "My Attachments" from the drop-down list. How can I tell an attachment is orphaned? If the PM has been deleted, you'll see a message like this in your attachment list: Unfortunately there is no message if the post has been deleted, so please check your old posts. We do purge old birthday threads every once in a while. Also some hosted projects have been shut down, so you may have orphaned attachments on one of those locations. Thanks!
Visceral Moonlight

[RELz] BOSS

Recommended Posts

Sorry, I think we may be talking different things. In the XML files, what I'd like to do is have a variable and set its value to the directories and use the variable instead of listing the directories each time. This way, I'd just need to change the variable value instead of changing the directories in each field whenever the source files are reorganized. :)

 

If it doesn't do variables, does it have a way to break the XML files up into separate modules? Wouldn't be as good as a variable but it would also work. :)

 

Would it help if I gave an example? I can see about coming up with one. :)

Edited by Visceral Moonlight

Share this post


Link to post
Share on other sites

Oh sorry, no. XML is just a markup language. Doesn't assemble or compile. From Wikipedia:

Markup languages, and more generally data description languages (not necessarily textual markup), are not programming languages (they are data without instructions).

Share this post


Link to post
Share on other sites

So VS doesn't have some way to tell it to include other files, either?

You mean files to configure the project other than proj files?

No problem, I can try modifying my implementation of patch. I wrote it to help me manage configuration files by allowing me to split them up, it's pretty nifty. :)

That'll be nice. :)

Share this post


Link to post
Share on other sites

What I'm thinking is that I'd like to split an entire section of a proj file out into another file and then, in the parent element for this section, tell it to "import" the skeleton at this point.

 

Let me get an example together, I think it'll be easier to see with an example. I'll get it up tomorrow morning, I've been moving furniture all day. :)

Edited by Visceral Moonlight

Share this post


Link to post
Share on other sites

Thanks, I'll take a look as soon as I can. :)

 

I wonder if there might be a way to somehow simplify things instead of editing XML files that contain a lot of duplication.

Looking at it now. It looks like I had a brain-fart. For some reason, I set the include directory as src/common instead of just src. Just pushed a fix. :)

 

I can't think of a good example for the import stuff right now but I'll keep thinking. :)

Share this post


Link to post
Share on other sites

I've pushed a new branch trying to sort through the style for the parsing code. It's a bit messy so I'd like some opinions.

 

Here's the new code: http://gitlab.theassimilationlab.com/deaths_soul/boss/blob/parserStyle/src/parsing/grammar.cpp

 

Current code: http://gitlab.theassimilationlab.com/deaths_soul/boss/blob/codeCleanup/src/parsing/grammar.cpp

 

Am I moving in the right direction? I'm a bit unsure if it's any better as I wade through it.

Share this post


Link to post
Share on other sites

I'm trying to do some more organizing with the directory structure and I'm unsure where to put the NSIS file (it's a script that generates the installation wizard). Would it fit better in a folder for utility scripts or the build script directory? Or maybe keep it in the root of the tree?

Share this post


Link to post
Share on other sites

While I slept, I thought of a good way to handle the log themes: set up a new INI variable that contains the path of the desired CSS file and the one in there is the one that will be used.

 

I'll add this to my to-do list. :)

Edited by Visceral Moonlight

Share this post


Link to post
Share on other sites

I'm trying to do some more organizing with the directory structure and I'm unsure where to put the NSIS file (it's a script that generates the installation wizard). Would it fit better in a folder for utility scripts or the build script directory? Or maybe keep it in the root of the tree?

Can't think of anything. If it's just a one-off script, then the root directory might be okay. Have you tried the Dirty List Generator yet?

Share this post


Link to post
Share on other sites

Alright, thanks. I need to clean up my local directory some as I've got files I've generated to help inspect things in there, which should help me see things better. :)

 

I haven't tried running or building it yet but it should work. Been focusing on the main code a lot but I think it's time to get the Dirty List Generator up to the same level. It may be a day or so as I've got classes starting up but it won't be long, I just need to work out a good balance. :)

Share this post


Link to post
Share on other sites

DLG produces a text file with the message:

Critical Error: "cleanlist.txt" cannot be read! Exiting.

The Boss.exe and Boss Gui.exe files have grown (groan) by around half a meg each since last run (2 weeks ago?)

When running BOSS from the GUI, there is a "working" progress box. It has a "details" arrow on it when clicked, revealing... no details!

Heck, we have to put something there. Even a "joke" text with something like "Details? You_have_just_got_to_be_kidding!?!?" :P

Edited by lmstearn

Share this post


Link to post
Share on other sites

Looks like the Dirty List Generator is out of action for a bit. It looks like there were some changes in how BOSS worked a few years ago that broke the Dirty List Generator and its code wasn't updated. I did a search for cleanlist in the repository and there weren't any results other than where it tries to open that file in the Dirty List Generator code so it sounds like it may need some rewriting.

 

Not sure why the executable size increased. I didn't think I was making changes that would cause it to increase. Don't worry, though, I'm going to try to decrease the size. Making a static build with MinGW generates an executable that is 14 MB, which seems kind of excessive to me. Part of it is Boost so it should start to decrease when I start replacing more of Boost's usage with standard library features. :)

 

For the "details" arrow, was that blank before I started working on it? It's very possible it's something I introduced over the course of the cleanup. :P

 

Edit:

 

Soon, we may also be able to drop the Boost filesystem library as that's being proposed for C++17. Unfortunately, it's too early to tell if a VS version that still supports XP will be updated with that change.

Edited by Visceral Moonlight

Share this post


Link to post
Share on other sites

I was tinkering around with the Makefile and it can now build for Windows on Windows, for Windows on *nix systems, and it can now build a working native binary for *nix systems. The Makefiles still need work as you need to clean out the object files before you build for a different platform. I tried to set it up for different directories and got in over my head so I'll take a look at that again another day. :)

 

I had to change something with the logging function so let me know if that starts acting wonky.

 

While I'm in this area, I think I'll go ahead and swap out some Boost libraries for the standard ones. :)

 

Edit:

 

I also changed some paths that were to old Boost headers to the new locations for those headers so let me know if I broke something there, too. :)

 

Edit 2:

 

I still need to add the GUI build to the Makefiles.

Edited by Visceral Moonlight

Share this post


Link to post
Share on other sites

I just pushed up the changes swapping out Boost Regex, unordered_set, and unordered_map for the STL features. In the process, I identified some Unicode issues that need to be investigated. It seems I broke some stuff when I was changing things to make it build a few months back. Fortunately, the switch from Boost Regex to STL Regex brought them to my attention when the compiler refused to build the code.

 

Regarding the file size: what's the executable size like now after doing a build? For some reason, my build has ballooned to close to 20 MB. :/

Share this post


Link to post
Share on other sites

Sorry VM (pebcak), got this building Common:

Error	26	error C2780: 'std::pair<_Ty1,_Ty2> std::_Hash<_Traits>::emplace(_Valty &&)' : expects 1 arguments - 2 provided	C:\...\Visual Studio 2010\Projects\BOSS\src\parsing\grammar.cpp	670	1	BOSS-Common
Edited by lmstearn

Share this post


Link to post
Share on other sites

Looks like the 2010 version of MSVC has a different signature for the function from the standard, later versions were changed to be in-sync with the standard.

 

On line 670 in grammar.cpp, could you try changing the line to fileCRCs->emplace(std::make_pair(file, CRC)); and add #include <utility> to the top?

 

That should fix it. Basically, the standard says to have that function take a variable number of arguments but MSVC 2010 only takes one so we need to convert them to a pair ourselves instead of using the automatic conversion feature.

Share this post


Link to post
Share on other sites

So that change works? Great, thanks. I'll get it committed as soon as I can. :)

 

And I think I'll go ahead with splitting up the main functions into new files around the same time. I've been wanting to do it for a few weeks but I kept finding other things to fix that have caused me to get sidetracked. :P

Edited by Visceral Moonlight

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×