Skip to content

Commit

Permalink
Minor spelling/explaining and formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MeFisto94 committed Mar 12, 2016
1 parent dfe6cbb commit da770aa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
13 changes: 7 additions & 6 deletions harness-override/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
## What does this folder do?
This is pretty simple:
Since our SDK is based on Netbeans we download the so-called Netbeans Harness from official sources.
This Harness is basicaly the Skeleton of our SDK.
This Harness is basically the skeleton of our SDK.

In order to change the Icon on Windows Systems we need to change files of said Harness.
In order to change the icon on Windows Systems we need to change files of said Harness.
Since this harness could be re-downloaded any time we needed the `overrideHarness` build functionality.
It simply overwrites harness files _each build_ (When necessary).

It overwrites harness files *each build* (When necessary).
In this folder are our patched .exe files which will replace the harness files.
In this folder you'll find our patched .exe files which will replace the harness files.
The downside is that you have to manually change the icon (or whatever manual editing is required) each time a new netbeans version is used as sdk base. See the `resources/` folder for more information on that.
> Note: Fortunately it must not be that the .exe files are changed aswell, but look into it.
> Note: Fortunately it doesn't have to be that the .exe files are changed aswell, so just look into it.
To prevent patching an older version onto a newer netbeans we have the override.properties,
They define an `beforeHash`and an `afterHash` for each file. Before is the official netbeans source and after is our own patch file (we use this to detect an already patched file/unauthorized changes to *THIS* folder.)
They define an `beforeHash`and an `afterHash` for each file.
Before is the official netbeans source and after is our own patch file (we use this to detect an already patched file/unauthorized changes to _THIS_ folder.)

How do I generate such a hash? Those are SHA-256 hashes and either you make the build fail and see what gradle outputs or you issue `shasum -a 256 harness-override/*.exe` to print them out.
29 changes: 15 additions & 14 deletions resources/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
## What does this folder do?
This folder is no common resources/ folder as in it’d be processed by the build process.
This is just for the sole purpose of storing the downsampled Icons and other resources so you don’t have to do this all over again.
This folder is no common `resources/` folder as in it’d be processed by the build process.
This is just for the sole purpose of storing the downsampled icons and other resources so you don’t have to create them all over again.

### HOW TO properly generate Icons
The process of generating Icons shouldn't be necessary but who knows what the future brings.
You basically have on large file (256x256px) with 32bit color-depth and have to downsample that for .ico's
The process of generating icons shouldn't be necessary at all but who knows what the future brings.
You basically have one large file (256x256px) with 32bit color-depth and have to downsample that to say 128, 48, 32 and 16px.

Windows Icons contain multiple images with different resolutions to pick them based on the platform.
I included a GIMP project file, however feel free what Software you'd use.
I included a GIMP project file, however feel free to use what Software you'd use.

Essentially you have to create different layers and then the GIMP Exporter (Export -> Windows Icon) does all the work for you.
See here for the correct configuration:

![Icon Export](icon_export_settings.png)

### HOW TO Replace Icons:
When a new Netbeans Version is out you might need to redo this process since we override netbeans launcher exe with our version (and this launcher can change with a new nb version).
When a new Netbeans version is out you might need to redo this process since we override netbeans' launcher files with our version (and this launcher can change with a new Netbeans version).
See `harness-override/README.md` for more information on that subject.

Open up `app.exe`, `app64.exe` and `pre7_app.exe` (*not* `pre7_app_w.exe`*!!*) with the `Resource Hacker` Software (or comparable).
Open up the `Icon Group (100: 1033)` and Right-Click on it to select `Replace Icon`.
Open up `app.exe`, `app64.exe` and `pre7_app.exe` (_not_ `pre7_app_w.exe`_!!_) with the `Resource Hacker` Software (or comparable).
Open up the `Icon Group (100: 1033)` and Rightclick on it to select `Replace Icon`.
Select `jmonkeyplatform.ico` and you’re done. (Well, save the file ;))

Note: Your Windows has an Icon Cache so you can’t see that it actually worked.
Simply launch `ie4uinit.exe -ClearIconCache` and it should work.
Note: Your Windows System has an Icon Cache so you can’t see that it actually worked.
Simply launch `ie4uinit.exe -ClearIconCache` and you should see the differences.

[There’s](http://www.sevenforums.com/tutorials/49819-icon-cache-rebuild.html) a larger tutorial but it shouldn’t be necessary.
[There’s](http://www.sevenforums.com/tutorials/49819-icon-cache-rebuild.html) a larger tutorial but it shouldn’t be necessary.

When you’ve changed the Icon, make sure to change the hashes in `harness-override/override.properties`
You have the „hashBefore“ and „hashAfter“. The first one is the plain .exe before changing (This is so we can see if there’s a new netbeans version without us having changed the icons/exe) and the other one is after changing. Simple, huh?
When you’ve changed the icon, make sure to change the hashes in `harness-override/override.properties`.
You have the „hashBefore“ and „hashAfter“.
The first one is the plain `.exe` before changing (This is so we can see if there’s a new NetBeans version without us having changed the icons/exe) and the other one is after changing. Simple, huh?

Then issue `shasum -a 256 netbeans/harness/launchers/*.exe` so you have all the hashBefore’s / After’s
Then issue `shasum -a 256 netbeans/harness/launchers/*.exe` so you have all the hashBefore’s / After’s
See `harness-override/README.md` for more information on that subject.

0 comments on commit da770aa

Please sign in to comment.