Portal-Zone Gothic-Zone Gothic II-Zone Gothic 3-Zone Gothic 4-Zone Modifikationen-Zone Download-Zone Foren-Zone RPG-Zone Almanach-Zone Spirit of Gothic

 

Ergebnis 1 bis 13 von 13
  1. Beiträge anzeigen #1 Zitieren
    Held Avatar von Teron Gorefiend
    Registriert seit
    Nov 2006
    Ort
    im Alchemielabor
    Beiträge
    5.120
     
    Teron Gorefiend ist offline

    Gothic 1 Installer erstellen

    So ich hatte mal wieder Lust auf G1 und habe mir ne kleine Balance Mod zusammen gebastelt. Bisher kenne ich mit mit G1 eigendlich nicht aus aber items ändern und co. ist ja fast identisch.

    Nun habe ich eine mod datei und eine ini datei erstellt.

    aber was nun?

    Die Installationsdatei (*.exe) erstelle ich in G2 in
    _work\demo\setup.nsi

    aber wie geht das mit einer G1 mod? Ich habe das Forum durchsucht aber irgendwie nur Tutorials für das Erstellen einer DNDR Mod gefunden.

    Schonmal Danke im Vorraus.

  2. Beiträge anzeigen #2 Zitieren
    Knight Avatar von catalinux
    Registriert seit
    Jan 2008
    Beiträge
    1.484
     
    catalinux ist offline
    Just edit that setup.nsi file to fit your needs.
    For example:

    change
    Code:
    InstallDir "$PROGRAMFILES\JoWooD\Gothic II\"
    to
    Code:
    InstallDir "$PROGRAMFILES\Piranha Bytes\Gothic\"
    or to whatever is named the directory Gothic1 is (should be) installed.

    change
    Code:
      !insertmacro g2mod_CreateDirectory "$SMPROGRAMS\JoWooD\Gothic II\Modifikationen"
      CreateShortCut "$SMPROGRAMS\JoWooD\Gothic II\Modifikationen\${MOD_NAME}.lnk" \
        "$INSTDIR\System\GothicStarter.exe" "-game:${MOD_FILE}.ini"
      CreateShortCut "$SMPROGRAMS\JoWooD\Gothic II\Modifikationen\${MOD_NAME} entfernen.lnk" \
    to
    Code:
      !insertmacro g2mod_CreateDirectory "$SMPROGRAMS\Piranha Bytes\Gothic\Modifikationen"
      CreateShortCut "$SMPROGRAMS\Piranha Bytes\Gothic\Modifikationen\${MOD_NAME}.lnk" \
        "$INSTDIR\System\GothicStarter.exe" "-game:${MOD_FILE}.ini"
      CreateShortCut "$SMPROGRAMS\Piranha Bytes\Gothic\Modifikationen\${MOD_NAME} entfernen.lnk" \
    I suppose you can delete the line
    Code:
      !insertmacro g2mod_DeleteFile "$INSTDIR\vdfs_${MOD_FILE}.dmp"
    because vdfs32g.dll for Gothic1 doesn't create a separate .dmp file for every mod.

    Change
    Code:
      !insertmacro g2mod_DeleteFile "$SMPROGRAMS\JoWooD\Gothic II\Modifikationen\${MOD_NAME}.lnk"
      !insertmacro g2mod_DeleteFile "$SMPROGRAMS\JoWooD\Gothic II\Modifikationen\${MOD_NAME} entfernen.lnk"
      ; Werden nur entfernt, falls die Verzeihcnisse leer sind...
      !insertmacro g2mod_RemoveDirectory "$SMPROGRAMS\JoWooD\Gothic II\Modifikationen"
      !insertmacro g2mod_RemoveDirectory "$SMPROGRAMS\JoWooD\Gothic II"
      !insertmacro g2mod_RemoveDirectory "$SMPROGRAMS\JoWooD"
    and replace as before \JoWooD\Gothic II with \Piranha Bytes\Gothic

    And you should delete the whole section concerning PlayerKit

    Code:
      !insertmacro g2mod_InstallPlayerKit
    or change it so your installer will install gothic1_Player_kit.

    Change
    Code:
      IfFileExists "$INSTDIR\System\Gothic2.exe" done
    to
    Code:
      IfFileExists "$INSTDIR\System\Gothic.exe" done
    Change
    Code:
      MessageBox MB_OK|MB_ICONINFORMATION "Wählen Sie das Verzeichnis aus, in welchem sich 'Gothic II - Die Nacht des Raben' 2.6 (deutsch) befindet."
    to
    Code:
      MessageBox MB_OK|MB_ICONINFORMATION "Wählen Sie das Verzeichnis aus, in welchem sich 'Gothic' befindet."
    I don't know if I missed anything. Just read the file and change where necessary. Any tutorial concerning creating an installer for a G2dNdR mod is ok but you must adapt it to G1.

  3. Beiträge anzeigen #3 Zitieren
    Held Avatar von Teron Gorefiend
    Registriert seit
    Nov 2006
    Ort
    im Alchemielabor
    Beiträge
    5.120
     
    Teron Gorefiend ist offline
    I tried but the problrm is that I cant choose the G1 order when installing.

    It automatically selects the G2 Order and when I change it to my G1 order I cant start the installation.

  4. Beiträge anzeigen #4 Zitieren
    Knight Avatar von catalinux
    Registriert seit
    Jan 2008
    Beiträge
    1.484
     
    catalinux ist offline
    Zitat Zitat von Teron Gorefiend Beitrag anzeigen
    I tried but the problrm is that I cant choose the G1 order when installing.

    It automatically selects the G2 Order and when I change it to my G1 order I cant start the installation.
    Have you made the necessary changes also in g2mod.nsh?

    look for

    Code:
      StrCpy $R1 "JoWooD\Gothic II\$R1"
    Geändert von catalinux (29.03.2015 um 19:03 Uhr)

  5. Beiträge anzeigen #5 Zitieren
    Knight Avatar von catalinux
    Registriert seit
    Jan 2008
    Beiträge
    1.484
     
    catalinux ist offline
    The problem is g2mod.nsh, with the function

    Code:
    Function g2mod_GetInstallVersion
    And I don't know how to make the script to recognize the Gothic.exe version (the Gothic 1 executable)

    So I removed all reference to this function, and the installer work, only that the installer can't say if there is really a Gothic.exe, so it will install the mod anyplace the user will point to. But I think this is the behaviour of all installers of Gothic 1 mods?

    I included in an attachement the modified script files and the resulted installer, if you want to verify if it works.
    Note that I modified the paths in the setup.nsi, so it will look for the needed files in the current directory.

    (I don't understand from g2mod.nsh how the script finds the Gothic executable version. I would love to find out...)
    Angehängte Dateien

  6. Homepage besuchen Beiträge anzeigen #6 Zitieren
    Ritter Avatar von MaGoth
    Registriert seit
    May 2007
    Ort
    Russland (Samara)
    Beiträge
    1.407
     
    MaGoth ist offline
    catalinux,

    Try this file: GOTHIC1.rar, I changed it a few moments, everything should work correctly in the original script.
    Important: Before using the file, change it from encoding to ANSI.


    MfG MaGoth,
    |: WOG.de :|: WOG.en :|: WOG.ru :|: WOG.ro :|||: MAGIC-Team :|
    [Bild: 106462_941c3dcc88ff9e9b5597d9f24d9aea88.jpg]
    |: WOR.de :|: WOR.en :|: WOR.ru :|: WOR.ro :|||: Piranha-Bytes :|
    -=GOTHIC UND DIE FREUNDSCHAFT FÜR ALLE ZEITEN!=-

  7. Beiträge anzeigen #7 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.410
     
    NicoDE ist offline
    Shouldn't it just check for the "<gothic1>\System\GothicMod.exe"?


    IIRC, I introduced useful version information resources with G2 and the updated G1-Player-Kit.
    Back in the days G1 MOD installers were just checking the size of the German 1.08 Gothic.exe (8580524) and/or of the 1.08k_mod Player-Kit GothicMod.exe (8518352).
    (the first one is the reason why the dummy Gothic.exe in the G1-Player-Kit is exactly 8580524 bytes in size...)

    ps: G1-Mods should not install the Player-Kit (for several reasons, e.g. I plan to release an update in the next months).
    ps: G1-Modifikationen sollten das Player-Kit nicht installieren (aus verschiedenen Gründen, u.a. weil ich plane in den nächsten Monaten eine aktualisierte Version zu veröffentlichen).
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor
    Geändert von NicoDE (30.03.2015 um 09:35 Uhr)

  8. Beiträge anzeigen #8 Zitieren
    now also in your universe  Avatar von Milky-Way
    Registriert seit
    Jun 2007
    Beiträge
    15.244
     
    Milky-Way ist offline
    Is there a preferable solution or set of instructions at the moment? If so, I'd like to link them in the Editing FAQ tutorial on creating an installer.

  9. Beiträge anzeigen #9 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.410
     
    NicoDE ist offline
    Zitat Zitat von Milky-Way Beitrag anzeigen
    Is there a preferable solution or set of instructions at the moment?
    Skip the whole version checks and just test if the <gothic1>System\GothicMod.exe exists:
    Code:
    Function .onVerifyInstDir
    	IfFileExists $INSTDIR\System\GothicMod.exe +2
    		Abort
    FunctionEnd
    Well, there should be a hint that the Player-Kit is required and for maximum user convenience there should be a link (adding links to the setup GUI is another story).
    Don't test anything else (size, version, hash, ...) - it might/will trigger false positives over the years.

    ps: One might think about enabling AllowRootDirInstall (in the past some users installed Gothic into the root of a mapped and/or virtual drive).
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor

  10. Beiträge anzeigen #10 Zitieren
    Held Avatar von Teron Gorefiend
    Registriert seit
    Nov 2006
    Ort
    im Alchemielabor
    Beiträge
    5.120
     
    Teron Gorefiend ist offline
    can't be that hard to create a G1 mod exe ???

    I mean there are several gothic1 modifications and they created an installion file somehow.

  11. Beiträge anzeigen #11 Zitieren
    now also in your universe  Avatar von Milky-Way
    Registriert seit
    Jun 2007
    Beiträge
    15.244
     
    Milky-Way ist offline
    Most old ones actually use a self-extracting archive, but nowadays we have higher expectations. Installers for G1 are often created by people who really know what they are doing. I am not aware of instructions as simple as those for G2 (that don't really require any knowledge of NSIS). Personally, I have never tried to make one for G1, and never really looked into the details.

  12. Beiträge anzeigen #12 Zitieren
    Knight Avatar von catalinux
    Registriert seit
    Jan 2008
    Beiträge
    1.484
     
    catalinux ist offline
    Thanks to the excellent answer nicoDE gave us,
    Code:
    Function .onVerifyInstDir
    	IfFileExists $INSTDIR\System\GothicMod.exe +2
    		Abort
    FunctionEnd
    the problem is solved. I managed to make a installer that will install only if the user will point to a Gothic directory that actually contains a GothicMod.exe
    I included the function
    Code:
    .onVerifyInstDir
    just before
    Code:
    Function g2mod_GetInstallLocation
    in the .nsh file, and it works.
    In the attachement are the two files .nsh and .nsi. I don't know if I managed to remove all the obsole functions and calls about playerkit and exe/dll size or version because I don't understand much of the code NSIS works with, but it's a good start I suppose and above all it works!

    Maybe someone will better knowledge will clean the code so Milky-Way could do that entry in the Editing FAQ?
    Angehängte Dateien

  13. Beiträge anzeigen #13 Zitieren
    Held Avatar von Teron Gorefiend
    Registriert seit
    Nov 2006
    Ort
    im Alchemielabor
    Beiträge
    5.120
     
    Teron Gorefiend ist offline
    thank you, it is working.

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
Impressum | Link Us | intern
World of Gothic © by World of Gothic Team
Gothic, Gothic 2 & Gothic 3 are © by Piranha Bytes & Egmont Interactive & JoWooD Productions AG, all rights reserved worldwide