Commit 99b48d68 authored by Bruno Coudoin's avatar Bruno Coudoin

- more fixes for the windows install procedure

	- connect4 has been fixed by Miguel to better manage the
	  party end.
parent 4fcc62ff
2006-10-23 Bruno coudoin <bruno.coudoin@free.fr>
- more fixes for the windows install procedure
- connect4 has been fixed by Miguel to better manage the
party end.
* Makefile.mingw.in:
* boards/connect4/back.png: one pixel fix
* configure.in:
* gcompris-installer.nsi.in:
* src/boards/python/connect4.py:
* tools/py2exe/setup.py:
*** RELEASE 8.2BETA1 ***
2006-10-22 Bruno coudoin <bruno.coudoin@free.fr>
......
......@@ -18,6 +18,7 @@ LIBXML2_TOP := /libxml2
SDL_TOP := /sdl
CANVAS_TOP := /gnomecanvas
GNUCHESS_TOP := /gnuchess
PYTHON_TOP := /c/WINDOWS/system32/python24.dll
GNUCAP_TOP := /gnucap
MAKENSIS := "/c/Program Files/NSIS/makensis.exe"
......@@ -25,6 +26,7 @@ MAKENSIS := "/c/Program Files/NSIS/makensis.exe"
# These will be copied in the win32-install-dir ready to be packaged.
NEEDED_DLLS = $(GNUCHESS_TOP)/bin/pthreadGC.dll \
$(GNUCHESS_TOP)/bin/libreadline.dll \
$(PYTHON_TOP)/python24.dll \
$(GNUCAP_TOP)/src/MSW/gnucap.exe \
$(GTK_TOP)/bin/gspawn-win32-helper.exe \
$(GNUCHESS_TOP)/bin/gnuchess.exe \
......@@ -134,5 +136,7 @@ prep:
@echo "Copy pixmap"
mkdir $(GCOMPRIS_INSTALL_DIR)/share/pixmaps
cp gcompris.png $(GCOMPRIS_INSTALL_DIR)/share/pixmaps
@remove tuxpaint activity
rm -f $(GCOMPRIS_INSTALL_DIR)/share/$(pkgdatadir)/boards/tuxpaint.xml
@echo "Create the file gcompris-win-prepack.tar.gz"
tar -czf gcompris-win-prepack.tar.gz win32-install-dir nsis tools
boards/connect4/back.png

81.1 KB | W: | H:

boards/connect4/back.png

76.7 KB | W: | H:

boards/connect4/back.png
boards/connect4/back.png
boards/connect4/back.png
boards/connect4/back.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/gcompris/gcompris.c)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(gcompris, 8.2BETA1)
AM_INIT_AUTOMAKE(gcompris, 8.2BETA2)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
......
......@@ -216,6 +216,15 @@ Section -SecUninstallOldGcompris
; Check if we have uninstall string..
IfFileExists $R3 0 uninstall_problem
; Have uninstall string.. go ahead and uninstall.
; In this case just wipe out previous Gcompris install dir..
; We get here because versions 0.60a1 and 0.60a2 don't have versions set in the registry
; and versions 0.60 and lower did not correctly set the uninstall reg string
; (the string was set in quotes)
MessageBox MB_YESNO $(GCOMPRIS_PROMPT_WIPEOUT) IDYES do_wipeout IDNO cancel_install
cancel_install:
Quit
SetOverwrite on
; Need to copy uninstaller outside of the install dir
ClearErrors
......@@ -239,9 +248,7 @@ Section -SecUninstallOldGcompris
; and versions 0.60 and lower did not correctly set the uninstall reg string
; (the string was set in quotes)
IfSilent do_wipeout
MessageBox MB_YESNO $(GCOMPRIS_PROMPT_WIPEOUT) IDYES do_wipeout IDNO cancel_install
cancel_install:
Quit
MessageBox MB_YESNO "Uninstall previous version?" IDYES do_wipeout IDNO done
do_wipeout:
StrCmp $R0 "HKLM" gcompris_del_lm_reg gcompris_del_cu_reg
......@@ -379,9 +386,62 @@ Section Uninstall
RMDir /r "$INSTDIR\share"
Delete "$INSTDIR\gcompris.exe"
Delete "$INSTDIR\${GCOMPRIS_UNINST_EXE}"
Delete "$INSTDIR\COPYING"
Delete "$INSTDIR\Changelog"
Delete "$INSTDIR\README"
Delete "$INSTDIR\SDL.dll"
Delete "$INSTDIR\SDL_mixer.dll"
Delete "$INSTDIR\_cairo.pyd"
Delete "$INSTDIR\_gtk.pyd"
Delete "$INSTDIR\_socket.pyd"
Delete "$INSTDIR\_ssl.pyd"
Delete "$INSTDIR\_tkinter.pyd"
Delete "$INSTDIR\atk.pyd"
Delete "$INSTDIR\bz2.pyd"
Delete "$INSTDIR\freetype6.dll"
Delete "$INSTDIR\gnucap.exe"
Delete "$INSTDIR\gnuchess.exe"
Delete "$INSTDIR\gobject.pyd"
Delete "$INSTDIR\gspawn-win32-helper.exe"
Delete "$INSTDIR\iconv.dll"
Delete "$INSTDIR\intl.dll"
Delete "$INSTDIR\jpeg62.dll"
Delete "$INSTDIR\libart_lgpl_2-2.dll"
Delete "$INSTDIR\libatk-1.0-0.dll"
Delete "$INSTDIR\libcairo-2.dll"
Delete "$INSTDIR\libfontconfig-1.dll"
Delete "$INSTDIR\libgdk-win32-2.0-0.dll"
Delete "$INSTDIR\libgdk_pixbuf-2.0-0.dll"
Delete "$INSTDIR\libglib-2.0-0.dll"
Delete "$INSTDIR\libgmodule-2.0-0.dll"
Delete "$INSTDIR\libgnomecanvas-2-0.dll"
Delete "$INSTDIR\libgobject-2.0-0.dll"
Delete "$INSTDIR\libgthread-2.0-0.dll"
Delete "$INSTDIR\libgtk-win32-2.0-0.dll"
Delete "$INSTDIR\libiconv-2.dll"
Delete "$INSTDIR\libintl-2.dll"
Delete "$INSTDIR\libpango-1.0-0.dll"
Delete "$INSTDIR\libpangocairo-1.0-0.dll"
Delete "$INSTDIR\libpangoft2-1.0-0.dll"
Delete "$INSTDIR\libpangowin32-1.0-0.dll"
Delete "$INSTDIR\libpng13.dll"
Delete "$INSTDIR\libreadline.dll"
Delete "$INSTDIR\libxml2.dll"
Delete "$INSTDIR\pango.pyd"
Delete "$INSTDIR\pangocairo.pyd"
Delete "$INSTDIR\popt1.dll"
Delete "$INSTDIR\pthreadGC.dll"
Delete "$INSTDIR\python24.zip"
Delete "$INSTDIR\select.pyd"
Delete "$INSTDIR\setup.py"
Delete "$INSTDIR\unicodedata.pyd"
Delete "$INSTDIR\xmlparse.dll"
Delete "$INSTDIR\xmltok.dll"
Delete "$INSTDIR\zlib.pyd"
Delete "$INSTDIR\zlib1.dll"
;Try to remove Gcompris install dir .. if empty
RMDir /r "$INSTDIR"
RMDir "$INSTDIR"
; Shortcuts..
RMDir /r "$SMPROGRAMS\Gcompris"
......
......@@ -47,11 +47,9 @@ class Gcompris_connect4:
def __init__(self, gcomprisBoard):
print("Gcompris_connect4 __init__.")
self.gcomprisBoard = gcomprisBoard
def start(self):
print "Gcompris_connect4_start."
self.boardSize = 490.0
self.nbColumns = 7
self.nbLines = 6
......@@ -69,6 +67,7 @@ class Gcompris_connect4:
self.gcomprisBoard.maxlevel=9
self.gcomprisBoard.sublevel=1
self.gcomprisBoard.number_of_sublevel=1
self.winnercall = None
gcompris.bar_set(gcompris.BAR_LEVEL)
gcompris.bar_set_level(self.gcomprisBoard)
......@@ -111,7 +110,6 @@ class Gcompris_connect4:
self.newGame()
def end(self):
print "Gcompris_connect4 end."
if self.timerAnim:
gtk.timeout_remove(self.timerAnim)
if self.timerMachine:
......@@ -125,31 +123,28 @@ class Gcompris_connect4:
def ok(self):
print("Gcompris_connect4 ok.")
pass
def repeat(self):
print("Gcompris_connect4 repeat.", self.humanVictory)
if self.humanVictory >= self.maxVictory:
if self.gcomprisBoard.level < self.maxLevel:
self.set_level(self.gcomprisBoard.level+1)
else:
print "Level max is reached!"
self.end()
gcompris.end_board()
else:
self.newGame()
def config(self):
print("Gcompris_connect4 config.")
pass
def key_press(self, keyval, commit_str, preedit_str):
print("Gcompris_connect4 key press. %i" % keyval)
self.timericon.gnomecanvas.hide()
return False
def pause(self, pause):
print("Gcompris_connect4 pause.")
pass
# Called by gcompris when the user click on the level icon
def set_level(self, level):
......@@ -177,6 +172,7 @@ class Gcompris_connect4:
self.player2 = minmax.MinMax(self.gcomprisBoard.level, self.refreshScreen)
self.board = board.Board()
self.gamewon = False
self.machineHasPlayed = True
self.winLine = None
try:
del self.redLine
......@@ -189,11 +185,10 @@ class Gcompris_connect4:
if event.type == gtk.gdk.BUTTON_PRESS:
if event.button == 1 and self.gamewon == False and self.machineHasPlayed:
column = int((event.x - (gcompris.BOARD_WIDTH-self.boardSize)/2.0) // self.stoneSize)
#print "columnItemEvent", column
if not (column < 0 or column > (self.nbColumns-1)):
gcompris.bar_hide(True)
if self.play(self.player1, 1, column):
if self.gamewon == False:
if self.winnercall == None:
self.timericon.gnomecanvas.show()
self.endAnimCallback = self.machinePlay
self.machineHasPlayed = False
......@@ -207,9 +202,9 @@ class Gcompris_connect4:
self.machinePlay()
def machinePlay(self):
print "ai starts"
# ai starts
self.play(self.player2, 2, 0)
print "ai ends"
# ai ends
self.timericon.gnomecanvas.hide()
self.prof.hide()
self.endAnimCallback = self.machinePlayed
......@@ -232,9 +227,9 @@ class Gcompris_connect4:
self.winLine = rules.isWinner(self.board, numPlayer)
if self.winLine:
self.winner(numPlayer)
self.winnercall = lambda : self.winner(numPlayer)
elif rules.isBoardFull(self.board):
self.winner(0)
self.winnercall = lambda : self.winner(0)
return True
gcompris.bar_hide(False)
......@@ -264,12 +259,15 @@ class Gcompris_connect4:
self.stone.set_property('y', y + (self.boardSize/self.nbColumns))
self.timerAnim = gtk.timeout_add(200, self.animTimer)
else:
if self.winnercall:
self.winnercall()
self.winnercall=None
self.endAnimCallback=None
if self.endAnimCallback:
self.endAnimCallback()
def winner(self, player):
self.gamewon = True
print 'The winner is:', player
# It's a draw, no line to draw
if player == 0:
......
......@@ -9,7 +9,6 @@ setup(
windows = [
{
'script': 'gcompris.py',
'icon_resources': [(1, "gcompris.ico")],
}
],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment