Deployment 如何在play框架中使linux与windows兼容

Deployment 如何在play框架中使linux与windows兼容,deployment,playframework,playframework-2.0,Deployment,Playframework,Playframework 2.0,如何在play框架中使linux与windows兼容?? 它会生成.bat文件,但当我执行$play dist时,我需要.sh文件。如果您检查播放,他们会告诉您该文件会发生什么,以及您需要什么 对于Windows用户,将使用.bat文件生成开始脚本 分机。在Windows上运行播放应用程序时使用此文件 For Unix users, zip files do not retain Unix file permissions so when the file is expanded the sta

如何在play框架中使linux与windows兼容?? 它会生成.bat文件,但当我执行$play dist时,我需要.sh文件。如果您检查播放,他们会告诉您该文件会发生什么,以及您需要什么

对于Windows用户,将使用.bat文件生成开始脚本 分机。在Windows上运行播放应用程序时使用此文件

For Unix users, zip files do not retain Unix file permissions so when the file is expanded the start script will be required to be set

as an executable:

$ chmod +x /path/to/bin/<project-name>

Alternatively a tar.gz file can be produced instead. Tar files retain permissions. Invoke the universal:package-zip-tarball task

instead of the dist task:

play universal:package-zip-tarball
这是一个没有分机的卡普拉特

在文档中,您还可以使用本机packager,它为特定操作系统创建图像:

Play使用SBT本机Packager插件。本机packager插件声明dist任务以创建zip文件。调用dist任务直接等同于调用以下内容:

$ play universal:package-bin

Many other types of archive can be generated including:

    tar.gz
    OS X disk images
    Microsoft Installer (MSI)
    RPMs
    Debian files

Please consult the documentation on the native packager for more information.

以下是运行
dist
任务后生成的zip文件的解压缩
cd
进入bin目录并运行
/appname

谢谢你的快速回答。但我遇到的困难是我有一台Windows PC,我想生成一个可以在linux机器上运行的包。因此,我想只有本地打包机是一种选择,而且我对这一点还不熟悉。这非常令人困惑。还有,他们有没有办法在没有插件的情况下生成一个war?你可以先检查一下你使用的是哪一个jar,然后使用SBT汇编插件检查一下,在文档中,我发现文档有点混乱:在我制作了zip文件之后,文档说
这将生成一个ZIP文件,其中包含运行应用程序所需的所有JAR文件
(无需使用任何其他工具?)。对于windows,您有一个.bat文件,只需从控制台启动即可。但是,当我尝试在linux机器上运行它时,文档并没有告诉我如何运行它。现在有2种可能性:我引用的句子是错误的/不完整的,或者文档中没有显示在linux下启动此程序的命令。注意:只需键入
/APPNAME
,即可在linux下启动应用程序。对于没有经验的用户来说,这个信息会很好。
$ play universal:package-bin

Many other types of archive can be generated including:

    tar.gz
    OS X disk images
    Microsoft Installer (MSI)
    RPMs
    Debian files

Please consult the documentation on the native packager for more information.