Announcement

Collapse
No announcement yet.

Handy Polishing Tips After Packaging Your Final Build

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Handy Polishing Tips After Packaging Your Final Build

    Handy Polishing Tips After Packaging Your Final Build


    This tutorial/advice assumes that you have just packaged the final build of your game via Unreal Frontend and
    want to make your beautiful piece of artwork look really pro when you give it out to someone to play. Some of these points will require
    that you package your game and then install your packaged game on your PC.



    This is what we're going to cover:
    - Changing the name of your EXE
    - Changing the icon of your EXE
    - Extras
    - Creating a custom installer (Using NullSoft)




    ---------------------

    CHANGE THE NAME OF YOUR EXE

    Instead of keeping your game called UDK.exe, this is a very simple and effective tip to make your game look professional.

    - Start off by installing your packaged build to your computer.
    - Locate UDK.exe in your game's install folder (example: C:\MYGAME\Binaries\Win32).
    - There will be 3 files here called UDK (an Application file), UDK (an MS-DOS file), and UDK.exe (an XML file).
    - Rename all of these files to your game name. (example: MyGame (an Application file), MyGame (an MS-DOS file), and MyGame.exe (an XML file)).
    - Repeat these steps in the C:\MYGAME\Binaries\Win64 folder if applicable.

    Click image for larger version

Name:	udkfiles.jpg
Views:	1
Size:	65.8 KB
ID:	3253497
    Click image for larger version

Name:	mygamefiles.jpg
Views:	1
Size:	63.4 KB
ID:	3253496



    ---------------------

    CHANGE THE ICON OF YOUR EXE

    Wouldn't you rather have your customized logo stamped on your game's exe? Of course you would! The more places you can put your logo, the better!
    Follow these simple steps to changing the icon of your game's exe.

    Icon Changer 1.0.0.0 allows free icon changes. You can download it here: http://www.softpedia.com/progDownloa...ad-190309.html

    - Again, you would start off by having an installed packaged build to your computer.
    - Open the software, select your custom-made icon and open.
    - Select your installed game's EXE in the newly opened window and hit Open. (example: C:\MYGAME\Binaries\Win32\MyGame)
    - Hit Change Now. That's it!


    ---------------------

    EXTRAS

    REMOVE ANY LOG FILES


    Ensure you remove any log files after testing out your installed build. If people playing your game has issues and sends you an old log file that actually
    originated from you testing the game then things can get rather confusing.


    ---------------------

    CHANGING YOUR GAME NAME IN THE WINDOWS BAR

    This does not require you to have already packaged your game, this can be done in your working folder.
    When running your game in windowed mode you will see Unreal Development Kit in the window's title bar, you can change this rather easily by
    opening the following file:
    - C:\UDK\UDK-2012-11\UDKGame\Config\DefaultEngineUDK.ini
    - Find line 35 & 36 called GameName & GameNameShort.
    - Change these to your actual game name. (example: GameName=MyGame, GameNameShort=MyGame)


    ---------------------

    CREATING A CUSTOM INSTALLER (USING NULLSOFT)

    It took me a while to get to grips with Nullsoft's script system though after I figured out a few functions it was great to see things working, and
    Nullsoft really does work well. I will help you through a very simple method of using the Nullsoft custom installer tools so make sure you go
    download them from here before we begin: http://nsis.sourceforge.net/Download

    - Download and install NSIS (Nullsoft Scriptable Install System)
    - Download this script file : HERE (Unzip It!) : and place it in your NSIS install folder here: C:\Program Files (x86)\NSIS\Contrib\zip2exe - BACKUP YOUR ORIGINAL FILE FIRST!
    - Open the script file with NotePad and scroll to the bottom.

    Here you will see where I customized this script for MyGame. Here you can edit what you need to for your game. Let's go through some areas together:

    MAKE SURE YOU REPLACE EVERY INSTANCE OF 'COMPANYNAME' AND 'MyGame' WITH YOUR OWN IN EVERY PART OF THIS TUTORIAL!

    ==============
    CREATE THE SHORTCUTS
    Code:
    Section "Create Shortcuts"
            SetShellVarContext all
            AccessControl::GrantOnFile "$INSTDIR" "(S-1-5-32-545)" "FullAccess"
            CreateShortCut "$SMPROGRAMS\COMPANYNAME\MyGame.lnk" "$INSTDIR\Binaries\Win32\MyGame.exe"
            CreateShortCut "$DESKTOP\MyGame.lnk" "$INSTDIR\Binaries\Win32\MyGame.exe"
            WriteUninstaller "$INSTDIR\uninstall.exe"
            WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\COMPANYNAME\MyGame" "DisplayName" "MyGame"
            WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\COMPANYNAME\MyGame" "UninstallString" "$INSTDIR\uninstall.exe"
    SectionEnd

    This allows the installer full read and write commands, this is required.
    Code:
    SetShellVarContext all
    AccessControl::GrantOnFile "$INSTDIR" "(S-1-5-32-545)" "FullAccess"

    The area below defines where we want to place shortcuts and where those shortcuts will direct to after the game has installed. So first we have it
    creating a shortcut to the Start Menu > All Programs > Toxic Games folder and pointing that to the game's install directory and .exe. The second command
    creates a shortcut on the desktop and directs to the game's install directory and .exe again.
    Code:
    CreateShortCut "$SMPROGRAMS\COMPANYNAME\MyGame.lnk" "$INSTDIR\Binaries\Win32\MyGame.exe"
    CreateShortCut "$DESKTOP\MyGame.lnk" "$INSTDIR\Binaries\Win32\MyGame.exe"

    This writes the uninstaller.
    Code:
    WriteUninstaller "$INSTDIR\uninstall.exe"

    This area writes the registry keys (though I don't think it's correct!).
    Code:
    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\COMPANYNAME\MyGame" "DisplayName" "MyGame"
    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\COMPANYNAME\MyGame" "UninstallString" "$INSTDIR\uninstall.exe"

    ==============
    INSTALL PRE-REQUISITES
    Code:
    Section "Redistributable Prerequisites"
            SetShellVarContext all
            AccessControl::GrantOnFile "$INSTDIR" "(S-1-5-32-545)" "FullAccess"
            DetailPrint "Starting the Redistributable Prerequisites Setup..."
            ExecWait "$INSTDIR\Binaries\Redist\UE3Redist.exe"
    SectionEnd

    ==============
    THE UNINSTALLER
    Basically tell it what to uninstall.
    Code:
    Section "Uninstall"
            SetShellVarContext all
            Delete "$SMPROGRAMS\COMPANYNAME\MyGame\MyGame.lnk"
            Delete "$DESKTOP\MyGame.lnk"
            RMDir /r "$SMPROGRAMS\COMPANYNAME"
            RMDir /r "$INSTDIR"
            Delete $INSTDIR\uninstall.exe
    SectionEnd


    =====================

    ACCESS CONTROL PLUGIN:
    NOTE: Here are the Full Access Control plugin files required for this script to compile successfully:

    http://dl.dropboxusercontent.com/u/2...essControl.zip

    - UnZip/RAR and place these files into your NSIS directory.

    This plugin is required for the installer to gain full read/write access to the installation directory.
    =====================




    There are lots of documention and tutorials online for NSIS if you wanted to dig deeper into the installer, but what I've
    outlined here for you is a pretty good starting point.

    So now that we've quickly gone through the most basic areas for NSIS let's make the installer!


    - To begin, ensure you have an installed packaged build of your game on your computer. (Package the game from Frontend, Install it on your computer)
    - Make any of the above changes to the icon and exe etc.
    - Locate your newly installed game, select the Binaries, Engine, UDKGame folders, right click and compress your installed game contents into a .ZIP.
    - Open NSIS and click 'Installer based on ZIP file', select you game's .ZIP and wait for it to allocate the files.
    - Specify the Installer Name.
    - Specify the Default Folder (usually something like $PROGRAMFILES\COMPANYNAME\ to ensure it ties in with the scripts)
    - Specify where you want the custom installer to be created.
    - Hit Generate.



    That's it!




    I hope this will be helpful to some folks.


    Thanks,
    ZeJudge

    #2
    It's actually quite useful tips. Especially the nullsoft guide. I got it a couple years back but never spent the time to figure it out and just let it go. It would be extra useful for user DLLs and external tools we might use.

    Thanks for the post. I'm sure it'll be helpful to a lot of guys out there as well.

    Comment


      #3
      Thanks, I'm glad you find some of it helpful. Hopefully others will find it helpful too!

      Comment


        #4
        Yea, those are awesome tips

        Comment


          #5
          The setup won't run the UE3Redist.exe and won't create any shortcut or uninstaller.
          Can someone help me with it? So ist useless on a PC without installed UDK =/

          Comment


            #6
            @vesta:
            If you followed the instructions carefully it should work, the main reason I think why it isn't creating the shortcuts and uninstaller for you may be due to what you specify your Default Folder to be in the Zip2Exe application (the final step) or if you Zipped your game files inside another folder. So try navigating to your installed game directory and select all of your folders: Binaries, Engine, UDKGame right click and compress into a zip file and then try repeating the above steps.

            It may take a little experimenting to get it correct.

            Comment


              #7
              can this be used to also update the game later on????

              Comment


                #8
                Of course! You wouldn't even need the script I provided for that. You'd just add the updated packages/levels/shaders in the UDKGame/CookedPC folder into a .zip rather than the entire game and instruct the user to install to their game directory.

                Comment


                  #9
                  I made a working setup with Inno Setup now.
                  The script:

                  Code:
                  #define MyAppName "GameName"
                  #define MyAppVersion "1.0"
                  #define MyAppPublisher "MyStudio"
                  #define MyAppURL "http://www.myurl.com/"
                  #define MyAppExeName "mygame.exe"
                  
                  [Setup]
                  ; NOTE: The value of AppId uniquely identifies this application.
                  ; Do not use the same AppId value in installers for other applications.
                  ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
                  AppId={{5A06F0F8-D493-4859-9044-F44B24C3885B}
                  AppName={#MyAppName}
                  AppVersion={#MyAppVersion}
                  ;AppVerName={#MyAppName} {#MyAppVersion}
                  AppPublisher={#MyAppPublisher}
                  AppPublisherURL={#MyAppURL}
                  AppSupportURL={#MyAppURL}
                  AppUpdatesURL={#MyAppURL}
                  DefaultDirName={pf}\{#MyAppName}
                  DefaultGroupName={#MyAppName}
                  OutputDir=D:\
                  OutputBaseFilename=mygame-setup
                  Compression=lzma
                  SolidCompression=yes
                  
                  [Languages]
                  Name: "english"; MessagesFile: "compiler:Default.isl"
                  
                  [Tasks]
                  Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
                  
                  [Files]
                  Source: "D:\UDK\MyGame\Binaries\Win32\mygame.exe"; DestDir: "{app}"; Flags: ignoreversion
                  Source: "D:\UDK\MyGame\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
                  
                  
                  ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
                  
                  [Icons]
                  Name: "{group}\{#MyAppName}"; Filename: "{app}\Binaries\Win32\{#MyAppExeName}"
                  Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\Binaries\Win32\{#MyAppExeName}"; Tasks: desktopicon
                  
                  [Run]
                  Filename: "{app}\Binaries\Redist\UE3Redist.exe"; Description: "Install UE3Redist"; Flags: skipifsilent

                  Comment


                    #10
                    Ah thanks for the share! This will be helpful to a lot of people!

                    Comment


                      #11
                      No Problem.
                      But i have another Problem. Installation on Dev PC is working fine but the game crashes on other PC's with this Log

                      Code:
                      [0006.21] Critical: appError called: Assertion failed: i>=0 && (i<ArrayNum||(i==0 && ArrayNum==0)) [File:d:\depot\unrealengine3-udk\development\src\core\inc\Array.h] [Line: 581]
                      
                      Stack: Address = 0xf41f39 (filename not found) [in D:\Program Files (x86)\Revenge of the Fallen - Alpha Demo\Binaries\Win32\RotF.exe]
                      
                      [0006.21] Critical: Windows GetLastError: Der Vorgang wurde erfolgreich beendet. (0)
                      [0008.93] Log: === Critical error: ===
                      Assertion failed: i>=0 && (i<ArrayNum||(i==0 && ArrayNum==0)) [File:d:\depot\unrealengine3-udk\development\src\core\inc\Array.h] [Line: 581]
                      
                      Stack: Address = 0xf41f39 (filename not found) [in D:\Program Files (x86)\Revenge of the Fallen - Alpha Demo\Binaries\Win32\RotF.exe]
                      
                      
                      System.Runtime.InteropServices.SEHException error in UDK:
                      
                      Eine externe Komponente hat eine Ausnahme ausgelöst.
                      
                      bei GuardedMainWrapper(Char* , HINSTANCE__* , HINSTANCE__* , Int32 )
                      bei ManagedGuardedMain(Char* CmdLine, HINSTANCE__* hInInstance, HINSTANCE__* hPrevInstance, Int32 nCmdShow)Address = 0x7574c41f (filename not found) [in C:\Windows\syswow64\KERNELBASE.dll]
                      Address = 0xfa8c31 (filename not found) [in D:\Program Files (x86)\Revenge of the Fallen - Alpha Demo\Binaries\Win32\RotF.exe]
                      Address = 0xfe3ab3 (filename not found) [in D:\Program Files (x86)\Revenge of the Fallen - Alpha Demo\Binaries\Win32\RotF.exe]
                      Any ideas wats the Problem with the installer? Have the same problem with the NSIS Installer. If i Install the Frontend Build installer the game is running fine o_0

                      Comment


                        #12
                        I'm unfamiliar with Inno Setup so I may not be able to help you much there.

                        Is it possible you didn't package all required the files into the Inno Setup?

                        Remember to install the game from the frontend installer first, then take those files and slap them into the custom installer.

                        Comment


                          #13
                          Originally posted by ZeJudge View Post
                          I'm unfamiliar with Inno Setup so I may not be able to help you much there.

                          Is it possible you didn't package all required the files into the Inno Setup?

                          Remember to install the game from the frontend installer first, then take those files and slap them into the custom installer.
                          I tried NSIS again but i get an error while generating.
                          Code:
                          Processing config: F:\Program Files (x86)\NSIS\nsisconf.nsh
                          Processing script file: "C:\Users\Daniel\AppData\Local\Temp\zne6038.tmp" (ACP)
                          Invalid command: AccessControl::GrantOnFile
                          !include: error in script: "F:\Program Files (x86)\NSIS\Contrib\zip2exe\Base.nsh" on line 28
                          Error in script "C:\Users\Daniel\AppData\Local\Temp\zne6038.tmp" on line 6 -- aborting creation process
                          (source ZIP size was 911438277 bytes)
                          You think it's possible that you can help me with this problem via steam/skype/teamviewer?
                          It's getting very frustrating ...

                          Comment


                            #14
                            It's stating theres a problem on line 28 of the Base.nsh file, can you copy and paste that here to see what the problem is?

                            Comment


                              #15
                              Originally posted by ZeJudge View Post
                              It's stating theres a problem on line 28 of the Base.nsh file, can you copy and paste that here to see what the problem is?
                              Since i have the same error, i will post it

                              Function zip2exe.SetOutPath
                              AccessControl::GrantOnFile "$INSTDIR" "(S-1-5-32-545)" "FullAccess"
                              SetOutPath "$INSTDIR"
                              FunctionEnd

                              Seems to be that line, depends how notepad calculates the lines

                              By the way, the script and installer is great. Just need to figure this little thing out and you got a great tool for people

                              Comment

                              Working...
                              X