Coder Social home page Coder Social logo

Comments (5)

laher avatar laher commented on July 17, 2024

Hi Owen, thanks for the report. I'll try to deal with both aspects this weekend.

I'll deal with the subfolder bug first. I think it's just a bug in the 'zip' task and shouldn't take long to fix it.

Secondly, my approach to per-platform parameters is to have multiple config files in the same folder. The only thing missing at the moment is the possibility to share common settings between the configs.

I've deliberated over how to share settings across config files before, but I think I'll just decide on a name for a base config, e.g. 'base.goxc.json', and then both configs will automatically inherit settigs from that.
So, you'd put the version numbers etc in 'base.goxc.json', and then in each config you'd add platform filtering and per-platform options. For darwin you'd run goxc -c=darwin. This is all possible already except you need to specify everything twice (including version number, etc)

For now you can do this.
It works but you'll need to keep all your common settings in sync:
cp .goxc.json darwin.goxc.json
goxc -wc -os='linux windows plan9'
goxc -wc -os=darwin -c=darwin

But, after I've made the change you would do it a bit differently.
mv .goxc.json base.goxc.json
goxc -wc -os='linux windows plan9'
goxc -wc -os=darwin -c=darwin
Then you wouldn't need to duplicate all the common stuff.

I hope that makes sense.

from goxc.

laher avatar laher commented on July 17, 2024

Hey I fixed the 'subdirectories' issue. Please go get -u github.com/laher/goxc and try it.
More to follow soon. Cheers

from goxc.

owenthereal avatar owenthereal commented on July 17, 2024

Thanks! Already using it!

from goxc.

laher avatar laher commented on July 17, 2024

OK goxc now have 'config inheritance':

  1. update to latest version go get -u github.com/laher/goxc
  2. To prepare your 2 specific configurations (in addition to your main config file), you can run the following commands:

goxc -wc -c=darwin -bc='darwin' -include='myosxfile1,myosxfile2' goxc -wc -c=default -bc='!darwin'

Note the use of single quotes in the -bc option. (because exclamation marks have significance in bash)

This creates 2 new files, (default.goxc.json and darwin.config.json).
Both configs now (as of version 0.8.0) inherit from the main config file (.goxc.json).

  1. Remove the Darwin-specific entries from the Include line in the base config file '.goxc.json'.
  2. To invoke the 2 configs, you can use these commands:
    goxc goxc -c=darwin

Note that during invocation, the 'default' file 'default.goxc.json' is used by default. If it's not there, goxc will still use the 'base' file .goxc.json.

I hope that all makes sense and solves your problem.
Cheers

from goxc.

owenthereal avatar owenthereal commented on July 17, 2024

Super! I am using it already. Thanks for the hard work! Closing the issue

from goxc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.