fix: add executable permissions for .command files during installation

- Update install.xml to set 775 permissions for .command files in Script pack
- Add .command files to target directory copy tasks in pom.xml
- Allow macOS users to run Forge apps without manual chmod

This change ensures .command files receive proper executable permissions
during installation, matching the behavior of .sh files on Unix/Linux.
This commit is contained in:
wcoldren
2024-10-24 11:13:46 -04:00
committed by Chris H
parent a6ccbe0f1d
commit 2585ad1cf6
2 changed files with 16 additions and 4 deletions

View File

@@ -68,14 +68,23 @@
<file src="forge.sh" targetdir="$INSTALL_PATH/" override="true">
<additionaldata key="permission.file" value="775"/>
</file>
<file src="forge.command" targetdir="$INSTALL_PATH/" override="true">
<additionaldata key="permission.file" value="775"/>
</file>
<file src="forge-adventure.sh" targetdir="$INSTALL_PATH/" override="true">
<additionaldata key="permission.file" value="775"/>
</file>
<file src="forge-adventure.command" targetdir="$INSTALL_PATH/" override="true">
<additionaldata key="permission.file" value="775"/>
</file>
<file src="adventure-editor.sh" targetdir="$INSTALL_PATH/" override="true">
<additionaldata key="permission.file" value="775"/>
</file>
<file src="adventure-editor.command" targetdir="$INSTALL_PATH/" override="true">
<additionaldata key="permission.file" value="775"/>
</file>
<executable stage="never" failure="ignore" keep="true">
<fileset targetdir="$INSTALL_PATH/" includes="forge.sh,forge-adventure.sh,adventure-editor.sh"/>
<fileset targetdir="$INSTALL_PATH/" includes="forge.sh,forge.command,forge-adventure.sh,forge-adventure.command,adventure-editor.sh,adventure-editor.command"/>
</executable>
</pack>
</packs>

View File

@@ -206,13 +206,16 @@
<chmod file="${project.build.directory}/${project.build.finalName}/forge-adventure.exe" perm="a+rx" />
<chmod file="${project.build.directory}/${project.build.finalName}/adventure-editor.exe" perm="a+rx" />
<copy todir="${basedir}/target">
<fileset dir="${project.build.directory}/../../forge-gui-desktop/target" includes="forge.sh" />
<fileset dir="${project.build.directory}/../../forge-gui-mobile-dev/target" includes="forge-adventure.sh" />
<fileset dir="${project.build.directory}/../../adventure-editor/target" includes="adventure-editor.sh" />
<fileset dir="${project.build.directory}/../../forge-gui-desktop/target" includes="forge.sh,forge.command" />
<fileset dir="${project.build.directory}/../../forge-gui-mobile-dev/target" includes="forge-adventure.sh,forge-adventure.command" />
<fileset dir="${project.build.directory}/../../adventure-editor/target" includes="adventure-editor.sh,adventure-editor.command" />
</copy>
<chmod file="${basedir}/target/forge.sh" perm="a+rx" />
<chmod file="${basedir}/target/forge.command" perm="a+rx" />
<chmod file="${basedir}/target/forge-adventure.sh" perm="a+rx" />
<chmod file="${basedir}/target/forge-adventure.command" perm="a+rx" />
<chmod file="${basedir}/target/adventure-editor.sh" perm="a+rx" />
<chmod file="${basedir}/target/adventure-editor.command" perm="a+rx" />
<tar destfile="${basedir}/target/${project.build.finalName}.tar.bz2" compression="bzip2">
<tarfileset filemode="755" dir="${project.build.directory}/${project.build.finalName}">
<include name="forge.sh" />