Skip to content

Commit b4361d0

Browse files
committed
testing with icon and not remaning.
1 parent 1889166 commit b4361d0

File tree

6 files changed

+57
-10
lines changed

6 files changed

+57
-10
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
env:
99
FILE_NAME: connect4
10+
ICON_NAME: connect4-512
1011
MAIN_CLASS: App
1112
OUT_DIR: out
1213
VERSION: ${{ github.ref_name }}
@@ -86,14 +87,17 @@ jobs:
8687
--name ${{ env.FILE_NAME }} \
8788
--main-jar ${{ env.FILE_NAME }}-${{ env.VERSION }}.jar \
8889
--main-class ${{ env.MAIN_CLASS }} \
90+
--icon assets/icon/${{ env.ICON_NAME }}.icns \
91+
--app-version ${{ env.VERSION }} \
8992
--type dmg \
9093
--dest .
9194
95+
9296
- name: List contents of out directory
9397
run: ls ${{ env.OUT_DIR }}
9498

95-
- name: Rename MacOS standalone
96-
run: mv ${{ env.FILE_NAME }}-1.0.dmg ${{ env.FILE_NAME }}-MacOS-${{ env.VERSION }}.dmg
99+
# - name: Rename MacOS standalone
100+
# run: mv ${{ env.FILE_NAME }}-1.0.dmg ${{ env.FILE_NAME }}-MacOS-${{ env.VERSION }}.dmg
97101

98102
- name: Attach MacOS Standalone to Release
99103
uses: actions/upload-release-asset@v1
@@ -125,14 +129,17 @@ jobs:
125129
--name ${{ env.FILE_NAME }} \
126130
--main-jar ${{ env.FILE_NAME }}-${{ env.VERSION }}.jar \
127131
--main-class ${{ env.MAIN_CLASS }} \
132+
--icon assets/icon/${{ env.ICON_NAME }}.png \
133+
--resource-dir resources \
134+
--app-version ${{ env.VERSION }} \
128135
--type deb \
129136
--dest .
130137
131138
- name: List contents of out directory
132139
run: ls -lh .
133140

134-
- name: Rename Ubuntu standalone
135-
run: mv ${{ env.FILE_NAME }}_1.0-1_amd64.deb ${{ env.FILE_NAME }}-Ubuntu-${{ env.VERSION }}_amd64.deb
141+
# - name: Rename Ubuntu standalone
142+
# run: mv ${{ env.FILE_NAME }}_1.0-1_amd64.deb ${{ env.FILE_NAME }}-Ubuntu-${{ env.VERSION }}_amd64.deb
136143

137144
- name: Attach Ubuntu Standalone to Release
138145
uses: actions/upload-release-asset@v1
@@ -167,18 +174,20 @@ jobs:
167174
- name: Create Standalone for Windows
168175
run: |
169176
jpackage --input out `
170-
--name connect4 `
171-
--main-jar connect4-v1.1.0.jar `
172-
--main-class App `
177+
--name ${{ env.FILE_NAME }} `
178+
--main-jar ${{ env.FILE_NAME }}-${{ env.VERSION }}.jar `
179+
--main-class ${{ env.MAIN_CLASS }} `
180+
--icon assets/icon/${{ env.ICON_NAME }}.ico `
173181
--win-shortcut `
182+
--app-version ${{ env.VERSION }} `
174183
--type exe `
175184
--dest .
176185
177186
- name: List contents of out directory (Windows)
178187
run: Get-ChildItem -Path .
179188

180-
- name: Rename Windows standalone
181-
run: move ${{ env.FILE_NAME }}-1.0.exe ${{ env.OUT_DIR }}/${{ env.FILE_NAME }}-Windows-${{ env.VERSION }}.exe
189+
# - name: Rename Windows standalone
190+
# run: move ${{ env.FILE_NAME }}-1.0.exe ${{ env.OUT_DIR }}/${{ env.FILE_NAME }}-Windows-${{ env.VERSION }}.exe
182191

183192
- name: Attach Windows Standalone to Release
184193
uses: actions/upload-release-asset@v1

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,33 @@ Downloading the jar file is preferred. You can download the release version of t
2020

2121
## **Ubuntu**
2222

23+
### Option 1: Downloading the DEB File (simpler)
24+
25+
1. Open the terminal and navigate to the directory where you downloaded the .deb file.
26+
27+
```bash
28+
cd ~/Downloads
29+
```
30+
31+
2. Run the following command to install the package:
32+
33+
```bash
34+
sudo dpkg -i ./connect4_1.0.0_amd64.deb -y # Replace the filename/version with the name of the DEB file you downloaded
35+
```
36+
3. If you get an error, run the following command to install the dependencies:
37+
38+
```bash
39+
sudo apt-get install -f
40+
```
41+
42+
4. Run the following command to start the game:
43+
44+
```bash
45+
/opt/connect4/bin/connect4
46+
```
47+
48+
### Option 2: Downloading the JAR File
49+
2350
1. **Installing Java** (if it's not already installed):
2451
```bash
2552
sudo apt update
@@ -115,4 +142,7 @@ The game is written in Java and can be compiled using the following steps:
115142

116143

117144
## Bugs:
118-
I have not found any bugs in the program yet. If you find any, please let me know by opening an issue from the issue tab.
145+
I have not found any bugs in the program yet. If you find any, please let me know by opening an issue from the issue tab.
146+
147+
## Acknowledgements
148+
- [Icon](https://icon-icons.com/icon/grid-board-cell-table/187134)

assets/icon/connect4-512.icns

31 KB
Binary file not shown.

assets/icon/connect4-512.ico

63.6 KB
Binary file not shown.

assets/icon/connect4-512.png

3.92 KB
Loading
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Desktop Entry]
2+
Type=Application
3+
Name=Connect4
4+
Exec=/opt/connect4/bin/connect4
5+
Icon=/opt/connect4/connect4-512.png
6+
Comment=Play Connect4 game
7+
Terminal=false
8+
Categories=Game;

0 commit comments

Comments
 (0)