Compiling and Packaging With CompilePal

Discussion in 'Tutorials & Resources' started by fubarFX, Aug 10, 2016.

  1. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,563
    Positive Ratings:
    1,613
    Compiling and Packaging
    with CompilePal

    and then adapting it to your workflow

    CompilePal is a great way of automating the process of compiling and packaging maps. It is also made easy to build upon, you are encouraged to mod it to match your workflow. Where CompilePal truly shines is with its asset dependency detection which is second to none. CompilePal will look for content under the custom/ folder without trouble. It will find all materials, models, particles, soundscapes, sounds, skyboxes, color correction, nav files, menu photos etc... it does it all*. CompilePal doesn't stop there too, oh no... it will track all the model skins used in your map and only include those being used. It will also look inside particle files for custom materials. Soundscape/soundscript files will be scanned for custom sounds to be included, all dependencies are dealt with in a single click. There are no reason to not use CompilePal in your workflow unless you have a weird kink for hammer's compile window.

    cpal23.jpg


    Download
    Get it here.

    Advanced use
    Retrieving the asset list to be used with bspzip.exe - CompilePal has a folder called CompileLogs, in it you will find files.txt. It is the list of assets paked for the last map compiled with the pack option. That file is fed to bspzip.exe for packaging. (additionnaly, you can run the packing utility with the -verbose option)

    Adding compile options that do not appear in the interface - we try to keep the interface clean by not having every possible options but you can always add missing options by yourself. To do so, you need to manually edit the chosen preset via text editor. In the "Parameters" folder, you will find several .csv file containing the parameters for each process. From a text editor, this is where you can add in any parameter you want. The formatting should be fairly straightforward. Alternatively you can also directly edit your presets with a text editor.

    Adding executables in your compile process - For those times when vbsp, vvis and vrad are not enough... if you want to add an other step in your compile (vmfii for example) you can do so by adding files to the "Parameters" folder. You'll need to add a .json file to reference the executable and a .csv file to list your executable's parameters.


    Troubleshooting
    I am one of the developer for this tool so you can report any problems directly to me or via comment. Alternatively, you can report problems on our GitHub page.
     
    • Thanks Thanks x 7
    • Like Like x 4
    Last edited: Jan 13, 2017
  2. Izotope

    aa Izotope Never releases maps

    Messages:
    505
    Positive Ratings:
    405
    EDIT: As mentioned further down in the thread, this issue was resolved, it was a false alarm.

    My Antivirus alarm went off when trying to install this version (23), something about Adware.
    There was no problem with the previous version (22), can you look into this?
     
    Last edited: Mar 10, 2017
  3. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,563
    Positive Ratings:
    1,613
    Well, I know Windows Defender freaks out sometimes because our application is not registered with microsoft... which, is a dick move on their part but what are you going to do. if that's not it then mind telling me which antivirus you're using?
     
  4. Izotope

    aa Izotope Never releases maps

    Messages:
    505
    Positive Ratings:
    405
    The one from Avira
     
  5. Zurby

    Zurby L2: Junior Member

    Messages:
    76
    Positive Ratings:
    108
    According to VirusTotal Avira flags it just as adware, so no harm there. All the others say it's fine. So I wouldn't worry about it.
     
  6. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,563
    Positive Ratings:
    1,613
    still weird, we don't use any library that would get us flagged to my knowledge. But anyways, if people don't trust the binaries, they can always compile their own from the source code :D yay open source
     
  7. Pocket

    aa Pocket When all you have is Hammer...

    Messages:
    4,234
    Positive Ratings:
    1,998
    It might help if you distributed it as a proper MSI installer rather than just a pile of files we have to dump somewhere, manually open the Start menu's folder to create shortcuts, etc. It's not 1994 anymore.
     
    • Agree Agree x 2
  8. Yrr

    aa Yrr An Actual Deer

    Messages:
    914
    Positive Ratings:
    1,611
    tbh i prefer this cause it means i know exactly what files im installing and that im not gonna get some adware shit
     
  9. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,563
    Positive Ratings:
    1,613
    Thing is, the bunch of files is kind of useful, most of them are meant to make compilepal as modular as possible. Source has a rich modding culture and we're aware that not everyone has the same needs. We want to provide something that works well out of the box but also something that's super flexible and that can be easily modified. You can do pretty powerful things with those files, things that we would never have the time to replace with a proper UI. So that's why they're there, you're welcome to explore those files and change compilepal to better suit your workflow. We could hide most of it deep down in a appdata folder but we feel like that's not what the source community is about.
     
    • Agree Agree x 1
  10. BenCo

    BenCo L5: Dapper Member

    Messages:
    236
    Positive Ratings:
    146
    Would it be better if I would use this instead of PakRat?
     
  11. Nicky

    aa Nicky Rotten Tops

    Messages:
    882
    Positive Ratings:
    1,557
    Anything would be better than Pakrat tbh. Pakrat is very old, this will be a good replacement!
     
    • Thanks Thanks x 1
  12. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,563
    Positive Ratings:
    1,613
    compilepal's automatic paking is superior to pakrat. Compilepal doesn't let you do manual paking however, that's a tradeoff. The bet we're making is that the automatic paking is so good that you will never need manual paking but it may not be the case. also compilepal is a compiler bundled with a paker, so you're more or less forced to use our compiler to take advantage of the paking tool. If you're okay with all that, welcome aboard.
     
    • Thanks Thanks x 1
  13. Vel0city

    aa Vel0city func_fish_pool

    Messages:
    1,772
    Positive Ratings:
    1,310
    Now bundle a repacker/unpacker as well...
     
  14. Pocket

    aa Pocket When all you have is Hammer...

    Messages:
    4,234
    Positive Ratings:
    1,998
    Bad idea; if people go all the way from compiling, to packing content, to repacking, then they're liable to just dump the finished product on the Interweb without building cubemaps first. (Assuming it's even possible to build cubemaps after your map has been repacked.)
     
  15. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,563
    Positive Ratings:
    1,613
    The thing that was stopping compilepal from doing repacking was cubemaps, they need to done before compression begins. however, I've recently found a way to automate cubemaps. If I manage to implement that into compilepal, I'll be doing repacking as well. Pretty much automating the whole process... yeah, pretty exciting I know.
     
    • Like Like x 1
  16. Vel0city

    aa Vel0city func_fish_pool

    Messages:
    1,772
    Positive Ratings:
    1,310
    As in, build cubemaps outside the game in a way that mimics the whole "you gotta do a bazillion (3) console commands before building cubemaps and then do another billion (again, 3) commands if you want to do it for HDR"? Neato.
     
  17. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,563
    Positive Ratings:
    1,613
    well the cubemaps can only happen in the game, but we can automate that
     
  18. Izotope

    aa Izotope Never releases maps

    Messages:
    505
    Positive Ratings:
    405
    The changelogs didn't mention anything about -makedevshots though.
    0/10

    I tried adding that parameter myself in version 22, but it didn't seem to do anything.
     
  19. Pocket

    aa Pocket When all you have is Hammer...

    Messages:
    4,234
    Positive Ratings:
    1,998
    You'd basically have to emulate the actual Source engine inside CompilePal to add cubemap building. The closest I recall any third-party tool ever getting to that was Crafty, and it broke when all the textures got moved to VPK because Nem never bothered to learn how to support it.

    I really don't understand the logic here. The "bunch of files" are still going to install wherever you put the program; how dumb do you think these people are that they can't find C:\Program Files (x86)\CompilePal\? If this were something that had to be put inside the bin folder of the game in question, that'd make sense, but it's not. I know how to muck around with the TF2 config files, and the fact that Steam installs itself and its games into a logical location hasn't hindered that in any way.
     
  20. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,563
    Positive Ratings:
    1,613
    makedevshots is on my radar, more on that later. but uh... running the game option is kinda broken atm, so we're out of luck there

    I don't deploy the app so those changes are not even mine to make but to be completely honest I don't really see the value in making an installer. I'm here for the cold hard features.