如何在Play框架中使用windows兼容windows

时间:2015-05-27 06:22:34

标签: deployment playframework playframework-2.0

如何在Play框架中使用windows兼容的windows? 它会生成.bat文件,但是当我执行$ play dist

时我想要.sh文件

2 个答案:

答案 0 :(得分:1)

如果您查看游戏Documentation,他们会说明此文件会发生什么以及您需要什么,activator

  

对于Windows用户,将使用.bat文件生成启动脚本   延期。在Windows上运行Play应用程序时使用此文件。

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

使用激活器,我想也是如此,它会生成一个带有shell脚本助手的bat和文件:

###  ------------------------------- ###
###  Helper methods for BASH scripts ###
###  ------------------------------- ###

这里有一个没有扩展名的

Activator output after dist command in Idea console

同样在文档中,您可以使用本机打包程序,它为特定操作系统创建图像:

Play使用SBT Native Packager插件。 native 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.

以下是doc

答案 1 :(得分:0)

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