GithubHelp home page GithubHelp logo

dajakerboss / eztheme Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 61 KB

A script to allow themers with no idea how to package their themes to do so in one big script.

License: MIT License

Shell 100.00%
cydia theme dpkg

eztheme's Introduction

EzTheme - The Easy Way to Package your Theme for Cydia

Easy (hopefully) way to package the icon themes from all themers.

It should be easy, but I'm not all the way done as of this commit.

Instructions

To kick things off, clone this repository onto your computer.
You can use git or you can just download the .zip file and extract it somewhere
Personally, I recommend installing and using git, that way I can issue updates directly to you
and you can have the updated files in a heartbeat.
Open up your computer's terminal and find your way into the repo.
If you cloned this repo in your terminal it should just be in your home folder:
cd ~/eztheme
I go more in depth in the next section

If you extracted the zip, find where you put it.
Here's an example for your standard Downloads folder:
cd ~/Downloads/eztheme
I can make a standalone script for git if you'd like, for simplicity's sake.

Hacker voice You're in.
The hard part is done.
To run the installer, type:
./build
If it wont run, no problem, just type:
chmod +x build
and try again. Nothin' to it :)

Installing and Using Git with this script

Step 1: Install it!

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

Step 2: Clone my repository

cd ~/
git clone https://github.com/Dajakerboss/eztheme/

Step 3: Enter the folder

cd ~/eztheme

Boom!

To update your files when I update the repo:

cd ~/eztheme
git pull

Easy money!

Guide to control

Item Meaning
Package This is the name of the package as-installed. Name according to Cydia and dpkg
Name The name as appears in Cydia
Version The current version as you set it
Section Just how the repo will organize this. Don't touch unless the repo maintainers tell you.
Architecture Tells the package manager it was meant for iPhones. Don't touch.
Depends Tells the package manager and cydia what to install alongside this.
Maintainer whoever keeps up with the .deb files. You should keep this as me so I can be contacted for errors in my script.
Author Whoever made the package. You.
Description What pops up in Cydia as the description
Icon Tells Cydia what to use as an icon. Don't touch, I've handled it in the script.

Editing the control file:

This script uses the easy-to-learn and popular editing tool nano

There are only a few things you need to know:
Write out (^O or Ctrl + O [as in oh not zero]) saves the file, and enter confirms the save Exit command (^X or Ctrl + X) closes nano and continues the program

I decided against vi or vim since I didn't want to include a 5 page document on how to edit 8 lines of a file.

There are a few lines that will need your attention:

Depends: com.anemonethemeing.anemone

If you find that your theme works on a specific iOS range (e.g. iOS 8+), then add firmware (>= [iOS Version]), where iOS version is the lowest iOS that will be compatible. Example of this line:
Depends: com.anemonethemeing.anemone, firmware (>= 8.0) for a theme with iOS support for 8 and up.

Package: 

This is the name that iOS uses. Usually, you'd want to keep it in line with how iOS apps usually go:
com.[author].[package]
For instance, take Sutoroku by Ripped Themer: com.rippedthemer.sutoroku

Preinst and Postinst files

These are two files that I automatically place inside of the ~/[package name]_[version]/DEBIAN/ folder.
These are the two files that will output messages in Cydia when the package is being installed.

If you'd like to change these any, feel welcome to it!
The standard command to put out text is echo "[message]"
You can add lines to your liking :-)

Side note for compiling

I have noted that dpkg will throw warnings in my script for the control file. Here's what that means:

dpkg as it has been installed on your system is not accustomed to haveing certain fields on the control file filled out. It specifies these lines as "user-defined"
Cydia and the iOS dpkg that Saurik included are in fact compatible with these lines, and require a few.
I didn't want to censor these messages in case it threw you an actual error and you needed to let me know.
If you see these, it's safe to ignore them :-)

If you have any questions just email me. I love this stuff.

By the way, you don't have to, but I think it'd be beneficial if I was listed as the package maintainer
This way, if anyone has problems during installation, I can see where things went wrong in the script
and issue a fix for you!

Have fun! If you need anything more, feel free to reach out!

eztheme's People

Contributors

dajakerboss avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

eztheme's Issues

Adapt sutoroku-installer `build` script to work with all themes

I am in the process of adapting my script to work with all themes and themers.

In theory, it won't take too long. Here's a list of changes I have planned at the moment:

  • Include variables to change the name of the .deb file to match theme name ✔
  • Remove the "Welcome Ripped Themer" friendly message ✔
  • Put in a sample control file and a template for new users ✔

The fancier changes:

  • Write things out to a preinst and postinst file to give author credit, personalized messages, and credit to the script. ⏱ ⤵
  • Personalized message by reading the home folder address ⏱
  • Configure the script to handle writing the control file itself

With these changes, the script will officially be known as eztheme. Cheesy AF, but if you have a better name, drop a line!

There will be a new branch available known as easytheme-beta as this change progresses. Feel free to help out :-)

Add multiple themes to one package

This will need to add some new original code, so I will do that.

For now, I have a vanilla that we can push out to repositories for just the icon themes. I'm sure they can wait another 2 days ;)

lol jk. I will have it done ASAP :))

Not all terminals support drag-and-drop

LXterm on Lubuntu I have noted to not be drag-and-drop compatible when dropping folders or files in. I have no idea if this is due to LXDE being so light or if LXterm doesn't support it at all. I have not tested X or UXterm.

For now Lubuntu users can right click on the folder, and select "Copy file path" in the drop down menu. You can paste that into the script and it will take it. Sorry for the extra steps.

Also, Windows 10 users using WSL. Though WSL is fully compatible with my script, there are some WSL changes in the newer builds that allow for drag-and-drop translations. For instance, in the stable build, dragging files in will automatically write the current Windows directory:

C:\Users\[usr]\[path_to_file]

while in the Insider builds of Windows, it gets translated into something WSL can understand:

/mnt/c/Users/[usr]/[path_to_file]

This is a Windows-end bug and is best resolved by becoming an insider. I have no idea if the translation feature is present in the slow builds, but it is definitely in fast builds. I unfortunately cannot go to either due to a bug with Windows and AMD in memory handling.

Enhancements to the script

I have two planned changes for the script as it comes:

First is installation as a package.
This may come in the form of a .deb file posted alongside the source for this script so that it can either be installed by the user or the user can just clone the git repo.

I might look into adding it to launchpad for creation as an official repository so apt can handle updates to the script.

Second is the integration of bash-level UI.
Far earlier in some of my first scripts that are now wiped from existence, I used a program called dialog. This is a tool that can actually integrate menus, prompts, and messages as needed in a script.
image
I feel this would significantly enhance the user experience, but I also think it would require the script to exist in a repository to ensure that dialog exists before running the script.

The downside to this is that these menus take a while to configure, as well as some wrangling of man pages. They really don't make pretty one-liners. That being said, backslash is our friend.

These changes will come after the script is adapted to include all themes and themers so I don't waste these features on one package.

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.