Skip to content

Commit

Permalink
新增Linux支持
Browse files Browse the repository at this point in the history
  • Loading branch information
ganggang2011 committed Feb 29, 2024
1 parent fd9df2f commit 7b1bafc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PlayerSettings:
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: DefaultCompany
productName: FPS
productName: Nighmare
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ FPS-Demo has different installation methods on different operating systems. Plea
If you are using MacOS, you can directly move the downloaded software to `Finder-Sidebar-Applications` or `Users/(Your Username)/Application`. If all goes well, you will see it in the Launchpad. Clicking the left mouse button will open it, and you can force exit the game by clicking `Esc - Quit Game` in the game or pressing `[LeftCommand] + [Q]` on any interface.
#### Windows
If you are using Windows, you will typically receive a folder. If you want to launch the program directly, you can enter the folder and open `Nightmare.exe`. For a better launch experience, you can manually move the folder to the default download folder or a custom path, i.e., `C:\Program Files\`, and add a shortcut to the desktop.
#### Linux
If you're using the Linux operating system, first ensure that the Unity game folder you've downloaded contains a Linux platform executable file. Typically, this file won't have a .exe extension but will be an executable file without any extension, and you might need to manually grant it execution permissions. Here's how to install and start the game:
1. Grant Execution Permission: Open the terminal and use the cd command to navigate to the game folder's location. Then, use the chmod command to grant the main game executable file execution permissions. Assuming the main executable file is named Nightmare, you can use the following command:
```bash
chmod +x Nightmare_Linux
```
2. Start the Game: Once execution permission has been granted, you can start the game directly from the terminal by entering:
```bash
./Nightmare_Linux
```
If the game is located in a directory within your `PATH` environment variable, you can also start it by simply entering the game's name.

For convenience, you may also create a desktop shortcut or add the game to your application launcher, so you can start the game without going through the terminal. Different Linux distributions might have different methods for creating shortcuts, usually involving creating a `.desktop` file and specifying the appropriate game start command and path.

<h2 id="section2">Operation Mode</h2>

Expand Down
16 changes: 14 additions & 2 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,20 @@ Nightmare 在不同在操作系统下有不同的安装方式,请您在下载
#### MacOS
如果您使用的是MacOS操作系统,您可以直接将下载下的软件移动至`访达-边栏-应用程序``Users/(您的用户名)/Application`。不出意外的话,您将在启动台中看到它,单击鼠标左键可以打开,点击游戏内`Ese - 退出游戏`或在任意界面按下`[LeftCommand] + [Q]`可以强制退出游戏。
#### Windows
如果您使用的是Windows操作系统,不出意外,您将获得一个文件夹。如果您想直接启动程序,可以进入文件夹并直接打开`Nightmare.exe`。为了要获得更好的开启体验,可以将文件夹手动移动至默认下载文件夹或自定义路径,即`C:\Program Files\`,并添加快捷方式至桌面。

如果您使用的是Windows操作系统,不出意外,您将获得一个文件夹。如果您想直接启动程序,可以进入文件夹并直接打开`Nightmare.exe`。为了便于开启,可以将文件夹手动移动至默认下载文件夹或自定义路径,即`C:\Program Files\`,并添加快捷方式至桌面。
#### Linux
如果您使用的是Linux操作系统,首先需要确保下载下来的Unity游戏文件夹包含了一个Linux平台的可执行文件。通常,这个文件不会有.exe扩展名,而是一个没有扩展名的可执行文件,您可能需要手动赋予其执行权限。下面是如何安装和启动游戏的步骤:
1. 赋予执行权限:打开终端,使用cd命令导航到游戏文件夹的位置。然后,使用chmod命令赋予游戏主执行文件执行权限。假设游戏的主执行文件名为GameName,您可以使用以下命令:
```bash
chmod +x Nightmare_Linux
```
2. 启动游戏:一旦赋予了执行权限,您可以通过终端直接启动游戏,只需输入:
```bash
./Nightmare_Linux
```
如果游戏位于您的`PATH`环境变量中的目录下,也可以直接输入游戏名来启动。

为了便于开启,您还可以创建一个桌面快捷方式或将游戏添加到您的应用启动器中,这样就可以不通过终端来启动游戏。不同的Linux发行版可能有不同的方法来创建快捷方式,通常需要创建一个`.desktop`文件并填写相应的游戏启动命令和路径。

<h2 id="section2">操作方式</h2>

Expand Down

0 comments on commit 7b1bafc

Please sign in to comment.