Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.haxelib/
node_modules/
/*.cdb
/new.img
/src/test/test.js
Expand All @@ -6,8 +8,9 @@
/bin/Release.n
/www/file
/bin/style.min.css
/www/sample
/bin/castle.js
/bin/index.js
/bin/*.js.map
/bin/nwjs
/bin/*.lnk
/dist
/dist
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ Since it's a hidden gem and still super useful I decided to fork it here & updat
![image](https://github.com/dazKind/castle/assets/5015415/fb52ec84-f020-4a64-bd00-5d6e78d5ecfb)


## Compile from sources:

### 1. Install Prerequisites
- Install [Haxe](https://haxe.org) using approriate installer from https://haxe.org/download/
- Install [NodeJS](https://nodejs.org) and [pnpm](https://pnpm.io/). Normal npm should work too, but is untested.

### 2. Build castle.js
- Clone this repository and enter it with your terminal
- Install haxelibs using the command `haxelib install build.hxml`
- Install js libraries using the command `pnpm install`
- At the root of the repository folder run
```
haxe build.hxml
```
This will create `castle.js` and `index.js` files in the `bin` folder

#### 3. Package or Run
The Electron app itself lives in the `bin` folder. We can run it with this command:
```
npx electron bin
```

---

Expand Down
85 changes: 0 additions & 85 deletions bin/Release.hx

This file was deleted.

16 changes: 0 additions & 16 deletions bin/cdb.cmd

This file was deleted.

9 changes: 3 additions & 6 deletions bin/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css"/>
<script type="text/javascript" src="libs/jquery-latest.min.js"></script>
<script type="text/javascript" src="libs/jquery-sortable-min.js"></script>
<script>window.$ = window.jQuery = require('jquery');</script>
<script>window.jQuery.sortable = require('jquery-sortable');</script>
<link rel="stylesheet" type="text/css" href="libs/select2.css"/>
<link rel="stylesheet" type="text/css" href="libs/spectrum.css"/>
<link rel="stylesheet" type="text/css" href="dock/dockspawn.css"/>
Expand All @@ -16,9 +16,6 @@
<body>

<div id="helpers">

<input type="file" id="fileSelect" style="display:none"/>

<div id="newsheet" class="modal" style="display:none">
<div class="content">
<form id="sheet_form" onsubmit="return false">
Expand Down Expand Up @@ -349,4 +346,4 @@ <h1>About</h1>
<script type="text/javascript" src="castle.js"></script>

</body>
</html>
</html>
12 changes: 0 additions & 12 deletions bin/package.json

This file was deleted.

18 changes: 15 additions & 3 deletions castle.hxml → build.hxml
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
-cp src
-js bin/castle.js
-main Main
-lib electron
--debug
-dce std
-w -WDeprecated
-cp src/

--each

-js bin/index.js
-cp src/main/

--next

-cp src/renderer/
-js bin/castle.js
-lib hxnodejs:git:https://github.com/HaxeFoundation/hxnodejs
-lib hx3compat:git:https://github.com/HaxeFoundation/hx3compat
-lib format:git:https://github.com/HaxeFoundation/format
-lib hxbit:git:https://github.com/HeapsIO/hxbit
-lib thx.csv
-D lz4js
-D analyzer-optimize
-dce std
-D js-es=6
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "castle",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "electron bin/",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"electron": "^34.2.0",
"jquery": "^3.7.1",
"jquery-sortable": "^0.9.13"
}
}
Loading