Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
Argent77 committed Apr 24, 2024
2 parents 7072c74 + 37eac5a commit c967641
Show file tree
Hide file tree
Showing 104 changed files with 12,368 additions and 1,417 deletions.
10 changes: 5 additions & 5 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="lib/jorbis/jorbis.jar" sourcepath="lib/jorbis/jorbis-0.0.17.zip"/>
<classpathentry exported="true" kind="lib" path="lib/rsyntaxtextarea/rsyntaxtextarea.jar" sourcepath="lib/rsyntaxtextarea/rsyntaxtextarea-3.3.2-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/rsyntaxtextarea/rsyntaxtextarea.jar" sourcepath="lib/rsyntaxtextarea/rsyntaxtextarea-3.4.0-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jhexview/jhexview.jar" sourcepath="lib/jhexview/jhexview-current.zip"/>
<classpathentry exported="true" kind="lib" path="lib/montemedia/montemedia.jar" sourcepath="lib/montemedia/MonteMedia-0.7.7.zip"/>
<classpathentry exported="true" kind="lib" path="lib/apng-writer/apng-writer-core.jar" sourcepath="lib/apng-writer/apng-writer-core-src.zip"/>
<classpathentry exported="true" kind="lib" path="lib/json/json-20230227.jar" sourcepath="lib/json/JSON-java-20230227.zip"/>
<classpathentry exported="true" kind="lib" path="lib/commonmark/commonmark-0.21.0.jar" sourcepath="lib/commonmark/commonmark-java-commonmark-parent-0.21.0.zip"/>
<classpathentry exported="true" kind="lib" path="lib/flatlaf/flatlaf-3.1.1.jar" sourcepath="lib/flatlaf/flatlaf-3.1.1-sources.jar">
<classpathentry exported="true" kind="lib" path="lib/flatlaf/flatlaf-3.4.jar" sourcepath="lib/flatlaf/flatlaf-3.4-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/NearInfinity/lib/flatlaf/flatlaf-3.1.1-javadoc.jar!/"/>
<attribute name="javadoc_location" value="jar:platform:/resource/NearInfinity/lib/flatlaf/flatlaf-3.4-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="lib/flatlaf/flatlaf-intellij-themes-3.1.1.jar" sourcepath="lib/flatlaf/flatlaf-intellij-themes-3.1.1-sources.jar">
<classpathentry exported="true" kind="lib" path="lib/flatlaf/flatlaf-intellij-themes-3.4.jar" sourcepath="lib/flatlaf/flatlaf-intellij-themes-3.4-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/NearInfinity/lib/flatlaf/flatlaf-intellij-themes-3.1.1-javadoc.jar!/"/>
<attribute name="javadoc_location" value="jar:platform:/resource/NearInfinity/lib/flatlaf/flatlaf-intellij-themes-3.4-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
Expand Down
33 changes: 20 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up JDK 1.8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
Expand All @@ -36,19 +36,19 @@ jobs:
echo "NI_VERSION=$(java -jar "NearInfinity.jar" -version 2>/dev/null | grep -Eo '[0-9]{8}')" >> "$GITHUB_OUTPUT"
- name: Upload JAR artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: NearInfinity-${{ steps.ni-build.outputs.NI_VERSION }}
path: NearInfinity.jar

# Build and upload installer versions for Windows and macOS
# Build and upload installer versions for Windows, macOS-x86_64 and macOS-arm64
deploy-installer:
if: ${{ github.repository == 'Argent77/NearInfinity' }}
needs: deploy-jar
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macos-latest ]
os: [ windows-latest, macos-13, macos-14 ]
java: [ '21' ]
runs-on: ${{ matrix.os }}
name: Create installer for ${{ matrix.os }}, JDK ${{ matrix.java }}
Expand All @@ -58,7 +58,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
Expand All @@ -77,7 +77,7 @@ jobs:
# Preparations
- name: Download JAR artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: NearInfinity-${{ needs.deploy-jar.outputs.ni_version }}
path: jar
Expand All @@ -99,7 +99,7 @@ jobs:
.\build-installer.cmd
- name: Build installer (macos)
if: (matrix.os == 'macos-latest')
if: startsWith(matrix.os, 'macos-')
run: |
mv assets/redistributable/macos/package .
mv assets/redistributable/macos/build.command .
Expand All @@ -112,27 +112,34 @@ jobs:
run: dir

- name: List built files (macos)
if: (matrix.os == 'macos-latest')
if: startsWith(matrix.os, 'macos-')
run: ls -l

# Uploading
- name: Upload portable artifact (windows)
if: (matrix.os == 'windows-latest')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: portable-windows
path: NearInfinity-*.zip

- name: Upload exe artifact (windows)
if: (matrix.os == 'windows-latest')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: installer-windows
path: NearInfinity-*.exe

- name: Upload pkg artifact (macos)
if: (matrix.os == 'macos-latest')
uses: actions/upload-artifact@v3
if: (matrix.os == 'macos-13')
uses: actions/upload-artifact@v4
with:
name: installer-macos
name: installer-macos-x86_64
path: NearInfinity-*.pkg

- name: Upload pkg artifact (macos-arm64)
if: (matrix.os == 'macos-14')
uses: actions/upload-artifact@v4
with:
name: installer-macos-arm64
path: NearInfinity-*.pkg
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<property name="apng_writer.file" value="${lib.path.rel}/apng-writer/apng-writer-core.jar"/>
<property name="json.file" value="${lib.path.rel}/json/json-20230227.jar"/>
<property name="commonmark.file" value="${lib.path.rel}/commonmark/commonmark-0.21.0.jar"/>
<property name="flatlaf.file" value="${lib.path.rel}/flatlaf/flatlaf-3.1.1.jar"/>
<property name="flatlafthemes.file" value="${lib.path.rel}/flatlaf/flatlaf-intellij-themes-3.1.1.jar"/>
<property name="flatlaf.file" value="${lib.path.rel}/flatlaf/flatlaf-3.4.jar"/>
<property name="flatlafthemes.file" value="${lib.path.rel}/flatlaf/flatlaf-intellij-themes-3.4.jar"/>
<property name="javacc.home" value="lib/javacc"/>
<property name="parser.path" value="org/infinity/resource/bcs/parser"/>
<property name="src.parser.path" value="${src.path}/org/infinity/resource/bcs/parser"/>
Expand Down
Binary file removed lib/flatlaf/flatlaf-3.1.1-javadoc.jar
Binary file not shown.
Binary file removed lib/flatlaf/flatlaf-3.1.1-sources.jar
Binary file not shown.
Binary file removed lib/flatlaf/flatlaf-3.1.1.jar
Binary file not shown.
Binary file added lib/flatlaf/flatlaf-3.4-javadoc.jar
Binary file not shown.
Binary file added lib/flatlaf/flatlaf-3.4-sources.jar
Binary file not shown.
Binary file added lib/flatlaf/flatlaf-3.4.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed lib/flatlaf/flatlaf-intellij-themes-3.1.1.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added lib/flatlaf/flatlaf-intellij-themes-3.4.jar
Binary file not shown.
Binary file not shown.
Binary file modified lib/rsyntaxtextarea/rsyntaxtextarea.jar
Binary file not shown.
14 changes: 13 additions & 1 deletion src/org/infinity/AppOption.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public class AppOption {
public static final AppOption TEXT_TAB_SIZE = new AppOption(OptionsMenuItem.OPTION_TEXT_TABSIZE, "Tab Size", 1);

// Category: BCS and BAF
/** Menu Options > BCS and BAF: BcsColorScheme (Integer, Default: 6) */
/** Menu Options > BCS and BAF: BcsColorScheme (Integer, Default: last item in list) */
public static final AppOption BCS_COLOR_SCHEME = new AppOption(OptionsMenuItem.OPTION_BCS_COLORSCHEME,
"BCS Color Scheme", OptionsMenuItem.getBcsColorSchemes().size() - 1);
/** Menu Options > BCS and BAF: BcsSyntaxHighlighting (Boolean, Default: true) */
Expand Down Expand Up @@ -230,6 +230,12 @@ public class AppOption {
/** Menu Options > Misc. Types: LuaSyntaxHighlighting (Boolean, Default: true) */
public static final AppOption LUA_SYNTAX_HIGHLIGHTING = new AppOption(OptionsMenuItem.OPTION_LUA_SYNTAXHIGHLIGHTING,
"Enable LUA Syntax Highlighting", true);
/** Menu Options > Misc. Types: MenuColorScheme (Integer, Default: 0) */
public static final AppOption MENU_COLOR_SCHEME = new AppOption(OptionsMenuItem.OPTION_MENU_COLORSCHEME,
"MENU Color Scheme", 0);
/** Menu Options > Misc. Types: MenuSyntaxHighlighting (Boolean, Default: true) */
public static final AppOption MENU_SYNTAX_HIGHLIGHTING = new AppOption(OptionsMenuItem.OPTION_MENU_SYNTAXHIGHLIGHTING,
"Enable MENU Syntax Highlighting", true);
/** Menu Options > Misc. Types: SqlColorScheme (Integer, Default: 0) */
public static final AppOption SQL_COLOR_SCHEME = new AppOption(OptionsMenuItem.OPTION_SQL_COLORSCHEME,
"SQL Color Scheme", 0);
Expand All @@ -250,6 +256,12 @@ public class AppOption {
"Enable WeiDU Syntax Highlighting", true);

// Category: Dialog Tree Viewer
/** Menu Options > Dialog Tree Viewer: DlgColorScheme (Integer, Default: last item in list) */
public static final AppOption DLG_COLOR_SCHEME = new AppOption(OptionsMenuItem.OPTION_DLG_COLORSCHEME,
"Color Scheme", OptionsMenuItem.getDlgColorSchemes().size() - 1);
/** Menu Options > Dialog Tree Viewer: DlgSyntaxHighlighting (Boolean, Default: true) */
public static final AppOption DLG_SYNTAX_HIGHLIGHTING = new AppOption(OptionsMenuItem.OPTION_DLG_SYNTAXHIGHLIGHTING,
"Enable Syntax Highlighting", true);
/** Menu Options > Dialog Tree Viewer: DlgShowIcons (Boolean, Default: true) */
public static final AppOption DLG_SHOW_ICONS = new AppOption(OptionsMenuItem.OPTION_SHOWICONS, "Show Icons", true);
/** Menu Options > Dialog Tree Viewer: DlgSortStatesByWeight (Boolean, Default: true) */
Expand Down
2 changes: 1 addition & 1 deletion src/org/infinity/NearInfinity.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@

public final class NearInfinity extends JFrame implements ActionListener, ViewableContainer {
// the current Near Infinity version
private static final String VERSION = "v2.4-20231231";
private static final String VERSION = "v2.4-20240424";

// the minimum supported Java version
private static final int JAVA_VERSION_MIN = 8;
Expand Down
1 change: 1 addition & 0 deletions src/org/infinity/check/StructChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ public int getOffset() {
return offset;
}

@SuppressWarnings("unused")
public String getMessage() {
return errorMsg;
}
Expand Down
1 change: 1 addition & 0 deletions src/org/infinity/datatype/ResourceRef.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ public void mouseClicked(MouseEvent event) {
bView.addActionListener(this);
bPlay = new JButton("Play", Icons.ICON_PLAY_16.getIcon());
bPlay.addActionListener(this);
bPlay.setVisible(ResourceEntry.isSound(types));
list.addListSelectionListener(this);
setResourceEntryUpdated(list.getSelectedValue());

Expand Down
17 changes: 17 additions & 0 deletions src/org/infinity/gui/InfinityTextArea.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.infinity.resource.text.modes.BCSTokenMaker;
import org.infinity.resource.text.modes.GLSLTokenMaker;
import org.infinity.resource.text.modes.INITokenMaker;
import org.infinity.resource.text.modes.MenuTokenMaker;
import org.infinity.resource.text.modes.TLKTokenMaker;
import org.infinity.resource.text.modes.WeiDULogTokenMaker;
import org.infinity.util.Misc;
Expand All @@ -54,6 +55,8 @@ public enum Language {
NONE(SyntaxConstants.SYNTAX_STYLE_NONE),
/** Select BCS highlighting. */
BCS(BCSTokenMaker.SYNTAX_STYLE_BCS),
/** Select DLG tree viewer trigger/action highlighting. */
DLG(BCSTokenMaker.SYNTAX_STYLE_BCS),
/** Select TLK highlighting. */
TLK(TLKTokenMaker.SYNTAX_STYLE_TLK),
/** Select GLSL highlighting. */
Expand All @@ -62,6 +65,8 @@ public enum Language {
INI(INITokenMaker.SYNTAX_STYLE_INI),
/** Select LUA highlighting. */
LUA(SyntaxConstants.SYNTAX_STYLE_LUA),
/** Select MENU highlighting. */
MENU(MenuTokenMaker.SYNTAX_STYLE_MENU),
/** Select SQL highlighting. */
SQL(SyntaxConstants.SYNTAX_STYLE_SQL),
/** Select WeiDU.log highlighting. */
Expand Down Expand Up @@ -163,6 +168,8 @@ public String getScheme() {
GLSLTokenMaker.class.getCanonicalName());
((AbstractTokenMakerFactory) TokenMakerFactory.getDefaultInstance()).putMapping(INITokenMaker.SYNTAX_STYLE_INI,
INITokenMaker.class.getCanonicalName());
((AbstractTokenMakerFactory) TokenMakerFactory.getDefaultInstance()).putMapping(MenuTokenMaker.SYNTAX_STYLE_MENU,
MenuTokenMaker.class.getCanonicalName());
}

private final SortedMap<Integer, GutterIcon> gutterIcons = new TreeMap<>();
Expand Down Expand Up @@ -342,6 +349,11 @@ public static void applyExtendedSettings(RSyntaxTextArea edit, Language language
schemePath = BrowserMenuBar.getInstance().getOptions().getBcsColorScheme();
}
break;
case DLG:
if (BrowserMenuBar.isInstantiated()) {
schemePath = BrowserMenuBar.getInstance().getOptions().getDlgColorScheme();
}
break;
case TLK:
if (BrowserMenuBar.isInstantiated()) {
schemePath = BrowserMenuBar.getInstance().getOptions().getTlkColorScheme();
Expand All @@ -362,6 +374,11 @@ public static void applyExtendedSettings(RSyntaxTextArea edit, Language language
schemePath = BrowserMenuBar.getInstance().getOptions().getLuaColorScheme();
}
break;
case MENU:
if (BrowserMenuBar.isInstantiated()) {
schemePath = BrowserMenuBar.getInstance().getOptions().getMenuColorScheme();
}
break;
case SQL:
if (BrowserMenuBar.isInstantiated()) {
schemePath = BrowserMenuBar.getInstance().getOptions().getSqlColorScheme();
Expand Down
19 changes: 11 additions & 8 deletions src/org/infinity/gui/OpenFileFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,40 +124,41 @@ public void mouseClicked(MouseEvent event) {
gbc.weightx = 1.0;
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(3, 3, 3, 6);
gbc.insets = new Insets(6, 4, 3, 8);
gbl.setConstraints(rbExternal, gbc);
pane.add(rbExternal);

gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 1.0;
gbc.gridwidth = 1;
gbc.insets = new Insets(0, 12, 3, 0);
gbc.insets = new Insets(0, 8, 3, 0);
gbl.setConstraints(tfExternalName, gbc);
pane.add(tfExternalName);

gbc.fill = GridBagConstraints.NONE;
gbc.weightx = 0.0;
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc.insets = new Insets(0, 3, 3, 6);
gbc.insets = new Insets(0, 3, 3, 8);
gbl.setConstraints(bExternalBrowse, gbc);
pane.add(bExternalBrowse);

gbc.fill = GridBagConstraints.BOTH;
gbc.weightx = 1.0;
gbc.weighty = 1.0;
gbc.insets = new Insets(0, 12, 3, 6);
gbc.insets = new Insets(0, 8, 3, 8);
gbl.setConstraints(lExternalDrop, gbc);
pane.add(lExternalDrop);

gbc.weighty = 0.0;
gbc.weightx = 1.0;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(9, 3, 3, 6);
gbc.insets = new Insets(9, 4, 3, 8);
gbl.setConstraints(rbInternal, gbc);
pane.add(rbInternal);

gbc.weighty = 3.0;
gbc.fill = GridBagConstraints.BOTH;
gbc.insets = new Insets(0, 12, 3, 6);
gbc.insets = new Insets(0, 8, 3, 8);
gbl.setConstraints(lpInternal, gbc);
pane.add(lpInternal);

Expand All @@ -167,18 +168,20 @@ public void mouseClicked(MouseEvent event) {

gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weighty = 0.0;
gbc.insets = new Insets(3, 6, 0, 6);
gbc.insets = new Insets(3, 8, 0, 8);

gbl.setConstraints(bPanel, gbc);
pane.add(bPanel);

gbc.insets.top = 0;
gbc.insets.bottom = 6;
gbc.anchor = GridBagConstraints.CENTER;
gbc.fill = GridBagConstraints.NONE;
gbl.setConstraints(cbStayOpen, gbc);
pane.add(cbStayOpen);

setSize(330, 400);
pack();
setMinimumSize(getSize());
Center.center(this, NearInfinity.getInstance().getBounds());
}

Expand Down
Loading

0 comments on commit c967641

Please sign in to comment.