Laden...

Installationsdatei mit XNA 2 und .NET 3

Erstellt von ANSI_code vor 15 Jahren Letzter Beitrag vor 15 Jahren 2.718 Views
ANSI_code Themenstarter:in
467 Beiträge seit 2007
vor 15 Jahren
Installationsdatei mit XNA 2 und .NET 3

1 Frage: wenn man .NET 3 hat, gehen doch .NET 2 Progrme auch, oder? (bin mir sogar ziemlich sicher)
Ihc würde mir gerne verschiedene Artikel darüber durchlesen, (werde ich auch tun, also nichts gegen Links), aber ich muss die Datei leider bis morgen(also eig. heute noch) haben. Kann mir jemand ein einfache Möglichkeit(InstallationsDateiEditor, od. so) nennen, die mein Programm in einen Ordner koppiere, dann .NET 3 Runtime installiere, wobei ich die Datei gerne mit reinpacken würde, die Lizens davon dann auch noch anzeigen, das sellbe mit XNA, natürlich vorher überprüfen ob nicht schon drauf. Am Ende vielleicht noch Desktopverknüpfung, muss aber nicht unbedingt sein. Ich hoffe sowas ist in der kurzen Zeit möglich. Dieses Forum zeichnet sich ja dadurch aus, dass man sehr schnell ein Antwort bekommt. Und bitte, wenn es irgend ein Script dafür bedarf, ich werde wahrscheinlich nicht an einem Tag eine solche Scriptsprache lernen können. Vielen Dank im Voraus.

ANSI_code Themenstarter:in
467 Beiträge seit 2007
vor 15 Jahren

ist es möglich mit "nullsoft scriptable install system" auf bestimmte Runtimes zuprüfen, und diese falls nötig zu installieren?
(schade, dass ich kein c++ mehr kann(alles vergessen), dann könnte ich mir eine Installdatei selber progen, die nur das .NET Framework installiert, und dann würde mein Programm den rest selber machen)

691 Beiträge seit 2007
vor 15 Jahren

Kann mir jemand ein einfache Möglichkeit(InstallationsDateiEditor, od. so) nennen, die mein Programm in einen Ordner koppiere,

Und bitte, wenn es irgend ein Script dafür bedarf, ich werde wahrscheinlich nicht an einem Tag eine solche Scriptsprache lernen können. Vielen Dank im Voraus.

Setups kannst du z.B. mit NSIS relativ einfach installieren, auch mit Lizenzanzeige, Deinstaller etc.

http://nsis.sourceforge.net/Main_Page

http://nsis.sourceforge.net/Simple_tutorials

//edit: Zum Framework gibts es dort auch Beispielseiten: http://nsis.sourceforge.net/DotNET

mit freundlichen Grüßen,
Tomot

Projekte: www.gesellschaftsspieler-gesucht.de

ANSI_code Themenstarter:in
467 Beiträge seit 2007
vor 15 Jahren

oh mein Gott. Das ist ja noch viel komplizierter als C#. Ich werde es mir wohl alles durchlesen müssen, aber mit meinen Englischkenntnissen habe ich das Ding dann spätestens in 3 Wochen, das ist zu spät.
Kann mir vielleicht jemand eine Form ein Script zeigen, wo XNA und .NET 3 installiert werden, und das nicht aus dem Internet, wie in dem Link(man darf doch die Intalldatei vom Framework mit reinstecken, oder? Und das geht doch, oder?)
Ich glaube das mit dem Filecopieren schaffe ich jetzt bereits. Hoffentlich schaffe ich es noch rechtzeitig. Auf Morgen wid´s wohl nichts mehr, aber vielleicht bis Freitag? Das Wäre dann der Totestermin.

ANSI_code Themenstarter:in
467 Beiträge seit 2007
vor 15 Jahren

ich kriege einfach kein Funktionierendes Script hin. Der "File" Befehl kopiert die Dateien in die Installdatei? Meine Englisch kenntnisse sind leider noch etwas wankend, und die Fehlermeldungen des Compilers haben ungefähr die Aussagekraft von "Fehler Zeile 7", dabei bin ich sogar unsicher ob der die Kommentare mitrechnet. Muss man das Teil irgenwie bestimmt anfangen?

ANSI_code Themenstarter:in
467 Beiträge seit 2007
vor 15 Jahren

ich will mit dem File Befehl alles(auch unterordner) einbinden, was in einem Ordner enthalten ist.
warum geht das so nicht?

File /r /x C:\Projekt\Content

Anleitung die ich offenbar nicht ganz verstehe:

4.9.1.5 File
[/nonfatal] [/a] ([/r] [/x file|wildcard [...]] (file|wildcard) [...] | /oname=file.dat infile.dat)
Adds file(s) to be extracted to the current output path ($OUTDIR).

Note that the output file name is $OUTDIR\filename_portion_of_file.
Use /oname=X switch to change the output name. X may contain variables and can be a fully qualified path or a relative path in which case it will be appended to $OUTDIR set by SetOutPath. When using this switch, only one file can be specified. If the output name contains spaces, quote the entire parameter, including /oname, as shown in the examples below.
Wildcards are supported.
If the /r switch is used, matching files and directories are recursively searched for in subdirectories. If just one path segment is specified (e.g. File /r something), the current directory will be recursively searched. If more than one segment is specified (e.g. File /r something*.*), the last path segment will be used as the matching condition and the rest for the directory to search recursively. If a directory name matches, all of its contents is added recursively. Directory structure is preserved.
Use the /x switch to exclude files or directories.
If the /a switch is used, the attributes of the file(s) added will be preserved.
The File command sets the error flag if overwrite mode is set to 'try' and the file could not be overwritten, or if the overwrite mode is set to 'on' and the file could not be overwritten and the user selects ignore.
If the /nonfatal switch is used and no files are found, a warning will be issued instead of an error.
File something.exe
File /a something.exe
File *.exe
File /r .dat
File /r data
File /oname=temp.dat somefile.ext
File /oname=$TEMP\temp.dat somefile.ext
File "/oname=$TEMP\name with spaces.dat" somefile.ext
File /nonfatal "a file that might not exist"
File /r /x CVS myproject*.

File /r /x *.res /x *.obj /x .pch source*.
Note: when using the /r switch, both matching directories and files will be searched. This is always done with or without the use of wildcards, even if the given path perfectly matches one directory. That means, the following directory structure:

<DIR> something
file.dat
another.dat
<DIR> dir
something
<DIR> dir2
file2.dat
<DIR> another
<DIR> something
readme.txt
with the following File usage:

File /r something
will match the directory named something on the root directory, the file named something in the directory named dir and the directory named something in the directory named another. To match only the directory named something on the root directory, use the following:

File /r something*.*
When adding *.*, it will be used as the matching condition and something will be used as the directory to search. When only something is specified, the current directory will be recursively searched for every and directory named something and another\something will be matched.

und warum geht das nicht?

MessageBox MB_YESNO "wollen Sie Das .NET Framework Verision 3.0 Restibutable installieren? Es wird zur ausführung des Programms benötigt und auf Windows Vista bereits vorhanden. Drücken Sie nur ""Nein"", wenn Sie sicher sind, dass es auf Ihrem System bereits vorhanden ist, sonst wird das Programm nicht funktionieren." IDNO false 



File C:\Projekt\dotnetfx3setup.exe
  DetailPrint "Installationsvorgang wird gestartet"
  File C:\Projekt\dotnetfx3setup.exe
  ExecWait '"$INSTDIR\dotnetfx3setup.exe"'

false:

Fehlermeldung(sagt wie man es richtig machen soll)

Usage: MessageBox mode messagebox_text [/SD return] [return_check label_to_goto_if_equal [return_check2 label2]]
mode=modeflag[|modeflag[|modeflag[...]]]
modeflag=(MB_ABORTRETRYIGNORE|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_YESNO|MB_YESNOCANCEL|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_USERICON|MB_TOPMOST|MB_SETFOREGROUND|MB_RIGHT

ANSI_code Themenstarter:in
467 Beiträge seit 2007
vor 15 Jahren

auch wenn das offenbar keinen interessiert: ich habe jetzt eine einigermaßend funktionierende Lösung.

Name "Space_In_Vision"

OutFile "Space_In_Vision_Setup.exe"
InstallDir $PROGRAMFILES\Space_In_Vision

Page directory
Page custom InstallRuntimes
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles

Section ""
  SetOutPath $INSTDIR
  File C:\Projekt\Space_In_Vision.exe
  File C:\Projekt\Highscores.txt
  File /r C:\Projekt\Content


  WriteUninstaller $INSTDIR\uninstall.exe
SectionEnd

Section "Uninstall"
  Delete  "$INSTDIR\Highscores.txt"
  Delete  "$INSTDIR\Space_In_Vision.exe"
  RMDIR /r "$INSTDIR\Content"
  Delete "$INSTDIR\uninstall.exe"
  RMDir $INSTDIR
SectionEnd


Function InstallRuntimes

SetOutPath $INSTDIR
MessageBox MB_YESNO "wollen Sie Das .NET Framework Verision 3.0 Restibutable installieren? Es wird zur ausführung des Programms benötigt und auf Windows Vista bereits vorhanden. Drücken Sie nur Nein, wenn Sie sicher sind, dass es auf Ihrem System bereits vorhanden ist, sonst wird das Programm nicht funktionieren." IDNO noinstall

  MessageBox MB_OK "Installationsvorgang wird gestartet"
  File  C:\Projekt\dotnetfx3setup.exe
  ExecWait '"$INSTDIR\dotnetfx3setup.exe"'
  Delete $INSTDIR\dotnetfx3setup.exe

noinstall:

MessageBox MB_YESNO "wollen Sie Das XNA Framework Verision 2.0 Restibutable installieren? Es wird zur ausführung des Programms benötigt. Drücken Sie nur Nein, wenn Sie sicher sind, dass es auf Ihrem System bereits vorhanden ist" IDNO noinstall2

File C:\Projekt\xnafx20_redist.msi
  MessageBox MB_OK "Installationsvorgang wird gestartet"
  ;ExecWait '"$INSTDIR\xnafx20_redist.msi"'
ExecWait 'msiexec.exe /qb /i "$INSTDIR\xnafx20_redist.msi"'
  Delete $INSTDIR\xnafx20_redist.msi
noinstall2:

FunctionEnd