Skip to content

Commit

Permalink
Fork Stuff (#79)
Browse files Browse the repository at this point in the history
Some major changes:
* version checker now checks against http://eln.ja13.org so that we can have our own version numbers
* new build script for making builds have more details about how they were built. This will be useful in the upcoming analytics changes.
* many hours wasted on Gradle configurations
  • Loading branch information
jrddunbr committed Jan 20, 2019
1 parent 210e09a commit e908fdb
Show file tree
Hide file tree
Showing 11 changed files with 159 additions and 140 deletions.
17 changes: 0 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,9 @@ dist: trusty
# Container-based infrastructure
sudo: false

# Install python dependencies in the home directory (no sudo access)
# Transifex-client version 0.12.1 is required
# See https://github.com/transifex/transifex-client/issues/113
install:
- echo "Installing the Transifex client"
- pip install --user 'git+https://github.com/eliben/pycparser@release_v2.14'
- pip install --user 'requests[security]'
- pip install --user transifex-client
- echo "Preparing FORGE workspace"
- gradle setupDecompWorkspace

env:
global:
# $TRANSIFEX_PASSWORD for Transifex (travis encrypt)
secure: c2LmAS3T90ZsRQCj5Qn2GUhWLU3DLumcD2jTMwTdnY8xwLPfsT8WOxPKq03aF/AnUH//67lRMToS5V4mYh/5sek7GX67+HMJBenQOuUjaSpcSK3/ik9hheTVt4M5i5Pu5JZrTe+D3LvGzukasho9jwmR/F0q6gmZYcfpkIKZ5QQ=

# Caching Gradle
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
Expand All @@ -29,7 +16,3 @@ cache:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.cache/pip

after_success:
- ./script/transifex.sh
- if [ "$TRAVIS_BRANCH" == "1.7.10-MNA" ]; then ./gradlew bintrayUpload; fi
75 changes: 17 additions & 58 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,32 @@

This is an open source project. We appreciate any help from the community to improve the mod.

### Bugs or ideas for new items
## Bugs or ideas for new items

Did you found a bug or do you have an idea how to improve the mod? We are happy to hear from you.

- [IRC Channel](https://qchat.rizon.net/?channels=electricalage)
- [Bug Tracker](https://github.com/Electrical-Age/ElectricalAge/issues)
- [Bug Tracker](https://github.com/jrddunbr/ElectricalAge/issues)

Contributions via [pull request](https://github.com/Electrical-Age/ElectricalAge/pulls),
and [bug reports](https://github.com/Electrical-Age/ElectricalAge/issues) are welcome!
Please submit your pull request to the `develop` branch and use the GitHub issue tracker to report issues.
Contributions via [pull request](https://github.com/jrddunbr/ElectricalAge/pulls),
and [bug reports](https://github.com/jrddunbr/ElectricalAge/issues) are welcome!
Please submit your pull request to the `base` branch and use the GitHub issue tracker to report issues.

### Translations
## Development

Is the mod not available in your language or are some translations missing?
Well you can change that by adding or modifying a translation:
The **"base"** branch, is where commits during development are integrated into. It is where our team pushes or merges
their actual changes together and where contributions from the community (Pull requests) are integrated into the
development version of the mod. Anyone who wish to try the cutting edge version of Electrical Age can download the
develop branch and build the mod for themselves.

Pull requests are always merged into the **"base"** branch. If you are willing to contribute, make sure sending us
pull requests against the develop branch.

We use Transifex as localization platform. Create an account and ask to join the
[ELN Team](https://www.transifex.com/electrical-age/eln/) on Transifex to translate the mod into your language. No
coding skills are required at all.
## Translations

Is the mod not available in your language or are some translations missing?
Well you can change that by adding or modifying a translation! Just ask us how you can help!

Some translation strings might contain placeholders for runtime arguments in order to include numbers or other runtime
objects into the sentence. These are identified by **%N$** whereas *N* is the number of the argument in the argument
list (at runtime). A translation string should include these placeholders too at the appropriate position in the text.

# Development

The default branch for the Electrical Age source repository on github is **"master"**, while there is another important
branch called **"develop"**. Each of them serves his own purpose.

### master branch
The **"master"** branch is a stable branch, and gets updated only on releases. Whenever people checkout the **"master"**
branch, they get the source code of the latest release of the Electrical Age mod.

### develop branch
The **"develop"** branch, is where commits during development are integrated into. It is where the Electrical Age team
pushes or merges their actual changes together and where contributions from the community (Pull requests) are
integrated into the development version of the mod. Anyone who wish to try the cutting edge version of Electrical Age
can download the develop branch and build the mod himself.

Pull requests are always merged into the **"develop"** branch. If you are willing to contribute, make sure sending us
pull requests against the develop branch but not the *master* branch. Attention, **"develop"** is not the default branch
on github, so you need to pull and checkout the development branch before atually starting your development.


### GIT Flow
They are named *master* and *develop* because most of the core developers adapt the git flow convention when working
on Electrical Age. When working on a feature that is likely taking quite some time to finish, a local feature branch is
created, and not necessarily pushed to the github. This way, when there are pending pull requests, they do not have to
wait too long, since they can be merged into develop branch first.

An introduction of git-flow can be found [here](http://nvie.com/posts/a-successful-git-branching-model/) or
[here](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow).

You do not necessarily have to adopt git-flow for yourself in order to contribute to the mod, as long as your changes
use the branch **"develop"** as a base and the pull request is against the **"develop"** branch, we will be able
to integrate your changes easily.

#### In short for EA:

- Features get developed on **feature branches**, either in your local repository or pushed to github. Feature branches
can be rebased.
- Once ready, **feature branches** are PR'd to **develop**.
- When the EA team wants to make a release, **develop** is branched into a **release branch**. Any necessary
stabilization works happen there; **develop** is never frozen, and efforts to PR in **feature branches** should not
stop just because a release is happening.
- When a release is made, the **release branch** is pushed to **master** and **master** is tagged at that point.
- If hotfixes need to be made, then they can be made on the **release branch**. Anything that also applies to the
**development branch** is first committed there, then cherry-picked to the **release branch**. The **release branch**
is then pushed to **master** (again), and tagged (again), going from e.g. 0.52.0 to 0.52.1.
- **develop**, **master** and the **release branches** are all protected; no rebasing happens there.
47 changes: 26 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
# Minecraft Mod - Codename : ELN

[![Build Status](https://travis-ci.org/Electrical-Age/ElectricalAge.svg?branch=1.7.10-MNA)](https://travis-ci.org/Electrical-Age/ElectricalAge)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FElectrical-Age%2FElectricalAge.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FElectrical-Age%2FElectricalAge?ref=badge_shield)

Electrical Age (ELN) is a Minecraft Mod offering the ability to perform large-scale in-game electrical simulations.

Look at the official project website [electrical-age.net](https://electrical-age.net/) and [the Wiki](http://wiki.electrical-age.net/) to get general information. [This official Minecraft forum post](http://www.minecraftforum.net/topic/2741783-172forge-electrical-age-mod-beta-146/) is updated frequently.
Look at the official project website [electrical-age.net](https://electrical-age.net/) and [the Wiki](http://wiki.electrical-age.net/) to get general information.

This is a fork of Electrical Age, maintained by Jared Dunbar (jrddunbr) and Graham Nothup (Grissess), with the intent to add features and push for active development, which is incorporated back into the main distribution as they see fit.

## How to get started

**ElectricalAge is Minecraft 1.7.10 compatible only. Forge is needed.**

1. Download the [last mod release](https://minecraft.curseforge.com/projects/electrical-age) (other versions are available through the same link). Copy the Jar file to the `.minecraft/mods/` directory (or related folder depending on your platform).
2. Get started with the tutorial map or start playing on the offical demonstration map. The two official maps can be [downloaded from here](https://github.com/Electrical-Age/ElectricalAge/releases/download/BETA-1.10/ElectricalAge_tutorialMap_BETA-1.9_r41.zip). They must be copied to the `.minecraft/saves/` (or related) directory.
3. Launch Minecraft using the `1.7.10-Forge` profile, select the tutorial map and enjoy!
1. Visit the [releases](https://github.com/jrddunbr/ElectricalAge/releases) page on GitHub for the latest stable build.

2. Download the latest build, and add the jar to your launcher. Be sure that you are using Forge 1.7.10, revision 1614.

3. Launch, and have fun!

Or add it with the Curse launcher.
4. Download the [test world](https://eln.ja13.org/worlds/latest.zip).

### Building from source

Alternatively, you can compile and launch the current development version.
[Download](https://github.com/Electrical-Age/ElectricalAge/archive/develop.zip) or clone the `develop` branch. Then build and launch the tutorial map using Gradle:
You can compile and launch the current development version.
[Download](https://github.com/jrddunbr/ElectricalAge/archive/base.zip) or clone the `base` branch. Then build and launch using Gradle:

```sh
$ git clone https://github.com/Electrical-Age/ElectricalAge.git
```bash
$ git clone https://github.com/jrddunbr/ElectricalAge.git
$ cd ElectricalAge
$ gradle unzipTutoMap runClient
$ ./gradlew setupDecompWorkspace
$ ./gradlew runClient
```

## Contributing
Expand All @@ -37,7 +39,7 @@ We appreciate any help from the community to improve the mod. You can find more
Here is some highlighted features:

A better simulation
> Electrical simulation with resistive and capacitive effects. Behaviour similar to those of real life objects.
> Electrical simulation with resistive and capacitive effects. Behavior similar to those of real life objects.
Multiple electrical machines and components
> Furnaces, Solar panels, Wind turbines, Batteries, Capacitors, ...
Expand All @@ -52,7 +54,7 @@ Small and big electrical consumers
> From lamps and electrical furnaces to miners and transporters...
Incredible tools
> XRay scanner, flashlight, portable mining drill...
> X-Ray scanner, flashlight, portable mining drill...
Interoperability
> Old redstone circuits can be exploited with electrical <-> redstone converters.
Expand All @@ -63,12 +65,14 @@ Game lifetime/complexity extended
## CURRENT STATE

Electrical Age is still in **Beta**.
Use at your own risk and do map backup frequently.
Use at your own risk and do map backup frequently and between mod updates.

## MAIN DEVELOPERS

- **Dolu1990** (Code guru, concepts, some 3D models)
- **Svein Ove Aas, aka. Baughn** (Code, some 3D models, concepts)
- **jrddunbr** (concepts, ideas, code)
- **Grissess** (code, models, textures, sounds, math, MNA work)
- **cm0x4D** (Sound engineer, code and 3D models/texturing, concepts)
- **lambdaShade** (3D models/texturing/graphics maestro, concepts, some sounds and lines of code)
- **metc** (Website/Wiki webmaster)
Expand All @@ -77,6 +81,8 @@ Use at your own risk and do map backup frequently.

Code/models:

- **OmegaHaxors** (major updates to balance, new features)
- **lashtear** (small bugfixes and new features)
- **bloxgate** (some tweaks)
- **DrummerMC** (bug fix)
- **ltouroumov** (bug fix)
Expand All @@ -86,6 +92,8 @@ Code/models:

Languages:

TO BE UPDATED

- **bomdia** (it_IT)
- **Ahtsm** (zh_CN)
- **dcbrwn** (ru_RU)
Expand All @@ -98,7 +106,7 @@ Mod promotion:
- **Baughn** (forum expert)
- ...

The full list of contributors is [available here](https://github.com/Electrical-Age/ElectricalAge/graphs/contributors).
The full list of contributors is [available here](https://github.com/jrddunbr/ElectricalAge/graphs/contributors).

## LICENSE

Expand All @@ -117,7 +125,4 @@ Some graphics are public domain. These are:
- src/main/resources/assets/eln/textures/blocks/smallrotatingsolarpanel.png
- src/main/resources/assets/eln/textures/blocks/2x3rotatingsolarpanel.png

![logo](https://raw.githubusercontent.com/Electrical-Age/electrical-age.github.io/master/assets/favicon.ico)


[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FElectrical-Age%2FElectricalAge.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FElectrical-Age%2FElectricalAge?ref=badge_large)
![logo](https://raw.githubusercontent.com/jrddunbr/electrical-age.github.io/master/assets/favicon.ico)
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ minecraft {
replace "@MAJORVERSION@", MAJORVERSION
replace "@MINORVERSION@", MINORVERSION
replace "@REVISION@", REVISION

replace "@BUILD_HOST@", BUILD_HOST
replace "@BUILD_DATE@", BUILD_DATE
replace "@JAVA_VERSION@", JAVA_VERSION
replace "@GIT_REVISION@", GIT_REVISION
}

configurations {
Expand Down Expand Up @@ -98,10 +103,10 @@ jar {
attributes 'Build-Date': new Date().format("yyyy-MM-dd HH:mm:ss")
attributes 'Built-JDK': System.getProperty('java.version')
attributes 'Implementation-Title': project.name
attributes 'Implementation-URL': 'https://github.com/Electrical-Age'
attributes 'Implementation-URL': 'https://github.com/jrddunbr/ElectricalAge'
attributes 'Implementation-Vendor': 'Electrical-Age Team'
attributes 'Implementation-Vendor-Id': 'net.electricalage.eln'
attributes 'Project-Url': 'https://electrical-age.net/'
attributes 'Project-Url': 'https://eln.ja13.org/'
attributes 'Source-Compatibility': project.sourceCompatibility
attributes 'Target-Compatibility': project.targetCompatibility
}
Expand Down
21 changes: 21 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

cd "$(dirname $0)"

# remove old data from gradle.properties
cp gradle.properties gradle.properties.back
cat gradle.properties | grep -vE "BUILD_HOST|BUILD_DATE|JAVA_VERSION|GIT_REVISION" > gradle.properties.new
mv gradle.properties.new gradle.properties

# set variables in gradle.properties
echo "" >> gradle.properties
echo "BUILD_HOST = '$(hostname)'" >> gradle.properties
echo "BUILD_DATE = '$(date)'" >> gradle.properties
echo "JAVA_VERSION = '$(java -version 2>&1 | awk -F\" '/version/ {print $2}')'" >> gradle.properties
echo "GIT_REVISION = '$(git log --pretty=format:'%H' -n 1)'" >> gradle.properties

# build the game
./gradlew setupDecompWorkspace
./gradlew build

mv gradle.properties.back gradle.properties
14 changes: 10 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
MAJORVERSION = 1
MINORVERSION = 14
REVISION = 2
MINORVERSION = 15
REVISION = 0

GROUP = 'net.electricalage.eln'
ARCHIVE_NAME = 'ElectricalAge'
MAPURL = 'https://github.com/Electrical-Age/ElectricalAge/releases/download/BETA-1.11r51/ElectricalAge_tutorial_map-BETA-1.11r51.zip'
ARCHIVE_NAME = 'ElectricalAge-jrddunbr'
MAPURL = 'https://eln.ja13.org/worlds/latest.zip'


BUILD_HOST = 'unknown'
BUILD_DATE = 'unknown'
JAVA_VERSION = 'unknown'
GIT_REVISION = 'unknown'
12 changes: 6 additions & 6 deletions src/main/java/mods/eln/Eln.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,12 @@
public class Eln {
// Mod information (override from 'mcmod.info' file)
public final static String MODID = "Eln";
public final static String NAME = "Electrical Age";
public final static String MODDESC = "Electricity in your base !";
public final static String URL = "https://electrical-age.net";
public final static String UPDATE_URL = "https://github.com/Electrical-Age/ElectricalAge/releases";
public final static String SRC_URL = "https://github.com/Electrical-Age";
public final static String[] AUTHORS = {"Dolu1990", "lambdaShade", "cm0x4D", "metc", "Baughn"};
public final static String NAME = "Electrical Age - jrddunbr edition";
public final static String MODDESC = "Electricity in your base!";
public final static String URL = "https://eln.ja13.org";
public final static String UPDATE_URL = "https://github.com/jrddunbr/ElectricalAge/releases";
public final static String SRC_URL = "https://github.com/jrddunbr/ElectricalAge";
public final static String[] AUTHORS = {"Dolu1990", "lambdaShade", "cm0x4D", "metc", "Baughn", "jrddunbr", "Grissess", "OmegaHaxors"};

public static final String channelName = "miaouMod";
public static final double solarPanelBasePower = 65.0;
Expand Down
Loading

0 comments on commit e908fdb

Please sign in to comment.