Swiftpack.co - Package - iAlex11/MoonFish

Moonfish | The Library for creating package managers is finally here.

Website version phase

Moonfish is an open-source, fast, free and easy to use library for creating your own package managers. It serves as a fast and reliable way to install files from your FTP to a device.

Getting Started

Ripped from iAlex11 Tools / Moonfish

Installing moonfish is really straight-forward proccess. Moonfish is made in Python and Swift, so you'll need to install them. Take note that in order for it to work on Windows you'll need to install Swift for Windows.

Python and Swift installation

Python installation

$ brew install python3

Note: take note that depending on what OS you are using the command may vary from py to python to python3.

Now to check if Python was installed correctly, run:

[python/python3] -V

If it returns the python version, you are done with python! :)

Swift installation

macOS X

If you are on macOS you just need to install Xcode from the Mac App Store and it will automatically install Swift.

Windows

There's no official way for moonfish to be ran on Windows. In fact, you'll need to change the source code for it to work. If you really want to run moonfish on windows try downloading someone's fork with the necessary changes.

Moonfish v1.1 will come with Windows support. You can check it's development process here.

For Swift to run on windows, just download Swift for Windows compiler from the official website.

Linux

If you are on any Linux distro, download Swift files from the Swift's Official Website and install them manually, or just follow this tutorial.

To check if Swift was installed correctly, run:

swift -version

If it returns the Swift version, you'll be done with the installation!

Setting up Moonfish

Download the latest release from the Moonfish Github Repo. Once downloaded, go to terminal and go to the downloaded moonfish folder using cd. Once there, run:

python setup.py

Note: if you also have python 2.7.x on your computer you might have to use python3 instead of python command.

setup.py will automatically install all the necessary files for moonfish to work (src, lib, cmd) and install all the commands. setup.py shows every step and can be stopped at any time.

You'll be required to enter a path for moonfish to be installed. By default, moonfish installation path is /Library/Moonfish, so if you just want the default path, just leave it in blank and press enter, this will tell setup.py you want the default path. Take note that if you install another path than the default one, you'll need to add it to $PATH for the moonfish command to work. See this

You'll also be required to enter python, swift and swiftc installation paths. To know which are them, just open another terminal window WITHOUT closing the one running setup.py and run the following command:

To obtain Python 3.x path:

which python

Note: this will return you the python path. If you also have python 2.7.x, this will return you the python2 path. As moonfish requires the Python3.x version, just replace python with python3 (i.e. which python3 )

To obtain Swift paths (swift and swiftc):

which swift swiftc

Note: this will return two paths: the first one is the swift's path, the second one is the swiftc's path. So when you are asked for the swift path, enter the first one. When you are asked for the swiftc path, enter the second one.

Adding a external path to $PATH

For the moonfish command to work you'll need to add the moonfish installation path to $PATH. For that, you'll need to modify either .bash_profile or .zshrc depending on your shell.

Bash shell:

To add moonfish command path to $PATH in bash shell follow the next steps:

  1. Find .bash_profile. It usually is in your main folder (~). To go to there enter cd ~.
  2. Open .bash_profile with the editor of your preference.
  3. Add the following line: export PATH="$PATH:[MOONFISH_PATH]" Where [MOONFISH_PATH] enter the path you chose for moonfish installation
  4. Save .bash_profile and run source .bash_profile to load the changes.
  5. You're done!
Zsh shell:

The zsh shell process is the same as the bash shell process, just that the file name changes. To add moonfish command path to $PATH in zsh shell follow the next steps:

  1. Find .zshrc. It usually is in your main folder (~). To go to there enter cd ~.
  2. Open .zshrc with the editor of your preference.
  3. Add the following line: export PATH="$PATH:[MOONFISH_PATH]" Where [MOONFISH_PATH] enter the path you chose for moonfish installation
  4. Save .zshrc and run source .zshrc to load the changes.
  5. You're done!

Contributing

Local setup

  1. git clone https://github.com/iAlex11/MoonFish.git
  2. python3 cmd/contribution/contribution_setup.py setups moonfish enviroment to program.
  3. python3 cmd/contribution/compile_files.py once done all the changes, run to compile all moonfish files
  4. python3 cmd/contribution/test_changes.py runs ./tests/Contribution/InstanceDelegate.swift to test changes

NOTE: contribution_setup.py creates a folder called /contribution where you'll find moonfish API files like if you were creating a new moofish instance, instead is only for testing purposes.

Submitting changes

Once you've done all the changes you want and tested them, commit the changes and open a pull request on GitHub. Your changes will then automatically be added to the next nightly build of moonfish, and available to download on releases.

Coded with ❤️ by @iAlex11_

Github

link
Stars: 1
Help us keep the lights on

Dependencies

Used By

Total:

Releases

v1.0 - May 5, 2019

Moonfish v1.0 is here with a fully-fledged stable library for iOS and macOS, new contribution enviroment, new icon and more! Moonfish has been completely re-written for this update.

This update contains: · Reduced python usage so it runs faster. · iOS 12 Support · Adapted to Swift 5 so it is more stable than ever. · Support to jailbroken devices with Cydia Substrate and iOS 11 or newer. · Now moonfish supports all types of FTPs and Databases. · Made installation easier. · Now moonfish installs all dependencies while installation. No more longer installing them yourself! · New moonfish command · Now longer need to clone and refactor all moonfish source files by yourself. Now moonfish new does that. · Support for Thunderbolt repo tweaks (Cydia and Sileo). · New Icon

Bug fixes: · fixed dynamic library duplication bug some users experimented in v1.0 Nightly and 1.0b2019f36 beta builds. · fixed setup.py installation bug. · fixed contribution_setup.py bug that made InstanceDelegate.swift not work in iOS 12.1.4 and Jailbroken iOS 11.

v0.11-beta - Oct 7, 2018

  • Removed Target Membership of install.swift and main.swift that didn't allow to run install.swift.
  • Now you can see the MoonFish packages by using moonfish packages.
  • You can also install new packages by using moonfish packages install.
  • Added MoonFish online installation via Python (removed Vanilla one as SerSide.vf doesn't allow cURL usage).