Notes on Electron - YellowAfterlife/GMEdit GitHub Wiki
If you are building GMEdit from source code and choosing to use Electron binaries rather than the ones that come from GMEdit's itch/GH releases, the following may prove useful:
Preparing binaries
Grab the pre-built binaries from GitHub.
Commonly you'll want:
- electron-v#-win32-ia32.zip (Windows 32-bit, for compatibility)
- electron-v#-darwin-x64 (Mac x64)
- electron-v#-linux-x64 (Linux x64)
Windows
- Rename
/electron.exeto/Editor.exe
(todo: pick a time to break people's shortcuts by renaming it to GMEdit.exe instead) - Use Resource Hacker to replace Icon Group 1 by resources/app/favicon.ico
- Use Resource Hacker to edit Version Info 1 to have GMEdit data, like
BLOCK "040904B0" { VALUE "CompanyName", "YellowAfterlife" VALUE "FileDescription", "GMEdit" VALUE "FileVersion", "<keep Electron version>" VALUE "InternalName", "Editor.exe" VALUE "LegalCopyright", "(c) YellowAfterlife" VALUE "OriginalFilename", "Editor.exe" VALUE "ProductName", "GMEdit" VALUE "ProductVersion", "<keep Electron version>" VALUE "SquirrelAwareVersion", "1" }
Linux
- Rename
/electronto/GMEdit. - Add an empty file called
GMEdit is an executable!because people get confused.
Mac
- Rename
/Electron.appto/GMEdit.app - Replace
/GMEdit.app/Contents/Resources/electron.icnsby the one from/art/icon/electron.icns
Packaging
All of the commands are to be executed in bin/ after doing the preceding steps;
Editor-App-Only:
7zip a Editor-App-Only.zip resources
Editor-Win:
Rename the win32 zip to be Editor-Win.zip;
7zip a Editor-Win.zip resources
Editor-Linux:
Rename the Linux zip to be Editor-Linux.zip;
7zip a Editor-Linux.zip resources
Editor-Mac:
Rename the Mac zip to be Editor-Mac.zip;
First-time setup (note: requires elevated command prompt):
mkdir GMEdit.app\Contents\Resources
mklink /D GMEdit.app\Contents\Resources\app resources\app
Subsequent packaging:
7zip a Editor-Mac.zip GMEdit.app
Uploading:
Not very useful unless you're me or doing a full-on fork, if we're being honest.
set /p ver=<buildnumber.txt
set /p date=<builddate.txt
gh release create "%ver%" Editor-Win.zip Editor-Linux.zip Editor-Mac.zip Editor-App-Only.zip -t "%date%"
itchio-butler push Editor-Win.zip yourname/gmedit:Editor --userversion-file builddate.txt
itchio-butler push Editor-Linux.zip yourname/gmedit:Editor-Linux --userversion-file builddate.txt
itchio-butler push Editor-Mac.zip yourname/gmedit:Editor-Mac --userversion-file builddate.txt
itchio-butler push Editor-App-Only.zip yourname/gmedit:Editor-App-Only --userversion-file builddate.txt