Comments (4)
Another way of fixing cross-platform compatibility that I considered mentioning in the issue itself is to run the build hooks in a container and mount the whole mcman repository into it. The problem with this approach is that you don't know what someone would want to do. Maybe it's more than just change a couple of files, maybe they want to send a notification to their phone that the build is completed (e.g. if they have extremely slow internet and/or a lot of huge worlds), or whatever other use cases we cannot think of. This "outside the repository" use would need to be facilitated by editing the container specification, and we can't expect everyone who just wants a script to run to be good at working with containers, which are a divisive technology anyway.
from mcman.
that's a solid config format! i guess we can add extra metadata (such as the world being unpacked) as environment variables to the child process.
im still skeptical about the platform compatability though, bat and sh dont mix very well
maybe it can be like so: hooks/meow.sh
and hooks/meow.bat
- would be defined as [hooks.meow]
in the config and mcman would pick the correct file depending on the OS
from mcman.
However, .py
scripts would work the same on both. To avoid having to code a million edge cases for incompatible-but-similar programs (e.g. windos binaries, POSIX binaries, MacOS binaries), how about we add the option of manually specifying platform-dependent options?
So if you have a cross-platform script (e.g. .py), or you're not interested in cross-platform compatibility (such as a lot of users), you don't do anything else, but if you are, you just do:
[hooks.meow]
platforms = { windows = "meow.bat", linux = "meow.sh" } # Unmentioned platforms will default to the name specified by the subsection, namely just "meow"
This would mean you could make your configuration as you want (e.g. just call your script "meow" on unix), but if demand falls upon you to fix cross-platform compatibility, it is easy to do (add a meow.bat
, and add platforms = { windows = "meow.bat" }
to the [hooks.meow]
section - NO need to rename the original file, which might already be expected in its previous form by build/test pipelines and such). Forcing people to give their scripts particular names also runs into other edge cases, such as someone wanting to use a .sh
file on windows.
An alternative syntax could be something like:
[hooks.meow]
windows = "meow.bat"
linux = "meow.sh"
Once again with the option of leaving any platforms missing and having the default meow
script be called.
from mcman.
It's now implemented, will release 0.4.4 soon! :3
from mcman.
Related Issues (20)
- Pre-resolve all addons, download in parallel
- [feat] Steps (compiled addons etc)
- Error with older versions of a vanilla minecraft server (tested with 1.12.2) HOT 5
- [feat] JavaAPI/Java management
- [feat] create modpack from modded version profile (vanilla launcher, curseforge, etc) HOT 6
- [docs] add nix installation
- Inconsistent Downloadable::Modrinth errors
- Test server start detection breaks with better log4j config mod HOT 2
- mcman version vs mcman --version
- server port not changed HOT 5
- mrpack export issues
- `mcman build` skips changing `server.properties` if `.mcman.lock` is present. HOT 2
- `mcman dev` does not hot reload
- Downloadable::Spigot 403 Forbidden on spigotmc.org/../download HOT 4
- Downloadable::Jenkins `fingerprint: [{}]` issue
- Test success hook do not run
- markdown command fails on modrinth API response
- Initializing from a curseforge modpack HOT 1
- Sort mods by categories or alphabetically for README.md
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcman.