Browse Source

atari: enable apptype directive, and change exe extension when compiling a GUI app

git-svn-id: trunk@35215 -
Károly Balogh 8 years ago
parent
commit
95274c1d7b
2 changed files with 7 additions and 2 deletions
  1. 1 1
      compiler/scandir.pas
  2. 6 1
      compiler/systems/t_atari.pas

+ 1 - 1
compiler/scandir.pas

@@ -284,7 +284,7 @@ unit scandir;
         if not (target_info.system in systems_all_windows + [system_i386_os2,
         if not (target_info.system in systems_all_windows + [system_i386_os2,
                                        system_i386_emx, system_powerpc_macos,
                                        system_i386_emx, system_powerpc_macos,
                                        system_arm_nds, system_i8086_msdos,
                                        system_arm_nds, system_i8086_msdos,
-                                       system_i8086_embedded] +
+                                       system_i8086_embedded, system_m68k_atari] +
                                        systems_nativent) then
                                        systems_nativent) then
           begin
           begin
             if m_delphi in current_settings.modeswitches then
             if m_delphi in current_settings.modeswitches then

+ 6 - 1
compiler/systems/t_atari.pas

@@ -214,15 +214,20 @@ var
   CmdStr  : TCmdStr;
   CmdStr  : TCmdStr;
   StripStr: string[40];
   StripStr: string[40];
   DynLinkStr : string;
   DynLinkStr : string;
+  ExeName: string;
 begin
 begin
   StripStr:='';
   StripStr:='';
   if (cs_link_strip in current_settings.globalswitches) then StripStr:='-s';
   if (cs_link_strip in current_settings.globalswitches) then StripStr:='-s';
 
 
+  ExeName:=current_module.exefilename;
+  if apptype = app_gui then
+    Replace(ExeName,target_info.exeext,'.prg');
+
   { Call linker }
   { Call linker }
   SplitBinCmd(Info.ExeCmd[1],BinStr,CmdStr);
   SplitBinCmd(Info.ExeCmd[1],BinStr,CmdStr);
   binstr:=FindUtil(utilsprefix+BinStr);
   binstr:=FindUtil(utilsprefix+BinStr);
   Replace(cmdstr,'$OPT',Info.ExtraOptions);
   Replace(cmdstr,'$OPT',Info.ExtraOptions);
-  Replace(cmdstr,'$EXE',maybequoted(ScriptFixFileName(current_module.exefilename)));
+  Replace(cmdstr,'$EXE',maybequoted(ScriptFixFileName(ExeName)));
   Replace(cmdstr,'$RES',maybequoted(ScriptFixFileName(outputexedir+Info.ResName)));
   Replace(cmdstr,'$RES',maybequoted(ScriptFixFileName(outputexedir+Info.ResName)));
   Replace(cmdstr,'$FLAGS','-tos-flags fastload,fastram');
   Replace(cmdstr,'$FLAGS','-tos-flags fastload,fastram');
   Replace(cmdstr,'$STRIP',StripStr);
   Replace(cmdstr,'$STRIP',StripStr);