Open BertrandBordage opened 11 years ago
I have VS.Net 2012 and Cython, and using these commands, i can almost do a build...
SET VS90COMNTOOLS=%VS110COMNTOOLS%
python setup.py build --compiler msvc
it almost works.
I am hoping that when i compile it, it will include pyglet, etc.. and i can just make a setup file for windows to include the other resource files (fonts, textures, sounds...)
And I was the one to change the name form Pyglet Windows to pyCraftr, it kind of made sense, and i would be happy leaving it as it, but that is just me.
We need to drop the r. pyCraft or Pynecraft I say.
I don't feel we need a launcher, at least not like Minecraft's. The main menu basically functions as a launcher, and we can add update functionality to it if we want it. With python installed on Windows, I can just double click main.py and it runs fine, so I don't see how a launcher would make anything "easier" for the end user either. You can now launch server.py via the main menu (in my repo, which I hope to merge tonight) too.
While version numbers are a good idea, I think its still too early for them to be useful. The game is not yet suitable for non developers (its not fun enough yet). An auto updater is an excellent idea, if it still used git.
Why not make a script to download pyglet and other libraries and install them automatically, that will be convenient.
add the game to the Ubuntu software center (when the project will be stable and less "alpha-like")
We don't have to start with adding our game to Ubuntu Software Center - we can create PPA (on Launchpad). More about it.
Another solution: http://wiki.debian.org/Teams/PythonAppsPackagingTeam or https://wiki.ubuntu.com/UbuntuDevelopment/NewPackages
a name. Now that anybody calls this "pyCraftr", why not choosing this? See #21.
I also think that it should be "official" name.
version numbers
In my opinion we should use major number 0 for "alpha" version.
an icon
Maybe Minecraft-like icon with some Python logo element?
@avelanarius yeah, creating a PPA is a good idea. I also agrea that we should use 0.x.x as version numbers for now. And what about a rasterized and "cubed" python logo? :P
Dont forget that we need to do a windows and mac client. Still trying to get the game to compile under Windows.
@ronmurphy Have you tried my latest changes (https://github.com/boskee/Minecraft/commit/f56844c6fd6a32759213bb6ec3fa21d4cf92e353 and https://github.com/boskee/Minecraft/commit/9bcacf98e4325ef1de1db029c29a7e84b53b07d9)? With these changes I am able to compile pyCraftr under Windows (Visual Studio 2010).
Also under Windows there is an interesing command:
python setup.py bdist_wininst
If you want to make things really easy for your users, you can create one or more built distributions for them. For instance, if you are running on a Windows machine, and want to make things easy for other Windows users, you can create an executable installer (the most appropriate type of built distribution for this platform) with the bdist_wininst command
But I'm not sure if it really works (but certainly it doesn't include libraries).
@avelanarius I JUST got the project to compile by way of this...
SET VS90COMNTOOLS=%VS110COMNTOOLS% python setup.py install build --compiler=msvc
but i dont know where the windows exe is stores afterwards. I will try the above way!
edit: the above way does work, i will try to make a setup installer to download the needed dependent files and install them prior the actual setup, then the game.
ok here is my build4win.bat , it does a fresh compile every time, for whatever new features, etc... that have been added in.
@echo off echo Setting tools to VS2012... SET VS90COMNTOOLS=%VS110COMNTOOLS% echo Clearing old compile files (if the exist)... del .pyc del .c del .h del .so echo Doing a fresh compile... python setup.py build --compiler=msvc echo Packaging for Windows (w/o dependents...) python setup.py bdist_wininst echo Done. @echo on
@BertrandBordage What about Distribute (http://pythonhosted.org/distribute/setuptools.html)? https://github.com/boskee/Minecraft/commit/7cb066d569edfb3f850edd159926de01e095114c
@avelanarius What's the advantage on distutils?
I meant, what additional feature of Distribute would you like to use? Cause Distribute is itself an additional dependency, so it seems quite counterproductive…
Stupid question, but does setuptools / distutils have this function (at build time)?
Automatically find/download/install/upgrade dependencies at build time using the EasyInstall tool, which supports downloading via HTTP, FTP, Subversion, and SourceForge, and automatically scans web pages linked from PyPI to find download links. (It’s the closest thing to CPAN currently available for Python.)
Yes... So we don't need Distribute...
Hum… I can't find it. There's a install_requires command in Distribute and setuptools, but not in distutils. And AFAIK, distutils is officially the package to use.
So automatic downloading of dependencies is only available in setuptools (and Distribute) and not distutils?
It seems.
dependencies and pyCraftr download/install in a single step
And with setuptools / Distribute it would be easier to achieve.
I agree, we have to do things the right way: if possible, with distutils, if not, with setuptools. However, we will need an OS-specific way to install dependencies such as OpenAL.
Nebual suggested PyInstaller to make OS-dependant complete installers. That's probably a good solution for us to produce easy installers. But we also need a clean setup.py for developpers (at least for Cython).
I don't believe PyInstaller actually makes "installers", they're standalone executables.
Its pretty good at finding dependencies and packaging them with the executable though, optionally even including python itself as a dependency.
py2exe does good for a windows setup file, but i dont know how to specify dependent files or folders.
On Tue, Apr 30, 2013 at 2:21 PM, Nebual notifications@github.com wrote:
I don't believe PyInstaller actually makes "installers", they're standalone executables.
Its pretty good at finding dependencies and packaging them with the executable though, optionally even including python itself as a dependency.
— Reply to this email directly or view it on GitHubhttps://github.com/boskee/Minecraft/issues/71#issuecomment-17245047 .
I have a updater script:
from subprocess import check_call as run
import shutil
import os
import time
import sys
def update():
UPDATE_CMD = ( # base command
'git clone '
'update_url updatedir --quiet' #quiet means it won't print anything
)
try:
run(UPDATE_CMD)
except:
print("An error occured. Exiting...")
time.sleep(3)
sys.exit()
files=os.listdir("updatedir")
for fle in files:
full_filename = os.path.join("updatedir", fle)
if os.path.isfile(full_filename):
if file != "update.py":
current_dir=os.path.basename(os.getcwd())
shutil.copy(full_filename, current_dir)
os.system('powershell.exe rm -r -fo updatedir')
but it works on windows only.
You could add a check for windows and run
os.system('powershell.exe rm -r -fo updatedir')
,
otherwise run
os.system('rm -rf updatedir')
I also agrea that we should use 0.x.x as version numbers for now.
Try using 0.xx for globals.APP_VERSION
I've tried PyInstaller, it doesn't work with the server.
Not a critical issue, but it's a tiny effort that stops the distribution of this project.
Currently, using pyCraftr is easy for geeks. Install pyglet, clone the repository and that's all.
For other people, it's not that easy. This requires to know how to:
Maybe 30 % of Linux users know how to use it. And something like 0.05 % of Mac and Windows users do.
People both need:
What goals we could achieve:
What do we need: