Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux build support #7

Open
stackotter opened this issue Mar 5, 2022 · 2 comments
Open

Linux build support #7

stackotter opened this issue Mar 5, 2022 · 2 comments
Labels
enhancement New feature or request hacktoberfest

Comments

@stackotter
Copy link
Owner

stackotter commented Mar 5, 2022

A major goal of this project is to eventually support building apps for Linux. There are many competing file formats that can be used to bundle binaries and resources into a single executable/installable file for distribution. Two major ones are deb and AppImage.

To add Linux build support you'll have to create a LinuxBundler type implementing the Bundler protocol. The architecture of this project is very much based off the functional programming paradigm, so it may take a little getting used to writing relatively pure functions (in this case static methods) and using Result instead of try and throw. The functional style of programming generally has a lot of benefits for build systems and related tools.

I believe that the first format to be implemented should be AppImage as it's generally more cross platform than deb. However there are other formats such as flatpak (which take a bit more setup), so I'm definitely open to discuss the options further! Feel free to choose either deb or AppImage if you're more familiar with one or the other.

Modify this line in Bundler.swift to return LinuxBundler.self once you've created the LinuxBundler type, and you should be able to test out your implementation simply by building a simple test project (which can be created using swift bundler create MyApp).

As always, I'm very happy to help out contributors, do don't hesitate to contact me on Discord (@stackotter), Twitter (@stackotter, or via email (stackotter@stackotter.dev).

@stackotter stackotter added the enhancement New feature or request label Mar 5, 2022
@tannerdsilva
Copy link

I might be able to move the ball forward on this. Certainly, it would be nice to have this for some projects I have on my horizon for next year.

Would you be opposed to me building some of this source into the solution? Or did you have another way in mind?

@stackotter
Copy link
Owner Author

I might be able to move the ball forward on this.

Awesome!

Would you be opposed to me building some of this source into the solution? Or did you have another way in mind?

That’s basically what I was planning too. I’d be fine if that tool was just considered a dependency for now (and we simply use Process to interface with it). But if you can turn the source into a form that can be built as a swiftpm library target, then all the better 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants