Skip to content

Commit

Permalink
Behind-the-scenes updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans5958 committed Apr 20, 2020
1 parent fd2e5fb commit bdc6d07
Show file tree
Hide file tree
Showing 8 changed files with 299 additions and 17 deletions.
165 changes: 165 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
on:
push:
branches:
- master

name: Deploy

jobs:
build:
name: Deployment
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- name: Calculate depth
id: depth
run: |
echo ::set-output name=DEPTH::$(($(echo '${{toJSON(github.event.commits)}}' | jq '. | length') + 1))
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: ${{steps.depth.outputs.DEPTH}}
- name: Check changes
run: |
git diff --name-only $(echo ${{github.event.compare}} | grep -oE '([a-z0-9]+\.\.\.[a-z0-9]+)')
if ! git diff --name-only $(echo ${{github.event.compare}} | grep -oE '([a-z0-9]+\.\.\.[a-z0-9]+)') | grep -E '(\.rc$)'; then
echo "No resource files changed. Aborting."
echo ::set-env name=RC_CHANGED::false
else
echo ::set-env name=RC_CHANGED::true
fi
- name: Set enviroment variables
run: |
echo ::set-env name=BUILD_DATE::"$(git log -1 --format="%at" | xargs -I{} date -d @{} +%Y%m%d%H%M%S)"
echo ::set-env name=BUILD_DATE_TIDY::"$(git log -1 --format="%at" | xargs -I{} date -d @{} +'%Y/%m/%d %H:%M:%S')"
echo ::set-env name=VERSION_NUM::"$(cat version.txt)"
- name: Set version on executable
run: |
cd VersionInfo
sed -i '2s/.*/FILEVERSION 1,43,${{env.VERSION_NUM}},0/' 1.rc
sed -i '3s/.*/PRODUCTVERSION 1,43,${{env.VERSION_NUM}},0/' 1.rc
sed -i '12s/.*/ VALUE "FileVersion", "1.43-${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}"/' 1.rc
sed -i '17s/.*/ VALUE "ProductVersion", "1.43-${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}"/' 1.rc
- name: Install Resource Hacker
run: choco install reshack
- name: Build (part 1, powershell)
shell: powershell
run: |
cd _compile
echo "[FILENAMES]
Exe= Domino.exe
SaveAs= Domino.exe
Log= CON
[COMMANDS]
-delete MENU,,
-delete DIALOG,,
-delete STRINGTABLE,,
-delete VERSIONINFO,,
-add Menu.res, MENU,,
-add Dialog.res, DIALOG,,
-add StringTable.res, STRINGTABLE,,
-add VersionInfo.res, VERSIONINFO,," > tmp.txt
cat ../Dialog/* > Dialog.rc
cat ../Menu/* > Menu.rc
cat ../StringTable/* > StringTable.rc
cat ../VersionInfo/* > VersionInfo.rc
Start-Process -NoNewWindow -FilePath "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -ArgumentList "-open Dialog.rc", "-save Dialog.res", "-action compile", "-log CON" -Wait
Start-Process -NoNewWindow -FilePath "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -ArgumentList "-open Menu.rc", "-save Menu.res", "-action compile", "-log CON" -Wait
Start-Process -NoNewWindow -FilePath "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -ArgumentList "-open StringTable.rc", "-save StringTable.res -action", "compile", "-log CON" -Wait
Start-Process -NoNewWindow -FilePath "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -ArgumentList "-open VersionInfo.rc", "-save VersionInfo.res -action", "compile", "-log CON" -Wait
Start-Process -NoNewWindow -FilePath "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -ArgumentList "-script tmp.txt"
- name: Build (part 2, bash)
run: |
cd _compile
touch Domino.exe
rm -rf *.rc
rm -rf *.res
rm -rf tmp.*
- name: Prepare deployment
run: |
cd _compile
cp ../_deploy/readme-translation.txt readme-translation.txt
sed -i '2s/.*/Build ${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}} (1.43-${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}})/' readme-translation.txt
7z a ../Domino143_Translated.zip *
mv -v Domino.exe ../Domino_Translated.exe
- name: Upload artifact 1
uses: actions/upload-artifact@v1
with:
name: Domino143_Translated_v${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}.zip
path: Domino143_Translated.zip
- name: Upload artifact 2
uses: actions/upload-artifact@v1
with:
name: Domino_Translated_v${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}.exe
path: Domino_Translated.exe
- name: Write release body
if: env.RC_CHANGED
run: |
echo "\
### Release Notes
" >> release.txt
if [ ! -s _deploy/release-text.md ]; then
echo '${{github.event.head_commit.message}}' >> release.txt
else
cat _deploy/release-notes.md >> release.txt
fi
echo "\
### Commits
" >> release.txt
for row in $(echo '${{toJSON(github.event.commits)}}' | jq -r '.[] | @base64'); do
_jq() {
echo ${row} | base64 --decode | jq -r ${1}
}
echo - $(_jq '.id') $(_jq '.message' | awk '{gsub(/\\n/,"\n")}1' | head -1) \($(_jq '.committer.username')\) >> release.txt
done
echo "\
----
*Commit pushed by ${{github.event.head_commit.author.name}} (${{github.event.head_commit.author.username}}) on ${{github.event.head_commit.timestamp}}*
*Built on ${{env.BUILD_DATE_TIDY}}*" >> release.txt
- name: Create release
if: env.RC_CHANGED
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
tag_name: 1.43-en.${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}
name: Build ${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}
prerelease: true
files: |
Domino143_Translated.zip
Domino_Translated.exe
# Domino143_Translated_v${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}.zip
# Domino_Translated_v${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}.exe
body_path: release.txt
# - name: Create release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# with:
# tag_name: 1.43-en.${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}
# release_name: Build ${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}} – ${{env.BUILD_DATE_TIDY}}
# prerelease: true
# - name: Upload 1
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# with:
# upload_url: ${{steps.create_release.outputs.upload_url}}
# asset_path: Domino143_Translated_v${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}.zip
# asset_name: Domino143_Translated_v${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}.zip
# asset_content_type: application/zip
# - name: Upload 2
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# with:
# upload_url: ${{steps.create_release.outputs.upload_url}}
# asset_path: Domino_Translated_v${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}.exe
# asset_name: Domino_Translated_v${{env.VERSION_NUM}}-nightly.${{env.BUILD_DATE}}.exe
# asset_content_type: application/octet-stream
56 changes: 48 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,63 @@

# Domino English Translation

<a href="https://travis-ci.org/Hans5958/Domino-English-Translation/"><img src="https://img.shields.io/travis/Hans5958/Domino-English-Translation?style=flat-square" alt="Travis CI passing"></a> <a href="https://github.com/Hans5958/Domino-English-Translation/releases/"><img src="https://img.shields.io/github/v/release/Hans5958/Domino-English-Translation?style=flat-square" alt="Version number"></a> <a href="https://github.com/Hans5958/Domino-English-Translation/releases/"><img src="https://img.shields.io/github/downloads/Hans5958/Domino-English-Translation/total.svg?style=flat-square" alt="Download counter"></a> <a href="http://makeapullrequest.com"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="PRs Welcome"></a> <a href="https://discord.gg/s42aft8"><img src="https://img.shields.io/discord/139268201803546624.svg?color=7289DA&style=flat-square" alt="Discord"></a>
<a href="https://travis-ci.org/Hans5958/Domino-English-Translation/"><img src="https://img.shields.io/github/workflow/status/Hans5958/Domino-English-Translation/Deploy?style=flat-square" alt="GitHub Actions build status"></a> <a href="https://github.com/Hans5958/Domino-English-Translation/releases/"><img src="https://img.shields.io/github/v/release/Hans5958/Domino-English-Translation?style=flat-square" alt="Version number"></a> <a href="https://github.com/Hans5958/Domino-English-Translation/releases/"><img src="https://img.shields.io/github/downloads/Hans5958/Domino-English-Translation/total.svg?style=flat-square" alt="Download counter"></a> <a href="https://makeapullrequest.com"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="PRs Welcome"></a> <a href="https://discord.gg/s42aft8"><img src="https://img.shields.io/discord/139268201803546624.svg?color=7289DA&style=flat-square" alt="Discord"></a>

Domino is MIDI editor that is used for creating MIDI songs/musics. Domino is used by various blackers in the Black MIDI ecosystem.
Domino is a MIDI editor that is used for creating MIDI songs/musics. Domino is used by various blackers in the Black MIDI ecosystem.

Since Domino is an abandonware, and it's original language is Japanese, many people tried to translate it using resource editing tools. Some of it are outdated, while others are incomplete.

This repository is made to unify the translations made by community, while trying to complete it for easier usage.

## Contribute
## Usage

When contributing, it is best to discuss it first via an issue, e-mail, or other methods of contact. Please note that we have a code of conduct that you should follow in any interactions.
1. Download either the Domino ``.zip`` or the ``.exe``.
- The ``.zip`` contains everything you need to run Domino. __Download this if you are not sure or this is your first time using this program.__
- You can also download the ``.exe`` if you want to use your configured settings. Place it inside your Domino directly, where "``Domino.exe``" placed.

You can contribute by following these steps.
<a href="https://github.com/Hans5958/Domino-English-Translation/releases/download/1.43-en.2/Domino143_Translated_v2.zip"><img src="https://img.shields.io/github/v/release/Hans5958/Domino-English-Translation?label=download %20.zip&style=flat-square"></a>
<a href="https://github.com/Hans5958/Domino-English-Translation/releases/download/latest/Domino143_Translated.zip"><img src="https://img.shields.io/github/v/release/Hans5958/Domino-English-Translation?include_prereleases&label=download%20.zip&style=flat-square"></a>
<a href="https://github.com/Hans5958/Domino-English-Translation/releases/download/1.43-en.2/Domino_Translated_v2.exe"><img src="https://img.shields.io/github/v/release/Hans5958/Domino-English-Translation?label=download %20.exe&style=flat-square"></a>
<a href="https://github.com/Hans5958/Domino-English-Translation/releases/download/latest/Domino_Translated.exe"><img src="https://img.shields.io/github/v/release/Hans5958/Domino-English-Translation?include_prereleases&label=download%20.exe&style=flat-square"></a>

2. Run the executable.
- If you downloaded the .zip, just run ``Domino.exe``.
- If you downloaded the .exe, after placing it on the directory, run ``Domino_Translated.exe`` (make sure you rename it so you know which one's the new version!).

## Contributing

You can contribute by translating the ``.rc`` files. The ``.rc`` files contains the most of the program's strings. Some of it are translated, so check the checklist below first to know which one's is not translated.

You can also execute ``compile.sh`` if you want the ``.exe`` versions of it, and it will be placed inside the ``_compile`` folder. Just make sure you have Resoure Hacker and Windows Subsystem for Linux installed.

For starters, you can make a pull request from your fork, and the I'll check and merge it. If you don't know how to do it, make sure to read one of this guides.
- [How to Contribute to Open Source | Open Source Guides](https://opensource.guide/how-to-contribute/#opening-a-pull-request)
- [How to create a pull request in GitHub | Opensource.com](https://opensource.com/article/19/7/create-pull-request-github)
- [Creating a pull request - GitHub Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request)

TL;DR, here's how.
1. Fork this repository by clicking the "Fork" button above.
2. Make a branch in your fork. (optional)
3. Do your edits there and commit (and push) the changes.
4. Create a pull request by clicking the "New pull request" button.

If you are still confused, you can ask me on [the issue board](https://github.com/Hans5958/Domino-English-Translation/issues) or on Discord (``Hans5958#0969``).
<!-- You can contribute by following these steps.
1. Fork the master repository.
You can do this by visit [the repository](https://github.com/Hans5958/Domino-English-Translation/) and click the "Fork" button.
2. Do the edits on the forked repository.
After you forked the repository, you can edit whatever you want.
After you forked the repository, you can edit whatever you want. Don't forget to commit it, of course.
3. Create a pull request.
After that, you can create a pull request by clicking the "New pull request" button. Follow the steps and we will review it.
After that, you can create a pull request by clicking the "New pull request" button. Follow the steps and we will review it. -->

## Completion Checklist

### Dialogs
### Dialog

<details><summary>Expand to view the checklist.</summary>

- [x] 100
- [x] 131
Expand Down Expand Up @@ -135,13 +166,21 @@ After that, you can create a pull request by clicking the "New pull request" but
- [ ] 326
- [x] 327

</details>

### Menu

<details><summary>Expand to view the checklist.</summary>

- [ ] 128
- [x] 130

</details>

### String Tables

<details><summary>Expand to view the checklist.</summary>

- [x] 1
- [x] 2
- [x] 3
Expand Down Expand Up @@ -196,3 +235,4 @@ After that, you can create a pull request by clicking the "New pull request" but
- [x] 52
- [x] 53

</details>
25 changes: 25 additions & 0 deletions VersionInfo/1.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
1 VERSIONINFO
FILEVERSION 1,43,3,0 // Do not edit these headers!
PRODUCTVERSION 1,43,3,0
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
{
BLOCK "StringFileInfo"
{
BLOCK "040904B0"
{
VALUE "FileDescription", "Domino MIDI-Music Editor"
VALUE "FileVersion", "1.43-en.3-nightly" // Do not edit this!
VALUE "InternalName", "Domino"
VALUE "LegalCopyright", "Software (c) 2007-2013 Takabo Soft, Translation (c) 2019-2020"
VALUE "OriginalFilename", "Domino.exe"
VALUE "ProductName", "Domino"
VALUE "ProductVersion", "1.43-en.3-nightly" // Do not edit this!
}
}

BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0409 0x04B0
}
}
16 changes: 16 additions & 0 deletions _deploy/readme-translation.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Domino English Translation
Build **-nightly.**** (1.43-en.**-nightly.****)

Thank you using the Domino English Translation.

Domino is a MIDI editor that is used for creating MIDI songs/musics. Domino is used by various blackers in the Black MIDI ecosystem.

Since Domino is an abandonware, and it's original language is Japanese, many people tried to translate it using resource editing tools. Some of it are outdated, while others are incomplete.

This project is made to unify the translations made by community, while trying to complete it for easier usage.

You can download the latest version or even contribute by clicking the links below.

Repository : https://github.com/Hans5958/Domino-English-Translation/
Releases : https://github.com/Hans5958/Domino-English-Translation/releases
Domino site : http://takabosoft.com/domino
13 changes: 13 additions & 0 deletions _deploy/release-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
No significant updates for the translation for this one, but it's related to the backstage.

I have added `readme-translation.txt` for explaining the program and to give links, since there are some people who uploaded the program without linking the repo because they forgot about it.

Starting now, the versions on the binaries (``.exe``) will be updated for each release. This will reduce some confusion on users. You can see this by right-click the binary, click "Properties", and click the "Details" tab. The file version will only list the build number, while the product version will list both the build number and the nightly date.

There are now nightly releases that has new translation each time I update it. This release is one of them. The complete release for each version/build will also be uploaded sooner or later. If there are no updates on the strings, it will be uploaded as an artifact, which you can check on the latest deployment on [GitHub Actions](https://github.com/Hans5958/Domino-English-Translation/actions/).

I have changed the CI from Travis CI to GitHub Actions for the nightly releases, and, for the future, checking the pull requests before merging it.

[The readme on the repository](https://github.com/Hans5958/Domino-English-Translation/blob/master/README.md) has been updated for new users who wanted to use the program or contributing to the project.

That's all for this release, thanks for reading.
14 changes: 12 additions & 2 deletions compile.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
VERSION_NUM="$(cat version.txt)"
BUILD_DATE=$(date +'%Y%m%d%H%M%S')
cd _compile
echo "[FILENAMES]
Exe= Domino.exe
SaveAs= Domino_Translated_"$(date +'%Y%m%d%H%M%S')".exe
SaveAs= Domino_Translated_"$BUILD_DATE".exe
Log= CON
[COMMANDS]
-delete MENU,,
-delete DIALOG,,
-delete STRINGTABLE,,
-delete VERSIONINFO,,
-add Menu.res, MENU,,
-add Dialog.res, DIALOG,,
-add StringTable.res, STRINGTABLE,,
-add VersionInfo.res, VERSIONINFO,,
" > tmp.txt
echo '"C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -open Dialog.rc -save Dialog.res -action compile -log CON
"C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -open Menu.rc -save Menu.res -action compile -log CON
"C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -open StringTable.rc -save StringTable.res -action compile -log CON
"C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -open VersionInfo.rc -save VersionInfo.res -action compile -log CON
"C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -script tmp.txt' > tmp.bat
cat ../Dialog/* > Dialog.rc
cat ../Menu/* > Menu.rc
cat ../StringTable/* > StringTable.rc
cat ../VersionInfo/* > VersionInfo.rc
sed -i '2s/.*/FILEVERSION 1,43,'$VERSION_NUM',0/' VersionInfo.rc
sed -i '3s/.*/PRODUCTVERSION 1,43,'$VERSION_NUM',0/' VersionInfo.rc
sed -i '12s/.*/ VALUE "FileVersion", "1.43-en.'$VERSION_NUM'-nightly.'$BUILD_DATE'"/' VersionInfo.rc
sed -i '17s/.*/ VALUE "ProductVersion", "1.43-en.'$VERSION_NUM'-nightly.'$BUILD_DATE'"/' VersionInfo.rc
cmd.exe /c tmp.bat
touch Domino.exe
touch Domino_Translated_$BUILD_DATE.exe
# read -n1 -r -p "Press any key to continue..." key
rm -rf *.rc
rm -rf *.res
Expand Down
Loading

0 comments on commit bdc6d07

Please sign in to comment.